vendor: 4,113 bytes, lines 1-11
1import{FeatureNotFoundError as e,ChromeStatusHttpError as t}from"./cs-client.js";import{S as i,R as r,a as s}from"./SummarySuggestion-DcUnu0bh.js"; 2/** 3 * @license 4 * Copyright 2019 Google LLC 5 * SPDX-License-Identifier: BSD-3-Clause 6 */const o=globalThis,a=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),l=new WeakMap;let d=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(a&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=l.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&l.set(t,e))}return e}toString(){return this.cssText}};const c=(e,...t)=>{const i=1===e.length?e[0]:t.reduce((t,i,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[r+1],e[0]);return new d(i,e,n)},h=a?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new d("string"==typeof e?e:e+"",void 0,n))(t)})(e):e,{is:u,defineProperty:p,getOwnPropertyDescriptor:f,getOwnPropertyNames:m,getOwnPropertySymbols:g,getPrototypeOf:b}=Object,v=globalThis,y=v.trustedTypes,_=y?y.emptyScript:"",w=v.reactiveElementPolyfillSupport,k=(e,t)=>e,x={toAttribute(e,t){switch(t){case Boolean:e=e?_:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},$=(e,t)=>!u(e,t),S={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:$}; 7/** 8 * @license 9 * Copyright 2017 Google LLC 10 * SPDX-License-Identifier: BSD-3-Clause 11 */Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let C=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=S){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,t);void 0!==r&&p(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){const{get:r,set:s}=f(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){const o=r?.call(this);s?.call(this,t),this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??S}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;const e=b(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){const e=this.properties,t=[...m(e),...g(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(h(e))}else void 0!==e&&t.push(h(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e
vendor: 4,096 bytes, lines 11-17
11=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(a)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const i of t){const t=document.createElement("style"),r=o.litNonce;void 0!==r&&t.setAttribute("nonce",r),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(t,i.type);this._$Em=e,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,t){const i=this.constructor,r=i._$Eh.get(e);if(void 0!==r&&this._$Em!==r){const e=i.getPropertyOptions(r),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:x;this._$Em=r;const o=s.fromAttribute(t,e.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){const r=this.constructor,s=this[e];if(i??=r.getPropertyOptions(e),!((i.hasChanged??$)(s,t)||i.useDefault&&i.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:r,wrapped:s},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==s||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e){const{wrapped:e}=i,r=this[t];!0!==e||this._$AL.has(t)||void 0===r||this.C(t,void 0,i,r)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[k("elementProperties")]=new Map,C[k("finalized")]=new Map,w?.({ReactiveElement:C}),(v.reactiveElementVersions??=[]).push("2.1.1"); 12/** 13 * @license 14 * Copyright 2017 Google LLC 15 * SPDX-License-Identifier: BSD-3-Clause 16 */ 17const E=globalThis,I=E.trustedTypes,T=I?I.createPolicy("lit-html",{createHTML:e=>e}):void 0,A="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,P="?"+R,D=`<${P}>`,O=document,z=()=>O.createComment(""),L=e=>null===e||"object"!=typeof e&&"function"!=typeof e,F=Array.isArray,N="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,U=/>/g,B=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,V=/"/g,H=/^(?:script|style|textarea|title)$/i,W=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}
vendor: 5,656 bytes, line 17
17))(1),G=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),K=new WeakMap,Q=O.createTreeWalker(O,129);function X(e,t){if(!F(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(t):t}let J=class e{constructor({strings:t,_$litType$:i},r){let s;this.parts=[];let o=0,a=0;const n=t.length-1,l=this.parts,[d,c]=((e,t)=>{const i=e.length-1,r=[];let s,o=2===t?"<svg>":3===t?"<math>":"",a=M;for(let t=0;t<i;t++){const i=e[t];let n,l,d=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===M?"!--"===l[1]?a=q:void 0!==l[1]?a=U:void 0!==l[2]?(H.test(l[2])&&(s=RegExp("</"+l[2],"g")),a=B):void 0!==l[3]&&(a=B):a===B?">"===l[0]?(a=s??M,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?B:'"'===l[3]?V:j):a===V||a===j?a=B:a===q||a===U?a=M:(a=B,s=void 0);const h=a===B&&e[t+1].startsWith("/>")?" ":"";o+=a===M?i+D:d>=0?(r.push(n),i.slice(0,d)+A+i.slice(d)+R+h):i+R+(-2===d?t:h)}return[X(e,o+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]})(t,i);if(this.el=e.createElement(d,r),Q.currentNode=this.el.content,2===i||3===i){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=Q.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(A)){const t=c[a++],i=s.getAttribute(e).split(R),r=/([.?@])?(.*)/.exec(t);l.push({type:1,index:o,name:r[2],strings:i,ctor:"."===r[1]?re:"?"===r[1]?se:"@"===r[1]?oe:ie}),s.removeAttribute(e)}else e.startsWith(R)&&(l.push({type:6,index:o}),s.removeAttribute(e));if(H.test(s.tagName)){const e=s.textContent.split(R),t=e.length-1;if(t>0){s.textContent=I?I.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],z()),Q.nextNode(),l.push({type:2,index:++o});s.append(e[t],z())}}}else if(8===s.nodeType)if(s.data===P)l.push({type:2,index:o});else{let e=-1;for(;-1!==(e=s.data.indexOf(R,e+1));)l.push({type:7,index:o}),e+=R.length-1}o++}}static createElement(e,t){const i=O.createElement("template");return i.innerHTML=e,i}};function Z(e,t,i=e,r){if(t===G)return t;let s=void 0!==r?i._$Co?.[r]:i._$Cl;const o=L(t)?void 0:t._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),void 0===o?s=void 0:(s=new o(e),s._$AT(e,i,r)),void 0!==r?(i._$Co??=[])[r]=s:i._$Cl=s),void 0!==s&&(t=Z(e,s._$AS(e,t.values),s,r)),t}let ee=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,r=(e?.creationScope??O).importNode(t,!0);Q.currentNode=r;let s=Q.nextNode(),o=0,a=0,n=i[0];for(;void 0!==n;){if(o===n.index){let t;2===n.type?t=new te(s,s.nextSibling,this,e):1===n.type?t=new n.ctor(s,n.name,n.strings,this,e):6===n.type&&(t=new ae(s,this,e)),this._$AV.push(t),n=i[++a]}o!==n?.index&&(s=Q.nextNode(),o++)}return Q.currentNode=O,r}p(e){let t=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},te=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,r){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Z(this,e,t),L(e)?e===Y||null==e||""===e?(this._$AH!==Y&&this._$AR(),this._$AH=Y):e!==this._$AH&&e!==G&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>F(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Y&&L(this._$AH)?this._$AA.nextSibling.data=e:this.T(O.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,r="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=J.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(t);else{const e=new ee(r,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=K.get(e.strings);return void 0===t&&K.set(e.strings,t=new J(e)),t}k(t){F(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let r,s=0;for(const o of t)s===i.length?i.push(r=new e(this.O(z()),this.O(z()),this,this.options)):r=i[s],r._$AI(o),s++;s<i.length&&(this._$AR(r&&r._$AB.nextSibling,s),i.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},ie=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,r,s){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(e,t=this,i,r){const s=this.strings;let o=!1;if(void 0===s)e=Z(this,e,t,0),o=!L(e)||e!==this._$AH&&e!==G,o&&(this._$AH=e);else{const r=e;let a,n;for(e=s[0],a=0;a<s.length-1;a++)n=Z(this,r[i+a],t,a),n===G&&(n=this._$AH[a]),o||=!L(n)||n!==this._$AH[a],n===Y?e=Y:e!==Y&&(e+=(n??"")+s[a+1]),this._$AH[a]=n}o&&!r&&this.j(e)}j(e){e===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},re=class extends ie{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Y?void 0:e}},se=class extends ie{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Y)}},oe=class extends ie{constructor(e,t,i,r,s){super(e,t,i,r,s),this.type=5}
17_$AI(e,t=this){if((e=Z(this,e,t,0)??Y)===G)return;const i=this._$AH,r=e===Y&&i!==Y||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==Y&&(i===Y||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ae=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Z(this,e)}};const ne={I:te},le=E.litHtmlPolyfillSupport;le?.(J,te),(E.litHtmlVersions??=[]).push("3.3.1");const de=globalThis; 18/** 19 * @license 20 * Copyright 2017 Google LLC 21 * SPDX-License-Identifier: BSD-3-Clause 22 */let ce=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{const r=i?.renderBefore??t;let s=r._$litPart$;if(void 0===s){const e=i?.renderBefore??null;r._$litPart$=s=new te(t.insertBefore(z(),e),e,void 0,i??{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return G}};ce._$litElement$=!0,ce.finalized=!0,de.litElementHydrateSupport?.({LitElement:ce});const he=de.litElementPolyfillSupport;he?.({LitElement:ce}),(de.litElementVersions??=[]).push("4.2.1");var ue=c` 23 :host { 24 --track-width: 2px; 25 --track-color: rgb(128 128 128 / 25%); 26 --indicator-color: var(--sl-color-primary-600); 27 --speed: 2s; 28 29 display: inline-flex; 30 width: 1em; 31 height: 1em; 32 flex: none; 33 } 34 35 .spinner { 36 flex: 1 1 auto; 37 height: 100%; 38 width: 100%; 39 } 40 41 .spinner__track, 42 .spinner__indicator { 43 fill: none; 44 stroke-width: var(--track-width); 45 r: calc(0.5em - var(--track-width) / 2); 46 cx: 0.5em; 47 cy: 0.5em; 48 transform-origin: 50% 50%; 49 } 50 51 .spinner__track { 52 stroke: var(--track-color); 53 transform-origin: 0% 0%; 54 } 55 56 .spinner__indicator { 57 stroke: var(--indicator-color); 58 stroke-linecap: round; 59 stroke-dasharray: 150% 75%; 60 animation: spin var(--speed) linear infinite; 61 } 62 63 @keyframes spin { 64 0% { 65 transform: rotate(0deg); 66 stroke-dasharray: 0.05em, 3em; 67 } 68 69 50% { 70 transform: rotate(450deg); 71 stroke-dasharray: 1.375em, 1.375em; 72 } 73 74 100% { 75 transform: rotate(1080deg); 76 stroke-dasharray: 0.05em, 3em; 77 } 78 } 79`;const pe=new Set,fe=new Map;let me,ge="ltr",be="en";const ve="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(ve){const e=new MutationObserver(_e);ge=document.documentElement.dir||"ltr",be=document.documentElement.lang||navigator.language,e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function ye(...e){e.map(e=>{const t=e.$code.toLowerCase();fe.has(t)?fe.set(t,Object.assign(Object.assign({},fe.get(t)),e)):fe.set(t,e),me||(me=e)}),_e()}function _e(){ve&&(ge=document.documentElement.dir||"ltr",be=document.documentElement.lang||navigator.language),[...pe.keys()].map(e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()})}let we=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){pe.add(this.host)}hostDisconnected(){pe.delete(this.host)}dir(){return`${this.host.dir||ge}`.toLowerCase()}lang(){return`${this.host.lang||be}`.toLowerCase()}getTranslationData(e){var t,i;const r=new Intl.Locale(e.replace(/_/g,"-")),s=null==r?void 0:r.language.toLowerCase(),o=null!==(i=null===(t=null==r?void 0:r.region)||void 0===t?void 0:t.toLowerCase())&&void 0!==i?i:"";return{locale:r,language:s,region:o,primary:fe.get(`${s}-${o}`),secondary:fe.get(s)}}exists(e,t){var i;const{primary:r,secondary:s}=this.getTranslationData(null!==(i=t.lang)&&void 0!==i?i:this.lang());return t=Object.assign({includeFallback:!1},t),!!(r&&r[e]||s&&s[e]||t.includeFallback&&me&&me[e])}term(e,...t){const{primary:i,secondary:r}=this.getTranslationData(this.lang());let s;if(i&&i[e])s=i[e];else if(r&&r[e])s=r[e];else{if(!me||!me[e])return console.error(`No translation found for: ${String(e)}`),String(e);s=me[e]}return"function"==typeof s?s(...t):s}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(e,t)}};
79var ke={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};ye(ke);var xe=ke,$e=class extends we{};ye(xe);var Se=c` 80 :host { 81 box-sizing: border-box; 82 } 83 84 :host *, 85 :host *::before, 86 :host *::after { 87 box-sizing: inherit; 88 } 89 90 [hidden] { 91 display: none !important; 92 } 93`,Ce=Object.defineProperty,Ee=Object.defineProperties,Ie=Object.getOwnPropertyDescriptor,Te=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,De=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Oe=e=>{throw TypeError(e)},ze=(e,t,i)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Le=(e,t)=>{for(var i in t||(t={}))Re.call(t,i)&&ze(e,i,t[i]);if(Ae)for(var i of Ae(t))Pe.call(t,i)&&ze(e,i,t[i]);return e},Fe=(e,t)=>Ee(e,Te(t)),Ne=(e,t,i,r)=>{for(var s,o=r>1?void 0:r?Ie(t,i):t,a=e.length-1;a>=0;a--)(s=e[a])&&(o=(r?s(t,i,o):s(o))||o);return r&&o&&Ce(t,i,o),o},Me=(e,t,i)=>t.has(e)||Oe("Cannot "+i),qe=function(e,t){this[0]=e,this[1]=t}; 94/** 95 * @license 96 * Copyright 2017 Google LLC 97 * SPDX-License-Identifier: BSD-3-Clause 98 */ 99const Ue=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Be={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:$},je=(e=Be,t,i)=>{const{kind:r,metadata:s}=i;let o=globalThis.litPropertyMetadata.get(s);if(void 0===o&&globalThis.litPropertyMetadata.set(s,o=new Map),"setter"===r&&((e=Object.create(e)).wrapped=!0),o.set(i.name,e),"accessor"===r){const{name:r}=i;return{set(i){const s=t.get.call(this);t.set.call(this,i),this.requestUpdate(r,s,e)},init(t){return void 0!==t&&this.C(r,void 0,e,t),t}}}if("setter"===r){const{name:r}=i;return function(i){const s=this[r];t.call(this,i),this.requestUpdate(r,s,e)}}throw Error("Unsupported decorator location: "+r)}; 100/** 101 * @license 102 * Copyright 2017 Google LLC 103 * SPDX-License-Identifier: BSD-3-Clause 104 */function Ve(e){return(t,i)=>"object"==typeof i?je(e,t,i):((e,t,i)=>{const r=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),r?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)} 105/** 106 * @license 107 * Copyright 2017 Google LLC 108 * SPDX-License-Identifier: BSD-3-Clause 109 */function He(e){return Ve({...e,state:!0,attribute:!1})} 110/** 111 * @license 112 * Copyright 2017 Google LLC 113 * SPDX-License-Identifier: BSD-3-Clause 114 */function We(e){return(t,i)=>{const r="function"==typeof t?t:t[i];Object.assign(r,e)}} 115/** 116 * @license 117 * Copyright 2017 Google LLC 118 * SPDX-License-Identifier: BSD-3-Clause 119 */const Ge=(e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i); 120/** 121 * @license 122 * Copyright 2017 Google LLC 123 * SPDX-License-Identifier: BSD-3-Clause 124 */function Ye(e,t){return(t,i,r)=>Ge(t,i,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})} 125/** 126 * @license 127 * Copyright 2017 Google LLC 128 * SPDX-License-Identifier: BSD-3-Clause 129 */let Ke;var Qe,Xe=class extends ce{constructor(){var e,t,i;super(),e=this,i=!1,(t=Qe).has(e)?Oe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}emit(e,t){const i=new CustomEvent(e,Le({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){const r=customElements.get(e);if(!r){try{customElements.define(e,t,i)}catch(r){customElements.define(e,class extends t{},i)}return}let s=" (unknown version)",o=s;"version"in t&&t.version&&(s=" v"+t.version),"version"in r&&r.version&&(o=" v"+r.version),s&&o&&s===o||console.warn(`Attempted to register <${e}>${s}, but <${e}>${o} has already been registered.`)}attributeChangedCallback(e,t,i){var r,s;Me(r=this,s=Qe,"read from private field"),s.get(r)||(this.constructor.elementProperties.forEac
129h((e,t)=>{e.reflect&&null!=this[t]&&this.initialReflectedProperties.set(t,this[t])}),((e,t,i)=>{Me(e,t,"write to private field"),t.set(e,i)})(this,Qe,!0)),super.attributeChangedCallback(e,t,i)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((t,i)=>{e.has(i)&&null==this[i]&&(this[i]=t)})}};Qe=new WeakMap,Xe.version="2.20.1",Xe.dependencies={},Ne([Ve()],Xe.prototype,"dir",2),Ne([Ve()],Xe.prototype,"lang",2);var Je=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this)}render(){return W` 130 <svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}> 131 <circle class="spinner__track"></circle> 132 <circle class="spinner__indicator"></circle> 133 </svg> 134 `}};Je.styles=[Se,ue];var Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakSet,rt=new WeakMap,st=class{constructor(e,t){this.handleFormData=e=>{const t=this.options.disabled(this.host),i=this.options.name(this.host),r=this.options.value(this.host),s="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!t&&!s&&"string"==typeof i&&i.length>0&&void 0!==r&&(Array.isArray(r)?r.forEach(t=>{e.formData.append(i,t.toString())}):e.formData.append(i,r.toString()))},this.handleFormSubmit=e=>{var t;const i=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(t=Ze.get(this.form))||t.forEach(e=>{this.setUserInteracted(e,!0)})),!this.form||this.form.noValidate||i||r(this.host)||(e.preventDefault(),e.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),rt.set(this.host,[])},this.handleInteraction=e=>{const t=rt.get(this.host);t.includes(e.type)||t.push(e.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const e=this.form.querySelectorAll("*");for(const t of e)if("function"==typeof t.checkValidity&&!t.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const e=this.form.querySelectorAll("*");for(const t of e)if("function"==typeof t.reportValidity&&!t.reportValidity())return!1}return!0},(this.host=e).addController(this),this.options=Le({form:e=>{const t=e.form;if(t){const i=e.getRootNode().querySelector(`#${t}`);if(i)return i}return e.closest("form")},name:e=>e.name,value:e=>e.value,defaultValue:e=>e.defaultValue,disabled:e=>{var t;return null!=(t=e.disabled)&&t},reportValidity:e=>"function"!=typeof e.reportValidity||e.reportValidity(),checkValidity:e=>"function"!=typeof e.checkValidity||e.checkValidity(),setValue:(e,t)=>e.value=t,assumeInteractionOn:["sl-input"]},t)}hostConnected(){const e=this.options.form(this.host);e&&this.attachForm(e),rt.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),rt.delete(this.host),this.options.assumeInteractionOn.forEach(e=>{this.host.removeEventListener(e,this.handleInteraction)})}hostUpdated(){const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(e){e?(this.form=e,Ze.has(this.form)?Ze.get(this.form).add(this.host):Ze.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),et.has(this.form)||(et.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),tt.has(this.form)||(tt.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const e=Ze.get(this.form);e&&(e.delete(this.host),e.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),et.has(this.form)&&(this.form.reportValidity=et.get(this.form),et.delete(this.form)),tt.has(this.form)&&(this.form.checkValidity=tt.get(this.form),tt.delete(this.form)),this.form=void 0))}setUserInteracted(e,t){t?it.add(e):it.delete(e),e.requestUpdate()}doAction(e,t){if(this.form){const i=document.createElement("button");i.type=e,i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.clipPath="inset(50%)",i.style.overflow="hidden",i.style.whiteSpace="nowrap",t&&(i.name=t.name,i.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(e
vendor: 15,064 bytes, lines 134-673
134=>{t.hasAttribute(e)&&i.setAttribute(e,t.getAttribute(e))})),this.form.append(i),i.click(),i.remove()}}getForm(){var e;return null!=(e=this.form)?e:null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}setValidity(e){const t=this.host,i=Boolean(it.has(t)),r=Boolean(t.required);t.toggleAttribute("data-required",r),t.toggleAttribute("data-optional",!r),t.toggleAttribute("data-invalid",!e),t.toggleAttribute("data-valid",e),t.toggleAttribute("data-user-invalid",!e&&i),t.toggleAttribute("data-user-valid",e&&i)}updateValidity(){const e=this.host;this.setValidity(e.validity.valid)}emitInvalidEvent(e){const t=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});e||t.preventDefault(),this.host.dispatchEvent(t)||null==e||e.preventDefault()}},ot=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),at=Object.freeze(Fe(Le({},ot),{valid:!1,valueMissing:!0})),nt=Object.freeze(Fe(Le({},ot),{valid:!1,customError:!0})),lt=c` 135 :host { 136 display: inline-block; 137 position: relative; 138 width: auto; 139 cursor: pointer; 140 } 141 142 .button { 143 display: inline-flex; 144 align-items: stretch; 145 justify-content: center; 146 width: 100%; 147 border-style: solid; 148 border-width: var(--sl-input-border-width); 149 font-family: var(--sl-input-font-family); 150 font-weight: var(--sl-font-weight-semibold); 151 text-decoration: none; 152 user-select: none; 153 -webkit-user-select: none; 154 white-space: nowrap; 155 vertical-align: middle; 156 padding: 0; 157 transition: 158 var(--sl-transition-x-fast) background-color, 159 var(--sl-transition-x-fast) color, 160 var(--sl-transition-x-fast) border, 161 var(--sl-transition-x-fast) box-shadow; 162 cursor: inherit; 163 } 164 165 .button::-moz-focus-inner { 166 border: 0; 167 } 168 169 .button:focus { 170 outline: none; 171 } 172 173 .button:focus-visible { 174 outline: var(--sl-focus-ring); 175 outline-offset: var(--sl-focus-ring-offset); 176 } 177 178 .button--disabled { 179 opacity: 0.5; 180 cursor: not-allowed; 181 } 182 183 /* When disabled, prevent mouse events from bubbling up from children */ 184 .button--disabled * { 185 pointer-events: none; 186 } 187 188 .button__prefix, 189 .button__suffix { 190 flex: 0 0 auto; 191 display: flex; 192 align-items: center; 193 pointer-events: none; 194 } 195 196 .button__label { 197 display: inline-block; 198 } 199 200 .button__label::slotted(sl-icon) { 201 vertical-align: -2px; 202 } 203 204 /* 205 * Standard buttons 206 */ 207 208 /* Default */ 209 .button--standard.button--default { 210 background-color: var(--sl-color-neutral-0); 211 border-color: var(--sl-input-border-color); 212 color: var(--sl-color-neutral-700); 213 } 214 215 .button--standard.button--default:hover:not(.button--disabled) { 216 background-color: var(--sl-color-primary-50); 217 border-color: var(--sl-color-primary-300); 218 color: var(--sl-color-primary-700); 219 } 220 221 .button--standard.button--default:active:not(.button--disabled) { 222 background-color: var(--sl-color-primary-100); 223 border-color: var(--sl-color-primary-400); 224 color: var(--sl-color-primary-700); 225 } 226 227 /* Primary */ 228 .button--standard.button--primary { 229 background-color: var(--sl-color-primary-600); 230 border-color: var(--sl-color-primary-600); 231 color: var(--sl-color-neutral-0); 232 } 233 234 .button--standard.button--primary:hover:not(.button--disabled) { 235 background-color: var(--sl-color-primary-500); 236 border-color: var(--sl-color-primary-500); 237 color: var(--sl-color-neutral-0); 238 } 239 240 .button--standard.button--primary:active:not(.button--disabled) { 241 background-color: var(--sl-color-primary-600); 242 border-color: var(--sl-color-primary-600); 243 color: var(--sl-color-neutral-0); 244 } 245 246 /* Success */ 247 .button--standard.button--success { 248 background-color: var(--sl-color-success-600); 249 border-color: var(--sl-color-success-600); 250 color: var(--sl-color-neutral-0); 251 } 252 253 .button--standard.button--success:hover:not(.button--disabled) { 254 background-color: var(--sl-color-success-500); 255 border-color: var(--sl-color-success-500); 256 color: var(--sl-color-neutral-0); 257 } 258 259 .button--standard.button--success:active:not(.button--disabled) { 260 background-color: var(--sl-color-success-600); 261 border-color: var(--sl-color-success-600); 262 color: var(--sl-color-neutral-0); 263 } 264 265 /* Neutral */ 266 .button--standard.button--neutral { 267 background-color: var(--sl-color-neutral-600); 268 border-color: var(--sl-color-neutral-600); 269 color: var(--sl-color-neutral-0); 270 } 271 272 .button--standard.button--neutral:hover:not(.button--disabled) { 273 background-color: var(--sl-color-neutral-500); 274 border-color: var(--sl-color-neutral-500); 275 color: var(--sl-color-neutral-0); 276 } 277 278 .button--standard.button--neutral:active:not(.button--disabled) { 279 background-color: var(--sl-color-neutral-600); 280 border-color: var(--sl-color-neutral-600); 281 color: var(--sl-color-neutral-0); 282 } 283 284 /* Warning */ 285 .button--standard.button--warning { 286 background-color: var(--sl-color-warning-600); 287 border-color: var(--sl-color-warning-600); 288 color: var(--sl-color-neutral-0); 289 } 290 .button--standard.button--warning:hover:not(.button--disabled) { 291 background-color: var(--sl-color-warning-500); 292 border-color: var(--sl-color-warning-500); 293 color: var(--sl-color-neutral-0); 294 } 295 296 .button--standard.button--warning:active:not(.button--disabled) { 297 background-color: var(--sl-color-warning-600); 298 border-color: var(--sl-color-warning-600); 299 color: var(--sl-color-neutral-0); 300 } 301 302 /* Danger */ 303 .button--standard.button--danger { 304 background-color: var(--sl-color-danger-600); 305 border-color: var(--sl-color-danger-600); 306 color: var(--sl-color-neutral-0); 307 } 308 309 .button--standard.button--danger:hover:not(.button--disabled) { 310 background-color: var(--sl-color-danger-500); 311 border-color: var(--sl-color-danger-500); 312 color: var(--sl-color-neutral-0); 313 } 314 315 .button--standard.button--danger:active:not(.button--disabled) { 316 background-color: var(--sl-color-danger-600); 317 border-color: var(--sl-color-danger-600); 318 color: var(--sl-color-neutral-0); 319 } 320 321 /* 322 * Outline buttons 323 */ 324 325 .button--outline { 326 background: none; 327 border: solid 1px; 328 } 329 330 /* Default */ 331 .button--outline.button--default { 332 border-color: var(--sl-input-border-color); 333 color: var(--sl-color-neutral-700); 334 } 335 336 .button--outline.button--default:hover:not(.button--disabled), 337 .button--outline.button--default.button--checked:not(.button--disabled) { 338 border-color: var(--sl-color-primary-600); 339 background-color: var(--sl-color-primary-600); 340 color: var(--sl-color-neutral-0); 341 } 342 343 .button--outline.button--default:active:not(.button--disabled) { 344 border-color: var(--sl-color-primary-700); 345 background-color: var(--sl-color-primary-700); 346 color: var(--sl-color-neutral-0); 347 } 348 349 /* Primary */ 350 .button--outline.button--primary { 351 border-color: var(--sl-color-primary-600); 352 color: var(--sl-color-primary-600); 353 } 354 355 .button--outline.button--primary:hover:not(.button--disabled), 356 .button--outline.button--primary.button--checked:not(.button--disabled) { 357 background-color: var(--sl-color-primary-600); 358 color: var(--sl-color-neutral-0); 359 } 360 361 .button--outline.button--primary:active:not(.button--disabled) { 362 border-color: var(--sl-color-primary-700); 363 background-color: var(--sl-color-primary-700); 364 color: var(--sl-color-neutral-0); 365 } 366 367 /* Success */ 368 .button--outline.button--success { 369 border-color: var(--sl-color-success-600); 370 color: var(--sl-color-success-600); 371 } 372 373 .button--outline.button--success:hover:not(.button--disabled), 374 .button--outline.button--success.button--checked:not(.button--disabled) { 375 background-color: var(--sl-color-success-600); 376 color: var(--sl-color-neutral-0); 377 } 378 379 .button--outline.button--success:active:not(.button--disabled) { 380 border-color: var(--sl-color-success-700); 381 background-color: var(--sl-color-success-700); 382 color: var(--sl-color-neutral-0); 383 } 384 385 /* Neutral */ 386 .button--outline.button--neutral { 387 border-color: var(--sl-color-neutral-600); 388 color: var(--sl-color-neutral-600); 389 } 390 391 .button--outline.button--neutral:hover:not(.button--disabled), 392 .button--outline.button--neutral.button--checked:not(.button--disabled) { 393 background-color: var(--sl-color-neutral-600); 394 color: var(--sl-color-neutral-0); 395 } 396 397 .button--outline.button--neutral:active:not(.button--disabled) { 398 border-color: var(--sl-color-neutral-700); 399 background-color: var(--sl-color-neutral-700); 400 color: var(--sl-color-neutral-0); 401 } 402 403 /* Warning */ 404 .button--outline.button--warning { 405 border-color: var(--sl-color-warning-600); 406 color: var(--sl-color-warning-600); 407 } 408 409 .button--outline.button--warning:hover:not(.button--disabled), 410 .button--outline.button--warning.button--checked:not(.button--disabled) { 411 background-color: var(--sl-color-warning-600); 412 color: var(--sl-color-neutral-0); 413 } 414 415 .button--outline.button--warning:active:not(.button--disabled) { 416 border-color: var(--sl-color-warning-700); 417 background-color: var(--sl-color-warning-700); 418 color: var(--sl-color-neutral-0); 419 } 420 421 /* Danger */ 422 .button--outline.button--danger { 423 border-color: var(--sl-color-danger-600); 424 color: var(--sl-color-danger-600); 425 } 426 427 .button--outline.button--danger:hover:not(.button--disabled), 428 .button--outline.button--danger.button--checked:not(.button--disabled) { 429 background-color: var(--sl-color-danger-600); 430 color: var(--sl-color-neutral-0); 431 } 432 433 .button--outline.button--danger:active:not(.button--disabled) { 434 border-color: var(--sl-color-danger-700); 435 background-color: var(--sl-color-danger-700); 436 color: var(--sl-color-neutral-0); 437 } 438 439 @media (forced-colors: active) { 440 .button.button--outline.button--checked:not(.button--disabled) { 441 outline: solid 2px transparent; 442 } 443 } 444 445 /* 446 * Text buttons 447 */ 448 449 .button--text { 450 background-color: transparent; 451 border-color: transparent; 452 color: var(--sl-color-primary-600); 453 } 454 455 .button--text:hover:not(.button--disabled) { 456 background-color: transparent; 457 border-color: transparent; 458 color: var(--sl-color-primary-500); 459 } 460 461 .button--text:focus-visible:not(.button--disabled) { 462 background-color: transparent; 463 border-color: transparent; 464 color: var(--sl-color-primary-500); 465 } 466 467 .button--text:active:not(.button--disabled) { 468 background-color: transparent; 469 border-color: transparent; 470 color: var(--sl-color-primary-700); 471 } 472 473 /* 474 * Size modifiers 475 */ 476 477 .button--small { 478 height: auto; 479 min-height: var(--sl-input-height-small); 480 font-size: var(--sl-button-font-size-small); 481 line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); 482 border-radius: var(--sl-input-border-radius-small); 483 } 484 485 .button--medium { 486 height: auto; 487 min-height: var(--sl-input-height-medium); 488 font-size: var(--sl-button-font-size-medium); 489 line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); 490 border-radius: var(--sl-input-border-radius-medium); 491 } 492 493 .button--large { 494 height: auto; 495 min-height: var(--sl-input-height-large); 496 font-size: var(--sl-button-font-size-large); 497 line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); 498 border-radius: var(--sl-input-border-radius-large); 499 } 500 501 /* 502 * Pill modifier 503 */ 504 505 .button--pill.button--small { 506 border-radius: var(--sl-input-height-small); 507 } 508 509 .button--pill.button--medium { 510 border-radius: var(--sl-input-height-medium); 511 } 512 513 .button--pill.button--large { 514 border-radius: var(--sl-input-height-large); 515 } 516 517 /* 518 * Circle modifier 519 */ 520 521 .button--circle { 522 padding-left: 0; 523 padding-right: 0; 524 } 525 526 .button--circle.button--small { 527 width: var(--sl-input-height-small); 528 border-radius: 50%; 529 } 530 531 .button--circle.button--medium { 532 width: var(--sl-input-height-medium); 533 border-radius: 50%; 534 } 535 536 .button--circle.button--large { 537 width: var(--sl-input-height-large); 538 border-radius: 50%; 539 } 540 541 .button--circle .button__prefix, 542 .button--circle .button__suffix, 543 .button--circle .button__caret { 544 display: none; 545 } 546 547 /* 548 * Caret modifier 549 */ 550 551 .button--caret .button__suffix { 552 display: none; 553 } 554 555 .button--caret .button__caret { 556 height: auto; 557 } 558 559 /* 560 * Loading modifier 561 */ 562 563 .button--loading { 564 position: relative; 565 cursor: wait; 566 } 567 568 .button--loading .button__prefix, 569 .button--loading .button__label, 570 .button--loading .button__suffix, 571 .button--loading .button__caret { 572 visibility: hidden; 573 } 574 575 .button--loading sl-spinner { 576 --indicator-color: currentColor; 577 position: absolute; 578 font-size: 1em; 579 height: 1em; 580 width: 1em; 581 top: calc(50% - 0.5em); 582 left: calc(50% - 0.5em); 583 } 584 585 /* 586 * Badges 587 */ 588 589 .button ::slotted(sl-badge) { 590 position: absolute; 591 top: 0; 592 right: 0; 593 translate: 50% -50%; 594 pointer-events: none; 595 } 596 597 .button--rtl ::slotted(sl-badge) { 598 right: auto; 599 left: 0; 600 translate: -50% -50%; 601 } 602 603 /* 604 * Button spacing 605 */ 606 607 .button--has-label.button--small .button__label { 608 padding: 0 var(--sl-spacing-small); 609 } 610 611 .button--has-label.button--medium .button__label { 612 padding: 0 var(--sl-spacing-medium); 613 } 614 615 .button--has-label.button--large .button__label { 616 padding: 0 var(--sl-spacing-large); 617 } 618 619 .button--has-prefix.button--small { 620 padding-inline-start: var(--sl-spacing-x-small); 621 } 622 623 .button--has-prefix.button--small .button__label { 624 padding-inline-start: var(--sl-spacing-x-small); 625 } 626 627 .button--has-prefix.button--medium { 628 padding-inline-start: var(--sl-spacing-small); 629 } 630 631 .button--has-prefix.button--medium .button__label { 632 padding-inline-start: var(--sl-spacing-small); 633 } 634 635 .button--has-prefix.button--large { 636 padding-inline-start: var(--sl-spacing-small); 637 } 638 639 .button--has-prefix.button--large .button__label { 640 padding-inline-start: var(--sl-spacing-small); 641 } 642 643 .button--has-suffix.button--small, 644 .button--caret.button--small { 645 padding-inline-end: var(--sl-spacing-x-small); 646 } 647 648 .button--has-suffix.button--small .button__label, 649 .button--caret.button--small .button__label { 650 padding-inline-end: var(--sl-spacing-x-small); 651 } 652 653 .button--has-suffix.button--medium, 654 .button--caret.button--medium { 655 padding-inline-end: var(--sl-spacing-small); 656 } 657 658 .button--has-suffix.button--medium .button__label, 659 .button--caret.button--medium .button__label { 660 padding-inline-end: var(--sl-spacing-small); 661 } 662 663 .button--has-suffix.button--large, 664 .button--caret.button--large { 665 padding-inline-end: var(--sl-spacing-small); 666 } 667 668 .button--has-suffix.button--large .button__label, 669 .button--caret.button--large .button__label { 670 padding-inline-end: var(--sl-spacing-small); 671 } 672 673 /*
674 * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.). 675 * This means buttons aren't always direct descendants of the button group, thus we can't target them with the 676 * ::slotted selector. To work around this, the button group component does some magic to add these special classes to 677 * buttons and we style them here instead. 678 */ 679 680 :host([data-sl-button-group__button--first]:not([data-sl-button-group__button--last])) .button { 681 border-start-end-radius: 0; 682 border-end-end-radius: 0; 683 } 684 685 :host([data-sl-button-group__button--inner]) .button { 686 border-radius: 0; 687 } 688 689 :host([data-sl-button-group__button--last]:not([data-sl-button-group__button--first])) .button { 690 border-start-start-radius: 0; 691 border-end-start-radius: 0; 692 } 693 694 /* All except the first */ 695 :host([data-sl-button-group__button]:not([data-sl-button-group__button--first])) { 696 margin-inline-start: calc(-1 * var(--sl-input-border-width)); 697 } 698 699 /* Add a visual separator between solid buttons */ 700 :host( 701 [data-sl-button-group__button]:not( 702 [data-sl-button-group__button--first], 703 [data-sl-button-group__button--radio], 704 [variant='default'] 705 ):not(:hover) 706 ) 707 .button:after { 708 content: ''; 709 position: absolute; 710 top: 0; 711 inset-inline-start: 0; 712 bottom: 0; 713 border-left: solid 1px rgb(128 128 128 / 33%); 714 mix-blend-mode: multiply; 715 } 716 717 /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */ 718 :host([data-sl-button-group__button--hover]) { 719 z-index: 1; 720 } 721 722 /* Focus and checked are always on top */ 723 :host([data-sl-button-group__button--focus]), 724 :host([data-sl-button-group__button][checked]) { 725 z-index: 2; 726 } 727`,dt=class{constructor(e,...t){this.slotNames=[],this.handleSlotChange=e=>{const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{if(e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim())return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("sl-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};var ct="";function ht(e){ct=e}var ut={name:"default",resolver:e=>function(e=""){if(!ct){const e=[...document.getElementsByTagName("script")],t=e.find(e=>e.hasAttribute("data-shoelace"));if(t)ht(t.getAttribute("data-shoelace"));else{const t=e.find(e=>/shoelace(\.min)?\.js($|\?)/.test(e.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(e.src));let i="";t&&(i=t.getAttribute("src")),ht(i.split("/").slice(0,-1).join("/"))}}return ct.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}(`assets/icons/${e}.svg`)},pt={caret:'\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n ',check:'\n <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor">\n <g transform="translate(3.428571, 3.428571)">\n <path d="M0,5.71428571 L3.42857143,9.14285714"></path>\n <path d="M9.14285714,0 L3.42857143,9.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"chevron-down":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',"chevron-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>\n </svg>\n ',"chevron-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',copy:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewB
727ox="0 0 16 16">\n <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>\n </svg>\n ',eye:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">\n <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>\n <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>\n </svg>\n ',"eye-slash":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">\n <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>\n <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>\n <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>\n </svg>\n ',eyedropper:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">\n <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>\n </svg>\n ',"grip-vertical":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">\n <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>\n </svg>\n ',indeterminate:'\n <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor" stroke-width="2">\n <g transform="translate(2.285714, 6.857143)">\n <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"person-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">\n <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>\n </svg>\n ',"play-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>\n </svg>\n ',"pause-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>\n </svg>\n ',radio:'\n <svg part="checked-icon" class="radio__icon" viewB
727ox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="currentColor">\n <circle cx="8" cy="8" r="3.42857143"></circle>\n </g>\n </g>\n </svg>\n ',"star-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">\n <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>\n </svg>\n ',"x-lg":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">\n <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>\n </svg>\n ',"x-circle-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>\n </svg>\n '},ft={name:"system",resolver:e=>e in pt?`data:image/svg+xml,${encodeURIComponent(pt[e])}`:""},mt=[ut,ft],gt=[];function bt(e){return mt.find(t=>t.name===e)}var vt=c` 728 :host { 729 display: inline-block; 730 width: 1em; 731 height: 1em; 732 box-sizing: content-box !important; 733 } 734 735 svg { 736 display: block; 737 height: 100%; 738 width: 100%; 739 } 740`;function yt(e,t){const i=Le({waitUntilFirstUpdate:!1},t);return(t,r)=>{const{update:s}=t,o=Array.isArray(e)?e:[e];t.update=function(e){o.forEach(t=>{const s=t;if(e.has(s)){const t=e.get(s),o=this[s];t!==o&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[r](t,o))}}),s.call(this,e)}}} 741/** 742 * @license 743 * Copyright 2020 Google LLC 744 * SPDX-License-Identifier: BSD-3-Clause 745 */const{I:_t}=ne,wt=e=>void 0===e.strings,kt=()=>document.createComment(""),xt=(e,t,i)=>{const r=e._$AA.parentNode,s=void 0===t?e._$AB:t._$AA;if(void 0===i){const t=r.insertBefore(kt(),s),o=r.insertBefore(kt(),s);i=new _t(t,o,e,e.options)}else{const t=i._$AB.nextSibling,o=i._$AM,a=o!==e;if(a){let t;i._$AQ?.(e),i._$AM=e,void 0!==i._$AP&&(t=e._$AU)!==o._$AU&&i._$AP(t)}if(t!==s||a){let e=i._$AA;for(;e!==t;){const t=e.nextSibling;r.insertBefore(e,s),e=t}}}return i},$t=(e,t,i=e)=>(e._$AI(t,i),e),St={},Ct=(e,t=St)=>e._$AH=t,Et=e=>{e._$AR(),e._$AA.remove()};var It,Tt=Symbol(),At=Symbol(),Rt=new Map,Pt=class extends Xe{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(e,t){var i;let r;if(null==t?void 0:t.spriteSheet)return this.svg=W`<svg part="svg"> 746 <use part="use" href="${e}"></use> 747 </svg>`,this.svg;try{if(r=await fetch(e,{mode:"cors"}),!r.ok)return 410===r.status?Tt:At}catch(e){return At}try{const e=document.createElement("div");e.innerHTML=await r.text();const t=e.firstElementChild;if("svg"!==(null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase()))return Tt;It||(It=new DOMParser);const s=It.parseFromString(t.outerHTML,"text/html").body.querySelector("svg");return s?(s.part.add("svg"),document.adoptNode(s)):Tt}catch(e){return Tt}}connectedCallback(){var e;super.connectedCallback(),e=this,gt.push(e)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var e;super.disconnectedCallback(),e=this,gt=gt.filter(t=>t!==e)}getIconSource(){const e=bt(this.library);return this.name&&e?{url:e.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;const{url:t,fromLibrary:i}
747=this.getIconSource(),r=i?bt(this.library):void 0;if(!t)return void(this.svg=null);let s=Rt.get(t);if(s||(s=this.resolveIcon(t,r),Rt.set(t,s)),!this.initialRender)return;const o=await s;if(o===At&&Rt.delete(t),t===this.getIconSource().url)if((e=>void 0!==e?._$litType$)(o)){if(this.svg=o,r){await this.updateComplete;const e=this.shadowRoot.querySelector("[part='svg']");"function"==typeof r.mutator&&e&&r.mutator(e)}}else switch(o){case At:case Tt:this.svg=null,this.emit("sl-error");break;default:this.svg=o.cloneNode(!0),null==(e=null==r?void 0:r.mutator)||e.call(r,this.svg),this.emit("sl-load")}}render(){return this.svg}};Pt.styles=[Se,vt],Ne([He()],Pt.prototype,"svg",2),Ne([Ve({reflect:!0})],Pt.prototype,"name",2),Ne([Ve()],Pt.prototype,"src",2),Ne([Ve()],Pt.prototype,"label",2),Ne([Ve({reflect:!0})],Pt.prototype,"library",2),Ne([yt("label")],Pt.prototype,"handleLabelChange",1),Ne([yt(["name","src","library"])],Pt.prototype,"setIcon",1); 748/** 749 * @license 750 * Copyright 2017 Google LLC 751 * SPDX-License-Identifier: BSD-3-Clause 752 */ 753const Dt=1,Ot=2,zt=3,Lt=4,Ft=e=>(...t)=>({_$litDirective$:e,values:t});let Nt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}; 754/** 755 * @license 756 * Copyright 2018 Google LLC 757 * SPDX-License-Identifier: BSD-3-Clause 758 */const Mt=Ft(class extends Nt{constructor(e){if(super(e),e.type!==Dt||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const i=e.element.classList;for(const e of this.st)e in t||(i.remove(e),this.st.delete(e));for(const e in t){const r=!!t[e];r===this.st.has(e)||this.nt?.has(e)||(r?(i.add(e),this.st.add(e)):(i.remove(e),this.st.delete(e)))}return G}}),qt=Symbol.for(""),Ut=e=>{if(e?.r===qt)return e?._$litStatic$},Bt=(e,...t)=>({_$litStatic$:t.reduce((t,i,r)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[r+1],e[0]),r:qt}),jt=new Map,Vt=(e=>(t,...i)=>{const r=i.length;let s,o;const a=[],n=[];let l,d=0,c=!1;for(;d<r;){for(l=t[d];d<r&&void 0!==(o=i[d],s=Ut(o));)l+=s+t[++d],c=!0;d!==r&&n.push(o),a.push(l),d++}if(d===r&&a.push(t[r]),c){const e=a.join("$$lit$$");void 0===(t=jt.get(e))&&(a.raw=a,jt.set(e,t=a)),i=n}return e(t,...i)})(W),Ht=e=>e??Y; 759/** 760 * @license 761 * Copyright 2020 Google LLC 762 * SPDX-License-Identifier: BSD-3-Clause 763 */var Wt=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this,{assumeInteractionOn:["click"]}),this.hasSlotController=new dt(this,"[default]","prefix","suffix"),this.localize=new $e(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:ot}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(){"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){const e=this.isLink(),t=e?Bt`a`:Bt`button`;return Vt` 764 <${t} 765 part="base" 766 class=${Mt({button:!0,"button--default":"default"===this.variant,"button--primary":"primary"===this.variant,"button--success":"success"===this.variant,"button--neutral":"neutral"===this.variant,"button--warning":"warning"===this.variant,"button--danger":"danger"===this.variant,"button--text":"text"===this.variant,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":"rtl"===this.localize.dir(),"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})} 767 ?disabled=${Ht(e?void 0:this.disabled)} 768 type=${Ht(e?void 0:this.type)} 769 title=${this.title} 770 name=${Ht(e?void 0:this.name)} 771 value=${Ht(e?void 0:this.value)} 772 href=${Ht(e&&!this.disabled?this.href:void 0)} 773 target=${Ht(e?this.target:void 0)} 774 download=${Ht(e?this.download:void 0)} 775 rel=${Ht(e?this.rel:void 0)} 776 role=${Ht(e?void 0:"button")} 777 aria-disabled=${this.disabled?"true":"false"} 778 tabindex=${this.disabled?"-1":"0"} 779 @blur=${this.handleBlur} 780 @focus=${this.handleFocus} 781 @invalid=${this.isButton()?this.handleInvalid:null} 782 @click=${this.handleClick} 783 > 784 <slot name="prefix" part="prefix" class="button__prefix"></slot> 785 <slot part="label" class="button__label"></slot> 786 <slot name="suffix" part="suffix" class="button__suffix"></slot> 787 ${this.caret?Vt` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""} 788 ${this.loading?Vt`<sl-spinner part="spinner"></sl-spinner>`:""} 789 </${t}> 790 `}};Wt.styles=[Se,lt],Wt.dependencies={"sl-icon":Pt,"sl-spinner":Je},Ne([Ye(".button")],Wt.prototype,"button",2),Ne([He()],Wt.prototype,"hasFocus",2),Ne([He()],Wt.prototype,"invali
790d",2),Ne([Ve()],Wt.prototype,"title",2),Ne([Ve({reflect:!0})],Wt.prototype,"variant",2),Ne([Ve({reflect:!0})],Wt.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],Wt.prototype,"caret",2),Ne([Ve({type:Boolean,reflect:!0})],Wt.prototype,"disabled",2),Ne([Ve({type:Boolean,reflect:!0})],Wt.prototype,"loading",2),Ne([Ve({type:Boolean,reflect:!0})],Wt.prototype,"outline",2),Ne([Ve({type:Boolean,reflect:!0})],Wt.prototype,"pill",2),Ne([Ve({type:Boolean,reflect:!0})],Wt.prototype,"circle",2),Ne([Ve()],Wt.prototype,"type",2),Ne([Ve()],Wt.prototype,"name",2),Ne([Ve()],Wt.prototype,"value",2),Ne([Ve()],Wt.prototype,"href",2),Ne([Ve()],Wt.prototype,"target",2),Ne([Ve()],Wt.prototype,"rel",2),Ne([Ve()],Wt.prototype,"download",2),Ne([Ve()],Wt.prototype,"form",2),Ne([Ve({attribute:"formaction"})],Wt.prototype,"formAction",2),Ne([Ve({attribute:"formenctype"})],Wt.prototype,"formEnctype",2),Ne([Ve({attribute:"formmethod"})],Wt.prototype,"formMethod",2),Ne([Ve({attribute:"formnovalidate",type:Boolean})],Wt.prototype,"formNoValidate",2),Ne([Ve({attribute:"formtarget"})],Wt.prototype,"formTarget",2),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Wt.prototype,"handleDisabledChange",1),Wt.define("sl-button");var Gt=c` 791 :host { 792 display: inline-block; 793 } 794 795 .checkbox { 796 position: relative; 797 display: inline-flex; 798 align-items: flex-start; 799 font-family: var(--sl-input-font-family); 800 font-weight: var(--sl-input-font-weight); 801 color: var(--sl-input-label-color); 802 vertical-align: middle; 803 cursor: pointer; 804 } 805 806 .checkbox--small { 807 --toggle-size: var(--sl-toggle-size-small); 808 font-size: var(--sl-input-font-size-small); 809 } 810 811 .checkbox--medium { 812 --toggle-size: var(--sl-toggle-size-medium); 813 font-size: var(--sl-input-font-size-medium); 814 } 815 816 .checkbox--large { 817 --toggle-size: var(--sl-toggle-size-large); 818 font-size: var(--sl-input-font-size-large); 819 } 820 821 .checkbox__control { 822 flex: 0 0 auto; 823 position: relative; 824 display: inline-flex; 825 align-items: center; 826 justify-content: center; 827 width: var(--toggle-size); 828 height: var(--toggle-size); 829 border: solid var(--sl-input-border-width) var(--sl-input-border-color); 830 border-radius: 2px; 831 background-color: var(--sl-input-background-color); 832 color: var(--sl-color-neutral-0); 833 transition: 834 var(--sl-transition-fast) border-color, 835 var(--sl-transition-fast) background-color, 836 var(--sl-transition-fast) color, 837 var(--sl-transition-fast) box-shadow; 838 } 839 840 .checkbox__input { 841 position: absolute; 842 opacity: 0; 843 padding: 0; 844 margin: 0; 845 pointer-events: none; 846 } 847 848 .checkbox__checked-icon, 849 .checkbox__indeterminate-icon { 850 display: inline-flex; 851 width: var(--toggle-size); 852 height: var(--toggle-size); 853 } 854 855 /* Hover */ 856 .checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover { 857 border-color: var(--sl-input-border-color-hover); 858 background-color: var(--sl-input-background-color-hover); 859 } 860 861 /* Focus */ 862 .checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control { 863 outline: var(--sl-focus-ring); 864 outline-offset: var(--sl-focus-ring-offset); 865 } 866 867 /* Checked/indeterminate */ 868 .checkbox--checked .checkbox__control, 869 .checkbox--indeterminate .checkbox__control { 870 border-color: var(--sl-color-primary-600); 871 background-color: var(--sl-color-primary-600); 872 } 873 874 /* Checked/indeterminate + hover */ 875 .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover, 876 .checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover { 877 border-color: var(--sl-color-primary-500); 878 background-color: var(--sl-color-primary-500); 879 } 880 881 /* Checked/indeterminate + focus */ 882 .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control, 883 .checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control { 884 outline: var(--sl-focus-ring); 885 outline-offset: var(--sl-focus-ring-offset); 886 } 887 888 /* Disabled */ 889 .checkbox--disabled { 890 opacity: 0.5;
891 cursor: not-allowed; 892 } 893 894 .checkbox__label { 895 display: inline-block; 896 color: var(--sl-input-label-color); 897 line-height: var(--toggle-size); 898 margin-inline-start: 0.5em; 899 user-select: none; 900 -webkit-user-select: none; 901 } 902 903 :host([required]) .checkbox__label::after { 904 content: var(--sl-input-required-content); 905 color: var(--sl-input-required-content-color); 906 margin-inline-start: var(--sl-input-required-content-offset); 907 } 908`,Yt=(e="value")=>(t,i)=>{const r=t.constructor,s=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(t,o,a){var n;const l=r.getPropertyOptions(e);if(t===("string"==typeof l.attribute?l.attribute:e)){const t=l.converter||x,r=("function"==typeof t?t:null!=(n=null==t?void 0:t.fromAttribute)?n:x.fromAttribute)(a,l.type);this[e]!==r&&(this[i]=r)}s.call(this,t,o,a)}},Kt=c` 909 .form-control .form-control__label { 910 display: none; 911 } 912 913 .form-control .form-control__help-text { 914 display: none; 915 } 916 917 /* Label */ 918 .form-control--has-label .form-control__label { 919 display: inline-block; 920 color: var(--sl-input-label-color); 921 margin-bottom: var(--sl-spacing-3x-small); 922 } 923 924 .form-control--has-label.form-control--small .form-control__label { 925 font-size: var(--sl-input-label-font-size-small); 926 } 927 928 .form-control--has-label.form-control--medium .form-control__label { 929 font-size: var(--sl-input-label-font-size-medium); 930 } 931 932 .form-control--has-label.form-control--large .form-control__label { 933 font-size: var(--sl-input-label-font-size-large); 934 } 935 936 :host([required]) .form-control--has-label .form-control__label::after { 937 content: var(--sl-input-required-content); 938 margin-inline-start: var(--sl-input-required-content-offset); 939 color: var(--sl-input-required-content-color); 940 } 941 942 /* Help text */ 943 .form-control--has-help-text .form-control__help-text { 944 display: block; 945 color: var(--sl-input-help-text-color); 946 margin-top: var(--sl-spacing-3x-small); 947 } 948 949 .form-control--has-help-text.form-control--small .form-control__help-text { 950 font-size: var(--sl-input-help-text-font-size-small); 951 } 952 953 .form-control--has-help-text.form-control--medium .form-control__help-text { 954 font-size: var(--sl-input-help-text-font-size-medium); 955 } 956 957 .form-control--has-help-text.form-control--large .form-control__help-text { 958 font-size: var(--sl-input-help-text-font-size-large); 959 } 960 961 .form-control--has-help-text.form-control--radio-group .form-control__help-text { 962 margin-top: var(--sl-spacing-2x-small); 963 } 964` 965/** 966 * @license 967 * Copyright 2020 Google LLC 968 * SPDX-License-Identifier: BSD-3-Clause 969 */;const Qt=Ft(class extends Nt{constructor(e){if(super(e),e.type!==zt&&e.type!==Dt&&e.type!==Lt)throw Error("The `live` directive is not allowed on child or event bindings");if(!wt(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===G||t===Y)return t;const i=e.element,r=e.name;if(e.type===zt){if(t===i[r])return G}else if(e.type===Lt){if(!!t===i.hasAttribute(r))return G}else if(e.type===Dt&&i.getAttribute(r)===t+"")return G;return Ct(e),t}});var Xt=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasSlotController=new dt(this,"help-text"),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.indeterminate=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.helpText=""}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sl-change")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("help-text"),t=!!this.helpText||!!e;return W` 970 <div 971 class=${Mt({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-help-text":t})} 972 > 973 <label 974 part="base" 975 class=${Mt({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--small":"small"===this.size,"checkbox--medium":"medium"===this.size,"checkbox--large":"large"===this.size})} 976 > 977 <input 978 class="checkbox__input" 979 type="checkbox" 980 title=${this.title} 981 name=${this.name} 982 value=${Ht(this.value)} 983 .indeterminate=${Qt(this.indeterminate)} 984 .checked=${Qt(this.checked)} 985 .disabled=${this.disabled} 986 .required=${this.required} 987 aria-checked=${this.checked?"true":"false"} 988 aria-describedby="help-text" 989 @click=${this.handleClick}
990 @input=${this.handleInput} 991 @invalid=${this.handleInvalid} 992 @blur=${this.handleBlur} 993 @focus=${this.handleFocus} 994 /> 995 996 <span 997 part="control${this.checked?" control--checked":""}${this.indeterminate?" control--indeterminate":""}" 998 class="checkbox__control" 999 > 1000 ${this.checked?W` 1001 <sl-icon part="checked-icon" class="checkbox__checked-icon" library="system" name="check"></sl-icon> 1002 `:""} 1003 ${!this.checked&&this.indeterminate?W` 1004 <sl-icon 1005 part="indeterminate-icon" 1006 class="checkbox__indeterminate-icon" 1007 library="system" 1008 name="indeterminate" 1009 ></sl-icon> 1010 `:""} 1011 </span> 1012 1013 <div part="label" class="checkbox__label"> 1014 <slot></slot> 1015 </div> 1016 </label> 1017 1018 <div 1019 aria-hidden=${t?"false":"true"} 1020 class="form-control__help-text" 1021 id="help-text" 1022 part="form-control-help-text" 1023 > 1024 <slot name="help-text">${this.helpText}</slot> 1025 </div> 1026 </div> 1027 `}};function*Jt(e=document.activeElement){null!=e&&(yield e,"shadowRoot"in e&&e.shadowRoot&&"closed"!==e.shadowRoot.mode&&(yield*(e=>{var t,i=e[De("asyncIterator")],r=!1,s={};return null==i?(i=e[De("iterator")](),t=e=>s[e]=t=>i[e](t)):(i=i.call(e),t=e=>s[e]=t=>{if(r){if(r=!1,"throw"===e)throw t;return t}return r=!0,{done:!1,value:new qe(new Promise(r=>{var s=i[e](t);s instanceof Object||Oe("Object expected"),r(s)}),1)}}),s[De("iterator")]=()=>s,t("next"),"throw"in i?t("throw"):s.throw=e=>{throw e},"return"in i&&t("return"),s})(Jt(e.shadowRoot.activeElement))))}function Zt(){return[...Jt()].pop()}Xt.styles=[Se,Kt,Gt],Xt.dependencies={"sl-icon":Pt},Ne([Ye('input[type="checkbox"]')],Xt.prototype,"input",2),Ne([He()],Xt.prototype,"hasFocus",2),Ne([Ve()],Xt.prototype,"title",2),Ne([Ve()],Xt.prototype,"name",2),Ne([Ve()],Xt.prototype,"value",2),Ne([Ve({reflect:!0})],Xt.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],Xt.prototype,"disabled",2),Ne([Ve({type:Boolean,reflect:!0})],Xt.prototype,"checked",2),Ne([Ve({type:Boolean,reflect:!0})],Xt.prototype,"indeterminate",2),Ne([Yt("checked")],Xt.prototype,"defaultChecked",2),Ne([Ve({reflect:!0})],Xt.prototype,"form",2),Ne([Ve({type:Boolean,reflect:!0})],Xt.prototype,"required",2),Ne([Ve({attribute:"help-text"})],Xt.prototype,"helpText",2),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Xt.prototype,"handleDisabledChange",1),Ne([yt(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],Xt.prototype,"handleStateChange",1),Xt.define("sl-checkbox");var ei=new WeakMap;function ti(e){let t=ei.get(e);return t||(t=window.getComputedStyle(e,null),ei.set(e,t)),t}function ii(e){const t=e.tagName.toLowerCase(),i=Number(e.getAttribute("tabindex"));if(e.hasAttribute("tabindex")&&(isNaN(i)||i<=-1))return!1;if(e.hasAttribute("disabled"))return!1;if(e.closest("[inert]"))return!1;if("input"===t&&"radio"===e.getAttribute("type")){const t=e.getRootNode(),i=`input[type='radio'][name="${e.getAttribute("name")}"]`,r=t.querySelector(`${i}:checked`);if(r)return r===e;return t.querySelector(i)===e}if(!function(e){if("function"==typeof e.checkVisibility)return e.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const t=ti(e);return"hidden"!==t.visibility&&"none"!==t.display}(e))return!1;if(("audio"===t||"video"===t)&&e.hasAttribute("controls"))return!0;if(e.hasAttribute("tabindex"))return!0;if(e.hasAttribute("contenteditable")&&"false"!==e.getAttribute("contenteditable"))return!0;return!!["button","input","select","textarea","a","audio","video","summary","iframe"].includes(t)||function(e){const t=ti(e),{overflowY:i,overflowX:r}=t;return"scroll"===i||"scroll"===r||"auto"===i&&"auto"===r&&(e.scrollHeight>e.clientHeight&&"auto"===i||!(!(e.scrollWidth>e.clientWidth)||"auto"!==r))}(e)}function ri(e){const t=new WeakMap,i=[];return function r(s){if(s instanceof Element){if(s.hasAttribute("inert")||s.closest("[inert]"))return;if(t.has(s))return;t.set(s,!0),!i.includes(s)&&ii(s)&&i.push(s),s instanceof HTMLSlotElement&&function(e,t){var i;return(null==(i=e.getRootNode({composed:!0}))?void 0:i.host)!==t}(s,e)&&s.assignedElements({flatten:!0}
vendor: 3,347 bytes, line 1027
1027).forEach(e=>{r(e)}),null!==s.shadowRoot&&"open"===s.shadowRoot.mode&&r(s.shadowRoot)}for(const e of s.children)r(e)}(e),i.sort((e,t)=>{const i=Number(e.getAttribute("tabindex"))||0;return(Number(t.getAttribute("tabindex"))||0)-i})}var si=[],oi=class{constructor(e){this.tabDirection="forward",this.handleFocusIn=()=>{this.isActive()&&this.checkFocus()},this.handleKeyDown=e=>{var t;if("Tab"!==e.key||this.isExternalActivated)return;if(!this.isActive())return;const i=Zt();if(this.previousFocus=i,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;e.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const r=ri(this.element);let s=r.findIndex(e=>e===i);this.previousFocus=this.currentFocus;const o="forward"===this.tabDirection?1:-1;for(;;){s+o>=r.length?s=0:s+o<0?s=r.length-1:s+=o,this.previousFocus=this.currentFocus;const i=r[s];if("backward"===this.tabDirection&&this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;if(i&&this.possiblyHasTabbableChildren(i))return;e.preventDefault(),this.currentFocus=i,null==(t=this.currentFocus)||t.focus({preventScroll:!1});const a=[...Jt()];if(a.includes(this.currentFocus)||!a.includes(this.previousFocus))break}setTimeout(()=>this.checkFocus())},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=e,this.elementsWithTabbableControls=["iframe"]}activate(){si.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){si=si.filter(e=>e!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return si[si.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const e=ri(this.element);if(!this.element.matches(":focus-within")){const t=e[0],i=e[e.length-1],r="forward"===this.tabDirection?t:i;"function"==typeof(null==r?void 0:r.focus)&&(this.currentFocus=r,r.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(e){return this.elementsWithTabbableControls.includes(e.tagName.toLowerCase())||e.hasAttribute("controls")}};var ai=new Set;function ni(e){if(ai.add(e),!document.documentElement.classList.contains("sl-scroll-lock")){const e=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+function(){const e=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(e)||!e?0:e}();let t=getComputedStyle(document.documentElement).scrollbarGutter;t&&"auto"!==t||(t="stable"),e<2&&(t=""),document.documentElement.style.setProperty("--sl-scroll-lock-gutter",t),document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${e}px`)}}function li(e){ai.delete(e),0===ai.size&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}function di(e,t,i="vertical",r="smooth"){const s=function(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left
1027:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}(e,t),o=s.top+t.scrollTop,a=s.left+t.scrollLeft,n=t.scrollLeft,l=t.scrollLeft+t.offsetWidth,d=t.scrollTop,c=t.scrollTop+t.offsetHeight;"horizontal"!==i&&"both"!==i||(a<n?t.scrollTo({left:a,behavior:r}):a+e.clientWidth>l&&t.scrollTo({left:a-t.offsetWidth+e.clientWidth,behavior:r})),"vertical"!==i&&"both"!==i||(o<d?t.scrollTo({top:o,behavior:r}):o+e.clientHeight>c&&t.scrollTo({top:o-t.offsetHeight+e.clientHeight,behavior:r}))}var ci=c` 1028 :host { 1029 --width: 31rem; 1030 --header-spacing: var(--sl-spacing-large); 1031 --body-spacing: var(--sl-spacing-large); 1032 --footer-spacing: var(--sl-spacing-large); 1033 1034 display: contents; 1035 } 1036 1037 .dialog { 1038 display: flex; 1039 align-items: center; 1040 justify-content: center; 1041 position: fixed; 1042 top: 0; 1043 right: 0; 1044 bottom: 0; 1045 left: 0; 1046 z-index: var(--sl-z-index-dialog); 1047 } 1048 1049 .dialog__panel { 1050 display: flex; 1051 flex-direction: column; 1052 z-index: 2; 1053 width: var(--width); 1054 max-width: calc(100% - var(--sl-spacing-2x-large)); 1055 max-height: calc(100% - var(--sl-spacing-2x-large)); 1056 background-color: var(--sl-panel-background-color); 1057 border-radius: var(--sl-border-radius-medium); 1058 box-shadow: var(--sl-shadow-x-large); 1059 } 1060 1061 .dialog__panel:focus { 1062 outline: none; 1063 } 1064 1065 /* Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone) */ 1066 @media screen and (max-width: 420px) { 1067 .dialog__panel { 1068 max-height: 80vh; 1069 } 1070 } 1071 1072 .dialog--open .dialog__panel { 1073 display: flex; 1074 opacity: 1; 1075 } 1076 1077 .dialog__header { 1078 flex: 0 0 auto; 1079 display: flex; 1080 } 1081 1082 .dialog__title { 1083 flex: 1 1 auto; 1084 font: inherit; 1085 font-size: var(--sl-font-size-large); 1086 line-height: var(--sl-line-height-dense); 1087 padding: var(--header-spacing); 1088 margin: 0; 1089 } 1090 1091 .dialog__header-actions { 1092 flex-shrink: 0; 1093 display: flex; 1094 flex-wrap: wrap; 1095 justify-content: end; 1096 gap: var(--sl-spacing-2x-small); 1097 padding: 0 var(--header-spacing); 1098 } 1099 1100 .dialog__header-actions sl-icon-button, 1101 .dialog__header-actions ::slotted(sl-icon-button) { 1102 flex: 0 0 auto; 1103 display: flex; 1104 align-items: center; 1105 font-size: var(--sl-font-size-medium); 1106 } 1107 1108 .dialog__body { 1109 flex: 1 1 auto; 1110 display: block; 1111 padding: var(--body-spacing); 1112 overflow: auto; 1113 -webkit-overflow-scrolling: touch; 1114 } 1115 1116 .dialog__footer { 1117 flex: 0 0 auto; 1118 text-align: right; 1119 padding: var(--footer-spacing); 1120 } 1121 1122 .dialog__footer ::slotted(sl-button:not(:first-of-type)) { 1123 margin-inline-start: var(--sl-spacing-x-small); 1124 } 1125 1126 .dialog:not(.dialog--has-footer) .dialog__footer { 1127 display: none; 1128 } 1129 1130 .dialog__overlay { 1131 position: fixed; 1132 top: 0; 1133 right: 0; 1134 bottom: 0; 1135 left: 0; 1136 background-color: var(--sl-overlay-background-color); 1137 } 1138 1139 @media (forced-colors: active) { 1140 .dialog__panel { 1141 border: solid 1px var(--sl-color-neutral-0); 1142 } 1143 } 1144`,hi=e=>{var t;const{activeElement:i}=document;i&&e.contains(i)&&(null==(t=document.activeElement)||t.blur())},ui=c` 1145 :host { 1146 display: inline-block; 1147 color: var(--sl-color-neutral-600); 1148 } 1149 1150 .icon-button { 1151 flex: 0 0 auto; 1152 display: flex; 1153 align-items: center; 1154 background: none; 1155 border: none; 1156 border-radius: var(--sl-border-radius-medium); 1157 font-size: inherit; 1158 color: inherit; 1159 padding: var(--sl-spacing-x-small); 1160 cursor: pointer; 1161 transition: var(--sl-transition-x-fast) color; 1162 -webkit-appearance: none; 1163 } 1164 1165 .icon-button:hover:not(.icon-button--disabled), 1166 .icon-button:focus-visible:not(.icon-button--disabled) { 1167 color: var(--sl-color-primary-600); 1168 } 1169 1170 .icon-button:active:not(.icon-button--disabled) { 1171 color: var(--sl-color-primary-700); 1172 } 1173 1174 .icon-button:focus { 1175 outline: none; 1176 } 1177 1178 .icon-button--disabled { 1179 opacity: 0.5; 1180 cursor: not-allowed; 1181 } 1182 1183 .icon-button:focus-visible { 1184 outline: var(--sl-focus-ring); 1185 outline-offset: var(--sl-focus-ring-offset); 1186 } 1187 1188 .icon-button__icon { 1189 pointer-events: none; 1190 } 1191`,pi=class extends Xe{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}
vendor: 8,220 bytes, lines 1191-1261
1191handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}render(){const e=!!this.href,t=e?Bt`a`:Bt`button`;return Vt` 1192 <${t} 1193 part="base" 1194 class=${Mt({"icon-button":!0,"icon-button--disabled":!e&&this.disabled,"icon-button--focused":this.hasFocus})} 1195 ?disabled=${Ht(e?void 0:this.disabled)} 1196 type=${Ht(e?void 0:"button")} 1197 href=${Ht(e?this.href:void 0)} 1198 target=${Ht(e?this.target:void 0)} 1199 download=${Ht(e?this.download:void 0)} 1200 rel=${Ht(e&&this.target?"noreferrer noopener":void 0)} 1201 role=${Ht(e?void 0:"button")} 1202 aria-disabled=${this.disabled?"true":"false"} 1203 aria-label="${this.label}" 1204 tabindex=${this.disabled?"-1":"0"} 1205 @blur=${this.handleBlur} 1206 @focus=${this.handleFocus} 1207 @click=${this.handleClick} 1208 > 1209 <sl-icon 1210 class="icon-button__icon" 1211 name=${Ht(this.name)} 1212 library=${Ht(this.library)} 1213 src=${Ht(this.src)} 1214 aria-hidden="true" 1215 ></sl-icon> 1216 </${t}> 1217 `}};pi.styles=[Se,ui],pi.dependencies={"sl-icon":Pt},Ne([Ye(".icon-button")],pi.prototype,"button",2),Ne([He()],pi.prototype,"hasFocus",2),Ne([Ve()],pi.prototype,"name",2),Ne([Ve()],pi.prototype,"library",2),Ne([Ve()],pi.prototype,"src",2),Ne([Ve()],pi.prototype,"href",2),Ne([Ve()],pi.prototype,"target",2),Ne([Ve()],pi.prototype,"download",2),Ne([Ve()],pi.prototype,"label",2),Ne([Ve({type:Boolean,reflect:!0})],pi.prototype,"disabled",2);var fi=new Map,mi=new WeakMap;function gi(e,t){return"rtl"===t.toLowerCase()?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function bi(e,t){fi.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function vi(e,t,i){const r=mi.get(e);if(null==r?void 0:r[t])return gi(r[t],i.dir);const s=fi.get(t);return s?gi(s,i.dir):{keyframes:[],options:{duration:0}}}function yi(e,t){return new Promise(i=>{e.addEventListener(t,function r(s){s.target===e&&(e.removeEventListener(t,r),i())})})}function _i(e,t,i){return new Promise(r=>{if((null==i?void 0:i.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=e.animate(t,Fe(Le({},i),{duration:ki()?0:i.duration}));s.addEventListener("cancel",r,{once:!0}),s.addEventListener("finish",r,{once:!0})})}function wi(e){return(e=e.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?1e3*parseFloat(e):parseFloat(e)}function ki(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function xi(e){return Promise.all(e.getAnimations().map(e=>new Promise(t=>{e.cancel(),requestAnimationFrame(t)})))}function $i(e,t){return e.map(e=>Fe(Le({},e),{height:"auto"===e.height?`${t}px`:e.height}))}var Si=class extends Xe{constructor(){super(...arguments),this.hasSlotController=new dt(this,"footer"),this.localize=new $e(this),this.modal=new oi(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.modal.isActive()&&this.open&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),ni(this))}disconnectedCallback(){super.disconnectedCallback(),this.modal.deactivate(),li(this),this.removeOpenListeners()}requestClose(e){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=vi(this,"dialog.denyClose",{dir:this.localize.dir()});return void _i(this.panel,e.keyframes,e.options)}this.hide()}addOpenListeners(){var e;"CloseWatcher"in window?(null==(e=this.closeWatcher)||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var e;null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),ni(this);const e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([xi(this.dialog),xi(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});const t=vi(this,"dialog.show",{dir:this.localize.dir()}),i=vi(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([_i(this.panel,t.keyframes,t.options),_i(this.overlay,i.keyframes,i.options)]),this.emit("sl-after-show")}else{hi(this),this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([xi(this.dialog),xi(this.overlay)]);const e=vi(this,"dialog.hide",{dir:this.localize.dir()}),t=vi(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([_i(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),_i(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,li(this);const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout(()=>i.focus()),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,yi(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,yi(this,"sl-after-hide")}render(){return W` 1218 <div 1219 part="base" 1220 class=${Mt({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})} 1221 > 1222 <div part="overlay" class="dialog__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div> 1223 1224 <div 1225 part="panel" 1226 class="dialog__panel" 1227 role="dialog" 1228 aria-modal="true" 1229 aria-hidden=${this.open?"false":"true"} 1230 aria-label=${Ht(this.noHeader?this.label:void 0)} 1231 aria-labelledby=${Ht(this.noHeader?void 0:"title")} 1232 tabindex="-1" 1233 > 1234 ${this.noHeader?"":W` 1235 <header part="header" class="dialog__header"> 1236 <h2 part="title" class="dialog__title" id="title"> 1237 <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(65279)} </slot> 1238 </h2> 1239 <div part="header-actions" class="dialog__header-actions"> 1240 <slot name="header-actions"></slot> 1241 <sl-icon-button 1242 part="close-button" 1243 exportparts="base:close-button__base" 1244 class="dialog__close" 1245 name="x-lg" 1246 label=${this.localize.term("close")} 1247 library="system" 1248 @click="${()=>this.requestClose("close-button")}" 1249 ></sl-icon-button> 1250 </div> 1251 </header> 1252 `} 1253 ${""} 1254 <div part="body" class="dialog__body" tabindex="-1"><slot></slot></div> 1255 1256 <footer part="footer" class="dialog__footer"> 1257 <slot name="footer"></slot> 1258 </footer> 1259 </div> 1260 </div> 1261 `}};Si.styles=[Se,ci],Si.dependencies={"sl-icon-button":pi},Ne([Ye(".dialog")],Si.prototype,"dialog",2),Ne([Ye(".dialog__panel")],Si.prototype,"panel",2),Ne([Ye(".dialog__overlay")],Si.prototype,"overlay",2),Ne([Ve({type:Boolean,reflect:!0})],Si.prototype,"open",2),Ne([Ve({reflect:!0})],Si.prototype,"label",2),Ne([Ve({attribute:"no-header",type:Boolean,reflect:!0})],Si.prototype,"noHeader",2),Ne([yt("open",{waitUntilFirstUpdate:!0})],Si.prototype,"handleOpenChange",1),bi("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),bi("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),bi("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),bi("dialog.overlay.show",{keyframes:[{opacity:0}
1261,{opacity:1}],options:{duration:250}}),bi("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),Si.define("sl-dialog");var Ci=c` 1262 :host { 1263 --size: 25rem; 1264 --header-spacing: var(--sl-spacing-large); 1265 --body-spacing: var(--sl-spacing-large); 1266 --footer-spacing: var(--sl-spacing-large); 1267 1268 display: contents; 1269 } 1270 1271 .drawer { 1272 top: 0; 1273 inset-inline-start: 0; 1274 width: 100%; 1275 height: 100%; 1276 pointer-events: none; 1277 overflow: hidden; 1278 } 1279 1280 .drawer--contained { 1281 position: absolute; 1282 z-index: initial; 1283 } 1284 1285 .drawer--fixed { 1286 position: fixed; 1287 z-index: var(--sl-z-index-drawer); 1288 } 1289 1290 .drawer__panel { 1291 position: absolute; 1292 display: flex; 1293 flex-direction: column; 1294 z-index: 2; 1295 max-width: 100%; 1296 max-height: 100%; 1297 background-color: var(--sl-panel-background-color); 1298 box-shadow: var(--sl-shadow-x-large); 1299 overflow: auto; 1300 pointer-events: all; 1301 } 1302 1303 .drawer__panel:focus { 1304 outline: none; 1305 } 1306 1307 .drawer--top .drawer__panel { 1308 top: 0; 1309 inset-inline-end: auto; 1310 bottom: auto; 1311 inset-inline-start: 0; 1312 width: 100%; 1313 height: var(--size); 1314 } 1315 1316 .drawer--end .drawer__panel { 1317 top: 0; 1318 inset-inline-end: 0; 1319 bottom: auto; 1320 inset-inline-start: auto; 1321 width: var(--size); 1322 height: 100%; 1323 } 1324 1325 .drawer--bottom .drawer__panel { 1326 top: auto; 1327 inset-inline-end: auto; 1328 bottom: 0; 1329 inset-inline-start: 0; 1330 width: 100%; 1331 height: var(--size); 1332 } 1333 1334 .drawer--start .drawer__panel { 1335 top: 0; 1336 inset-inline-end: auto; 1337 bottom: auto; 1338 inset-inline-start: 0; 1339 width: var(--size); 1340 height: 100%; 1341 } 1342 1343 .drawer__header { 1344 display: flex; 1345 } 1346 1347 .drawer__title { 1348 flex: 1 1 auto; 1349 font: inherit; 1350 font-size: var(--sl-font-size-large); 1351 line-height: var(--sl-line-height-dense); 1352 padding: var(--header-spacing); 1353 margin: 0; 1354 } 1355 1356 .drawer__header-actions { 1357 flex-shrink: 0; 1358 display: flex; 1359 flex-wrap: wrap; 1360 justify-content: end; 1361 gap: var(--sl-spacing-2x-small); 1362 padding: 0 var(--header-spacing); 1363 } 1364 1365 .drawer__header-actions sl-icon-button, 1366 .drawer__header-actions ::slotted(sl-icon-button) { 1367 flex: 0 0 auto; 1368 display: flex; 1369 align-items: center; 1370 font-size: var(--sl-font-size-medium); 1371 } 1372 1373 .drawer__body { 1374 flex: 1 1 auto; 1375 display: block; 1376 padding: var(--body-spacing); 1377 overflow: auto; 1378 -webkit-overflow-scrolling: touch; 1379 } 1380 1381 .drawer__footer { 1382 text-align: right; 1383 padding: var(--footer-spacing); 1384 } 1385 1386 .drawer__footer ::slotted(sl-button:not(:last-of-type)) { 1387 margin-inline-end: var(--sl-spacing-x-small); 1388 } 1389 1390 .drawer:not(.drawer--has-footer) .drawer__footer { 1391 display: none; 1392 } 1393 1394 .drawer__overlay { 1395 display: block; 1396 position: fixed; 1397 top: 0; 1398 right: 0; 1399 bottom: 0; 1400 left: 0; 1401 background-color: var(--sl-overlay-background-color); 1402 pointer-events: all; 1403 } 1404 1405 .drawer--contained .drawer__overlay { 1406 display: none; 1407 } 1408 1409 @media (forced-colors: active) { 1410 .drawer__panel { 1411 border: solid 1px var(--sl-color-neutral-0); 1412 } 1413 } 1414`;function Ei(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ii=class extends Xe{constructor(){super(...arguments),this.hasSlotController=new dt(this,"footer"),this.localize=new $e(this),this.modal=new oi(this),this.open=!1,this.label="",this.placement="end",this.contained=!1,this.noHeader=!1,this.handleDocumentKeyDown=e=>{this.contained||"Escape"===e.key&&this.modal.isActive()&&this.open&&(e.stopImmediatePropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),ni(this)))}disconnectedCallback(){super.disconnectedCallback(),li(this),this.removeOpenListeners()}requestClose(e){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=vi(this,"drawer.denyClose",{dir:this.localize.dir()});return void _i(this.panel,e.keyframes,e.options)}this.hide()}addOpenListeners(){var e;"CloseWatcher"in window?(null==(e=this.closeWatcher)||e.destroy(),this.contained||(this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var e;document.removeEventListener("keydown",this.handleDocumentKeyDown),null==(e=this.closeWatcher)||e.destroy()}
1414async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),ni(this));const e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([xi(this.drawer),xi(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame(()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});const t=vi(this,`drawer.show${Ei(this.placement)}`,{dir:this.localize.dir()}),i=vi(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([_i(this.panel,t.keyframes,t.options),_i(this.overlay,i.keyframes,i.options)]),this.emit("sl-after-show")}else{hi(this),this.emit("sl-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),li(this)),await Promise.all([xi(this.drawer),xi(this.overlay)]);const e=vi(this,`drawer.hide${Ei(this.placement)}`,{dir:this.localize.dir()}),t=vi(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([_i(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),_i(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout(()=>i.focus()),this.emit("sl-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),ni(this)),this.open&&this.contained&&(this.modal.deactivate(),li(this))}async show(){if(!this.open)return this.open=!0,yi(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,yi(this,"sl-after-hide")}render(){return W` 1415 <div 1416 part="base" 1417 class=${Mt({drawer:!0,"drawer--open":this.open,"drawer--top":"top"===this.placement,"drawer--end":"end"===this.placement,"drawer--bottom":"bottom"===this.placement,"drawer--start":"start"===this.placement,"drawer--contained":this.contained,"drawer--fixed":!this.contained,"drawer--rtl":"rtl"===this.localize.dir(),"drawer--has-footer":this.hasSlotController.test("footer")})} 1418 > 1419 <div part="overlay" class="drawer__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div> 1420 1421 <div 1422 part="panel" 1423 class="drawer__panel" 1424 role="dialog" 1425 aria-modal="true" 1426 aria-hidden=${this.open?"false":"true"} 1427 aria-label=${Ht(this.noHeader?this.label:void 0)} 1428 aria-labelledby=${Ht(this.noHeader?void 0:"title")} 1429 tabindex="0" 1430 > 1431 ${this.noHeader?"":W` 1432 <header part="header" class="drawer__header"> 1433 <h2 part="title" class="drawer__title" id="title"> 1434 <!-- If there's no label, use an invisible character to prevent the header from collapsing --> 1435 <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(65279)} </slot> 1436 </h2> 1437 <div part="header-actions" class="drawer__header-actions"> 1438 <slot name="header-actions"></slot> 1439 <sl-icon-button 1440 part="close-button" 1441 exportparts="base:close-button__base" 1442 class="drawer__close" 1443 name="x-lg" 1444 label=${this.localize.term("close")} 1445 library="system" 1446 @click=${()=>this.requestClose("close-button")} 1447 ></sl-icon-button> 1448 </div> 1449 </header> 1450 `} 1451 1452 <slot part="body" class="drawer__body"></slot> 1453 1454 <footer part="footer" class="drawer__footer"> 1455 <slot name="footer"></slot> 1456 </footer> 1457 </div> 1458 </div> 1459 `}};Ii.styles=[Se,Ci],Ii.dependencies={"sl-icon-button":pi},Ne([Ye(".drawer")],Ii.prototype,"drawer",2),Ne([Ye(".drawer__panel")],Ii.prototype,"panel",2),Ne([Ye(".drawer__overlay")],Ii.prototype,"overlay",2),Ne([Ve({type:Boolean,reflect:!0}
1459)],Ii.prototype,"open",2),Ne([Ve({reflect:!0})],Ii.prototype,"label",2),Ne([Ve({reflect:!0})],Ii.prototype,"placement",2),Ne([Ve({type:Boolean,reflect:!0})],Ii.prototype,"contained",2),Ne([Ve({attribute:"no-header",type:Boolean,reflect:!0})],Ii.prototype,"noHeader",2),Ne([yt("open",{waitUntilFirstUpdate:!0})],Ii.prototype,"handleOpenChange",1),Ne([yt("contained",{waitUntilFirstUpdate:!0})],Ii.prototype,"handleNoModalChange",1),bi("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),bi("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}}),bi("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),bi("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),bi("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),bi("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}}),bi("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),bi("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),bi("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),bi("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),bi("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),Ii.define("sl-drawer");var Ti=c` 1460 :host { 1461 display: block; 1462 } 1463 1464 .details { 1465 border: solid 1px var(--sl-color-neutral-200); 1466 border-radius: var(--sl-border-radius-medium); 1467 background-color: var(--sl-color-neutral-0); 1468 overflow-anchor: none; 1469 } 1470 1471 .details--disabled { 1472 opacity: 0.5; 1473 } 1474 1475 .details__header { 1476 display: flex; 1477 align-items: center; 1478 border-radius: inherit; 1479 padding: var(--sl-spacing-medium); 1480 user-select: none; 1481 -webkit-user-select: none; 1482 cursor: pointer; 1483 } 1484 1485 .details__header::-webkit-details-marker { 1486 display: none; 1487 } 1488 1489 .details__header:focus { 1490 outline: none; 1491 } 1492 1493 .details__header:focus-visible { 1494 outline: var(--sl-focus-ring); 1495 outline-offset: calc(1px + var(--sl-focus-ring-offset)); 1496 } 1497 1498 .details--disabled .details__header { 1499 cursor: not-allowed; 1500 } 1501 1502 .details--disabled .details__header:focus-visible { 1503 outline: none; 1504 box-shadow: none; 1505 } 1506 1507 .details__summary { 1508 flex: 1 1 auto; 1509 display: flex; 1510 align-items: center; 1511 } 1512 1513 .details__summary-icon { 1514 flex: 0 0 auto; 1515 display: flex; 1516 align-items: center; 1517 transition: var(--sl-transition-medium) rotate ease; 1518 } 1519 1520 .details--open .details__summary-icon { 1521 rotate: 90deg; 1522 } 1523 1524 .details--open.details--rtl .details__summary-icon { 1525 rotate: -90deg; 1526 } 1527 1528 .details--open slot[name='expand-icon'], 1529 .details:not(.details--open) slot[name='collapse-icon'] { 1530 display: none; 1531 } 1532 1533 .details__body { 1534 overflow: hidden; 1535 } 1536 1537 .details__content { 1538 display: block; 1539 padding: var(--sl-spacing-medium); 1540 } 1541`,Ai=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.open=!1,this.disabled=!1}firstUpdated(){this.body.style.height=this.open?"auto":"0",this.open&&(this.details.open=!0),this.detailsObserver=new MutationObserver(e=>{for(const t of e)"attributes"===t.type&&"open"===t.attributeName&&(this.details.open?this.show():this.hide())}),this.detailsObserver.observe(this.details,{attributes:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this.detailsObserver)||e.disconnect()}handleSummaryClick(e){e.preventDefault(),this.disabled||(this.open?this.hide():this.show(),this.header.focu
1541s())}handleSummaryKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==e.key&&"ArrowLeft"!==e.key||(e.preventDefault(),this.hide()),"ArrowDown"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),this.show())}async handleOpenChange(){if(this.open){this.details.open=!0;if(this.emit("sl-show",{cancelable:!0}).defaultPrevented)return this.open=!1,void(this.details.open=!1);await xi(this.body);const{keyframes:e,options:t}=vi(this,"details.show",{dir:this.localize.dir()});await _i(this.body,$i(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sl-after-show")}else{if(this.emit("sl-hide",{cancelable:!0}).defaultPrevented)return this.details.open=!0,void(this.open=!0);await xi(this.body);const{keyframes:e,options:t}=vi(this,"details.hide",{dir:this.localize.dir()});await _i(this.body,$i(e,this.body.scrollHeight),t),this.body.style.height="auto",this.details.open=!1,this.emit("sl-after-hide")}}async show(){if(!this.open&&!this.disabled)return this.open=!0,yi(this,"sl-after-show")}async hide(){if(this.open&&!this.disabled)return this.open=!1,yi(this,"sl-after-hide")}render(){const e="rtl"===this.localize.dir();return W` 1542 <details 1543 part="base" 1544 class=${Mt({details:!0,"details--open":this.open,"details--disabled":this.disabled,"details--rtl":e})} 1545 > 1546 <summary 1547 part="header" 1548 id="header" 1549 class="details__header" 1550 role="button" 1551 aria-expanded=${this.open?"true":"false"} 1552 aria-controls="content" 1553 aria-disabled=${this.disabled?"true":"false"} 1554 tabindex=${this.disabled?"-1":"0"} 1555 @click=${this.handleSummaryClick} 1556 @keydown=${this.handleSummaryKeyDown} 1557 > 1558 <slot name="summary" part="summary" class="details__summary">${this.summary}</slot> 1559 1560 <span part="summary-icon" class="details__summary-icon"> 1561 <slot name="expand-icon"> 1562 <sl-icon library="system" name=${e?"chevron-left":"chevron-right"}></sl-icon> 1563 </slot> 1564 <slot name="collapse-icon"> 1565 <sl-icon library="system" name=${e?"chevron-left":"chevron-right"}></sl-icon> 1566 </slot> 1567 </span> 1568 </summary> 1569 1570 <div class="details__body" role="region" aria-labelledby="header"> 1571 <slot part="content" id="content" class="details__content"></slot> 1572 </div> 1573 </details> 1574 `}};Ai.styles=[Se,Ti],Ai.dependencies={"sl-icon":Pt},Ne([Ye(".details")],Ai.prototype,"details",2),Ne([Ye(".details__header")],Ai.prototype,"header",2),Ne([Ye(".details__body")],Ai.prototype,"body",2),Ne([Ye(".details__expand-icon-slot")],Ai.prototype,"expandIconSlot",2),Ne([Ve({type:Boolean,reflect:!0})],Ai.prototype,"open",2),Ne([Ve()],Ai.prototype,"summary",2),Ne([Ve({type:Boolean,reflect:!0})],Ai.prototype,"disabled",2),Ne([yt("open",{waitUntilFirstUpdate:!0})],Ai.prototype,"handleOpenChange",1),bi("details.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),bi("details.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}}),Ai.define("sl-details");var Ri=c` 1575 :host { 1576 display: inline-block; 1577 } 1578 1579 .dropdown::part(popup) { 1580 z-index: var(--sl-z-index-dropdown); 1581 } 1582 1583 .dropdown[data-current-placement^='top']::part(popup) { 1584 transform-origin: bottom; 1585 } 1586 1587 .dropdown[data-current-placement^='bottom']::part(popup) { 1588 transform-origin: top; 1589 } 1590 1591 .dropdown[data-current-placement^='left']::part(popup) { 1592 transform-origin: right; 1593 } 1594 1595 .dropdown[data-current-placement^='right']::part(popup) { 1596 transform-origin: left; 1597 } 1598 1599 .dropdown__trigger { 1600 display: block; 1601 } 1602 1603 .dropdown__panel { 1604 font-family: var(--sl-font-sans); 1605 font-size: var(--sl-font-size-medium); 1606 font-weight: var(--sl-font-weight-normal); 1607 box-shadow: var(--sl-shadow-large); 1608 border-radius: var(--sl-border-radius-medium); 1609 pointer-events: none; 1610 } 1611 1612 .dropdown--open .dropdown__panel { 1613 display: block; 1614 pointer-events: all; 1615 } 1616 1617 /* When users slot a menu, make sure it conforms to the popup's auto-size */ 1618 ::slotted(sl-menu) { 1619 max-width: var(--auto-size-available-width) !important; 1620 max-height: var(--auto-size-available-height) !important; 1621 } 1622`,Pi=c` 1623 :host { 1624 --arrow-color: var(--sl-color-neutral-1000); 1625 --arrow-size: 6px; 1626 1627 /* 1628 * These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant 1629 * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating. 1630 */ 1631 --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071); 1632 --arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size)); 1633 1634 display: contents; 1635 } 1636 1637 .popup { 1638 position: absolute; 1639 isolation: isolate; 1640 max-width: var(--auto-size-available-width, none); 1641 max-height: var(--auto-size-available-height, none); 1642 } 1643 1644 .popup--fixed { 1645 position: fixed; 1646 } 1647 1648 .popup:not(.popup--active) { 1649 display: none; 1650 } 1651 1652 .popup__arrow { 1653 position: absolute; 1654 width: calc(var(--arrow-size-diagonal) * 2); 1655 height: calc(var(--arrow-size-diagonal) * 2); 1656 rotate: 45deg; 1657 background: var(--arrow-color); 1658 z-index: -1; 1659 } 1660 1661 /* Hover bridge */ 1662 .popup-hover-bridge:not(.popup-hover-bridge--visible) { 1663 display: none; 1664 } 1665 1666 .popup-hover-bridge { 1667 position: fixed; 1668 z-index: calc(var(--sl-z-index-dropdown) - 1); 1669 top: 0; 1670 right: 0; 1671 bottom: 0; 1672 left: 0; 1673 clip-path: polygon( 1674 var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),
1675 var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0), 1676 var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0), 1677 var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) 1678 ); 1679 } 1680`;const Di=Math.min,Oi=Math.max,zi=Math.round,Li=Math.floor,Fi=e=>({x:e,y:e}),Ni={left:"right",right:"left",bottom:"top",top:"bottom"},Mi={start:"end",end:"start"};function qi(e,t,i){return Oi(e,Di(t,i))}function Ui(e,t){return"function"==typeof e?e(t):e}function Bi(e){return e.split("-")[0]}function ji(e){return e.split("-")[1]}function Vi(e){return"x"===e?"y":"x"}function Hi(e){return"y"===e?"height":"width"}const Wi=new Set(["top","bottom"]);function Gi(e){return Wi.has(Bi(e))?"y":"x"}function Yi(e){return Vi(Gi(e))}function Ki(e){return e.replace(/start|end/g,e=>Mi[e])}const Qi=["left","right"],Xi=["right","left"],Ji=["top","bottom"],Zi=["bottom","top"];function er(e,t,i,r){const s=ji(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Xi:Qi:t?Qi:Xi;case"left":case"right":return t?Ji:Zi;default:return[]}}(Bi(e),"start"===i,r);return s&&(o=o.map(e=>e+"-"+s),t&&(o=o.concat(o.map(Ki)))),o}function tr(e){return e.replace(/left|right|bottom|top/g,e=>Ni[e])}function ir(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function rr(e){const{x:t,y:i,width:r,height:s}=e;return{width:r,height:s,top:i,left:t,right:t+r,bottom:i+s,x:t,y:i}}function sr(e,t,i){let{reference:r,floating:s}=e;const o=Gi(t),a=Yi(t),n=Hi(a),l=Bi(t),d="y"===o,c=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,u=r[n]/2-s[n]/2;let p;switch(l){case"top":p={x:c,y:r.y-s.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(ji(t)){case"start":p[a]-=u*(i&&d?-1:1);break;case"end":p[a]+=u*(i&&d?-1:1)}return p}async function or(e,t){var i;void 0===t&&(t={});const{x:r,y:s,platform:o,rects:a,elements:n,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=Ui(t,e),f=ir(p),m=n[u?"floating"===h?"reference":"floating":h],g=rr(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(m)))||i?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:d,rootBoundary:c,strategy:l})),b="floating"===h?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),y=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},_=rr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-_.top+f.top)/y.y,bottom:(_.bottom-g.bottom+f.bottom)/y.y,left:(g.left-_.left+f.left)/y.x,right:(_.right-g.right+f.right)/y.x}}const ar=new Set(["left","top"]);function nr(){return"undefined"!=typeof window}function lr(e){return hr(e)?(e.nodeName||"").toLowerCase():"#document"}function dr(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function cr(e){var t;return null==(t=(hr(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function hr(e){return!!nr()&&(e instanceof Node||e instanceof dr(e).Node)}function ur(e){return!!nr()&&(e instanceof Element||e instanceof dr(e).Element)}function pr(e){return!!nr()&&(e instanceof HTMLElement||e instanceof dr(e).HTMLElement)}function fr(e){return!(!nr()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof dr(e).ShadowRoot)}const mr=new Set(["inline","contents"]);function gr(e){const{overflow:t,overflowX:i,overflowY:r,display:s}=Ir(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+i)&&!mr.has(s)}const br=new Set(["table","td","th"]);function vr(e){return br.has(lr(e))}const yr=[":popover-open",":modal"];function _r(e){return yr.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const wr=["transform","translate","scale","rotate","perspective"],kr=["transform","translate","scale","rotate","perspective","filter"],xr=["paint","layout","strict","content"];function $r(e){const t=Sr(),i=ur(e)?Ir(e):e;return wr.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||kr.some(e=>(i.willChange||"").includes(e))||xr.some(e=>(i.contain||"").includes(e))}function Sr(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Cr=new Set(["html","body","#document"]);function Er(e){return Cr.has(lr(e))}function Ir(e){return dr(e).getComputedStyle(e)}function Tr(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ar(e){if("html"===lr(e))return e;const t=e.assignedSlot||e.parentNode||fr(e)&&e.host||cr(e);return fr(t)?t.host:t}function Rr(e){const t=Ar(e);return Er(t)?e.ownerDocument?e.ownerDocument.body:e.body:pr(t)&&gr(t)?t:Rr(t)}function Pr(e,t,i){var r;void 0===t&&(t=[]),void 0===i&&(i=!0);const s=Rr(e),o=s===(null==(r=e.ownerDocument)?void 0:r.body),a=dr(s);
vendor: 10,082 bytes, line 1680
1680if(o){const e=Dr(a);return t.concat(a,a.visualViewport||[],gr(s)?s:[],e&&i?Pr(e):[])}return t.concat(s,Pr(s,[],i))}function Dr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Or(e){const t=Ir(e);let i=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=pr(e),o=s?e.offsetWidth:i,a=s?e.offsetHeight:r,n=zi(i)!==o||zi(r)!==a;return n&&(i=o,r=a),{width:i,height:r,$:n}}function zr(e){return ur(e)?e:e.contextElement}function Lr(e){const t=zr(e);if(!pr(t))return Fi(1);const i=t.getBoundingClientRect(),{width:r,height:s,$:o}=Or(t);let a=(o?zi(i.width):i.width)/r,n=(o?zi(i.height):i.height)/s;return a&&Number.isFinite(a)||(a=1),n&&Number.isFinite(n)||(n=1),{x:a,y:n}}const Fr=Fi(0);function Nr(e){const t=dr(e);return Sr()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fr}function Mr(e,t,i,r){void 0===t&&(t=!1),void 0===i&&(i=!1);const s=e.getBoundingClientRect(),o=zr(e);let a=Fi(1);t&&(r?ur(r)&&(a=Lr(r)):a=Lr(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==dr(e))&&t}(o,i,r)?Nr(o):Fi(0);let l=(s.left+n.x)/a.x,d=(s.top+n.y)/a.y,c=s.width/a.x,h=s.height/a.y;if(o){const e=dr(o),t=r&&ur(r)?dr(r):r;let i=e,s=Dr(i);for(;s&&r&&t!==i;){const e=Lr(s),t=s.getBoundingClientRect(),r=Ir(s),o=t.left+(s.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(s.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=o,d+=a,i=dr(s),s=Dr(i)}}return rr({width:c,height:h,x:l,y:d})}function qr(e,t){const i=Tr(e).scrollLeft;return t?t.left+i:Mr(cr(e)).left+i}function Ur(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-qr(e,i),y:i.top+t.scrollTop}}const Br=new Set(["absolute","fixed"]);function jr(e,t,i){let r;if("viewport"===t)r=function(e,t){const i=dr(e),r=cr(e),s=i.visualViewport;let o=r.clientWidth,a=r.clientHeight,n=0,l=0;if(s){o=s.width,a=s.height;const e=Sr();(!e||e&&"fixed"===t)&&(n=s.offsetLeft,l=s.offsetTop)}const d=qr(r);if(d<=0){const e=r.ownerDocument,t=e.body,i=getComputedStyle(t),s="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-s);a<=25&&(o-=a)}else d<=25&&(o+=d);return{width:o,height:a,x:n,y:l}}(e,i);else if("document"===t)r=function(e){const t=cr(e),i=Tr(e),r=e.ownerDocument.body,s=Oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-i.scrollLeft+qr(e);const n=-i.scrollTop;return"rtl"===Ir(r).direction&&(a+=Oi(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:n}}(cr(e));else if(ur(t))r=function(e,t){const i=Mr(e,!0,"fixed"===t),r=i.top+e.clientTop,s=i.left+e.clientLeft,o=pr(e)?Lr(e):Fi(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:s*o.x,y:r*o.y}}(t,i);else{const i=Nr(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return rr(r)}function Vr(e,t){const i=Ar(e);return!(i===t||!ur(i)||Er(i))&&("fixed"===Ir(i).position||Vr(i,t))}function Hr(e,t,i){const r=pr(t),s=cr(t),o="fixed"===i,a=Mr(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const l=Fi(0);function d(){l.x=qr(s)}if(r||!r&&!o)if(("body"!==lr(t)||gr(s))&&(n=Tr(t)),r){const e=Mr(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else s&&d();o&&!r&&s&&d();const c=!s||r||o?Fi(0):Ur(s,n);return{x:a.left+n.scrollLeft-l.x-c.x,y:a.top+n.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Wr(e){return"static"===Ir(e).position}function Gr(e,t){if(!pr(e)||"fixed"===Ir(e).position)return null;if(t)return t(e);let i=e.offsetParent;return cr(e)===i&&(i=i.ownerDocument.body),i}function Yr(e,t){const i=dr(e);if(_r(e))return i;if(!pr(e)){let t=Ar(e);for(;t&&!Er(t);){if(ur(t)&&!Wr(t))return t;t=Ar(t)}return i}let r=Gr(e,t);for(;r&&vr(r)&&Wr(r);)r=Gr(r,t);return r&&Er(r)&&Wr(r)&&!$r(r)?i:r||function(e){let t=Ar(e);for(;pr(t)&&!Er(t);){if($r(t))return t;if(_r(t))return null;t=Ar(t)}return null}(e)||i}const Kr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:r,strategy:s}=e;const o="fixed"===s,a=cr(r),n=!!t&&_r(t.floating);if(r===a||n&&o)return i;let l={scrollLeft:0,scrollTop:0},d=Fi(1);const c=Fi(0),h=pr(r);if((h||!h&&!o)&&(("body"!==lr(r)||gr(a))&&(l=Tr(r)),pr(r))){const e=Mr(r);d=Lr(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}const u=!a||h||o?Fi(0):Ur(a,l);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:i.y*d.y-l.scrollTop*d.y+c.y+u.y}},getDocumentElement:cr,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:r,strategy:s}=e;const o=[..."clippingAncestors"===i?_r(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let r=Pr(e,[],!1).filter(e=>ur(e)&&"body"!==lr(e)),s=null;const o="fixed"===Ir(e).position;let a=o?Ar(e):e;for(;ur(a)&&!Er(a);){const t=Ir(a),i=$r(a);i||"fixed"!==t.position||(s=null),(o?!i&&!s:!i&&"static"===t.position&&s&&Br.has(s.position)||gr(a)&&!i&&Vr(e,a))?r=r.filter(e=>e!==a):s=t,a=Ar(a)}return t.set(e,r),r}(t,this._c):[].concat(i),r],a=o[0],n=o.reduce((e,i)=>{const r=jr(t,i,s);return e.top=Oi(r.top,e.top),e.right=Di(r.right,e.right),e.bottom=Di(r.bottom,e.bottom),e.left=Oi(r.left,e.left),e},jr(t,a,s));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:Yr,getElementRects:async function(e){const t=this.getOffsetParent||Yr,i=this.getDimensions,r=await i(e.floating);return{reference:Hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=Or(e);return{width:t,height:i}},getScale:Lr,isElement:ur,isRTL:function(e){return"rtl"===Ir(e).direction}};function Qr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xr(e,t,i,r){void 0===r&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,d=zr(e),c=s||o?[...d?Pr(d):[],...Pr(t)]:[];c.forEach(e=>{s&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const h=d&&n?function(e,t){let i,r=null;const s=cr(e);function o(){var e;clearTimeout(i),null==(e=r)||e.disconnect(),r=null}return function a(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:h,width:u,height:p}=d;if(n||t(),!u||!p)return;const f={rootMargin:-Li(h)+"px "+-Li(s.clientWidth-(c+u))+"px "+-Li(s.clientHeight-(h+p))+"px "+-Li(c)+"px",threshold:Oi(0,Di(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):i=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Qr(d,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...f,root:s.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),o}(d,i):null;let u,p=-1,f=null;a&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),i()}),d&&!l&&f.observe(d),f.observe(t));let m=l?Mr(e):null;return l&&function t(){const r=Mr(e);m&&!Qr(m,r)&&i();m=r,u=requestAnimationFrame(t)}(),i(),()=>{var e;c.forEach(e=>{s&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(u)}}const Jr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,r;const{x:s,y:o,placement:a,middlewareData:n}=t,l=await async function(e,t){const{placement:i,platform:r,elements:s}=e,o=await(null==r.isRTL?void 0:r.isRTL(s.floating)),a=Bi(i),n=ji(i),l="y"===Gi(i),d=ar.has(a)?-1:1,c=o&&l?-1:1,h=Ui(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof f&&(p="end"===n?-1*f:f),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(t,e);return a===(null==(i=n.offset)?void 0:i.placement)&&null!=(r=n.arrow)&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:a}}}}},Zr=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...l}=Ui(e,t),d={x:i,y:r},c=await or(t,l),h=Gi(Bi(s)),u=Vi(h);let p=d[u],f=d[h];if(o){const e="y"===u?"bottom":"right";p=qi(p+c["y"===u?"top":"left"],p,p-c[e])}if(a){const e="y"===h?"bottom":"right";f=qi(f+c["y"===h?"top":"left"],f,f-c[e])}const m=n.fn({...t,[u]:p,[h]:f});return{...m,data:{x:m.x-i,y:m.y-r,enabled:{[u]:o,[h]:a}}}}}},es=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:n,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Ui(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const b=Bi(s),v=Gi(n),y=Bi(n)===n,_=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=u||(y||!m?[tr(n)]:function(e){const t=tr(e);return[Ki(e),t,Ki(t)]}(n)),k="none"!==f;!u&&k&&w.push(...er(n,m,f,_));const x=[n,...w],$=await or(t,g),S=[];let C=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&S.push($[b]),h){const e=function(e,t,i){void 0===i&&(i=!1);const r=ji(e),s=Yi(e),o=Hi(s);let a="x"===s?r===(i?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=tr(a)),[a,tr(a)]}(s,a,_);S.push($[e[0]],$[e[1]])}if(C=[...C,{placement:s,overflows:S}],!S.every(e=>e<=0)){var E,I;const e=((null==(E=o.flip)?void 0:E.index)||0)+1,t=x[e];if(t){if(!("alignment"===h&&v!==Gi(t))||C.every(e=>Gi(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:C},reset:{placement:t}}}let i=null==(I=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:I.placement;if(!i)switch(p){case"bestFit":{var T;const e=null==(T=C.filter(e=>{if(k){const t=Gi(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>
vendor: 6,676 bytes, line 1680
1680e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:T[0];e&&(i=e);break}case"initialPlacement":i=n}if(s!==i)return{reset:{placement:i}}}return{}}}},ts=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,r;const{placement:s,rects:o,platform:a,elements:n}=t,{apply:l=()=>{},...d}=Ui(e,t),c=await or(t,d),h=Bi(s),u=ji(s),p="y"===Gi(s),{width:f,height:m}=o.floating;let g,b;"top"===h||"bottom"===h?(g=h,b=u===(await(null==a.isRTL?void 0:a.isRTL(n.floating))?"start":"end")?"left":"right"):(b=h,g="end"===u?"top":"bottom");const v=m-c.top-c.bottom,y=f-c.left-c.right,_=Di(m-c[g],v),w=Di(f-c[b],y),k=!t.middlewareData.shift;let x=_,$=w;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&($=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(x=v),k&&!u){const e=Oi(c.left,0),t=Oi(c.right,0),i=Oi(c.top,0),r=Oi(c.bottom,0);p?$=f-2*(0!==e||0!==t?e+t:Oi(c.left,c.right)):x=m-2*(0!==i||0!==r?i+r:Oi(c.top,c.bottom))}await l({...t,availableWidth:$,availableHeight:x});const S=await a.getDimensions(n.floating);return f!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},is=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:r,placement:s,rects:o,platform:a,elements:n,middlewareData:l}=t,{element:d,padding:c=0}=Ui(e,t)||{};if(null==d)return{};const h=ir(c),u={x:i,y:r},p=Yi(s),f=Hi(p),m=await a.getDimensions(d),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",_=o.reference[f]+o.reference[p]-u[p]-o.floating[f],w=u[p]-o.reference[p],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d));let x=k?k[y]:0;x&&await(null==a.isElement?void 0:a.isElement(k))||(x=n.floating[y]||o.floating[f]);const $=_/2-w/2,S=x/2-m[f]/2-1,C=Di(h[b],S),E=Di(h[v],S),I=C,T=x-m[f]-E,A=x/2-m[f]/2+$,R=qi(I,A,T),P=!l.arrow&&null!=ji(s)&&A!==R&&o.reference[f]/2-(A<I?C:E)-m[f]/2<0,D=P?A<I?A-I:A-T:0;return{[p]:u[p]+D,data:{[p]:R,centerOffset:A-R-D,...P&&{alignmentOffset:D}},reset:P}}}),rs=(e,t,i)=>{const r=new Map,s={platform:Kr,...i},o={...s.platform,_c:r};return(async(e,t,i)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}=i,n=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:h}=sr(d,r,l),u=r,p={},f=0;for(let i=0;i<n.length;i++){const{name:o,fn:m}=n[i],{x:g,y:b,data:v,reset:y}=await m({x:c,y:h,initialPlacement:r,placement:u,strategy:s,middlewareData:p,rects:d,platform:a,elements:{reference:e,floating:t}});c=null!=g?g:c,h=null!=b?b:h,p={...p,[o]:{...p[o],...v}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(u=y.placement),y.rects&&(d=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:s}):y.rects),({x:c,y:h}=sr(d,u,l))),i=-1)}return{x:c,y:h,placement:u,strategy:s,middlewareData:p}})(e,t,{...s,platform:o})};function ss(e){return function(e){for(let t=e;t;t=os(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=os(e);t;t=os(t)){if(!(t instanceof Element))continue;const e=getComputedStyle(t);if("contents"!==e.display){if("static"!==e.position||$r(e))return t;if("BODY"===t.tagName)return t}}return null}(e)}function os(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}var as=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect();let i=0,r=0,s=0,o=0,a=0,n=0,l=0,d=0;this.placement.includes("top")||this.placement.includes("bottom")?e.top<t.top?(i=e.left,r=e.bottom,s=e.right,o=e.bottom,a=t.left,n=t.top,l=t.right,d=t.top):(i=t.left,r=t.bottom,s=t.right,o=t.bottom,a=e.left,n=e.top,l=e.right,d=e.top):e.left<t.left?(i=e.right,r=e.top,s=t.left,o=t.top,a=e.right,n=e.bottom,l=t.left,d=t.bottom):(i=t.right,r=t.top,s=e.left,o=e.top,a=t.right,n=t.bottom,l=e.left,d=e.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${i}px`),this.style.setProperty("--hover-bridge-top-left-y",`${r}px`),this.style.setProperty("--hover-bridge-top-right-x",`${s}px`),this.style.setProperty("--hover-bridge-top-right-y",`${o}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${a}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${n}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${d}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||function(e){return null!==e&&"object"==typeof e&&"getBoundingClientRect"in e&&(!("contextElement"in e)||e.contextElement instanceof Element)}(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.active&&this.start()}start(){this.anchorEl&&this.active&&(this.cleanup=Xr(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[Jr({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(ts({apply:({rects:e})=>{const t="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=t?`${e.reference.width}px`:"",this.popup.style.height=i?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(es({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding}
vendor: 3,554 bytes, lines 1680-1695
1680)),this.shift&&e.push(Zr({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(ts({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:t})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${t}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(is({element:this.arrowEl,padding:this.arrowPadding}));const t="absolute"===this.strategy?e=>Kr.getOffsetParent(e,ss):Kr.getOffsetParent;rs(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy,platform:Fe(Le({},Kr),{getOffsetParent:t})}).then(({x:e,y:t,middlewareData:i,placement:r})=>{const s="rtl"===this.localize.dir(),o={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${e}px`,top:`${t}px`}),this.arrow){const e=i.arrow.x,t=i.arrow.y;let r="",a="",n="",l="";if("start"===this.arrowPlacement){const i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",a=s?i:"",l=s?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";a=s?"":i,l=s?i:"",n="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":"",r="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof e?`${e}px`:"",r="number"==typeof t?`${t}px`:"");Object.assign(this.arrowEl.style,{top:r,right:a,bottom:n,left:l,[o]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.emit("sl-reposition")}render(){return W` 1681 <slot name="anchor" @slotchange=${this.handleAnchorChange}></slot> 1682 1683 <span 1684 part="hover-bridge" 1685 class=${Mt({"popup-hover-bridge":!0,"popup-hover-bridge--visible":this.hoverBridge&&this.active})} 1686 ></span> 1687 1688 <div 1689 part="popup" 1690 class=${Mt({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow})} 1691 > 1692 <slot></slot> 1693 ${this.arrow?W`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""} 1694 </div> 1695 `}};as.styles=[Se,Pi],Ne([Ye(".popup")],as.prototype,"popup",2),Ne([Ye(".popup__arrow")],as.prototype,"arrowEl",2),Ne([Ve()],as.prototype,"anchor",2),Ne([Ve({type:Boolean,reflect:!0})],as.prototype,"active",2),Ne([Ve({reflect:!0})],as.prototype,"placement",2),Ne([Ve({reflect:!0})],as.prototype,"strategy",2),Ne([Ve({type:Number})],as.prototype,"distance",2),Ne([Ve({type:Number})],as.prototype,"skidding",2),Ne([Ve({type:Boolean})],as.prototype,"arrow",2),Ne([Ve({attribute:"arrow-placement"})],as.prototype,"arrowPlacement",2),Ne([Ve({attribute:"arrow-padding",type:Number})],as.prototype,"arrowPadding",2),Ne([Ve({type:Boolean})],as.prototype,"flip",2),Ne([Ve({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(e=>e.trim()).filter(e=>""!==e),toAttribute:e=>e.join(" ")}}
vendor: 4,760 bytes, line 1695
1695)],as.prototype,"flipFallbackPlacements",2),Ne([Ve({attribute:"flip-fallback-strategy"})],as.prototype,"flipFallbackStrategy",2),Ne([Ve({type:Object})],as.prototype,"flipBoundary",2),Ne([Ve({attribute:"flip-padding",type:Number})],as.prototype,"flipPadding",2),Ne([Ve({type:Boolean})],as.prototype,"shift",2),Ne([Ve({type:Object})],as.prototype,"shiftBoundary",2),Ne([Ve({attribute:"shift-padding",type:Number})],as.prototype,"shiftPadding",2),Ne([Ve({attribute:"auto-size"})],as.prototype,"autoSize",2),Ne([Ve()],as.prototype,"sync",2),Ne([Ve({type:Object})],as.prototype,"autoSizeBoundary",2),Ne([Ve({attribute:"auto-size-padding",type:Number})],as.prototype,"autoSizePadding",2),Ne([Ve({attribute:"hover-bridge",type:Boolean})],as.prototype,"hoverBridge",2);var ns=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.skidding=0,this.hoist=!1,this.sync=void 0,this.handleKeyDown=e=>{this.open&&"Escape"===e.key&&(e.stopPropagation(),this.hide(),this.focusOnTrigger())},this.handleDocumentKeyDown=e=>{var t;if("Escape"===e.key&&this.open&&!this.closeWatcher)return e.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===e.key){if(this.open&&"sl-menu-item"===(null==(t=document.activeElement)?void 0:t.tagName.toLowerCase()))return e.preventDefault(),this.hide(),void this.focusOnTrigger();const i=(e,t)=>{if(!e)return null;const r=e.closest(t);if(r)return r;const s=e.getRootNode();return s instanceof ShadowRoot?i(s.host,t):null};setTimeout(()=>{var e;const t=(null==(e=this.containingElement)?void 0:e.getRootNode())instanceof ShadowRoot?Zt():document.activeElement;this.containingElement&&i(t,this.containingElement.tagName.toLowerCase())===this.containingElement||this.hide()})}},this.handleDocumentMouseDown=e=>{const t=e.composedPath();this.containingElement&&!t.includes(this.containingElement)&&this.hide()},this.handlePanelSelect=e=>{const t=e.target;this.stayOpenOnSelect||"sl-menu"!==t.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger())}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const e=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(null==e?void 0:e.focus)&&e.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(e=>"sl-menu"===e.tagName.toLowerCase())}handleTriggerClick(){this.open?this.hide():(this.show(),this.focusOnTrigger())}async handleTriggerKeyDown(e){if([" ","Enter"].includes(e.key))return e.preventDefault(),void this.handleTriggerClick();const t=this.getMenu();if(t){const i=t.getAllItems(),r=i[0],s=i[i.length-1];["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),this.open||(this.show(),await this.updateComplete),i.length>0&&this.updateComplete.then(()=>{"ArrowDown"!==e.key&&"Home"!==e.key||(t.setCurrentItem(r),r.focus()),"ArrowUp"!==e.key&&"End"!==e.key||(t.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(e){" "===e.key&&e.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const e=this.trigger.assignedElements({flatten:!0}).find(e=>function(e){var t,i;const r=ri(e);return{start:null!=(t=r[0])?t:null,end:null!=(i=r[r.length-1])?i:null}}(e).start);let t;if(e){switch(e.tagName.toLowerCase()){case"sl-button":case"sl-icon-button":t=e.button;break;default:t=e}t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,yi(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,yi(this,"sl-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){var e;this.panel.addEventListener("sl-select",this.handlePanelSelect),"CloseWatcher"in window?(null==(e=this.closeWatcher)||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide(),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){var e;this.panel&&(this.panel.removeEventListener("sl-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),null==(e=this.closeWatcher)||e.destroy()}async handleOpenChange(){if(this.disabled)this.open=!1;
vendor: 4,156 bytes, lines 1695-1775
1695else if(this.updateAccessibleTrigger(),this.open){this.emit("sl-show"),this.addOpenListeners(),await xi(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:e,options:t}=vi(this,"dropdown.show",{dir:this.localize.dir()});await _i(this.popup.popup,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),await xi(this);const{keyframes:e,options:t}=vi(this,"dropdown.hide",{dir:this.localize.dir()});await _i(this.popup.popup,e,t),this.panel.hidden=!0,this.popup.active=!1,this.emit("sl-after-hide")}}render(){return W` 1696 <sl-popup 1697 part="base" 1698 exportparts="popup:base__popup" 1699 id="dropdown" 1700 placement=${this.placement} 1701 distance=${this.distance} 1702 skidding=${this.skidding} 1703 strategy=${this.hoist?"fixed":"absolute"} 1704 flip 1705 shift 1706 auto-size="vertical" 1707 auto-size-padding="10" 1708 sync=${Ht(this.sync?this.sync:void 0)} 1709 class=${Mt({dropdown:!0,"dropdown--open":this.open})} 1710 > 1711 <slot 1712 name="trigger" 1713 slot="anchor" 1714 part="trigger" 1715 class="dropdown__trigger" 1716 @click=${this.handleTriggerClick} 1717 @keydown=${this.handleTriggerKeyDown} 1718 @keyup=${this.handleTriggerKeyUp} 1719 @slotchange=${this.handleTriggerSlotChange} 1720 ></slot> 1721 1722 <div aria-hidden=${this.open?"false":"true"} aria-labelledby="dropdown"> 1723 <slot part="panel" class="dropdown__panel"></slot> 1724 </div> 1725 </sl-popup> 1726 `}};ns.styles=[Se,Ri],ns.dependencies={"sl-popup":as},Ne([Ye(".dropdown")],ns.prototype,"popup",2),Ne([Ye(".dropdown__trigger")],ns.prototype,"trigger",2),Ne([Ye(".dropdown__panel")],ns.prototype,"panel",2),Ne([Ve({type:Boolean,reflect:!0})],ns.prototype,"open",2),Ne([Ve({reflect:!0})],ns.prototype,"placement",2),Ne([Ve({type:Boolean,reflect:!0})],ns.prototype,"disabled",2),Ne([Ve({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],ns.prototype,"stayOpenOnSelect",2),Ne([Ve({attribute:!1})],ns.prototype,"containingElement",2),Ne([Ve({type:Number})],ns.prototype,"distance",2),Ne([Ve({type:Number})],ns.prototype,"skidding",2),Ne([Ve({type:Boolean})],ns.prototype,"hoist",2),Ne([Ve({reflect:!0})],ns.prototype,"sync",2),Ne([yt("open",{waitUntilFirstUpdate:!0})],ns.prototype,"handleOpenChange",1),bi("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),bi("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});var ls=ns;ns.define("sl-dropdown"),Pt.define("sl-icon"),pi.define("sl-icon-button");var ds=c` 1727 :host { 1728 display: block; 1729 } 1730 1731 .input { 1732 flex: 1 1 auto; 1733 display: inline-flex; 1734 align-items: stretch; 1735 justify-content: start; 1736 position: relative; 1737 width: 100%; 1738 font-family: var(--sl-input-font-family); 1739 font-weight: var(--sl-input-font-weight); 1740 letter-spacing: var(--sl-input-letter-spacing); 1741 vertical-align: middle; 1742 overflow: hidden; 1743 cursor: text; 1744 transition: 1745 var(--sl-transition-fast) color, 1746 var(--sl-transition-fast) border, 1747 var(--sl-transition-fast) box-shadow, 1748 var(--sl-transition-fast) background-color; 1749 } 1750 1751 /* Standard inputs */ 1752 .input--standard { 1753 background-color: var(--sl-input-background-color); 1754 border: solid var(--sl-input-border-width) var(--sl-input-border-color); 1755 } 1756 1757 .input--standard:hover:not(.input--disabled) { 1758 background-color: var(--sl-input-background-color-hover); 1759 border-color: var(--sl-input-border-color-hover); 1760 } 1761 1762 .input--standard.input--focused:not(.input--disabled) { 1763 background-color: var(--sl-input-background-color-focus); 1764 border-color: var(--sl-input-border-color-focus); 1765 box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color); 1766 } 1767 1768 .input--standard.input--focused:not(.input--disabled) .input__control { 1769 color: var(--sl-input-color-focus); 1770 } 1771 1772 .input--standard.input--disabled { 1773 background-color: var(--sl-input-background-color-disabled); 1774 border-color: var(--sl-input-border-color-disabled); 1775 opacity: 0.5;
1776 cursor: not-allowed; 1777 } 1778 1779 .input--standard.input--disabled .input__control { 1780 color: var(--sl-input-color-disabled); 1781 } 1782 1783 .input--standard.input--disabled .input__control::placeholder { 1784 color: var(--sl-input-placeholder-color-disabled); 1785 } 1786 1787 /* Filled inputs */ 1788 .input--filled { 1789 border: none; 1790 background-color: var(--sl-input-filled-background-color); 1791 color: var(--sl-input-color); 1792 } 1793 1794 .input--filled:hover:not(.input--disabled) { 1795 background-color: var(--sl-input-filled-background-color-hover); 1796 } 1797 1798 .input--filled.input--focused:not(.input--disabled) { 1799 background-color: var(--sl-input-filled-background-color-focus); 1800 outline: var(--sl-focus-ring); 1801 outline-offset: var(--sl-focus-ring-offset); 1802 } 1803 1804 .input--filled.input--disabled { 1805 background-color: var(--sl-input-filled-background-color-disabled); 1806 opacity: 0.5; 1807 cursor: not-allowed; 1808 } 1809 1810 .input__control { 1811 flex: 1 1 auto; 1812 font-family: inherit; 1813 font-size: inherit; 1814 font-weight: inherit; 1815 min-width: 0; 1816 height: 100%; 1817 color: var(--sl-input-color); 1818 border: none; 1819 background: inherit; 1820 box-shadow: none; 1821 padding: 0; 1822 margin: 0; 1823 cursor: inherit; 1824 -webkit-appearance: none; 1825 } 1826 1827 .input__control::-webkit-search-decoration, 1828 .input__control::-webkit-search-cancel-button, 1829 .input__control::-webkit-search-results-button, 1830 .input__control::-webkit-search-results-decoration { 1831 -webkit-appearance: none; 1832 } 1833 1834 .input__control:-webkit-autofill, 1835 .input__control:-webkit-autofill:hover, 1836 .input__control:-webkit-autofill:focus, 1837 .input__control:-webkit-autofill:active { 1838 box-shadow: 0 0 0 var(--sl-input-height-large) var(--sl-input-background-color-hover) inset !important; 1839 -webkit-text-fill-color: var(--sl-color-primary-500); 1840 caret-color: var(--sl-input-color); 1841 } 1842 1843 .input--filled .input__control:-webkit-autofill, 1844 .input--filled .input__control:-webkit-autofill:hover, 1845 .input--filled .input__control:-webkit-autofill:focus, 1846 .input--filled .input__control:-webkit-autofill:active { 1847 box-shadow: 0 0 0 var(--sl-input-height-large) var(--sl-input-filled-background-color) inset !important; 1848 } 1849 1850 .input__control::placeholder { 1851 color: var(--sl-input-placeholder-color); 1852 user-select: none; 1853 -webkit-user-select: none; 1854 } 1855 1856 .input:hover:not(.input--disabled) .input__control { 1857 color: var(--sl-input-color-hover); 1858 } 1859 1860 .input__control:focus { 1861 outline: none; 1862 } 1863 1864 .input__prefix, 1865 .input__suffix { 1866 display: inline-flex; 1867 flex: 0 0 auto; 1868 align-items: center; 1869 cursor: default; 1870 } 1871 1872 .input__prefix ::slotted(sl-icon), 1873 .input__suffix ::slotted(sl-icon) { 1874 color: var(--sl-input-icon-color); 1875 } 1876 1877 /* 1878 * Size modifiers 1879 */ 1880 1881 .input--small { 1882 border-radius: var(--sl-input-border-radius-small); 1883 font-size: var(--sl-input-font-size-small); 1884 height: var(--sl-input-height-small); 1885 } 1886 1887 .input--small .input__control { 1888 height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); 1889 padding: 0 var(--sl-input-spacing-small); 1890 } 1891 1892 .input--small .input__clear, 1893 .input--small .input__password-toggle { 1894 width: calc(1em + var(--sl-input-spacing-small) * 2); 1895 } 1896 1897 .input--small .input__prefix ::slotted(*) { 1898 margin-inline-start: var(--sl-input-spacing-small); 1899 } 1900 1901 .input--small .input__suffix ::slotted(*) { 1902 margin-inline-end: var(--sl-input-spacing-small); 1903 } 1904 1905 .input--medium { 1906 border-radius: var(--sl-input-border-radius-medium); 1907 font-size: var(--sl-input-font-size-medium); 1908 height: var(--sl-input-height-medium); 1909 } 1910 1911 .input--medium .input__control { 1912 height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); 1913 padding: 0 var(--sl-input-spacing-medium); 1914 } 1915 1916 .input--medium .input__clear, 1917 .input--medium .input__password-toggle { 1918 width: calc(1em + var(--sl-input-spacing-medium) * 2); 1919 } 1920 1921 .input--medium .input__prefix ::slotted(*) { 1922 margin-inline-start: var(--sl-input-spacing-medium); 1923 } 1924 1925 .input--medium .input__suffix ::slotted(*) { 1926 margin-inline-end: var(--sl-input-spacing-medium); 1927 } 1928 1929 .input--large { 1930 border-radius: var(--sl-input-border-radius-large); 1931 font-size: var(--sl-input-font-size-large); 1932 height: var(--sl-input-height-large); 1933 } 1934
1935 .input--large .input__control { 1936 height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); 1937 padding: 0 var(--sl-input-spacing-large); 1938 } 1939 1940 .input--large .input__clear, 1941 .input--large .input__password-toggle { 1942 width: calc(1em + var(--sl-input-spacing-large) * 2); 1943 } 1944 1945 .input--large .input__prefix ::slotted(*) { 1946 margin-inline-start: var(--sl-input-spacing-large); 1947 } 1948 1949 .input--large .input__suffix ::slotted(*) { 1950 margin-inline-end: var(--sl-input-spacing-large); 1951 } 1952 1953 /* 1954 * Pill modifier 1955 */ 1956 1957 .input--pill.input--small { 1958 border-radius: var(--sl-input-height-small); 1959 } 1960 1961 .input--pill.input--medium { 1962 border-radius: var(--sl-input-height-medium); 1963 } 1964 1965 .input--pill.input--large { 1966 border-radius: var(--sl-input-height-large); 1967 } 1968 1969 /* 1970 * Clearable + Password Toggle 1971 */ 1972 1973 .input__clear, 1974 .input__password-toggle { 1975 display: inline-flex; 1976 align-items: center; 1977 justify-content: center; 1978 font-size: inherit; 1979 color: var(--sl-input-icon-color); 1980 border: none; 1981 background: none; 1982 padding: 0; 1983 transition: var(--sl-transition-fast) color; 1984 cursor: pointer; 1985 } 1986 1987 .input__clear:hover, 1988 .input__password-toggle:hover { 1989 color: var(--sl-input-icon-color-hover); 1990 } 1991 1992 .input__clear:focus, 1993 .input__password-toggle:focus { 1994 outline: none; 1995 } 1996 1997 /* Don't show the browser's password toggle in Edge */ 1998 ::-ms-reveal { 1999 display: none; 2000 } 2001 2002 /* Hide the built-in number spinner */ 2003 .input--no-spin-buttons input[type='number']::-webkit-outer-spin-button, 2004 .input--no-spin-buttons input[type='number']::-webkit-inner-spin-button { 2005 -webkit-appearance: none; 2006 display: none; 2007 } 2008 2009 .input--no-spin-buttons input[type='number'] { 2010 -moz-appearance: textfield; 2011 } 2012`,cs=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new dt(this,"help-text","label"),this.localize=new $e(this),this.hasFocus=!1,this.title="",this.__numberInput=Object.assign(document.createElement("input"),{type:"number"}),this.__dateInput=Object.assign(document.createElement("input"),{type:"date"}),this.type="text",this.name="",this.value="",this.defaultValue="",this.size="medium",this.filled=!1,this.pill=!1,this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.spellcheck=!0}get valueAsDate(){var e;return this.__dateInput.type=this.type,this.__dateInput.value=this.value,(null==(e=this.input)?void 0:e.valueAsDate)||this.__dateInput.valueAsDate}set valueAsDate(e){this.__dateInput.type=this.type,this.__dateInput.valueAsDate=e,this.value=this.__dateInput.value}get valueAsNumber(){var e;return this.__numberInput.value=this.value,(null==(e=this.input)?void 0:e.valueAsNumber)||this.__numberInput.valueAsNumber}set valueAsNumber(e){this.__numberInput.valueAsNumber=e,this.value=this.__numberInput.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.emit("sl-change")}handleClearClick(e){e.preventDefault(),""!==this.value&&(this.value="",this.emit("sl-clear"),this.emit("sl-input"),this.emit("sl-change")),this.input.focus()}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout(()=>{e.defaultPrevented||e.isComposing||this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,t,i="none"){this.input.setSelectionRange(e,t,i)}setRangeText(e,t,i,r="preserve"){const s=null!=t?t:this.input.selectionStart,o=null!=i?i:this.input.selectionEnd;this.input.setRangeText(e,s,o,r),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),i=!!this.label||!!e,r=!!this.helpText||!!t,s=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return W` 2013 <div 2014 part="form-control" 2015 class=${Mt({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":i,"form-control--has-help-text":r})} 2016 > 2017 <label 2018 part="form-control-label" 2019 class="form-control__label" 2020 for="input" 2021 aria-hidden=${i?"false":"true"} 2022 > 2023 <slot name="label">${this.label}</slot> 2024 </label> 2025 2026 <div part="form-control-input" class="form-control-input"> 2027 <div 2028 part="base" 2029 class=${Mt({input:!0,"input--small":"small"===this.size,"input--medium":"medium"===this.size,"input--large":"large"===this.size,"input--pill":this.pill,"input--standard":!this.filled,"input--filled":this.filled,"input--disabled":this.disabled,"input--focused":this.hasFocus,"input--empty":!this.value,"input--no-spin-buttons":this.noSpinButtons})} 2030 >
2031 <span part="prefix" class="input__prefix"> 2032 <slot name="prefix"></slot> 2033 </span> 2034 2035 <input 2036 part="input" 2037 id="input" 2038 class="input__control" 2039 type=${"password"===this.type&&this.passwordVisible?"text":this.type} 2040 title=${this.title} 2041 name=${Ht(this.name)} 2042 ?disabled=${this.disabled} 2043 ?readonly=${this.readonly} 2044 ?required=${this.required} 2045 placeholder=${Ht(this.placeholder)} 2046 minlength=${Ht(this.minlength)} 2047 maxlength=${Ht(this.maxlength)} 2048 min=${Ht(this.min)} 2049 max=${Ht(this.max)} 2050 step=${Ht(this.step)} 2051 .value=${Qt(this.value)} 2052 autocapitalize=${Ht(this.autocapitalize)} 2053 autocomplete=${Ht(this.autocomplete)} 2054 autocorrect=${Ht(this.autocorrect)} 2055 ?autofocus=${this.autofocus} 2056 spellcheck=${this.spellcheck} 2057 pattern=${Ht(this.pattern)} 2058 enterkeyhint=${Ht(this.enterkeyhint)} 2059 inputmode=${Ht(this.inputmode)} 2060 aria-describedby="help-text" 2061 @change=${this.handleChange} 2062 @input=${this.handleInput} 2063 @invalid=${this.handleInvalid} 2064 @keydown=${this.handleKeyDown} 2065 @focus=${this.handleFocus} 2066 @blur=${this.handleBlur} 2067 /> 2068 2069 ${s?W` 2070 <button 2071 part="clear-button" 2072 class="input__clear" 2073 type="button" 2074 aria-label=${this.localize.term("clearEntry")} 2075 @click=${this.handleClearClick} 2076 tabindex="-1" 2077 > 2078 <slot name="clear-icon"> 2079 <sl-icon name="x-circle-fill" library="system"></sl-icon> 2080 </slot> 2081 </button> 2082 `:""} 2083 ${this.passwordToggle&&!this.disabled?W` 2084 <button 2085 part="password-toggle-button" 2086 class="input__password-toggle" 2087 type="button" 2088 aria-label=${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")} 2089 @click=${this.handlePasswordToggle} 2090 tabindex="-1" 2091 > 2092 ${this.passwordVisible?W` 2093 <slot name="show-password-icon"> 2094 <sl-icon name="eye-slash" library="system"></sl-icon> 2095 </slot> 2096 `:W` 2097 <slot name="hide-password-icon"> 2098 <sl-icon name="eye" library="system"></sl-icon> 2099 </slot> 2100 `} 2101 </button> 2102 `:""} 2103 2104 <span part="suffix" class="input__suffix"> 2105 <slot name="suffix"></slot> 2106 </span> 2107 </div> 2108 </div> 2109 2110 <div 2111 part="form-control-help-text" 2112 id="help-text" 2113 class="form-control__help-text" 2114 aria-hidden=${r?"false":"true"} 2115 > 2116 <slot name="help-text">${this.helpText}</slot> 2117 </div> 2118 </div> 2119 `}};cs.styles=[Se,Kt,ds],cs.dependencies={"sl-icon":Pt},Ne([Ye(".input__control")],cs.prototype,"input",2),Ne([He()],cs.prototype,"hasFocus",2),Ne([Ve()],cs.prototype,"title",2),Ne([Ve({reflect:!0})],cs.prototype,"type",2),Ne([Ve()],cs.prototype,"name",2),Ne([Ve()],cs.prototype,"value",2),Ne([Yt()],cs.prototype,"defaultValue",2),Ne([Ve({reflect:!0})],cs.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],cs.prototype,"filled",2),Ne([Ve({type:Boolean,reflect:!0})],cs.prototype,"pill",2),Ne([Ve()],cs.prototype,"label",2),Ne([Ve({attribute:"help-text"})],cs.prototype,"helpText",2),Ne([Ve({type:Boolean})],cs.prototype,"clearable",2),Ne([Ve({type:Boolean,reflect:!0})],cs.prototype,"disabled",2),Ne([Ve()],cs.prototype,"placeholder",2),Ne([
2119Ve({type:Boolean,reflect:!0})],cs.prototype,"readonly",2),Ne([Ve({attribute:"password-toggle",type:Boolean})],cs.prototype,"passwordToggle",2),Ne([Ve({attribute:"password-visible",type:Boolean})],cs.prototype,"passwordVisible",2),Ne([Ve({attribute:"no-spin-buttons",type:Boolean})],cs.prototype,"noSpinButtons",2),Ne([Ve({reflect:!0})],cs.prototype,"form",2),Ne([Ve({type:Boolean,reflect:!0})],cs.prototype,"required",2),Ne([Ve()],cs.prototype,"pattern",2),Ne([Ve({type:Number})],cs.prototype,"minlength",2),Ne([Ve({type:Number})],cs.prototype,"maxlength",2),Ne([Ve()],cs.prototype,"min",2),Ne([Ve()],cs.prototype,"max",2),Ne([Ve()],cs.prototype,"step",2),Ne([Ve()],cs.prototype,"autocapitalize",2),Ne([Ve()],cs.prototype,"autocorrect",2),Ne([Ve()],cs.prototype,"autocomplete",2),Ne([Ve({type:Boolean})],cs.prototype,"autofocus",2),Ne([Ve()],cs.prototype,"enterkeyhint",2),Ne([Ve({type:Boolean,converter:{fromAttribute:e=>!(!e||"false"===e),toAttribute:e=>e?"true":"false"}})],cs.prototype,"spellcheck",2),Ne([Ve()],cs.prototype,"inputmode",2),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],cs.prototype,"handleDisabledChange",1),Ne([yt("step",{waitUntilFirstUpdate:!0}
2119)],cs.prototype,"handleStepChange",1),Ne([yt("value",{waitUntilFirstUpdate:!0})],cs.prototype,"handleValueChange",1),cs.define("sl-input");var hs=c` 2120 :host { 2121 display: block; 2122 position: relative; 2123 background: var(--sl-panel-background-color); 2124 border: solid var(--sl-panel-border-width) var(--sl-panel-border-color); 2125 border-radius: var(--sl-border-radius-medium); 2126 padding: var(--sl-spacing-x-small) 0; 2127 overflow: auto; 2128 overscroll-behavior: none; 2129 } 2130 2131 ::slotted(sl-divider) { 2132 --spacing: var(--sl-spacing-x-small); 2133 } 2134`,us=class extends Xe{connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(e){const t=["menuitem","menuitemcheckbox"],i=e.composedPath(),r=i.find(e=>{var i;return t.includes((null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,"role"))||"")});if(!r)return;if(i.find(e=>{var t;return"menu"===(null==(t=null==e?void 0:e.getAttribute)?void 0:t.call(e,"role"))})!==this)return;const s=r;"checkbox"===s.type&&(s.checked=!s.checked),this.emit("sl-select",{detail:{item:s}})}handleKeyDown(e){if("Enter"===e.key||" "===e.key){const t=this.getCurrentItem();e.preventDefault(),e.stopPropagation(),null==t||t.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)){const t=this.getAllItems(),i=this.getCurrentItem();let r=i?t.indexOf(i):0;t.length>0&&(e.preventDefault(),e.stopPropagation(),"ArrowDown"===e.key?r++:"ArrowUp"===e.key?r--:"Home"===e.key?r=0:"End"===e.key&&(r=t.length-1),r<0&&(r=t.length-1),r>t.length-1&&(r=0),this.setCurrentItem(t[r]),t[r].focus())}}handleMouseDown(e){const t=e.target;this.isMenuItem(t)&&this.setCurrentItem(t)}handleSlotChange(){const e=this.getAllItems();e.length>0&&this.setCurrentItem(e[0])}isMenuItem(e){var t;return"sl-menu-item"===e.tagName.toLowerCase()||["menuitem","menuitemcheckbox","menuitemradio"].includes(null!=(t=e.getAttribute("role"))?t:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(e=>!(e.inert||!this.isMenuItem(e)))}getCurrentItem(){return this.getAllItems().find(e=>"0"===e.getAttribute("tabindex"))}
vendor: 12,114 bytes, lines 2134-2317
2134setCurrentItem(e){this.getAllItems().forEach(t=>{t.setAttribute("tabindex",t===e?"0":"-1")})}render(){return W` 2135 <slot 2136 @slotchange=${this.handleSlotChange} 2137 @click=${this.handleClick} 2138 @keydown=${this.handleKeyDown} 2139 @mousedown=${this.handleMouseDown} 2140 ></slot> 2141 `}};us.styles=[Se,hs],Ne([Ye("slot")],us.prototype,"defaultSlot",2),us.define("sl-menu");var ps=c` 2142 :host { 2143 --submenu-offset: -2px; 2144 2145 display: block; 2146 } 2147 2148 :host([inert]) { 2149 display: none; 2150 } 2151 2152 .menu-item { 2153 position: relative; 2154 display: flex; 2155 align-items: stretch; 2156 font-family: var(--sl-font-sans); 2157 font-size: var(--sl-font-size-medium); 2158 font-weight: var(--sl-font-weight-normal); 2159 line-height: var(--sl-line-height-normal); 2160 letter-spacing: var(--sl-letter-spacing-normal); 2161 color: var(--sl-color-neutral-700); 2162 padding: var(--sl-spacing-2x-small) var(--sl-spacing-2x-small); 2163 transition: var(--sl-transition-fast) fill; 2164 user-select: none; 2165 -webkit-user-select: none; 2166 white-space: nowrap; 2167 cursor: pointer; 2168 } 2169 2170 .menu-item.menu-item--disabled { 2171 outline: none; 2172 opacity: 0.5; 2173 cursor: not-allowed; 2174 } 2175 2176 .menu-item.menu-item--loading { 2177 outline: none; 2178 cursor: wait; 2179 } 2180 2181 .menu-item.menu-item--loading *:not(sl-spinner) { 2182 opacity: 0.5; 2183 } 2184 2185 .menu-item--loading sl-spinner { 2186 --indicator-color: currentColor; 2187 --track-width: 1px; 2188 position: absolute; 2189 font-size: 0.75em; 2190 top: calc(50% - 0.5em); 2191 left: 0.65rem; 2192 opacity: 1; 2193 } 2194 2195 .menu-item .menu-item__label { 2196 flex: 1 1 auto; 2197 display: inline-block; 2198 text-overflow: ellipsis; 2199 overflow: hidden; 2200 } 2201 2202 .menu-item .menu-item__prefix { 2203 flex: 0 0 auto; 2204 display: flex; 2205 align-items: center; 2206 } 2207 2208 .menu-item .menu-item__prefix::slotted(*) { 2209 margin-inline-end: var(--sl-spacing-x-small); 2210 } 2211 2212 .menu-item .menu-item__suffix { 2213 flex: 0 0 auto; 2214 display: flex; 2215 align-items: center; 2216 } 2217 2218 .menu-item .menu-item__suffix::slotted(*) { 2219 margin-inline-start: var(--sl-spacing-x-small); 2220 } 2221 2222 /* Safe triangle */ 2223 .menu-item--submenu-expanded::after { 2224 content: ''; 2225 position: fixed; 2226 z-index: calc(var(--sl-z-index-dropdown) - 1); 2227 top: 0; 2228 right: 0; 2229 bottom: 0; 2230 left: 0; 2231 clip-path: polygon( 2232 var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0), 2233 var(--safe-triangle-submenu-start-x, 0) var(--safe-triangle-submenu-start-y, 0), 2234 var(--safe-triangle-submenu-end-x, 0) var(--safe-triangle-submenu-end-y, 0) 2235 ); 2236 } 2237 2238 :host(:focus-visible) { 2239 outline: none; 2240 } 2241 2242 :host(:hover:not([aria-disabled='true'], :focus-visible)) .menu-item, 2243 .menu-item--submenu-expanded { 2244 background-color: var(--sl-color-neutral-100); 2245 color: var(--sl-color-neutral-1000); 2246 } 2247 2248 :host(:focus-visible) .menu-item { 2249 outline: none; 2250 background-color: var(--sl-color-primary-600); 2251 color: var(--sl-color-neutral-0); 2252 opacity: 1; 2253 } 2254 2255 .menu-item .menu-item__check, 2256 .menu-item .menu-item__chevron { 2257 flex: 0 0 auto; 2258 display: flex; 2259 align-items: center; 2260 justify-content: center; 2261 width: 1.5em; 2262 visibility: hidden; 2263 } 2264 2265 .menu-item--checked .menu-item__check, 2266 .menu-item--has-submenu .menu-item__chevron { 2267 visibility: visible; 2268 } 2269 2270 /* Add elevation and z-index to submenus */ 2271 sl-popup::part(popup) { 2272 box-shadow: var(--sl-shadow-large); 2273 z-index: var(--sl-z-index-dropdown); 2274 margin-left: var(--submenu-offset); 2275 } 2276 2277 .menu-item--rtl sl-popup::part(popup) { 2278 margin-left: calc(-1 * var(--submenu-offset)); 2279 } 2280 2281 @media (forced-colors: active) { 2282 :host(:hover:not([aria-disabled='true'])) .menu-item, 2283 :host(:focus-visible) .menu-item { 2284 outline: dashed 1px SelectedItem; 2285 outline-offset: -1px; 2286 } 2287 } 2288 2289 ::slotted(sl-menu) { 2290 max-width: var(--auto-size-available-width) !important; 2291 max-height: var(--auto-size-available-height) !important; 2292 } 2293` 2294/** 2295 * @license 2296 * Copyright 2017 Google LLC 2297 * SPDX-License-Identifier: BSD-3-Clause 2298 */;const fs=(e,t)=>{const i=e._$AN;if(void 0===i)return!1;for(const e of i)e._$AO?.(t,!1),fs(e,t);return!0},ms=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===i?.size)},gs=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),ys(t)}};function bs(e){void 0!==this._$AN?(ms(this),this._$AM=e,gs(this)):this._$AM=e}function vs(e,t=!1,i=0){const r=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(t)if(Array.isArray(r))for(let e=i;e<r.length;e++)fs(r[e],!1),ms(r[e]);else null!=r&&(fs(r,!1),ms(r));else fs(this,e)}const ys=e=>{e.type==Ot&&(e._$AP??=vs,e._$AQ??=bs)};class _s extends Nt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),gs(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(fs(this,e),ms(this))}setValue(e){if(wt(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}} 2299/** 2300 * @license 2301 * Copyright 2020 Google LLC 2302 * SPDX-License-Identifier: BSD-3-Clause 2303 */const ws=()=>new ks;let ks=class{};const xs=new WeakMap,$s=Ft(class extends _s{render(e){return Y}update(e,[t]){const i=t!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),Y}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let i=xs.get(t);void 0===i&&(i=new WeakMap,xs.set(t,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?xs.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Ss=class{constructor(e,t){this.popupRef=ws(),this.enableSubmenuTimer=-1,this.isConnected=!1,this.isPopupConnected=!1,this.skidding=0,this.submenuOpenDelay=100,this.handleMouseMove=e=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${e.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${e.clientY}px`)},this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()},this.handleKeyDown=e=>{switch(e.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":e.target!==this.host&&(e.preventDefault(),e.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(e)}},this.handleClick=e=>{var t;e.target===this.host?(e.preventDefault(),e.stopPropagation()):e.target instanceof Element&&("sl-menu-item"===e.target.tagName||(null==(t=e.target.role)?void 0:t.startsWith("menuitem")))&&this.disableSubmenu()},this.handleFocusOut=e=>{e.relatedTarget&&e.relatedTarget instanceof Element&&this.host.contains(e.relatedTarget)||this.disableSubmenu()},this.handlePopupMouseover=e=>{e.stopPropagation()},this.handlePopupReposition=()=>{const e=this.host.renderRoot.querySelector("slot[name='submenu']"),t=null==e?void 0:e.assignedElements({flatten:!0}).filter(e=>"sl-menu"===e.localName)[0],i="rtl"===getComputedStyle(this.host).direction;if(!t)return;const{left:r,top:s,width:o,height:a}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${i?r+o:r}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${s}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${i?r+o:r}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${s+a}px`)},(this.host=e).addController(this),this.hasSlotController=t}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sl-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(e){const t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t)return void console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);let i=null;for(const e of t.assignedElements())if(i=e.querySelectorAll("sl-menu-item, [role^='menuitem']"),0!==i.length)break;if(i&&0!==i.length){i[0].setAttribute("tabindex","0");for(let e=1;e!==i.length;++e)i[e].setAttribute("tabindex","-1");this.popupRef.value&&(e.preventDefault(),e.stopPropagation(),this.popupRef.value.active?i[0]instanceof HTMLElement&&i[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{i[0]instanceof HTMLElement&&i[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(e){this.popupRef.value&&this.popupRef.value.active!==e&&(this.popupRef.value.active=e,this.host.requestUpdate())}enableSubmenu(e=!0){e?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var e;if(!(null==(e=this.host.parentElement)?void 0:e.computedStyleMap))return;const t=this.host.parentElement.computedStyleMap(),i=["padding-top","border-top-width","margin-top"].reduce((e,i)=>{var r;const s=null!=(r=t.get(i))?r:new CSSUnitValue(0,"px");return e-(s instanceof CSSUnitValue?s:new CSSUnitValue(0,"px")).to("px").value},0);this.skidding=i}isExpanded(){return!!this.popupRef.value&&this.popupRef.value.active}renderSubmenu(){const e="rtl"===getComputedStyle(this.host).direction;return this.isConnected?W` 2304 <sl-popup 2305 ${$s(this.popupRef)} 2306 placement=${e?"left-start":"right-start"} 2307 anchor="anchor" 2308 flip 2309 flip-fallback-strategy="best-fit" 2310 skidding="${this.skidding}" 2311 strategy="fixed" 2312 auto-size="vertical" 2313 auto-size-padding="10" 2314 > 2315 <slot name="submenu"></slot> 2316 </sl-popup> 2317 `:W` <slot name="submenu" hidden></slot> `}},Cs=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.type="normal",this.checked=!1,this.value="",this.loading=!1,this.disabled=!1,this.hasSlotController=new dt(this,"submenu"),this.submenuController=new Ss(this,this.hasSlotController),this.handleHostClick=e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())},this.handleMouseOver=e=>{this.focus(),e.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){const e=this.getTextLabel();void 0!==this.cachedTextLabel?e!==this.cachedTextLabel&&(this.cachedTextLabel=e,this.emit
2317("slotchange",{bubbles:!0,composed:!1,cancelable:!1})):this.cachedTextLabel=e}handleCheckedChange(){if(this.checked&&"checkbox"!==this.type)return this.checked=!1,void console.error('The checked attribute can only be used on menu items with type="checkbox"',this);"checkbox"===this.type?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){"checkbox"===this.type?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return function(e){if(!e)return"";const t=e.assignedNodes({flatten:!0});let i="";return[...t].forEach(e=>{e.nodeType===Node.TEXT_NODE&&(i+=e.textContent)}),i}(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){const e="rtl"===this.localize.dir(),t=this.submenuController.isExpanded();return W` 2318 <div 2319 id="anchor" 2320 part="base" 2321 class=${Mt({"menu-item":!0,"menu-item--rtl":e,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--loading":this.loading,"menu-item--has-submenu":this.isSubmenu(),"menu-item--submenu-expanded":t})} 2322 ?aria-haspopup="${this.isSubmenu()}" 2323 ?aria-expanded="${!!t}" 2324 > 2325 <span part="checked-icon" class="menu-item__check"> 2326 <sl-icon name="check" library="system" aria-hidden="true"></sl-icon> 2327 </span> 2328 2329 <slot name="prefix" part="prefix" class="menu-item__prefix"></slot> 2330 2331 <slot part="label" class="menu-item__label" @slotchange=${this.handleDefaultSlotChange}></slot> 2332 2333 <slot name="suffix" part="suffix" class="menu-item__suffix"></slot> 2334 2335 <span part="submenu-icon" class="menu-item__chevron"> 2336 <sl-icon name=${e?"chevron-left":"chevron-right"} library="system" aria-hidden="true"></sl-icon> 2337 </span> 2338 2339 ${this.submenuController.renderSubmenu()} 2340 ${this.loading?W` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `:""} 2341 </div> 2342 `}};Cs.styles=[Se,ps],Cs.dependencies={"sl-icon":Pt,"sl-popup":as,"sl-spinner":Je},Ne([Ye("slot:not([name])")],Cs.prototype,"defaultSlot",2),Ne([Ye(".menu-item")],Cs.prototype,"menuItem",2),Ne([Ve()],Cs.prototype,"type",2),Ne([Ve({type:Boolean,reflect:!0})],Cs.prototype,"checked",2),Ne([Ve()],Cs.prototype,"value",2),Ne([Ve({type:Boolean,reflect:!0})],Cs.prototype,"loading",2),Ne([Ve({type:Boolean,reflect:!0})],Cs.prototype,"disabled",2),Ne([yt("checked")],Cs.prototype,"handleCheckedChange",1),Ne([yt("disabled")],Cs.prototype,"handleDisabledChange",1),Ne([yt("type")],Cs.prototype,"handleTypeChange",1),Cs.define("sl-menu-item");var Es=c` 2343 :host { 2344 display: block; 2345 user-select: none; 2346 -webkit-user-select: none; 2347 } 2348 2349 :host(:focus) { 2350 outline: none; 2351 } 2352 2353 .option { 2354 position: relative; 2355 display: flex; 2356 align-items: center; 2357 font-family: var(--sl-font-sans); 2358 font-size: var(--sl-font-size-medium); 2359 font-weight: var(--sl-font-weight-normal); 2360 line-height: var(--sl-line-height-normal); 2361 letter-spacing: var(--sl-letter-spacing-normal); 2362 color: var(--sl-color-neutral-700); 2363 padding: var(--sl-spacing-x-small) var(--sl-spacing-medium) var(--sl-spacing-x-small) var(--sl-spacing-x-small); 2364 transition: var(--sl-transition-fast) fill; 2365 cursor: pointer; 2366 } 2367 2368 .option--hover:not(.option--current):not(.option--disabled) { 2369 background-color: var(--sl-color-neutral-100); 2370 color: var(--sl-color-neutral-1000); 2371 } 2372 2373 .option--current, 2374 .option--current.option--disabled { 2375 background-color: var(--sl-color-primary-600); 2376 color: var(--sl-color-neutral-0); 2377 opacity: 1; 2378 } 2379 2380 .option--disabled { 2381 outline: none; 2382 opacity: 0.5; 2383 cursor: not-allowed; 2384 } 2385 2386 .option__label { 2387 flex: 1 1 auto; 2388 display: inline-block; 2389 line-height: var(--sl-line-height-dense); 2390 } 2391 2392 .option .option__check { 2393 flex: 0 0 auto; 2394 display: flex; 2395 align-items: center; 2396 justify-content: center; 2397 visibility: hidden; 2398 padding-inline-end: var(--sl-spacing-2x-small); 2399 } 2400 2401 .option--selected .option__check { 2402 visibility: visible; 2403 } 2404 2405 .option__prefix, 2406 .option__suffix { 2407 flex: 0 0 auto; 2408 display: flex; 2409 align-items: center; 2410 } 2411 2412 .option__prefix::slotted(*) { 2413 margin-inline-end: var(--sl-spacing-x-small); 2414 } 2415 2416 .option__suffix::slotted(*) { 2417 margin-inline-start: var(--sl-spacing-x-small); 2418 } 2419 2420 @media (forced-colors: active) { 2421 :host(:hover:not([aria-disabled='true'])) .option { 2422 outline: dashed 1px SelectedItem; 2423 outline-offset: -1px; 2424 } 2425 } 2426`,Is=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.isInitialized=!1,this.current=!1,this.selected=!1,this.hasHover=!1,this.value="",this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){this.isInitialized?customElements.whenDefined("sl-select").then(()=>{const e=this.closest("sl-select");e&&e.handleDefaultSlotChange()}):this.isInitialized=!0}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){"string"!=typeof this.value&&(this.value=String(this.value)),this.value.includes(" ")&&(console.error("Option values cannot include a space. All space
2426s have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){const e=this.childNodes;let t="";return[...e].forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(e.hasAttribute("slot")||(t+=e.textContent)),e.nodeType===Node.TEXT_NODE&&(t+=e.textContent)}),t.trim()}render(){return W` 2427 <div 2428 part="base" 2429 class=${Mt({option:!0,"option--current":this.current,"option--disabled":this.disabled,"option--selected":this.selected,"option--hover":this.hasHover})} 2430 @mouseenter=${this.handleMouseEnter} 2431 @mouseleave=${this.handleMouseLeave} 2432 > 2433 <sl-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></sl-icon> 2434 <slot part="prefix" name="prefix" class="option__prefix"></slot> 2435 <slot part="label" class="option__label" @slotchange=${this.handleDefaultSlotChange}></slot> 2436 <slot part="suffix" name="suffix" class="option__suffix"></slot> 2437 </div> 2438 `}};Is.styles=[Se,Es],Is.dependencies={"sl-icon":Pt},Ne([Ye(".option__label")],Is.prototype,"defaultSlot",2),Ne([He()],Is.prototype,"current",2),Ne([He()],Is.prototype,"selected",2),Ne([He()],Is.prototype,"hasHover",2),Ne([Ve({reflect:!0})],Is.prototype,"value",2),Ne([Ve({type:Boolean,reflect:!0})],Is.prototype,"disabled",2),Ne([yt("disabled")],Is.prototype,"handleDisabledChange",1),Ne([yt("selected")],Is.prototype,"handleSelectedChange",1),Ne([yt("value")],Is.prototype,"handleValueChange",1),Is.define("sl-option"),as.define("sl-popup");var Ts=c` 2439 :host { 2440 --height: 1rem; 2441 --track-color: var(--sl-color-neutral-200); 2442 --indicator-color: var(--sl-color-primary-600); 2443 --label-color: var(--sl-color-neutral-0); 2444 2445 display: block; 2446 } 2447 2448 .progress-bar { 2449 position: relative; 2450 background-color: var(--track-color); 2451 height: var(--height); 2452 border-radius: var(--sl-border-radius-pill); 2453 box-shadow: inset var(--sl-shadow-small); 2454 overflow: hidden; 2455 } 2456 2457 .progress-bar__indicator { 2458 height: 100%; 2459 font-family: var(--sl-font-sans); 2460 font-size: 12px; 2461 font-weight: var(--sl-font-weight-normal); 2462 background-color: var(--indicator-color); 2463 color: var(--label-color); 2464 text-align: center; 2465 line-height: var(--height); 2466 white-space: nowrap; 2467 overflow: hidden; 2468 transition: 2469 400ms width, 2470 400ms background-color; 2471 user-select: none; 2472 -webkit-user-select: none; 2473 } 2474 2475 /* Indeterminate */ 2476 .progress-bar--indeterminate .progress-bar__indicator { 2477 position: absolute; 2478 animation: indeterminate 2.5s infinite cubic-bezier(0.37, 0, 0.63, 1); 2479 } 2480 2481 .progress-bar--indeterminate.progress-bar--rtl .progress-bar__indicator { 2482 animation-name: indeterminate-rtl; 2483 } 2484 2485 @media (forced-colors: active) { 2486 .progress-bar { 2487 outline: solid 1px SelectedItem; 2488 background-color: var(--sl-color-neutral-0); 2489 } 2490 2491 .progress-bar__indicator { 2492 outline: solid 1px SelectedItem; 2493 background-color: SelectedItem; 2494 } 2495 } 2496 2497 @keyframes indeterminate { 2498 0% { 2499 left: -50%; 2500 width: 50%; 2501 } 2502 75%, 2503 100% { 2504 left: 100%; 2505 width: 50%; 2506 } 2507 } 2508 2509 @keyframes indeterminate-rtl { 2510 0% { 2511 right: -50%; 2512 width: 50%; 2513 } 2514 75%, 2515 100% { 2516 right: 100%; 2517 width: 50%; 2518 } 2519 } 2520` 2521/** 2522 * @license 2523 * Copyright 2018 Google LLC 2524 * SPDX-License-Identifier: BSD-3-Clause 2525 */;const As="important",Rs=" !"+As,Ps=Ft(class extends Nt{constructor(e){if(super(e),e.type!==Dt||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,i)=>{const r=e[i];return null==r?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const r=t[e];if(null!=r){this.ft.add(e);const t="string"==typeof r&&r.endsWith(Rs);e.includes("-")||t?i.setProperty(e,t?r.slice(0,-11):r,t?As:""):i[e]=r}}return G}});var Ds=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return W` 2526 <div 2527 part="base" 2528 class=${Mt({"progress-bar":!0,"progress-bar--indeterminate":this.indeterminate,"progress-bar--rtl":"rtl"===this.localize.dir()})} 2529 role="progressbar" 2530 title=${Ht(this.title)} 2531 aria-label=${this.label.length>0?this.label:this.localize.term("progress")} 2532 aria-valuemin="0" 2533 aria-valuemax="100" 2534 aria-valuenow=${this.indeterminate?0:this.value} 2535 > 2536 <div part="indicator" class="progress-bar__indicator" style=${Ps({width:`${this.value}%`})}> 2537 ${this.indeterminate?"":W` <slot part="label" class="progress-bar__label"></slot> `} 2538 </div> 2539 </div> 2540 `}};Ds.styles=[Se,Ts],Ne([Ve({type:Number,reflect:!0}
2540)],Ds.prototype,"value",2),Ne([Ve({type:Boolean,reflect:!0})],Ds.prototype,"indeterminate",2),Ne([Ve()],Ds.prototype,"label",2),Ds.define("sl-progress-bar");var Os=c` 2541 :host { 2542 display: block; 2543 } 2544 2545 .form-control { 2546 position: relative; 2547 border: none; 2548 padding: 0; 2549 margin: 0; 2550 } 2551 2552 .form-control__label { 2553 padding: 0; 2554 } 2555 2556 .radio-group--required .radio-group__label::after { 2557 content: var(--sl-input-required-content); 2558 margin-inline-start: var(--sl-input-required-content-offset); 2559 } 2560 2561 .visually-hidden { 2562 position: absolute; 2563 width: 1px; 2564 height: 1px; 2565 padding: 0; 2566 margin: -1px; 2567 overflow: hidden; 2568 clip: rect(0, 0, 0, 0); 2569 white-space: nowrap; 2570 border: 0; 2571 } 2572`,zs=c` 2573 :host { 2574 display: inline-block; 2575 } 2576 2577 .button-group { 2578 display: flex; 2579 flex-wrap: nowrap; 2580 } 2581`,Ls=class extends Xe{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(e){const t=Fs(e.target);null==t||t.toggleAttribute("data-sl-button-group__button--focus",!0)}handleBlur(e){const t=Fs(e.target);null==t||t.toggleAttribute("data-sl-button-group__button--focus",!1)}handleMouseOver(e){const t=Fs(e.target);null==t||t.toggleAttribute("data-sl-button-group__button--hover",!0)}handleMouseOut(e){const t=Fs(e.target);null==t||t.toggleAttribute("data-sl-button-group__button--hover",!1)}handleSlotChange(){const e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{const i=e.indexOf(t),r=Fs(t);r&&(r.toggleAttribute("data-sl-button-group__button",!0),r.toggleAttribute("data-sl-button-group__button--first",0===i),r.toggleAttribute("data-sl-button-group__button--inner",i>0&&i<e.length-1),r.toggleAttribute("data-sl-button-group__button--last",i===e.length-1),r.toggleAttribute("data-sl-button-group__button--radio","sl-radio-button"===r.tagName.toLowerCase()))})}render(){return W` 2582 <div 2583 part="base" 2584 class="button-group" 2585 role="${this.disableRole?"presentation":"group"}" 2586 aria-label=${this.label} 2587 @focusout=${this.handleBlur} 2588 @focusin=${this.handleFocus} 2589 @mouseover=${this.handleMouseOver} 2590 @mouseout=${this.handleMouseOut} 2591 > 2592 <slot @slotchange=${this.handleSlotChange}></slot> 2593 </div> 2594 `}};function Fs(e){var t;const i="sl-button, sl-radio-button";return null!=(t=e.closest(i))?t:e.querySelector(i)}Ls.styles=[Se,zs],Ne([Ye("slot")],Ls.prototype,"defaultSlot",2),Ne([He()],Ls.prototype,"disableRole",2),Ne([Ve()],Ls.prototype,"label",2);var Ns=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this),this.hasSlotController=new dt(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.errorMessage="",this.defaultValue="",this.label="",this.helpText="",this.name="option",this.value="",this.size="medium",this.form="",this.required=!1}get validity(){const e=this.required&&!this.value;return""!==this.customValidityMessage?nt:e?at:ot}get validationMessage(){const e=this.required&&!this.value;return""!==this.customValidityMessage?this.customValidityMessage:e?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sl-radio, sl-radio-button")]}handleRadioClick(e){const t=e.target.closest("sl-radio, sl-radio-button"),i=this.getAllRadios(),r=this.value;t&&!t.disabled&&(this.value=t.value,i.forEach(e=>
2594e.checked=e===t),this.value!==r&&(this.emit("sl-change"),this.emit("sl-input")))}handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const i=this.getAllRadios().filter(e=>!e.disabled),r=null!=(t=i.find(e=>e.checked))?t:i[0],s=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1,o=this.value;let a=i.indexOf(r)+s;a<0&&(a=i.length-1),a>i.length-1&&(a=0),this.getAllRadios().forEach(e=>{e.checked=!1,this.hasButtonGroup||e.setAttribute("tabindex","-1")}),this.value=i[a].value,i[a].checked=!0,this.hasButtonGroup?i[a].shadowRoot.querySelector("button").focus():(i[a].setAttribute("tabindex","0"),i[a].focus()),this.value!==o&&(this.emit("sl-change"),this.emit("sl-input")),e.preventDefault()}handleLabelClick(){this.focus()}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}async syncRadioElements(){var e,t;const i=this.getAllRadios();if(await Promise.all(i.map(async e=>{await e.updateComplete,e.checked=e.value===this.value,e.size=this.size})),this.hasButtonGroup=i.some(e=>"sl-radio-button"===e.tagName.toLowerCase()),i.length>0&&!i.some(e=>e.checked))if(this.hasButtonGroup){const t=null==(e=i[0].shadowRoot)?void 0:e.querySelector("button");t&&t.setAttribute("tabindex","0")}else i[0].setAttribute("tabindex","0");if(this.hasButtonGroup){const e=null==(t=this.shadowRoot)?void 0:t.querySelector("sl-button-group");e&&(e.disableRole=!0)}}syncRadios(){customElements.get("sl-radio")&&customElements.get("sl-radio-button")?this.syncRadioElements():(customElements.get("sl-radio")?this.syncRadioElements():customElements.whenDefined("sl-radio").then(()=>this.syncRadios()),customElements.get("sl-radio-button")?this.syncRadioElements():customElements.whenDefined("sl-radio-button").then(()=>this.syncRadios()))}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}checkValidity(){const e=this.required&&!this.value,t=""!==this.customValidityMessage;return!e&&!t||(this.formControlController.emitInvalidEvent(),!1)}getForm(){return this.formControlController.getForm()}reportValidity(){const e=this.validity.valid;return this.errorMessage=this.customValidityMessage||e?"":this.validationInput.validationMessage,this.formControlController.setValidity(e),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),e||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),e}setCustomValidity(e=""){this.customValidityMessage=e,this.errorMessage=e,this.validationInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){const t=this.getAllRadios(),i=t.find(e=>e.checked),r=t.find(e=>!e.disabled),s=i||r;s&&s.focus(e)}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),i=!!this.label||!!e,r=!!this.helpText||!!t,s=W` 2595 <slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot> 2596 `;return W` 2597 <fieldset 2598 part="form-control" 2599 class=${Mt({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--radio-group":!0,"form-control--has-label":i,"form-control--has-help-text":r})} 2600 role="radiogroup" 2601 aria-labelledby="label" 2602 aria-describedby="help-text" 2603 aria-errormessage="error-message" 2604 > 2605 <label 2606 part="form-control-label" 2607 id="label" 2608 class="form-control__label" 2609 aria-hidden=${i?"false":"true"} 2610 @click=${this.handleLabelClick} 2611 > 2612 <slot name="label">${this.label}</slot> 2613 </label> 2614 2615 <div part="form-control-input" class="form-control-input"> 2616 <div class="visually-hidden"> 2617 <div id="error-message" aria-live="assertive">${this.errorMessage}</div> 2618 <label class="radio-group__validation"> 2619 <input 2620 type="text" 2621 class="radio-group__validation-input" 2622 ?required=${this.required} 2623 tabindex="-1" 2624 hidden 2625 @invalid=${this.handleInvalid} 2626 /> 2627 </label> 2628 </div> 2629 2630 ${this.hasButtonGroup?W` 2631 <sl-button-group part="button-group" exportparts="base:button-group__base" role="presentation"> 2632 ${s} 2633 </sl-button-group> 2634 `:s} 2635 </div> 2636 2637 <div 2638 part="form-control-help-text" 2639 id="help-text" 2640 class="form-control__help-text" 2641 aria-hidden=${r?"false":"true"} 2642 > 2643 <slot name="help-text">${this.helpText}</slot> 2644 </div> 2645 </fieldset> 2646 `}};Ns.styles=[Se,Kt,Os],Ns.dependencies={"sl-button-group":Ls},Ne([Ye("slot:not([name])")],Ns.prototype,"defaultSlot",2),Ne([Ye(".radio-group__validation-input")],Ns.prototype,"validationInput",2),Ne([He()],Ns.prototype,"hasButtonGroup",2),Ne([He()],Ns.prototype,"errorMessage",2),Ne([He()],Ns.prototype,"defaultValue",2),Ne([
2646Ve()],Ns.prototype,"label",2),Ne([Ve({attribute:"help-text"})],Ns.prototype,"helpText",2),Ne([Ve()],Ns.prototype,"name",2),Ne([Ve({reflect:!0})],Ns.prototype,"value",2),Ne([Ve({reflect:!0})],Ns.prototype,"size",2),Ne([Ve({reflect:!0})],Ns.prototype,"form",2),Ne([Ve({type:Boolean,reflect:!0})],Ns.prototype,"required",2),Ne([yt("size",{waitUntilFirstUpdate:!0})],Ns.prototype,"handleSizeChange",1),Ne([yt("value")],Ns.prototype,"handleValueChange",1),Ns.define("sl-radio-group");var Ms=c` 2647 :host { 2648 display: block; 2649 } 2650 2651 :host(:focus-visible) { 2652 outline: 0px; 2653 } 2654 2655 .radio { 2656 display: inline-flex; 2657 align-items: top; 2658 font-family: var(--sl-input-font-family); 2659 font-size: var(--sl-input-font-size-medium); 2660 font-weight: var(--sl-input-font-weight); 2661 color: var(--sl-input-label-color); 2662 vertical-align: middle; 2663 cursor: pointer; 2664 } 2665 2666 .radio--small { 2667 --toggle-size: var(--sl-toggle-size-small); 2668 font-size: var(--sl-input-font-size-small); 2669 } 2670 2671 .radio--medium { 2672 --toggle-size: var(--sl-toggle-size-medium); 2673 font-size: var(--sl-input-font-size-medium); 2674 } 2675 2676 .radio--large { 2677 --toggle-size: var(--sl-toggle-size-large); 2678 font-size: var(--sl-input-font-size-large); 2679 } 2680 2681 .radio__checked-icon { 2682 display: inline-flex; 2683 width: var(--toggle-size); 2684 height: var(--toggle-size); 2685 } 2686 2687 .radio__control { 2688 flex: 0 0 auto; 2689 position: relative; 2690 display: inline-flex; 2691 align-items: center; 2692 justify-content: center; 2693 width: var(--toggle-size); 2694 height: var(--toggle-size); 2695 border: solid var(--sl-input-border-width) var(--sl-input-border-color); 2696 border-radius: 50%; 2697 background-color: var(--sl-input-background-color); 2698 color: transparent; 2699 transition: 2700 var(--sl-transition-fast) border-color, 2701 var(--sl-transition-fast) background-color, 2702 var(--sl-transition-fast) color, 2703 var(--sl-transition-fast) box-shadow; 2704 } 2705 2706 .radio__input { 2707 position: absolute; 2708 opacity: 0; 2709 padding: 0; 2710 margin: 0; 2711 pointer-events: none; 2712 } 2713 2714 /* Hover */ 2715 .radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover { 2716 border-color: var(--sl-input-border-color-hover); 2717 background-color: var(--sl-input-background-color-hover); 2718 } 2719 2720 /* Checked */ 2721 .radio--checked .radio__control { 2722 color: var(--sl-color-neutral-0); 2723 border-color: var(--sl-color-primary-600); 2724 background-color: var(--sl-color-primary-600); 2725 } 2726 2727 /* Checked + hover */ 2728 .radio.radio--checked:not(.radio--disabled) .radio__control:hover { 2729 border-color: var(--sl-color-primary-500); 2730 background-color: var(--sl-color-primary-500); 2731 } 2732 2733 /* Checked + focus */ 2734 :host(:focus-visible) .radio__control { 2735 outline: var(--sl-focus-ring); 2736 outline-offset: var(--sl-focus-ring-offset); 2737 } 2738 2739 /* Disabled */ 2740 .radio--disabled { 2741 opacity: 0.5; 2742 cursor: not-allowed; 2743 } 2744 2745 /* When the control isn't checked, hide the circle for Windows High Contrast mode a11y */ 2746 .radio:not(.radio--checked) svg circle { 2747 opacity: 0; 2748 } 2749 2750 .radio__label { 2751 display: inline-block; 2752 color: var(--sl-input-label-color); 2753 line-height: var(--toggle-size); 2754 margin-inline-start: 0.5em; 2755 user-select: none; 2756 -webkit-user-select: none; 2757 } 2758`,qs=class extends Xe{constructor(){super(),this.checked=!1,this.hasFocus=!1,this.size="medium",this.disabled=!1,this.handleBlur=()=>{this.hasFocus=!1,this.emit("sl-blur")},this.handleClick=()=>{this.disabled||(this.checked=!0)},this.handleFocus=()=>{this.hasFocus=!0,this.emit("sl-focus")},this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}connectedCallback(){super.connectedCallback(),this.setInitialAttributes()}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return W`
2759 <span 2760 part="base" 2761 class=${Mt({radio:!0,"radio--checked":this.checked,"radio--disabled":this.disabled,"radio--focused":this.hasFocus,"radio--small":"small"===this.size,"radio--medium":"medium"===this.size,"radio--large":"large"===this.size})} 2762 > 2763 <span part="${"control"+(this.checked?" control--checked":"")}" class="radio__control"> 2764 ${this.checked?W` <sl-icon part="checked-icon" class="radio__checked-icon" library="system" name="radio"></sl-icon> `:""} 2765 </span> 2766 2767 <slot part="label" class="radio__label"></slot> 2768 </span> 2769 `}};qs.styles=[Se,Ms],qs.dependencies={"sl-icon":Pt},Ne([He()],qs.prototype,"checked",2),Ne([He()],qs.prototype,"hasFocus",2),Ne([Ve()],qs.prototype,"value",2),Ne([Ve({reflect:!0})],qs.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],qs.prototype,"disabled",2),Ne([yt("checked")],qs.prototype,"handleCheckedChange",1),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],qs.prototype,"handleDisabledChange",1),qs.define("sl-radio");var Us=[{max:276e4,value:6e4,unit:"minute"},{max:72e6,value:36e5,unit:"hour"},{max:5184e5,value:864e5,unit:"day"},{max:24192e5,value:6048e5,unit:"week"},{max:28512e6,value:2592e6,unit:"month"},{max:1/0,value:31536e6,unit:"year"}],Bs=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.isoTime="",this.relativeTime="",this.date=new Date,this.format="long",this.numeric="auto",this.sync=!1}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.updateTimeout)}render(){const e=new Date,t=new Date(this.date);if(isNaN(t.getMilliseconds()))return this.relativeTime="",this.isoTime="","";const i=t.getTime()-e.getTime(),{unit:r,value:s}=Us.find(e=>Math.abs(i)<e.max);if(this.isoTime=t.toISOString(),this.relativeTime=this.localize.relativeTime(Math.round(i/s),r,{numeric:this.numeric,style:this.format}),clearTimeout(this.updateTimeout),this.sync){let e;e=js("minute"===r?"second":"hour"===r?"minute":"day"===r?"hour":"day"),this.updateTimeout=window.setTimeout(()=>this.requestUpdate(),e)}return W` <time datetime=${this.isoTime}>${this.relativeTime}</time> `}};function js(e){const t={second:1e3,minute:6e4,hour:36e5,day:864e5}[e];return t-Date.now()%t}Ne([He()],Bs.prototype,"isoTime",2),Ne([He()],Bs.prototype,"relativeTime",2),Ne([Ve()],Bs.prototype,"date",2),Ne([Ve()],Bs.prototype,"format",2),Ne([Ve()],Bs.prototype,"numeric",2),Ne([Ve({type:Boolean})],Bs.prototype,"sync",2),Bs.define("sl-relative-time");var Vs=c` 2770 :host { 2771 --border-radius: var(--sl-border-radius-pill); 2772 --color: var(--sl-color-neutral-200); 2773 --sheen-color: var(--sl-color-neutral-300); 2774 2775 display: block; 2776 position: relative; 2777 } 2778 2779 .skeleton { 2780 display: flex; 2781 width: 100%; 2782 height: 100%; 2783 min-height: 1rem; 2784 } 2785 2786 .skeleton__indicator { 2787 flex: 1 1 auto; 2788 background: var(--color); 2789 border-radius: var(--border-radius); 2790 } 2791 2792 .skeleton--sheen .skeleton__indicator { 2793 background: linear-gradient(270deg, var(--sheen-color), var(--color), var(--color), var(--sheen-color)); 2794 background-size: 400% 100%; 2795 animation: sheen 8s ease-in-out infinite; 2796 } 2797 2798 .skeleton--pulse .skeleton__indicator { 2799 animation: pulse 2s ease-in-out 0.5s infinite; 2800 } 2801 2802 /* Forced colors mode */ 2803 @media (forced-colors: active) { 2804 :host { 2805 --color: GrayText; 2806 } 2807 } 2808 2809 @keyframes sheen { 2810 0% { 2811 background-position: 200% 0; 2812 } 2813 to { 2814 background-position: -200% 0; 2815 } 2816 } 2817 2818 @keyframes pulse { 2819 0% { 2820 opacity: 1; 2821 } 2822 50% { 2823 opacity: 0.4; 2824 } 2825 100% { 2826 opacity: 1; 2827 } 2828 } 2829`,Hs=class extends Xe{constructor(){super(...arguments),this.effect="none"}render(){return W` 2830 <div 2831 part="base" 2832 class=${Mt({skeleton:!0,"skeleton--pulse":"pulse"===this.effect,"skeleton--sheen":"sheen"===this.effect})} 2833 > 2834 <div part="indicator" class="skeleton__indicator"></div> 2835 </div> 2836 `}};Hs.styles=[Se,Vs],Ne([Ve()],Hs.prototype,"effect",2),Hs.define("sl-skeleton");var Ws=c` 2837 :host { 2838 display: inline-block; 2839 } 2840 2841 .tag { 2842 display: flex; 2843 align-items: center; 2844 border: solid 1px; 2845 line-height: 1; 2846 white-space: nowrap; 2847 user-select: none; 2848 -webkit-user-select: none; 2849 } 2850 2851 .tag__remove::part(base) { 2852 color: inherit; 2853 padding: 0; 2854 } 2855 2856 /* 2857 * Variant modifiers 2858 */ 2859 2860 .tag--primary { 2861 background-color: var(--sl-color-primary-50); 2862 border-color: var(--sl-color-primary-200); 2863 color: var(--sl-color-primary-800); 2864 } 2865 2866 .tag--primary:active > sl-icon-button { 2867 color: var(--sl-color-primary-600); 2868 } 2869 2870 .tag--success { 2871 background-color: var(--sl-color-success-50); 2872 border-color: var(--sl-color-success-200); 2873 color: var(--sl-color-success-800); 2874 } 2875 2876 .tag--success:active > sl-icon-button { 2877 color: var(--sl-color-success-600); 2878 } 2879 2880 .tag--neutral { 2881 background-color: var(--sl-color-neutral-50); 2882 border-color: var(--sl-color-neutral-200); 2883 color: var(--sl-color-neutral-800); 2884 } 2885 2886 .tag--neutral:active > sl-icon-button { 2887 color: var(--sl-color-neutral-600); 2888 } 2889 2890 .tag--warning { 2891 background-color: var(--sl-color-warning-50); 2892 border-color: var(--sl-color-warning-200); 2893 color: var(--sl-color-warning-800); 2894 } 2895 2896 .tag--warning:active > sl-icon-button { 2897 color: var(--sl-color-warning-600); 2898 } 2899 2900 .tag--danger { 2901 background-color: var(--sl-color-danger-50); 2902 border-color: var(--sl-color-danger-200); 2903 color: var(--sl-color-danger-800); 2904 } 2905 2906 .tag--danger:active > sl-icon-button { 2907 color: var(--sl-color-danger-600); 2908 } 2909 2910 /* 2911 * Size modifiers 2912 */ 2913 2914 .tag--small { 2915 font-size: var(--sl-button-font-size-small); 2916 height: calc(var(--sl-input-height-small) * 0.8); 2917 line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); 2918 border-radius: var(--sl-input-border-radius-small); 2919 padding: 0 var(--sl-spacing-x-small); 2920 } 2921 2922 .tag--medium { 2923 font-size: var(--sl-button-font-size-medium); 2924 height: calc(var(--sl-input-height-medium) * 0.8); 2925 line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); 2926 border-radius: var(--sl-input-border-radius-medium); 2927 padding: 0 var(--sl-spacing-small); 2928 } 2929 2930 .tag--large { 2931 font-size: var(--sl-button-font-size-large); 2932 height: calc(var(--sl-input-height-large) * 0.8); 2933 line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); 2934 border-radius: var(--sl-input-border-radius-large); 2935 padding: 0 var(--sl-spacing-medium); 2936 } 2937 2938 .tag__remove { 2939 margin-inline-start: var(--sl-spacing-x-small); 2940 } 2941 2942 /* 2943 * Pill modifier 2944 */ 2945 2946 .tag--pill { 2947 border-radius: var(--sl-border-radius-pill); 2948 } 2949`,Gs=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.variant="neutral",this.size="medium",this.pill=!1,this.removable=!1}
2949handleRemoveClick(){this.emit("sl-remove")}render(){return W` 2950 <span 2951 part="base" 2952 class=${Mt({tag:!0,"tag--primary":"primary"===this.variant,"tag--success":"success"===this.variant,"tag--neutral":"neutral"===this.variant,"tag--warning":"warning"===this.variant,"tag--danger":"danger"===this.variant,"tag--text":"text"===this.variant,"tag--small":"small"===this.size,"tag--medium":"medium"===this.size,"tag--large":"large"===this.size,"tag--pill":this.pill,"tag--removable":this.removable})} 2953 > 2954 <slot part="content" class="tag__content"></slot> 2955 2956 ${this.removable?W` 2957 <sl-icon-button 2958 part="remove-button" 2959 exportparts="base:remove-button__base" 2960 name="x-lg" 2961 library="system" 2962 label=${this.localize.term("remove")} 2963 class="tag__remove" 2964 @click=${this.handleRemoveClick} 2965 tabindex="-1" 2966 ></sl-icon-button> 2967 `:""} 2968 </span> 2969 `}};Gs.styles=[Se,Ws],Gs.dependencies={"sl-icon-button":pi},Ne([Ve({reflect:!0})],Gs.prototype,"variant",2),Ne([Ve({reflect:!0})],Gs.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],Gs.prototype,"pill",2),Ne([Ve({type:Boolean})],Gs.prototype,"removable",2);var Ys=c` 2970 :host { 2971 display: block; 2972 } 2973 2974 /** The popup */ 2975 .select { 2976 flex: 1 1 auto; 2977 display: inline-flex; 2978 width: 100%; 2979 position: relative; 2980 vertical-align: middle; 2981 } 2982 2983 .select::part(popup) { 2984 z-index: var(--sl-z-index-dropdown); 2985 } 2986 2987 .select[data-current-placement^='top']::part(popup) { 2988 transform-origin: bottom; 2989 } 2990 2991 .select[data-current-placement^='bottom']::part(popup) { 2992 transform-origin: top; 2993 } 2994 2995 /* Combobox */ 2996 .select__combobox { 2997 flex: 1; 2998 display: flex; 2999 width: 100%; 3000 min-width: 0; 3001 position: relative; 3002 align-items: center; 3003 justify-content: start; 3004 font-family: var(--sl-input-font-family); 3005 font-weight: var(--sl-input-font-weight); 3006 letter-spacing: var(--sl-input-letter-spacing); 3007 vertical-align: middle; 3008 overflow: hidden; 3009 cursor: pointer; 3010 transition: 3011 var(--sl-transition-fast) color, 3012 var(--sl-transition-fast) border, 3013 var(--sl-transition-fast) box-shadow, 3014 var(--sl-transition-fast) background-color; 3015 } 3016 3017 .select__display-input { 3018 position: relative; 3019 width: 100%; 3020 font: inherit; 3021 border: none; 3022 background: none; 3023 color: var(--sl-input-color); 3024 cursor: inherit; 3025 overflow: hidden; 3026 padding: 0; 3027 margin: 0; 3028 -webkit-appearance: none; 3029 } 3030 3031 .select__display-input::placeholder { 3032 color: var(--sl-input-placeholder-color); 3033 } 3034 3035 .select:not(.select--disabled):hover .select__display-input { 3036 color: var(--sl-input-color-hover); 3037 } 3038 3039 .select__display-input:focus { 3040 outline: none; 3041 } 3042 3043 /* Visually hide the display input when multiple is enabled */ 3044 .select--multiple:not(.select--placeholder-visible) .select__display-input { 3045 position: absolute; 3046 z-index: -1; 3047 top: 0; 3048 left: 0; 3049 width: 100%; 3050 height: 100%; 3051 opacity: 0; 3052 } 3053 3054 .select__value-input { 3055 position: absolute; 3056 top: 0; 3057 left: 0; 3058 width: 100%; 3059 height: 100%; 3060 padding: 0; 3061 margin: 0; 3062 opacity: 0; 3063 z-index: -1; 3064 } 3065 3066 .select__tags { 3067 display: flex; 3068 flex: 1; 3069 align-items: center; 3070 flex-wrap: wrap; 3071 margin-inline-start: var(--sl-spacing-2x-small); 3072 } 3073 3074 .select__tags::slotted(sl-tag) { 3075 cursor: pointer !important; 3076 } 3077 3078 .select--disabled .select__tags, 3079 .select--disabled .select__tags::slotted(sl-tag) { 3080 cursor: not-allowed !important; 3081 } 3082 3083 /* Standard selects */ 3084 .select--standard .select__combobox { 3085 background-color: var(--sl-input-background-color); 3086 border: solid var(--sl-input-border-width) var(--sl-input-border-color); 3087 } 3088 3089 .select--standard.select--disabled .select__combobox { 3090 background-color: var(--sl-input-background-color-disabled); 3091 border-color: var(--sl-input-border-color-disabled); 3092 color: var(--sl-input-color-disabled); 3093 opacity: 0.5;
3094 cursor: not-allowed; 3095 outline: none; 3096 } 3097 3098 .select--standard:not(.select--disabled).select--open .select__combobox, 3099 .select--standard:not(.select--disabled).select--focused .select__combobox { 3100 background-color: var(--sl-input-background-color-focus); 3101 border-color: var(--sl-input-border-color-focus); 3102 box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color); 3103 } 3104 3105 /* Filled selects */ 3106 .select--filled .select__combobox { 3107 border: none; 3108 background-color: var(--sl-input-filled-background-color); 3109 color: var(--sl-input-color); 3110 } 3111 3112 .select--filled:hover:not(.select--disabled) .select__combobox { 3113 background-color: var(--sl-input-filled-background-color-hover); 3114 } 3115 3116 .select--filled.select--disabled .select__combobox { 3117 background-color: var(--sl-input-filled-background-color-disabled); 3118 opacity: 0.5; 3119 cursor: not-allowed; 3120 } 3121 3122 .select--filled:not(.select--disabled).select--open .select__combobox, 3123 .select--filled:not(.select--disabled).select--focused .select__combobox { 3124 background-color: var(--sl-input-filled-background-color-focus); 3125 outline: var(--sl-focus-ring); 3126 } 3127 3128 /* Sizes */ 3129 .select--small .select__combobox { 3130 border-radius: var(--sl-input-border-radius-small); 3131 font-size: var(--sl-input-font-size-small); 3132 min-height: var(--sl-input-height-small); 3133 padding-block: 0; 3134 padding-inline: var(--sl-input-spacing-small); 3135 } 3136 3137 .select--small .select__clear { 3138 margin-inline-start: var(--sl-input-spacing-small); 3139 } 3140 3141 .select--small .select__prefix::slotted(*) { 3142 margin-inline-end: var(--sl-input-spacing-small); 3143 } 3144 3145 .select--small.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) { 3146 margin-inline-start: var(--sl-input-spacing-small); 3147 } 3148 3149 .select--small.select--multiple:not(.select--placeholder-visible) .select__combobox { 3150 padding-block: 2px; 3151 padding-inline-start: 0; 3152 } 3153 3154 .select--small .select__tags { 3155 gap: 2px; 3156 } 3157 3158 .select--medium .select__combobox { 3159 border-radius: var(--sl-input-border-radius-medium); 3160 font-size: var(--sl-input-font-size-medium); 3161 min-height: var(--sl-input-height-medium); 3162 padding-block: 0; 3163 padding-inline: var(--sl-input-spacing-medium); 3164 } 3165 3166 .select--medium .select__clear { 3167 margin-inline-start: var(--sl-input-spacing-medium); 3168 } 3169 3170 .select--medium .select__prefix::slotted(*) { 3171 margin-inline-end: var(--sl-input-spacing-medium); 3172 } 3173 3174 .select--medium.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) { 3175 margin-inline-start: var(--sl-input-spacing-medium); 3176 } 3177 3178 .select--medium.select--multiple:not(.select--placeholder-visible) .select__combobox { 3179 padding-inline-start: 0; 3180 padding-block: 3px; 3181 } 3182 3183 .select--medium .select__tags { 3184 gap: 3px; 3185 } 3186 3187 .select--large .select__combobox { 3188 border-radius: var(--sl-input-border-radius-large); 3189 font-size: var(--sl-input-font-size-large); 3190 min-height: var(--sl-input-height-large); 3191 padding-block: 0; 3192 padding-inline: var(--sl-input-spacing-large); 3193 } 3194 3195 .select--large .select__clear { 3196 margin-inline-start: var(--sl-input-spacing-large); 3197 } 3198 3199 .select--large .select__prefix::slotted(*) { 3200 margin-inline-end: var(--sl-input-spacing-large); 3201 } 3202 3203 .select--large.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) { 3204 margin-inline-start: var(--sl-input-spacing-large); 3205 } 3206 3207 .select--large.select--multiple:not(.select--placeholder-visible) .select__combobox { 3208 padding-inline-start: 0; 3209 padding-block: 4px; 3210 } 3211 3212 .select--large .select__tags { 3213 gap: 4px; 3214 } 3215 3216 /* Pills */ 3217 .select--pill.select--small .select__combobox { 3218 border-radius: var(--sl-input-height-small); 3219 } 3220 3221 .select--pill.select--medium .select__combobox { 3222 border-radius: var(--sl-input-height-medium); 3223 } 3224 3225 .select--pill.select--large .select__combobox { 3226 border-radius: var(--sl-input-height-large); 3227 } 3228 3229 /* Prefix and Suffix */ 3230 .select__prefix, 3231 .select__suffix { 3232 flex: 0; 3233 display: inline-flex; 3234 align-items: center; 3235 color: var(--sl-input-placeholder-color); 3236 } 3237 3238 .select__suffix::slotted(*) { 3239 margin-inline-start: var(--sl-spacing-small); 3240 } 3241 3242 /* Clear button */ 3243 .select__clear { 3244 display: inline-flex; 3245 align-items: center; 3246 justify-content: center; 3247 font-size: inherit; 3248 color: var(--sl-input-icon-color); 3249 border: none; 3250 background: none; 3251 padding: 0; 3252 transition: var(--sl-transition-fast) color; 3253 cursor: pointer; 3254 } 3255 3256 .select__clear:hover { 3257 color: var(--sl-input-icon-color-hover); 3258 } 3259 3260 .select__clear:focus { 3261 outline: none; 3262 } 3263 3264 /* Expand icon */ 3265 .select__expand-icon { 3266 flex: 0 0 auto; 3267 display: flex; 3268 align-items: center; 3269 transition: var(--sl-transition-medium) rotate ease; 3270 rotate: 0; 3271 margin-inline-start: var(--sl-spacing-small); 3272 } 3273 3274 .select--open .select__expand-icon { 3275 rotate: -180deg; 3276 } 3277 3278 /* Listbox */ 3279 .select__listbox { 3280 display: block; 3281 position: relative; 3282 font-family: var(--sl-font-sans); 3283 font-size: var(--sl-font-size-medium);
3284 font-weight: var(--sl-font-weight-normal); 3285 box-shadow: var(--sl-shadow-large); 3286 background: var(--sl-panel-background-color); 3287 border: solid var(--sl-panel-border-width) var(--sl-panel-border-color); 3288 border-radius: var(--sl-border-radius-medium); 3289 padding-block: var(--sl-spacing-x-small); 3290 padding-inline: 0; 3291 overflow: auto; 3292 overscroll-behavior: none; 3293 3294 /* Make sure it adheres to the popup's auto size */ 3295 max-width: var(--auto-size-available-width); 3296 max-height: var(--auto-size-available-height); 3297 } 3298 3299 .select__listbox ::slotted(sl-divider) { 3300 --spacing: var(--sl-spacing-x-small); 3301 } 3302 3303 .select__listbox ::slotted(small) { 3304 display: block; 3305 font-size: var(--sl-font-size-small); 3306 font-weight: var(--sl-font-weight-semibold); 3307 color: var(--sl-color-neutral-500); 3308 padding-block: var(--sl-spacing-2x-small); 3309 padding-inline: var(--sl-spacing-x-large); 3310 } 3311` 3312/** 3313 * @license 3314 * Copyright 2017 Google LLC 3315 * SPDX-License-Identifier: BSD-3-Clause 3316 */;class Ks extends Nt{constructor(e){if(super(e),this.it=Y,e.type!==Ot)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Y||null==e)return this._t=void 0,this.it=e;if(e===G)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Ks.directiveName="unsafeHTML",Ks.resultType=1;const Qs=Ft(Ks);var Xs=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new dt(this,"help-text","label"),this.localize=new $e(this),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.valueHasChanged=!1,this.name="",this._value="",this.defaultValue="",this.size="medium",this.placeholder="",this.multiple=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.helpText="",this.form="",this.required=!1,this.getTag=e=>W` 3317 <sl-tag 3318 part="tag" 3319 exportparts=" 3320 base:tag__base, 3321 content:tag__content, 3322 remove-button:tag__remove-button, 3323 remove-button__base:tag__remove-button__base 3324 " 3325 ?pill=${this.pill} 3326 size=${this.size} 3327 removable 3328 @sl-remove=${t=>this.handleTagRemove(t,e)} 3329 > 3330 ${e.getTextLabel()} 3331 </sl-tag> 3332 `,this.handleDocumentFocusIn=e=>{const t=e.composedPath();this&&!t.includes(this)&&this.hide()},this.handleDocumentKeyDown=e=>{const t=e.target,i=null!==t.closest(".select__clear"),r=null!==t.closest("sl-icon-button");if(!i&&!r){if("Escape"===e.key&&this.open&&!this.closeWatcher&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===e.key||" "===e.key&&""===this.typeToSelectString)return e.preventDefault(),e.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const t=this.getAllOptions(),i=t.indexOf(this.currentOption);let r=Math.max(0,i);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===e.key?(r=i+1,r>t.length-1&&(r=0)):"ArrowUp"===e.key?(r=i-1,r<0&&(r=t.length-1)):"Home"===e.key?r=0:"End"===e.key&&(r=t.length-1),this.setCurrentOption(t[r])}if(e.key&&1===e.key.length||"Backspace"===e.key){const t=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if("Backspace"===e.key)return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>
3332this.typeToSelectString="",1e3),"Backspace"===e.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(const e of t){if(e.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(e);break}}}}},this.handleDocumentMouseDown=e=>{const t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get value(){return this._value}set value(e){e=this.multiple?Array.isArray(e)?e:e.split(" "):Array.isArray(e)?e.join(" "):e,this._value!==e&&(this.valueHasChanged=!0,this._value=e)}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),setTimeout(()=>{this.handleDefaultSlotChange()}),this.open=!1}addOpenListeners(){var e;document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn),"CloseWatcher"in window&&(null==(e=this.closeWatcher)||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.open&&(this.hide(),this.displayInput.focus({preventScroll:!0}))})}removeOpenListeners(){var e;document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn),null==(e=this.closeWatcher)||e.destroy()}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sl-focus")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(e){const t=e.composedPath().some(e=>e instanceof Element&&"sl-icon-button"===e.tagName.toLowerCase());this.disabled||t||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){"Tab"!==e.key&&(e.stopPropagation(),this.handleDocumentKeyDown(e))}handleClearClick(e){e.stopPropagation(),this.valueHasChanged=!0,""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sl-clear"),this.emit("sl-input"),this.emit("sl-change")}))}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){const t=e.target.closest("sl-option"),i=this.value;t&&!t.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(t):this.setSelectedOptions(t),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==i&&this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){customElements.get("sl-option")||customElements.whenDefined("sl-option").then(()=>this.handleDefaultSlotChange());const e=this.getAllOptions(),t=this.valueHasChanged?this.value:this.defaultValue,i=Array.isArray(t)?t:[t],r=[];e.forEach(e=>r.push(e.value)),this.setSelectedOptions(e.filter(e=>i.includes(e.value)))}handleTagRemove(e,t){e.stopPropagation(),this.valueHasChanged=!0,this.disabled||(this.toggleOptionSelection(t,!1),this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}))}getAllOptions(){return[...this.querySelectorAll("sl-option")]}getFirstOption(){return this.querySelector("sl-option")}setCurrentOption(e){this.getAllOptions().forEach(e=>{e.current=!1,e.tabIndex=-1}),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){const t=this.getAllOptions(),i=Array.isArray(e)?e:[e];t.forEach(e=>e.selected=!1),i.length&&i.forEach(e=>e.selected=!0),this.selectionChanged()}toggleOptionSelection(e,t){e.selected=!0===t||!1===t?t:!e.selected,this.selectionChanged()}selectionChanged(){var e,t,i;const r=this.getAllOptions();this.selectedOptions=r.filter(e=>e.selected);const s=this.valueHasChanged;if(this.multiple)this.value=this.selectedOptions.map(e=>e.value),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length);else{const r=this.selectedOptions[0];this.value=null!=(e=null==r?void 0:r.value)?e:"",this.displayLabel=null!=(i=null==(t=null==r?void 0:r.getTextLabel)?void 0:t.call(r))?i:""}this.valueHasChanged=s,this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.map((e,t)=>{if(t<this.maxOptionsVisible||this.maxOptionsVisible<=0){const i=this.getTag(e,t);return W`<div @sl-remove=${t=>this.handleTagRemove(t,e)}> 3333 ${"string"==typeof i?Qs(i):i} 3334 </div>`}return t===this.maxOptionsVisible?W`<sl-tag size=${this.size}>+${this.selectedOptions.length-t}</sl-tag>`:W``})}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"value"===e){const e=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=e}}handleValueChange(){if(!this.valueHasChanged){const e=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=e}const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter(e=>t.includes(e.value)))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit
3334("sl-show"),this.addOpenListeners(),await xi(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});const{keyframes:e,options:t}=vi(this,"select.show",{dir:this.localize.dir()});await _i(this.popup.popup,e,t),this.currentOption&&di(this.currentOption,this.listbox,"vertical","auto"),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),await xi(this);const{keyframes:e,options:t}=vi(this,"select.hide",{dir:this.localize.dir()});await _i(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sl-after-hide")}}async show(){if(!this.open&&!this.disabled)return this.open=!0,yi(this,"sl-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,yi(this,"sl-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),i=!!this.label||!!e,r=!!this.helpText||!!t,s=this.clearable&&!this.disabled&&this.value.length>0,o=this.placeholder&&this.value&&this.value.length<=0;return W` 3335 <div 3336 part="form-control" 3337 class=${Mt({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":i,"form-control--has-help-text":r})} 3338 > 3339 <label 3340 id="label" 3341 part="form-control-label" 3342 class="form-control__label" 3343 aria-hidden=${i?"false":"true"} 3344 @click=${this.handleLabelClick} 3345 > 3346 <slot name="label">${this.label}</slot> 3347 </label> 3348 3349 <div part="form-control-input" class="form-control-input"> 3350 <sl-popup 3351 class=${Mt({select:!0,"select--standard":!0,"select--filled":this.filled,"select--pill":this.pill,"select--open":this.open,"select--disabled":this.disabled,"select--multiple":this.multiple,"select--focused":this.hasFocus,"select--placeholder-visible":o,"select--top":"top"===this.placement,"select--bottom":"bottom"===this.placement,"select--small":"small"===this.size,"select--medium":"medium"===this.size,"select--large":"large"===this.size})} 3352 placement=${this.placement} 3353 strategy=${this.hoist?"fixed":"absolute"} 3354 flip 3355 shift 3356 sync="width" 3357 auto-size="vertical" 3358 auto-size-padding="10" 3359 > 3360 <div 3361 part="combobox" 3362 class="select__combobox" 3363 slot="anchor" 3364 @keydown=${this.handleComboboxKeyDown} 3365 @mousedown=${this.handleComboboxMouseDown} 3366 > 3367 <slot part="prefix" name="prefix" class="select__prefix"></slot> 3368 3369 <input 3370 part="display-input" 3371 class="select__display-input" 3372 type="text" 3373 placeholder=${this.placeholder} 3374 .disabled=${this.disabled} 3375 .value=${this.displayLabel} 3376 autocomplete="off" 3377 spellcheck="false" 3378 autocapitalize="off" 3379 readonly 3380 aria-controls="listbox" 3381 aria-expanded=${this.open?"true":"false"} 3382 aria-haspopup="listbox" 3383 aria-labelledby="label" 3384 aria-disabled=${this.disabled?"true":"false"} 3385 aria-describedby="help-text" 3386 role="combobox" 3387 tabindex="0" 3388 @focus=${this.handleFocus} 3389 @blur=${this.handleBlur} 3390 /> 3391 3392 ${this.multiple?W`<div part="tags" class="select__tags">${this.tags}</div>`:""} 3393 3394 <input 3395 class="select__value-input" 3396 type="text" 3397 ?disabled=${this.disabled} 3398 ?required=${this.required} 3399 .value=${Array.isArray(this.value)?this.value.join(", "):this.value} 3400 tabindex="-1" 3401 aria-hidden="true" 3402 @focus=${()=>this.focus()} 3403 @invalid=${this.handleInvalid} 3404 /> 3405 3406 ${s?W` 3407 <button 3408 part="clear-button" 3409 class="select__clear" 3410 type="button" 3411 aria-label=${this.localize.term("clearEntry")} 3412 @mousedown=${this.handleClearMouseDown} 3413 @click=${this.handleClearClick} 3414 tabindex="-1" 3415 > 3416 <slot name="clear-icon"> 3417 <sl-icon name="x-circle-fill" library="system"></sl-icon> 3418 </slot> 3419 </button> 3420 `:""} 3421 3422 <slot name="suffix" part="suffix" class="select__suffix"></slot> 3423 3424 <slot name="expand-icon" part="expand-icon" class="select__expand-icon"> 3425 <sl-icon library="system" name="chevron-down"></sl-icon> 3426 </slot> 3427 </div> 3428 3429 <div 3430 id="listbox"
3431 role="listbox" 3432 aria-expanded=${this.open?"true":"false"} 3433 aria-multiselectable=${this.multiple?"true":"false"} 3434 aria-labelledby="label" 3435 part="listbox" 3436 class="select__listbox" 3437 tabindex="-1" 3438 @mouseup=${this.handleOptionClick} 3439 @slotchange=${this.handleDefaultSlotChange} 3440 > 3441 <slot></slot> 3442 </div> 3443 </sl-popup> 3444 </div> 3445 3446 <div 3447 part="form-control-help-text" 3448 id="help-text" 3449 class="form-control__help-text" 3450 aria-hidden=${r?"false":"true"} 3451 > 3452 <slot name="help-text">${this.helpText}</slot> 3453 </div> 3454 </div> 3455 `}};Xs.styles=[Se,Kt,Ys],Xs.dependencies={"sl-icon":Pt,"sl-popup":as,"sl-tag":Gs},Ne([Ye(".select")],Xs.prototype,"popup",2),Ne([Ye(".select__combobox")],Xs.prototype,"combobox",2),Ne([Ye(".select__display-input")],Xs.prototype,"displayInput",2),Ne([Ye(".select__value-input")],Xs.prototype,"valueInput",2),Ne([Ye(".select__listbox")],Xs.prototype,"listbox",2),Ne([He()],Xs.prototype,"hasFocus",2),Ne([He()],Xs.prototype,"displayLabel",2),Ne([He()],Xs.prototype,"currentOption",2),Ne([He()],Xs.prototype,"selectedOptions",2),Ne([He()],Xs.prototype,"valueHasChanged",2),Ne([Ve()],Xs.prototype,"name",2),Ne([He()],Xs.prototype,"value",1),Ne([Ve({attribute:"value"})],Xs.prototype,"defaultValue",2),Ne([Ve({reflect:!0})],Xs.prototype,"size",2),Ne([Ve()],Xs.prototype,"placeholder",2),Ne([Ve({type:Boolean,reflect:!0})],Xs.prototype,"multiple",2),Ne([Ve({attribute:"max-options-visible",type:Number})],Xs.prototype,"maxOptionsVisible",2),Ne([Ve({type:Boolean,reflect:!0})],Xs.prototype,"disabled",2),Ne([Ve({type:Boolean})],Xs.prototype,"clearable",2),Ne([Ve({type:Boolean,reflect:!0})],Xs.prototype,"open",2),Ne([Ve({type:Boolean})],Xs.prototype,"hoist",2),Ne([Ve({type:Boolean,reflect:!0})],Xs.prototype,"filled",2),Ne([Ve({type:Boolean,reflect:!0})],Xs.prototype,"pill",2),Ne([Ve()],Xs.prototype,"label",2),Ne([Ve({reflect:!0})],Xs.prototype,"placement",2),Ne([Ve({attribute:"help-text"})],Xs.prototype,"helpText",2),Ne([Ve({reflect:!0})],Xs.prototype,"form",2),Ne([Ve({type:Boolean,reflect:!0})],Xs.prototype,"required",2),Ne([Ve()],Xs.prototype,"getTag",2),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleDisabledChange",1),Ne([yt(["defaultValue","value"],{waitUntilFirstUpdate:!0})],Xs.prototype,"handleValueChange",1),Ne([yt("open",{waitUntilFirstUpdate:!0})],Xs.prototype,"handleOpenChange",1),bi("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),bi("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}}),Xs.define("sl-select");var Js=c` 3456 :host { 3457 display: block; 3458 } 3459 3460 .textarea { 3461 display: grid; 3462 align-items: center; 3463 position: relative; 3464 width: 100%; 3465 font-family: var(--sl-input-font-family); 3466 font-weight: var(--sl-input-font-weight); 3467 line-height: var(--sl-line-height-normal); 3468 letter-spacing: var(--sl-input-letter-spacing); 3469 vertical-align: middle; 3470 transition: 3471 var(--sl-transition-fast) color, 3472 var(--sl-transition-fast) border, 3473 var(--sl-transition-fast) box-shadow, 3474 var(--sl-transition-fast) background-color; 3475 cursor: text; 3476 } 3477 3478 /* Standard textareas */ 3479 .textarea--standard { 3480 background-color: var(--sl-input-background-color); 3481 border: solid var(--sl-input-border-width) var(--sl-input-border-color); 3482 } 3483 3484 .textarea--standard:hover:not(.textarea--disabled) { 3485 background-color: var(--sl-input-background-color-hover); 3486 border-color: var(--sl-input-border-color-hover); 3487 } 3488 .textarea--standard:hover:not(.textarea--disabled) .textarea__control { 3489 color: var(--sl-input-color-hover); 3490 } 3491 3492 .textarea--standard.textarea--focused:not(.textarea--disabled) { 3493 background-color: var(--sl-input-background-color-focus); 3494 border-color: var(--sl-input-border-color-focus); 3495 color: var(--sl-input-color-focus); 3496 box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color); 3497 } 3498 3499 .textarea--standard.textarea--focused:not(.textarea--disabled) .textarea__control { 3500 color: var(--sl-input-color-focus); 3501 } 3502 3503 .textarea--standard.textarea--disabled { 3504 background-color: var(--sl-input-background-color-disabled); 3505 border-color: var(--sl-input-border-color-disabled); 3506 opacity: 0.5;
3507 cursor: not-allowed; 3508 } 3509 3510 .textarea__control, 3511 .textarea__size-adjuster { 3512 grid-area: 1 / 1 / 2 / 2; 3513 } 3514 3515 .textarea__size-adjuster { 3516 visibility: hidden; 3517 pointer-events: none; 3518 opacity: 0; 3519 } 3520 3521 .textarea--standard.textarea--disabled .textarea__control { 3522 color: var(--sl-input-color-disabled); 3523 } 3524 3525 .textarea--standard.textarea--disabled .textarea__control::placeholder { 3526 color: var(--sl-input-placeholder-color-disabled); 3527 } 3528 3529 /* Filled textareas */ 3530 .textarea--filled { 3531 border: none; 3532 background-color: var(--sl-input-filled-background-color); 3533 color: var(--sl-input-color); 3534 } 3535 3536 .textarea--filled:hover:not(.textarea--disabled) { 3537 background-color: var(--sl-input-filled-background-color-hover); 3538 } 3539 3540 .textarea--filled.textarea--focused:not(.textarea--disabled) { 3541 background-color: var(--sl-input-filled-background-color-focus); 3542 outline: var(--sl-focus-ring); 3543 outline-offset: var(--sl-focus-ring-offset); 3544 } 3545 3546 .textarea--filled.textarea--disabled { 3547 background-color: var(--sl-input-filled-background-color-disabled); 3548 opacity: 0.5; 3549 cursor: not-allowed; 3550 } 3551 3552 .textarea__control { 3553 font-family: inherit; 3554 font-size: inherit; 3555 font-weight: inherit; 3556 line-height: 1.4; 3557 color: var(--sl-input-color); 3558 border: none; 3559 background: none; 3560 box-shadow: none; 3561 cursor: inherit; 3562 -webkit-appearance: none; 3563 } 3564 3565 .textarea__control::-webkit-search-decoration, 3566 .textarea__control::-webkit-search-cancel-button, 3567 .textarea__control::-webkit-search-results-button, 3568 .textarea__control::-webkit-search-results-decoration { 3569 -webkit-appearance: none; 3570 } 3571 3572 .textarea__control::placeholder { 3573 color: var(--sl-input-placeholder-color); 3574 user-select: none; 3575 -webkit-user-select: none; 3576 } 3577 3578 .textarea__control:focus { 3579 outline: none; 3580 } 3581 3582 /* 3583 * Size modifiers 3584 */ 3585 3586 .textarea--small { 3587 border-radius: var(--sl-input-border-radius-small); 3588 font-size: var(--sl-input-font-size-small); 3589 } 3590 3591 .textarea--small .textarea__control { 3592 padding: 0.5em var(--sl-input-spacing-small); 3593 } 3594 3595 .textarea--medium { 3596 border-radius: var(--sl-input-border-radius-medium); 3597 font-size: var(--sl-input-font-size-medium); 3598 } 3599 3600 .textarea--medium .textarea__control { 3601 padding: 0.5em var(--sl-input-spacing-medium); 3602 } 3603 3604 .textarea--large { 3605 border-radius: var(--sl-input-border-radius-large); 3606 font-size: var(--sl-input-font-size-large); 3607 } 3608 3609 .textarea--large .textarea__control { 3610 padding: 0.5em var(--sl-input-spacing-large); 3611 } 3612 3613 /* 3614 * Resize types 3615 */ 3616 3617 .textarea--resize-none .textarea__control { 3618 resize: none; 3619 } 3620 3621 .textarea--resize-vertical .textarea__control { 3622 resize: vertical; 3623 } 3624 3625 .textarea--resize-auto .textarea__control { 3626 height: auto; 3627 resize: none; 3628 overflow-y: hidden; 3629 } 3630`,Zs=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new dt(this,"help-text","label"),this.hasFocus=!1,this.title="",this.name="",this.value="",this.size="medium",this.filled=!1,this.label="",this.helpText="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.spellcheck=!0,this.defaultValue=""}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setTextareaHeight()),this.updateComplete.then(()=>{this.setTextareaHeight(),this.resizeObserver.observe(this.input)})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){var e;super.disconnectedCallback(),this.input&&(null==(e=this.resizeObserver)||e.unobserve(this.input))}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}setTextareaHeight(){"auto"===this.resize?(this.sizeAdjuster.style.height=`${this.input.clientHeight}px`,this.input.style.height="auto",this.input.style.height=`${this.input.scrollHeight}px`):this.input.style.height=""}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(e){return e?("number"==typeof e.top&&(this.input.scrollTop=e.top),void("number"==typeof e.left&&(this.input.scrollLeft=e.left))):{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(e,t,i="none"){this.input.setSelectionRange(e,t,i)}setRangeText(e,t,i,r="preserve"){const s=null!=t?t:this.input.selectionStart,o=null!=i?i:this.input.selectionEnd;this.input.setRangeText(e,s,o,r),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight())}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),i=!!this.label||!!e,r=!!this.helpText||!!t;return W` 3631 <div 3632 part="form-control" 3633 class=${Mt({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":i,"form-control--has-help-text":r})} 3634 > 3635 <label 3636 part="form-control-label" 3637 class="form-control__label" 3638 for="input" 3639 aria-hidden=${i?"false":"true"} 3640 > 3641 <slot name="label">${this.label}</slot> 3642 </label> 3643 3644 <div part="form-control-input" class="form-control-input"> 3645 <div 3646 part="base" 3647 class=${Mt({textarea:!0,"textarea--small":"small"===this.size,"textarea--medium":"medium"===this.size,"textarea--large":"large"===this.size,"textarea--standard":!this.filled,"textarea--filled":this.filled,"textarea--disabled":this.disabled,"textarea--focused":this.hasFocus,"textarea--empty":!this.value,"textarea--resize-none":"none"===this.resize,"textarea--resize-vertical":"vertical"===this.resize,"textarea--resize-auto":"auto"===this.resize})} 3648 > 3649 <textarea 3650 part="textarea" 3651 id="input" 3652 class="textarea__control" 3653 title=${this.title} 3654 name=${Ht(this.name)} 3655 .value=${Qt(this.value)} 3656 ?disabled=${this.disabled} 3657 ?readonly=${this.readonly} 3658 ?required=${this.required} 3659 placeholder=${Ht(this.placeholder)} 3660 rows=${Ht(this.rows)} 3661 minlength=${Ht(this.minlength)} 3662 maxlength=${Ht(this.maxlength)} 3663 autocapitalize=${Ht(this.autocapitalize)} 3664 autocorrect=${Ht(this.autocorrect)} 3665 ?autofocus=${this.autofocus} 3666 spellcheck=${Ht(this.spellcheck)} 3667 enterkeyhint=${Ht(this.enterkeyhint)} 3668 inputmode=${Ht(this.inputmode)} 3669 aria-describedby="help-text" 3670 @change=${this.handleChange}
3671 @input=${this.handleInput} 3672 @invalid=${this.handleInvalid} 3673 @focus=${this.handleFocus} 3674 @blur=${this.handleBlur} 3675 ></textarea> 3676 <!-- This "adjuster" exists to prevent layout shifting. https://github.com/shoelace-style/shoelace/issues/2180 --> 3677 <div part="textarea-adjuster" class="textarea__size-adjuster" ?hidden=${"auto"!==this.resize}></div> 3678 </div> 3679 </div> 3680 3681 <div 3682 part="form-control-help-text" 3683 id="help-text" 3684 class="form-control__help-text" 3685 aria-hidden=${r?"false":"true"} 3686 > 3687 <slot name="help-text">${this.helpText}</slot> 3688 </div> 3689 </div> 3690 `}};Zs.styles=[Se,Kt,Js],Ne([Ye(".textarea__control")],Zs.prototype,"input",2),Ne([Ye(".textarea__size-adjuster")],Zs.prototype,"sizeAdjuster",2),Ne([He()],Zs.prototype,"hasFocus",2),Ne([Ve()],Zs.prototype,"title",2),Ne([Ve()],Zs.prototype,"name",2),Ne([Ve()],Zs.prototype,"value",2),Ne([Ve({reflect:!0})],Zs.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],Zs.prototype,"filled",2),Ne([Ve()],Zs.prototype,"label",2),Ne([Ve({attribute:"help-text"})],Zs.prototype,"helpText",2),Ne([Ve()],Zs.prototype,"placeholder",2),Ne([Ve({type:Number})],Zs.prototype,"rows",2),Ne([Ve()],Zs.prototype,"resize",2),Ne([Ve({type:Boolean,reflect:!0})],Zs.prototype,"disabled",2),Ne([Ve({type:Boolean,reflect:!0})],Zs.prototype,"readonly",2),Ne([Ve({reflect:!0})],Zs.prototype,"form",2),Ne([Ve({type:Boolean,reflect:!0})],Zs.prototype,"required",2),Ne([Ve({type:Number})],Zs.prototype,"minlength",2),Ne([Ve({type:Number})],Zs.prototype,"maxlength",2),Ne([Ve()],Zs.prototype,"autocapitalize",2),Ne([Ve()],Zs.prototype,"autocorrect",2),Ne([Ve()],Zs.prototype,"autocomplete",2),Ne([Ve({type:Boolean})],Zs.prototype,"autofocus",2),Ne([Ve()],Zs.prototype,"enterkeyhint",2),Ne([Ve({type:Boolean,converter:{fromAttribute:e=>!(!e||"false"===e),toAttribute:e=>e?"true":"false"}})],Zs.prototype,"spellcheck",2),Ne([Ve()],Zs.prototype,"inputmode",2),Ne([Yt()],Zs.prototype,"defaultValue",2),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Zs.prototype,"handleDisabledChange",1),Ne([yt("rows",{waitUntilFirstUpdate:!0})],Zs.prototype,"handleRowsChange",1),Ne([yt("value",{waitUntilFirstUpdate:!0})],Zs.prototype,"handleValueChange",1);var eo=Zs;Zs.define("sl-textarea");var to=c` 3691 :host { 3692 display: inline-flex; 3693 } 3694 3695 .badge { 3696 display: inline-flex; 3697 align-items: center; 3698 justify-content: center; 3699 font-size: max(12px, 0.75em); 3700 font-weight: var(--sl-font-weight-semibold); 3701 letter-spacing: var(--sl-letter-spacing-normal); 3702 line-height: 1; 3703 border-radius: var(--sl-border-radius-small); 3704 border: solid 1px var(--sl-color-neutral-0); 3705 white-space: nowrap; 3706 padding: 0.35em 0.6em; 3707 user-select: none; 3708 -webkit-user-select: none; 3709 cursor: inherit; 3710 } 3711 3712 /* Variant modifiers */ 3713 .badge--primary { 3714 background-color: var(--sl-color-primary-600); 3715 color: var(--sl-color-neutral-0); 3716 } 3717 3718 .badge--success { 3719 background-color: var(--sl-color-success-600); 3720 color: var(--sl-color-neutral-0); 3721 } 3722 3723 .badge--neutral { 3724 background-color: var(--sl-color-neutral-600); 3725 color: var(--sl-color-neutral-0); 3726 } 3727 3728 .badge--warning { 3729 background-color: var(--sl-color-warning-600); 3730 color: var(--sl-color-neutral-0); 3731 } 3732 3733 .badge--danger { 3734 background-color: var(--sl-color-danger-600); 3735 color: var(--sl-color-neutral-0); 3736 } 3737 3738 /* Pill modifier */ 3739 .badge--pill { 3740 border-radius: var(--sl-border-radius-pill); 3741 } 3742 3743 /* Pulse modifier */ 3744 .badge--pulse { 3745 animation: pulse 1.5s infinite; 3746 } 3747 3748 .badge--pulse.badge--primary { 3749 --pulse-color: var(--sl-color-primary-600); 3750 } 3751 3752 .badge--pulse.badge--success { 3753 --pulse-color: var(--sl-color-success-600); 3754 } 3755 3756 .badge--pulse.badge--neutral { 3757 --pulse-color: var(--sl-color-neutral-600); 3758 } 3759 3760 .badge--pulse.badge--warning { 3761 --pulse-color: var(--sl-color-warning-600); 3762 } 3763 3764 .badge--pulse.badge--danger { 3765 --pulse-color: var(--sl-color-danger-600); 3766 } 3767 3768 @keyframes pulse { 3769 0% { 3770 box-shadow: 0 0 0 0 var(--pulse-color); 3771 } 3772 70% { 3773 box-shadow: 0 0 0 0.5rem transparent; 3774 } 3775 100% { 3776 box-shadow: 0 0 0 0 transparent; 3777 } 3778 } 3779`,io=class extends Xe{constructor(){super(...arguments),this.variant="primary",this.pill=!1,this.pulse=!1}render(){return W`
3780 <span 3781 part="base" 3782 class=${Mt({badge:!0,"badge--primary":"primary"===this.variant,"badge--success":"success"===this.variant,"badge--neutral":"neutral"===this.variant,"badge--warning":"warning"===this.variant,"badge--danger":"danger"===this.variant,"badge--pill":this.pill,"badge--pulse":this.pulse})} 3783 role="status" 3784 > 3785 <slot></slot> 3786 </span> 3787 `}};io.styles=[Se,to],Ne([Ve({reflect:!0})],io.prototype,"variant",2),Ne([Ve({type:Boolean,reflect:!0})],io.prototype,"pill",2),Ne([Ve({type:Boolean,reflect:!0})],io.prototype,"pulse",2),io.define("sl-badge"),Gs.define("sl-tag");var ro=c` 3788 :host { 3789 --max-width: 20rem; 3790 --hide-delay: 0ms; 3791 --show-delay: 150ms; 3792 3793 display: contents; 3794 } 3795 3796 .tooltip { 3797 --arrow-size: var(--sl-tooltip-arrow-size); 3798 --arrow-color: var(--sl-tooltip-background-color); 3799 } 3800 3801 .tooltip::part(popup) { 3802 z-index: var(--sl-z-index-tooltip); 3803 } 3804 3805 .tooltip[placement^='top']::part(popup) { 3806 transform-origin: bottom; 3807 } 3808 3809 .tooltip[placement^='bottom']::part(popup) { 3810 transform-origin: top; 3811 } 3812 3813 .tooltip[placement^='left']::part(popup) { 3814 transform-origin: right; 3815 } 3816 3817 .tooltip[placement^='right']::part(popup) { 3818 transform-origin: left; 3819 } 3820 3821 .tooltip__body { 3822 display: block; 3823 width: max-content; 3824 max-width: var(--max-width); 3825 border-radius: var(--sl-tooltip-border-radius); 3826 background-color: var(--sl-tooltip-background-color); 3827 font-family: var(--sl-tooltip-font-family); 3828 font-size: var(--sl-tooltip-font-size); 3829 font-weight: var(--sl-tooltip-font-weight); 3830 line-height: var(--sl-tooltip-line-height); 3831 text-align: start; 3832 white-space: normal; 3833 color: var(--sl-tooltip-color); 3834 padding: var(--sl-tooltip-padding); 3835 pointer-events: none; 3836 user-select: none; 3837 -webkit-user-select: none; 3838 } 3839`,so=class extends Xe{constructor(){super(),this.localize=new $e(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&(e.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const e=wi(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const e=wi(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){var e,t;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?(null==(e=this.closeWatcher)||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await xi(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:i}=vi(this,"tooltip.show",{dir:this.localize.dir()});await _i(this.popup.popup,t,i),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await xi(this.body);const{keyframes:e,options:i}=vi(this,"tooltip.hide",{dir:this.localize.dir()});await _i(this.popup.popup,e,i),this.popup.active=!1,this.body.hidden=!0,this.emit
vendor: 2,644 bytes, lines 3839-3889
3839("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,yi(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,yi(this,"sl-after-hide")}render(){return W` 3840 <sl-popup 3841 part="base" 3842 exportparts=" 3843 popup:base__popup, 3844 arrow:base__arrow 3845 " 3846 class=${Mt({tooltip:!0,"tooltip--open":this.open})} 3847 placement=${this.placement} 3848 distance=${this.distance} 3849 skidding=${this.skidding} 3850 strategy=${this.hoist?"fixed":"absolute"} 3851 flip 3852 shift 3853 arrow 3854 hover-bridge 3855 > 3856 ${""} 3857 <slot slot="anchor" aria-describedby="tooltip"></slot> 3858 3859 ${""} 3860 <div part="body" id="tooltip" class="tooltip__body" role="tooltip" aria-live=${this.open?"polite":"off"}> 3861 <slot name="content">${this.content}</slot> 3862 </div> 3863 </sl-popup> 3864 `}};so.styles=[Se,ro],so.dependencies={"sl-popup":as},Ne([Ye("slot:not([name])")],so.prototype,"defaultSlot",2),Ne([Ye(".tooltip__body")],so.prototype,"body",2),Ne([Ye("sl-popup")],so.prototype,"popup",2),Ne([Ve()],so.prototype,"content",2),Ne([Ve()],so.prototype,"placement",2),Ne([Ve({type:Boolean,reflect:!0})],so.prototype,"disabled",2),Ne([Ve({type:Number})],so.prototype,"distance",2),Ne([Ve({type:Boolean,reflect:!0})],so.prototype,"open",2),Ne([Ve({type:Number})],so.prototype,"skidding",2),Ne([Ve()],so.prototype,"trigger",2),Ne([Ve({type:Boolean})],so.prototype,"hoist",2),Ne([yt("open",{waitUntilFirstUpdate:!0})],so.prototype,"handleOpenChange",1),Ne([yt(["content","distance","hoist","placement","skidding"])],so.prototype,"handleOptionsChange",1),Ne([yt("disabled")],so.prototype,"handleDisabledChange",1),bi("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),bi("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),so.define("sl-tooltip");const oo=c` 3865:host { 3866 --default-font-color: #222; 3867 3868 --light-grey: #eee; 3869 3870 --gray-1: #e6e6e6; 3871 --gray-2: #a9a9a9; 3872 --gray-3: #797979; 3873 --gray-4: #515151; 3874 3875 --nav-link-color: #444; 3876 3877 --bar-shadow-color: rgba(0, 0, 0, .065); 3878 --bar-border-color: #D4D4D4; 3879 --error-border-color: #FF0000; 3880 3881 --chromium-color-dark: #366597; 3882 --chromium-color-medium: #85b4df; 3883 --chromium-color-light: #bdd6ed; 3884 --chromium-color-center: #4580c0; 3885 3886 --material-primary-button: #58f; 3887 3888 --card-background: white; 3889 --card-border: 1px solid #ddd;
3890 --card-box-shadow: rgba(0, 0, 0, 0.067) 1px 1px 4px; 3891 3892 /* App specific */ 3893 --invalid-color: rgba(255,0,0,0.75); 3894 --content-padding: 16px; 3895 --content-padding-half: 8px; 3896 --content-padding-negative: -16px; 3897 --content-padding-huge: 80px; 3898 --default-border-radius: 3px; 3899 3900 --max-content-width: 860px; 3901}`,ao=c` 3902html, body { 3903 margin: 0; 3904 padding: 0; 3905 border: 0; 3906 font-weight: inherit; 3907 font-style: inherit; 3908 font-size: 100%; 3909 font-family: inherit; 3910 vertical-align: baseline; 3911} 3912 3913div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, 3914pre, a, abbr, acronym, address, code, del, dfn, em, img, 3915dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { 3916 margin: 0; 3917 padding: 0; 3918 border: 0; 3919 font-weight: inherit; 3920 font-size: 100%; 3921 font-family: inherit; 3922 vertical-align: baseline; 3923} 3924 3925ol, ul { 3926 padding: revert; 3927} 3928 3929blockquote, q { 3930 margin: 0; 3931 padding: 0; 3932 border: 0; 3933 font-weight: inherit; 3934 font-style: inherit; 3935 font-size: 100%; 3936 font-family: inherit; 3937 vertical-align: baseline; 3938 quotes: "" ""; 3939} 3940 3941blockquote { 3942 margin-left: 1em; 3943 border-left: 2px solid #999; 3944 padding-left: 1em; 3945} 3946 3947blockquote:before, q:before, 3948blockquote:after, q:after { 3949 content: ""; 3950} 3951 3952th, td, caption { 3953 margin: 0; 3954 padding: 0; 3955 border: 0; 3956 font-weight: inherit; 3957 font-style: inherit; 3958 font-size: 100%; 3959 font-family: inherit; 3960 vertical-align: baseline; 3961 text-align: left; 3962 font-weight: normal; 3963 vertical-align: middle; 3964} 3965 3966table { 3967 margin: 0; 3968 padding: 0; 3969 border: 0; 3970 font-weight: inherit; 3971 font-style: inherit; 3972 font-size: 100%; 3973 font-family: inherit; 3974 vertical-align: baseline; 3975 border-collapse: separate; 3976 border-spacing: 0; 3977 vertical-align: middle; 3978} 3979 3980a img { 3981 border: none; 3982} 3983`,no=c` 3984 .hbox, 3985 .vbox { 3986 display: flex; 3987 align-items: center; 3988 } 3989 3990 .hbox { 3991 flex-direction: row; 3992 } 3993 .hbox.align-top { 3994 align-items: flex-start; 3995 } 3996 .vbox { 3997 flex-direction: column; 3998 } 3999 4000 .hbox > .spacer, 4001 .vbox > .spacer { 4002 flex-grow: 1; 4003 visibility: hidden; 4004 } 4005`,lo=[oo,ao,no,c` 4006 4007 * { 4008 box-sizing: border-box; 4009 /* font: inherit; */ 4010 text-decoration: inherit; 4011 -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 4012 } 4013 4014 .conditional-comma:last-child { 4015 display: none; 4016 } 4017 4018 .data-table { 4019 width: 100%; 4020 border: var(--default-border); 4021 border-radius: var(--border-radius); 4022 } 4023 .data-table th { 4024 text-align: left; 4025 background: var(--table-header-background); 4026 padding: var(--content-padding-half) var(--content-padding); 4027 } 4028 .data-table td { 4029 vertical-align: top; 4030 border-top: var(--default-border); 4031 padding: var(--content-padding-half) var(--content-padding); 4032 } 4033 4034 h1, 4035 h2, 4036 h3, 4037 h4 { 4038 font-weight: 300; 4039 } 4040 4041 h1 { 4042 font-size: 30px; 4043 } 4044 4045 h2, 4046 h3, 4047 h4 { 4048 background: var(--heading-background); 4049 color: var(--heading-color); 4050 } 4051 4052 h2 { 4053 font-size: 25px; 4054 } 4055 4056 h3 { 4057 font-size: 20px; 4058 } 4059 4060 a { 4061 text-decoration: none; 4062 color: var(--link-color); 4063 } 4064 a:hover { 4065 text-decoration: underline; 4066 color: var(--link-hover-color); 4067 cursor: pointer; 4068 } 4069 4070 4071 .roadmap-sidebar nav { 4072 display: flex; 4073 flex-direction: column; 4074 gap: var(--content-padding-quarter); 4075 } 4076 4077 .roadmap-sidebar nav a { 4078 display: block; 4079 line-height: 1.4; 4080 } 4081 4082 .roadmap-sidebar nav a[aria-current="page"], 4083 .roadmap-sidebar nav a.active { 4084 margin-bottom: 0; /* spacing handled by gap */ 4085 } 4086 4087 input:not([type="submit"]), 4088 textarea { 4089 border: 1px solid var(--bar-border-color); 4090 } 4091 4092 input:not([type="submit"])[disabled], 4093 textarea[disabled], 4094 button[disabled] { 4095 opacity: 0.5; 4096 } 4097 4098 button, 4099 input[type="submit"], 4100 .button { 4101 display: inline-block; 4102 padding: 4px 16px; 4103 background: var(--button-background); 4104 border: var(--button-border); 4105 border-radius: var(--button-border-radius); 4106 color: var(--button-color); 4107 white-space: nowrap; 4108 user-select: none; 4109 cursor: pointer; 4110 font-size: var(--button-font-size); 4111 } 4112 4113 button.primary, 4114 input[type="submit"], 4115 .button.primary { 4116 background: var(--primary-button-background); 4117 color: var(--primary-button-color); 4118 font-weight: bold; 4119 } 4120 4121 button.primary:disabled, 4122 input[type="submit"]:disabled, 4123 .button.primary:disabled { 4124 background: var(--gray-4); 4125 } 4126 4127 .button.secondary { 4128 margin: var(--content-padding); 4129 border: var(--default-border); 4130 border-color: var(--primary-border-background); 4131 border-radius: var(--border-radius); 4132 } 4133 4134 button:not(:disabled):hover { 4135 border-color: var(--gray-4); 4136 } 4137 4138 #subheader { 4139 display: flex; 4140 align-items: center; 4141 margin: var(--content-padding) 0; 4142 max-width: var(--max-content-width); 4143 width: 100%; 4144 } 4145 #subheader div.search { 4146 min-width: 350px; 4147 } 4148 #subheader div input { 4149 width: 280px; 4150 padding: 10px 7px; 4151 } 4152 4153 code { 4154 font-family: monospace; 4155 } 4156 4157 .description { 4158 line-height: 1.4; 4159 } 4160 4161 .comma::after { 4162 content: ","; 4163 margin-right: 0.2em; 4164 } 4165 4166 details { 4167 padding: var(--content-padding-quarter); 4168 } 4169 4170 details summary { 4171 white-space: nowrap; 4172 box-sizing: border-box; 4173 contain: content; 4174 overflow: hidden; 4175 cursor: pointer; 4176 transition: margin 250ms ease-out; 4177 } 4178 4179 details summary:hover { 4180 color: var(--link-hover-color); 4181 } 4182 4183 details[open] #preview { 4184 display: none; 4185 } 4186 4187 details[open] summary { 4188 margin-bottom: var(--content-padding-quarter); 4189 } 4190 4191 details > div { 4192 padding: var(--content-padding-quarter); 4193 padding-left: var(--content-padding); 4194 } 4195 4196 .no-web-share { 4197 display: none; 4198 } 4199 4200 .preformatted { 4201 white-space: pre-wrap; 4202 } 4203 4204 .warning { 4205 margin: var(--content-padding); 4206 padding: var(--content-padding); 4207 background: var(--warning-background); 4208 color: var(--warning-color); 4209 } 4210 4211 #breadcrumbs { 4212 display: flex; 4213 align-items: center; 4214 } 4215 4216 #breadcrumbs a { 4217 text-decoration: none; 4218 color: inherit; 4219 display: flex; 4220 align-items: center; 4221 } 4222 4223 #breadcrumbs a sl-icon { 4224 padding-right: var(--content-padding-half); 4225 } 4226 4227 sl-dialog::part(title) { 4228 padding-top: calc(var(--header-spacing) / 2); 4229 padding-bottom: calc(var(--header-spacing) / 2); 4230 } 4231 4232 sl-dialog::part(close-button) { 4233 padding-right: 0; 4234 } 4235 4236 sl-dialog::part(body) { 4237 padding-top: 0; 4238 padding-bottom: calc(var(--body-spacing) / 2); 4239 } 4240 4241 sl-details::part(base) { 4242 margin: var(--content-padding-half) 0 0 0; 4243 color: var(--accordion-color); 4244 border: none; 4245 border-radius: 0; 4246 background-color: transparent; 4247 } 4248 4249 sl-details::part(header) { 4250 border-radius: var(--accordion-border-radius); 4251 background: var(--accordion-background); 4252 font-weight: 300; 4253 font-size: 20px; 4254 padding: var(--content-padding-quarter) var(--content-padding-half); 4255 } 4256 4257 sl-details::part(content) { 4258 padding: 0; 4259 } 4260 4261 sl-skeleton { 4262 --color: #eee; 4263 --sheen-color: #ccc; 4264 } 4265 4266 sl-relative-time { 4267 margin: 0 -3px; /* Mitigate spacing from unknown cause. */ 4268 } 4269 4270 sl-relative-time.no-squeeze { 4271 margin: 0 0; 4272 } 4273 4274 @media only screen and (max-width: 700px) { 4275 h1 { 4276 font-size: 24px; 4277 } 4278 h2 { 4279 font-size: 20px; 4280 } 4281 h3 { 4282 font-size: 15px; 4283 } 4284 4285 #subheader div:not(.search):not(.actionlinks):not(.tooltips) { 4286 display: none; 4287 } 4288 4289 #subheader div.search { 4290 text-align: center; 4291 min-width: 0; 4292 margin: 0; 4293 } 4294 #subheader div.search input { 4295 width: auto; 4296 } 4297 } 4298`],co=c` 4299.layout { 4300 display: flex; 4301} 4302.layout.wrap { 4303 flex-wrap: wrap; 4304} 4305.layout.center { 4306 align-items: center; 4307} 4308.layout.center-center { 4309 align-items: center; 4310 justify-content: center; 4311} 4312.layout.vertical { 4313 flex-direction: column; 4314}`;var ho=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let uo=class extends ce{constructor(){super(...arguments),this.editing=!1,this.component={},this.index=0,this.usersMap=new Map,this.componentId=0,this.name="",this.subscriberIds=[],this.ownerIds=[],this._client=window.csOpenApiClient}static get styles(){return[lo,oo,co,c` 4315 :host { 4316 display: flex; 4317 } 4318 4319 :host([editing]) .owners_list_add_remove { 4320 opacity: 1; 4321 pointer-events: all; 4322 } 4323 4324 :host([editing]) .owners_list select[multiple] { 4325 background-color: #fff; 4326 border-color: rgba(0, 0, 0, 0); 4327 } 4328 4329 :host([editing]) .owners_list select[multiple] option { 4330 padding-left: 4px; 4331 } 4332 4333 .component_name { 4334 flex: 1 0 130px; 4335 margin-right: var(--content-padding); 4336 } 4337 4338 .component_name h3 { 4339 color: initial; 4340 padding-top: 4px; 4341 } 4342 4343 .column_header { 4344 margin-bottom: calc(var(--content-padding) / 2); 4345 } 4346 4347 .owners_list { 4348 flex: 1 0 auto; 4349 } 4350 4351 .component_owner { 4352 font-weight: 600; 4353 } 4354 4355 .owners_list_add_remove { 4356 margin-left: calc(var(--content-padding) / 2); 4357 opacity: 0; 4358 transition: 200ms opacity cubic-bezier(0, 0, 0.2, 1); 4359 pointer-events: none; 4360 } 4361 4362 .owners_list_add_remove button[disabled] { 4363 pointer-events: none; 4364 opacity: 0.5; 4365 } 4366 4367 .remove_owner_button { 4368 color: darkred; 4369 } 4370 4371 select[multiple] { 4372 min-width: 275px; 4373 background-color: #eee; 4374 border: none; 4375 transition: 200ms background-color cubic-bezier(0, 0, 0.2, 1); 4376 font-size: inherit; 4377 } 4378 4379 select[multiple]:disabled option { 4380 color: initial; 4381 padding: 4px 0; 4382 } 4383 `]}getOwnerListElement(){return this.shadowRoot?.querySelector(`#owner_list_${this.index}`)}_getOptionsElement(){return this._ownerCandidates}
4383_findSelectedOptionElement(){return this._getOptionsElement().selectedOptions[0]}_isOwnerCheckboxChecked(){return this._isPrimaryCheckbox.checked}_isUserInOwnerList(e){const t=this.getOwnerListElement();return Array.from(t.options).find(t=>parseInt(t.value)===e)}_addUser(){const e=this._isOwnerCheckboxChecked(),t=this._findSelectedOptionElement(),i=parseInt(t.value);if(t.disabled)return void alert("Please select a user before trying to add");if(this._isUserInOwnerList(i)&&!e)return;let r=!1;this._client.addUserToComponent({componentId:this.componentId,userId:i,componentUsersRequest:{owner:e}}).then(()=>{}).catch(()=>{r=!0}).finally(()=>{this.dispatchEvent(new CustomEvent("adminAddComponentUser",{detail:{userId:i,toggleAsOwner:e,index:this.index,isError:r},bubbles:!0,composed:!0}))})}_removeUser(){const e=this._isOwnerCheckboxChecked(),t=this._findSelectedOptionElement(),i=parseInt(t.value);if(t.disabled)return void alert("Please select a user before trying to remove");if(!this._isUserInOwnerList(i))return;let r=!1;this._client.removeUserFromComponent({componentId:this.componentId,userId:i,componentUsersRequest:{owner:e}}).then(()=>{}).catch(()=>{r=!0}).finally(()=>{this.dispatchEvent(new CustomEvent("adminRemoveComponentUser",{detail:{userId:i,toggleAsOwner:e,index:this.index,isError:r},bubbles:!0,composed:!0}))})}_printUserDetails(e){return W`${this.usersMap.get(e).name}: 4384 ${this.usersMap.get(e).email}`}render(){const e=[];for(const t of this.usersMap.values())e.push(W`<option 4385 class="owner_name" 4386 value="${t.id}" 4387 data-email="${t.email}" 4388 data-name="${t.name}" 4389 > 4390 ${t.name}: ${t.email} 4391 </option>`);return W` 4392 <div class="component_name"> 4393 <div class="column_header">Component</div> 4394 <h3>${this.name}</h3> 4395 </div> 4396 <div class="owners_list layout horizontal center"> 4397 <div> 4398 <div class="column_header">Receives email updates:</div> 4399 <select 4400 multiple 4401 disabled 4402 id="owner_list_${this.index}" 4403 size="${this.subscriberIds.length}" 4404 > 4405 ${this.subscriberIds.map(e=>this.ownerIds.includes(e)?W`<option 4406 class="owner_name component_owner" 4407 value="${e}" 4408 > 4409 ${this._printUserDetails(e)} 4410 </option>`:W`<option class="owner_name" value="${e}"> 4411 ${this._printUserDetails(e)} 4412 </option>`)}; 4413 </select> 4414 </div> 4415 <div class="owners_list_add_remove"> 4416 <div> 4417 <select class="owner_candidates"> 4418 <option selected disabled data-placeholder="true"> 4419 Select owner to add/remove 4420 </option> 4421 ${e}</select 4422 ><br /> 4423 <label 4424 title="Toggles the user as an owner. If you click 'Remove' ans this is not checked, the user is removed from the component." 4425 >Owner? <input type="checkbox" class="is_primary_checkbox" 4426 /></label> 4427 </div> 4428 <button 4429 @click="${this._addUser}" 4430 class="add_owner_button" 4431 data-component-name="${this.name}" 4432 > 4433 Add 4434 </button> 4435 <button 4436 @click="${this._removeUser}" 4437 class="remove_owner_button" 4438 data-component-name="${this.name}" 4439 > 4440 Remove 4441 </button> 4442 </div> 4443 </div> 4444 `}};/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */ 4445function po(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r} 4446/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ 4447function fo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var r,s,o,a,n=[],l=!0,d=!1;try{if(o=(i=i.call(e)).next,0===t);else for(;!(l=(r=o.call(i)).done)&&(n.push(r.value),n.length!==t);l=!0);}catch(e){d=!0,s=e}
vendor: 6,839 bytes, line 4447
4447finally{try{if(!l&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(d)throw s}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return po(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?po(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}ho([Ve({type:Boolean,reflect:!0})],uo.prototype,"editing",void 0),ho([Ve({type:Object})],uo.prototype,"component",void 0),ho([Ve({type:Number})],uo.prototype,"index",void 0),ho([Ve({type:Object})],uo.prototype,"usersMap",void 0),ho([Ve({type:Number})],uo.prototype,"componentId",void 0),ho([Ve({type:String})],uo.prototype,"name",void 0),ho([Ve({type:Array})],uo.prototype,"subscriberIds",void 0),ho([Ve({type:Array})],uo.prototype,"ownerIds",void 0),ho([Ye(".owner_candidates")],uo.prototype,"_ownerCandidates",void 0),ho([Ye(".is_primary_checkbox")],uo.prototype,"_isPrimaryCheckbox",void 0),uo=ho([Ue("chromedash-admin-blink-component-listing")],uo);const mo=Object.entries,go=Object.setPrototypeOf,bo=Object.isFrozen,vo=Object.getPrototypeOf,yo=Object.getOwnPropertyDescriptor;let _o=Object.freeze,wo=Object.seal,ko=Object.create,xo="undefined"!=typeof Reflect&&Reflect,$o=xo.apply,So=xo.construct;_o||(_o=function(e){return e}),wo||(wo=function(e){return e}),$o||($o=function(e,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];return e.apply(t,r)}),So||(So=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return new e(...i)});const Co=Go(Array.prototype.forEach),Eo=Go(Array.prototype.lastIndexOf),Io=Go(Array.prototype.pop),To=Go(Array.prototype.push),Ao=Go(Array.prototype.splice),Ro=Array.isArray,Po=Go(String.prototype.toLowerCase),Do=Go(String.prototype.toString),Oo=Go(String.prototype.match),zo=Go(String.prototype.replace),Lo=Go(String.prototype.indexOf),Fo=Go(String.prototype.trim),No=Go(Number.prototype.toString),Mo=Go(Boolean.prototype.toString),qo="undefined"==typeof BigInt?null:Go(BigInt.prototype.toString),Uo="undefined"==typeof Symbol?null:Go(Symbol.prototype.toString),Bo=Go(Object.prototype.hasOwnProperty),jo=Go(Object.prototype.toString),Vo=Go(RegExp.prototype.test),Ho=(Wo=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return So(Wo,t)});var Wo;function Go(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];return $o(e,t,r)}}function Yo(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Po;if(go&&go(e,null),!Ro(t))return e;let r=t.length;for(;r--;){let s=t[r];if("string"==typeof s){const e=i(s);e!==s&&(bo(t)||(t[r]=e),s=e)}e[s]=!0}return e}function Ko(e){for(let t=0;t<e.length;t++)Bo(e,t)||(e[t]=null);return e}function Qo(e){const t=ko(null);for(const r of mo(e)){var i=fo(r,2);const s=i[0],o=i[1];Bo(e,s)&&(Ro(o)?t[s]=Ko(o):o&&"object"==typeof o&&o.constructor===Object?t[s]=Qo(o):t[s]=o)}return t}function Xo(e,t){for(;null!==e;){const i=yo(e,t);if(i){if(i.get)return Go(i.get);if("function"==typeof i.value)return Go(i.value)}e=vo(e)}return function(){return null}}const Jo=_o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Zo=_o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ea=_o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ta=_o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ia=_o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ra=_o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sa=_o(["#text"]),oa=_o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
4447spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),aa=_o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),na=_o(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),la=_o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),da=wo(/{{[\w\W]*|^[\w\W]*}}/g),ca=wo(/<%[\w\W]*|^[\w\W]*%>/g),ha=wo(/\${[\w\W]*/g),ua=wo(/^data-[\-\w.\u00B7-\uFFFF]+$/),pa=wo(/^aria-[\-\w]+$/),fa=wo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ma=wo(/^(?:\w+script|data):/i),ba=wo(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),va=wo(/^html$/i),ya=wo(/^[a-z][.\w]*(-[.\w]+)+$/i),_a=wo(/<[/\w!]/g),wa=wo(/<[/\w]/g),ka=wo(/<\/no(script|embed|frames)/i),xa=wo(/\/>/i),$a=1,Sa=3,Ca=7,Ea=8,Ia=9,Ta=11,Aa=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Ra=_o(Yo({},Aa)),Pa=function(){const e={};return Co(Aa,t=>{e[t]=wo(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),_o(e)}(),Da=function(){return"undefined"==typeof window?null:window},Oa=function(e,t,i,r){return Bo(e,t)&&Ro(e[t])?Yo(r.base?Qo(r.base):{},e[t],r.transform):i},za=function(e,t,i){const r=Bo(e,t)?e[t]:void 0;return r&&"object"==typeof r?Qo(r):i()};var La=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Da();const i=t=>e(t);if(i.version="3.4.16",i.removed=[],!t||!t.document||t.document.nodeType!==Ia||!t.Element)return i.isSupported=!1,i;let r=t.document;const s=r,o=s.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,n=t.Node,l=t.Element,d=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const c=t.DOMParser,h=t.trustedTypes,u=l.prototype,p=Xo(u,"cloneNode"),f=Xo(u,"remove"),m=Xo(u,"removeAttributeNode"),g=Xo(u,"nextSibling"),b=Xo(u,"childNodes"),v=Xo(u,"parentNode"),y=Xo(u,"shadowRoot"),_=Xo(u,"attributes"),w=n&&n.prototype?Xo(n.prototype,"nodeType"):null,k=n&&n.prototype?Xo(n.prototype,"nodeName"):null,x=n&&n.prototype?Xo(n.prototype,"ownerDocument"):null,$=function(e){return w?w(e):e.nodeType},S=function(e){return k?k(e):e.nodeName};if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let C,E,I="",T=!1,A=0;const R=function(){if(A>0)throw Ho('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},P=function(e){R(),A++;try{return C.createHTML(e)}finally{A--}},D=function(){return T||(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;
vendor: 13,780 bytes, line 4447
4447const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(i=t.getAttribute(r));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(h,o),T=!0),E},O=r,z=O.implementation,L=O.createNodeIterator,F=O.createDocumentFragment,N=O.getElementsByTagName,M=s.importNode;let q={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof mo&&"function"==typeof v&&z&&void 0!==z.createHTMLDocument;const U=da,B=ca,j=ha,V=ua,H=pa,W=ma,G=ba,Y=ya;let K=fa,Q=null;const X=Yo({},[...Jo,...Zo,...ea,...ia,...sa]);let J=null;const Z=Yo({},[...oa,...aa,...na,...la]);let ee=Object.seal(ko(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,ie=null;const re=Object.seal(ko(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let se=!0,oe=!0,ae=!1,ne=!0,le=!1,de=!0,ce=!1,he=!1,ue=null,pe=null,fe=!1,me=!1,ge=!1,be=!1,ve=!0,ye=!1;const _e="user-content-";let we=!0,ke=!1,xe={},$e=null;const Se=Yo({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ce=null;const Ee=Yo({},["audio","video","img","source","image","track"]);let Ie=null;const Te=Yo({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ae="http://www.w3.org/1998/Math/MathML",Re="http://www.w3.org/2000/svg",Pe="http://www.w3.org/1999/xhtml";let De=Pe,Oe=!1,ze=null;const Le=Yo({},[Ae,Re,Pe],Do),Fe=_o(["mi","mo","mn","ms","mtext"]);let Ne=Yo({},Fe);const Me=_o(["annotation-xml"]);let qe=Yo({},Me);const Ue=Yo({},["title","style","font","a","script"]);let Be=null;const je=["application/xhtml+xml","text/html"];let Ve=null,He=null;const We=r.createElement("form"),Ge=function(e){return e instanceof RegExp||e instanceof Function},Ye=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(He&&He===e)return;e&&"object"==typeof e||(e={}),e=Qo(e),Be=-1===je.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ve="application/xhtml+xml"===Be?Do:Po,Q=Oa(e,"ALLOWED_TAGS",X,{transform:Ve}),J=Oa(e,"ALLOWED_ATTR",Z,{transform:Ve}),ze=Oa(e,"ALLOWED_NAMESPACES",Le,{transform:Do}),Ie=Oa(e,"ADD_URI_SAFE_ATTR",Te,{transform:Ve,base:Te}),Ce=Oa(e,"ADD_DATA_URI_TAGS",Ee,{transform:Ve,base:Ee}),$e=Oa(e,"FORBID_CONTENTS",Se,{transform:Ve}),te=Oa(e,"FORBID_TAGS",Qo({}),{transform:Ve}),ie=Oa(e,"FORBID_ATTR",Qo({}),{transform:Ve}),xe=!!Bo(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?Qo(e.USE_PROFILES):e.USE_PROFILES),se=!1!==e.ALLOW_ARIA_ATTR,oe=!1!==e.ALLOW_DATA_ATTR,ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,le=e.SAFE_FOR_TEMPLATES||!1,de=!1!==e.SAFE_FOR_XML,ce=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,ge=e.RETURN_DOM_FRAGMENT||!1,be=e.RETURN_TRUSTED_TYPE||!1,fe=e.FORCE_BODY||!1,ve=!1!==e.SANITIZE_DOM,ye=e.SANITIZE_NAMED_PROPS||!1,we=!1!==e.KEEP_CONTENT,ke=e.IN_PLACE||!1,K=function(e){try{return Vo(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:fa,De="string"==typeof e.NAMESPACE?e.NAMESPACE:Pe,Ne=za(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>Yo({},Fe)),qe=za(e,"HTML_INTEGRATION_POINTS",()=>Yo({},Me));const t=za(e,"CUSTOM_ELEMENT_HANDLING",()=>ko(null));if(ee=ko(null),Bo(t,"tagNameCheck")&&Ge(t.tagNameCheck)&&(ee.tagNameCheck=t.tagNameCheck),Bo(t,"attributeNameCheck")&&Ge(t.attributeNameCheck)&&(ee.attributeNameCheck=t.attributeNameCheck),Bo(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(ee.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),wo(ee),le&&(oe=!1),ge&&(me=!0),xe&&(Q=Yo({},sa),J=ko(null),!0===xe.html&&(Yo(Q,Jo),Yo(J,oa)),!0===xe.svg&&(Yo(Q,Zo),Yo(J,aa),Yo(J,la)),!0===xe.svgFilters&&(Yo(Q,ea),Yo(J,aa),Yo(J,la)),!0===xe.mathMl&&(Yo(Q,ia),Yo(J,na),Yo(J,la))),re.tagCheck=null,re.attributeCheck=null,Bo(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?re.tagCheck=e.ADD_TAGS:Ro(e.ADD_TAGS)&&(Q===X&&(Q=Qo(Q)),Yo(Q,e.ADD_TAGS,Ve))),Bo(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?re.attributeCheck=e.ADD_ATTR:Ro(e.ADD_ATTR)&&(J===Z&&(J=Qo(J)),Yo(J,e.ADD_ATTR,Ve))),Bo(e,"ADD_FORBID_CONTENTS")&&Ro(e.ADD_FORBID_CONTENTS)&&($e===Se&&($e=Qo($e)),Yo($e,e.ADD_FORBID_CONTENTS,Ve)),we&&(Q["#text"]=!0),ce&&Yo(Q,["html","head","body"]),Q.table&&(Yo(Q,["tbody"]),delete te.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ho('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ho('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=C;C=e.TRUSTED_TYPES_POLICY;try{I=P("")}catch(e){throw C=t,e}}else null===e.TRUSTED_TYPES_POLICY?(C=void 0,I=""):(void 0===C&&(C=D()),C&&"string"==typeof I&&(I=P("")));_o&&_o(e),He=e},Ke=Yo({},[...Zo,...ea,...ta]),Qe=Yo({},[...ia,...ra]),Xe=function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:De,tagName:"template"});const i=Po(e.tagName),r=Po(t.tagName);return!!ze[e.namespaceURI]&&(e.namespaceURI===Re?function(e,t,i){return t.namespaceURI===Pe?"svg"===e:t.namespaceURI===Ae?"svg"===e&&("annotation-xml"===i||Ne[i]):Boolean(Ke[e])}(i,t,r):e.namespaceURI===Ae?function(e,t,i){return t.namespaceURI===Pe?"math"===e:t.namespaceURI===Re?"math"===e&&qe[i]:Boolean(Qe[e])}(i,t,r):e.namespaceURI===Pe?function(e,t,i){return!(t.namespaceURI===Re&&!qe[i])&&!(t.namespaceURI===Ae&&!Ne[i])&&!Qe[e]&&(Ue[e]||!Ke[e])}(i,t,r):!("application/xhtml+xml"!==Be||!ze[e.namespaceURI]))},Je=function(e){To(i.removed,{element:e});try{v(e).removeChild(e)}catch(t){if(f(e),!v(e))throw Ho("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ze=function(e,t,i){try{m(e,t)}catch(t){try{e.removeAttribute(i)}catch(e){}}},et=function(e){rt(e);const t=b(e);if(t){const e=[];Co(t,t=>{To(e,t)}),Co(e,e=>{try{f(e)}catch(e){}})}const i=_(e);if(i)for(let t=i.length-1;t>=0;--t){const r=i[t],s=r&&r.name;"string"==typeof s&&Ze(e,r,s)}},tt=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(e){r=null}To(i.removed,{attribute:r||null,from:t});try{r?m(t,r):t.removeAttribute(e)}catch(i){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(me||ge)try{Je(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},it=function(e){const t=_(e);if(t)for(let i=t.length-1;i>=0;--i){const r=t[i],s=r&&r.name;"string"!=typeof s||J[Ve(s)]||Ze(e,r,s)}},rt=function(e){const t=[e];for(;t.length>0;){const e=t.pop();$(e)===$a&&it(e);const i=b(e);if(i)for(let e=i.length-1;e>=0;--e)t.push(i[e])}},st=function(e,t){return!!de&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},ot=function(e){let t=null,i=null;if(fe)e="<remove></remove>"+e;else{const t=Oo(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===Be&&De===Pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const s=C?P(e):e;if(De===Pe)try{t=(new c).parseFromString(s,Be)}catch(e){}if(!t||!t.documentElement){t=z.createDocument(De,"template",null);try{t.documentElement.innerHTML=Oe?I:s}catch(e){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(r.createTextNode(i),o.childNodes[0]||null),De===Pe?N.call(t,ce?"html":"body")[0]:ce?t.documentElement:o},at=function(e){const t=x?x(e):e.ownerDocument;return L.call(t||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},nt=function(e){return e=zo(e,U," "),e=zo(e,B," "),e=zo(e,j," ")},lt=function(e){var t;e.normalize();const i=x?x(e):e.ownerDocument,r=L.call(i||e,e,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let s=r.nextNode();for(;s;)s.data=nt(s.data),s=r.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&Co(o,e=>{ct(e.content)&<(e.content)})},dt=function(e){const t=k?k(e):null;return"string"==typeof t&&("form"===Ve(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==_(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==w(e)||e.childNodes!==b(e)))},ct=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return w(e)===Ta}catch(e){return!1}},ht=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return"number"==typeof w(e)}catch(e){return!1}};function ut(e,t,r){0!==e.length&&Co(e,e=>{e.call(i,t,r,He)})}const pt=function(e,t){if(e instanceof RegExp)return Vo(e,t);if(e instanceof Function){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];return Boolean(e(t,...r))}return!1},ft=function(e,t,i,r){return 0===e.length?t:t===i||t===r?Qo(t):t},mt=function(e,t){return e!==t&&null===v(e)&&(ke&&rt(e),!0)},gt=function(e,t){if(ut(q.beforeSanitizeElements,e,null),mt(e,t))return!0;if(dt(e))return Je(e),!0;const r=Ve(S(e));if(Q=ft(q.uponSanitizeElement,Q,X,ue),ut(q.uponSanitizeElement,e,{tagName:r,allowedTags:Q}),mt(e,t))return!0;if(function(e,t){return!!(de&&e.hasChildNodes()&&!ht(e.firstElementChild)&&Vo(_a,e.textContent)&&Vo(_a,e.innerHTML))||!!(de&&e.namespaceURI===Pe&&Ra[t]&&(ht(e.firstElementChild)||"string"==typeof e.textContent&&Vo(Pa[t],e.textContent)))||e.nodeType===Ca||!(!de||e.nodeType!==Ea||!Vo(wa,e.data))}(e,r))return Je(e),!0;if(te[r]||!(re.tagCheck instanceof Function&&re.tagCheck(r))&&!Q[r]){const i=function(e,t,i){if(!te[t]&&yt(t)&&pt(ee.tagNameCheck,t))return!1;if(we&&!$e[t]){const t=v(e),r=b(e);if(r&&t)for(let s=r.length-1;s>=0;--s){const o=e===i?p(r[s],!0):r[s];t.insertBefore(o,g(e))}}return Je(e),!0}(e,r,t);return!(!1!==i||(ut(q.afterSanitizeElements,e,null),!mt(e,t)))||i}if($(e)===$a&&!Xe(e))return Je(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&Vo(ka,e.innerHTML))return Je(e),!0;if(le&&e.nodeType===Sa){const t=nt(e.textContent);e.textContent!==t&&(To(i.removed,{element:e.cloneNode()}),e.textContent=t)}return ut(q.afterSanitizeElements,e,null),mt(e,t)},bt=function(e,t,i){if(ie[t])return!1;if(st(t,e))return!1;if(ve&&("id"===t||"name"===t)&&(i in r||i in We))return!1;const s=J[t]||re.attributeCheck instanceof Function&&re.attributeCheck(t,e);return!(!oe||!Vo(V,t))||(!(!se||!Vo(H,t))||(s?!!Ie[t]||(!!Vo(K,zo(i,G,""))||(!("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Lo(i,"data:")||!Ce[e])||(!(!ae||Vo(W,zo(i,G,"")))||!i))):yt(e)&&pt(ee.tagNameCheck,e)&&pt(ee.attributeNameCheck,t,e)||"is"===t&&ee.allowCustomizedBuiltInElements&&pt(ee.tagNameCheck,i)))},vt=Yo({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yt=function(e){return!vt[Po(e)]&&Vo(Y,e)},_t=function(e,t,i,r){if(C&&"object"==typeof h&&"function"==typeof h.getAttributeType&&!i)switch(h.getAttributeType(e,t)){case"TrustedHTML":return P(r);case"TrustedScriptURL":return function(e){R(),A++;try{return C.createScriptURL(e)}finally{A--}}(r)}return r},wt=function(e,t,i,r){try{return i?e.setAttributeNS(i,t,r):e.setAttribute(t,r),!dt(e)||(Je(e),!1)}catch(i){return tt(t,e),!1}},kt=function(e,t){if(ut(q.beforeSanitizeAttributes,e,null),mt(e,t))return;const r=e.attributes;if(!r||dt(e))return;J=ft(q.uponSanitizeAttribute,J,Z,pe);const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let o=r.length;const a=Ve(e.nodeName);for(;o--;){const t=r[o],n=t.name,l=t.namespaceURI,d=t.value,c=Ve(n),h=d;let u="value"===n?h:Fo(h),p=!1;s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,ut(q.uponSanitizeAttribute,e,s),u=s.attrValue,!ye||"id"!==c&&"name"!==c||0===Lo(u,_e)||(tt(n,e,t),u=_e+u,p=!0),de&&Vo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)?tt(n,e,t):"attributename"===c&&Oo(u,"href")?tt(n,e,t):s.forceKeepAttr||(s.keepAttr&&(ne||!Vo(xa,u))?(le&&(u=nt(u)),bt(a,c,u)?(u=_t(a,c,l,u),u!==h&&wt(e,n,l,u)&&p&&Io(i.removed)):tt(n,e,t)):tt(n,e,t))}ut(q.afterSanitizeAttributes,e,null),mt(e,t)},xt=function(e){let t=null;const i=at(e);for(ut(q.beforeSanitizeShadowDOM,e,null);t=i.nextNode();)if(ut(q.uponSanitizeShadowNode,t,null),gt(t,e),kt(t,e),ct(t.content)&&xt(t.content),$(t)===$a){const e=y(t);ct(e)&&($t(e),xt(e))}ut(q.afterSanitizeShadowDOM,e,null)},$t=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){xt(e.shadow);continue}const i=e.node,r=$(i)===$a,s=b(i);if(s)for(let e=s.length-1;e>=0;--e)t.push({node:s[e],shadow:null});if(r){const e=k?k(i):null;if("string"==typeof e&&"template"===Ve(e)){const e=i.content;ct(e)&&t.push({node:e,shadow:null})}}if(r){const e=y(i);ct(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,n=null;if(Oe=!e,Oe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return No(e);case"boolean":return Mo(e);case"bigint":return qo?qo(e):"0";
4447case"symbol":return Uo?Uo(e):"Symbol()";case"undefined":default:return jo(e);case"function":case"object":{if(null===e)return jo(e);const t=e,i=Xo(t,"toString");if("function"==typeof i){const e=i(t);return"string"==typeof e?e:jo(e)}return jo(e)}}}(e)))throw Ho("dirty is not a string, aborting");if(!i.isSupported)return e;he?(Q=ue,J=pe):Ye(t),(q.uponSanitizeElement.length>0||q.uponSanitizeAttribute.length>0)&&(Q=Qo(Q)),q.uponSanitizeAttribute.length>0&&(J=Qo(J)),i.removed=[];const l=ke&&"string"!=typeof e&&ht(e);if(l){!function(e){if(!de)return;const t=[e];for(;t.length>0;){const e=t.pop(),i=$(e);if(i===Ca||i===Ea&&Vo(wa,e.data)){try{f(e)}catch(e){}continue}if(i===$a){const t=e,i=Ve(S(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&st("for",i)&&t.removeAttribute("for")}catch(e){}}const r=b(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}}(e);const t=S(e);if("string"==typeof t){const i=Ve(t);if(!Q[i]||te[i])throw et(e),Ho("root node is forbidden and cannot be sanitized in-place")}if(dt(e))throw et(e),Ho("root node is clobbered and cannot be sanitized in-place");try{$t(e)}catch(t){throw et(e),t}}else if(ht(e))r=ot("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),o.nodeType===$a&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),$t(r);else{if(!me&&!le&&!ce&&-1===e.indexOf("<"))return C&&be?P(e):e;if(r=ot(e),!r)return me?null:be?I:""}r&&fe&&Je(r.firstChild);const d=l?e:r;try{const e=at(d);for(;a=e.nextNode();)gt(a,d),kt(a,d),ct(a.content)&&xt(a.content)}catch(t){throw l&&(et(e),Co(i.removed,e=>{e.element&&rt(e.element)})),t}if(l){let t=!1;if(Co(i.removed,i=>{i.element&&(i.element===e&&(t=!0),rt(i.element))}),t)throw Ho("a node selected for removal could not be safely returned; refusing to sanitize in place");return le&<(e),e}if(me){if(le&<(r),ge)for(n=F.call(r.ownerDocument);r.firstChild;)n.appendChild(r.firstChild);else n=r;return(J.shadowroot||J.shadowrootmode)&&(n=M.call(s,n,!0)),n}let c=ce?r.outerHTML:r.innerHTML;return ce&&Q["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Vo(va,r.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+c),le&&(c=nt(c)),C&&be?P(c):c},i.setConfig=function(){Ye(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),he=!0,ue=Q,pe=J},i.clearConfig=function(){He=null,he=!1,ue=null,pe=null,C=E,I=""},i.isValidAttribute=function(e,t,i){He||Ye({});const r=Ve(e),s=Ve(t);return bt(r,s,i)},i.addHook=function(e,t){"function"==typeof t&&Bo(q,e)&&To(q[e],t)},i.removeHook=function(e,t){if(Bo(q,e)){if(void 0!==t){const i=Eo(q[e],t);return-1===i?void 0:Ao(q[e],i,1)[0]}return Io(q[e])}},i.removeHooks=function(e){Bo(q,e)&&(q[e]=[])},i.removeAllHooks=function(){q={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function Fa(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Na={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Ma(e){Na=e}var qa={exec:()=>null};function Ua(e){let t=[];return i=>{let r=Math.max(0,Math.min(3,i-1)),s=t[r];return s||(s=e(r),t[r]=s),s}}function Ba(e,t=""){let i="string"==typeof e?e:e.source,r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(Va.caret,"$1"),i=i.replace(e,s),r},getRegex:()=>new RegExp(i,t)};return r}var ja=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Va={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine
vendor: 9,726 bytes, line 4447
4447:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ua(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`)),hrRegex:Ua(e=>new RegExp(`^ {0,${e}}((?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\\*[ \t]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ua(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ua(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ua(e=>new RegExp(`^ {0,${e}}(?:</?(?:${en})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ua(e=>new RegExp(`^ {0,${e}}>`))},Ha=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wa=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ga=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ya=Ba(Ga).replace(/bull/g,Wa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ka=Ba(Ga).replace(/bull/g,Wa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Xa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ja=Ba(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Za=Ba(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Wa).getRegex(),en="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",tn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rn=Ba("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",tn).replace("tag",en).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sn=e=>Ba(Qa).replace("hr",Ha).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",en).getRegex(),on=sn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),an=sn(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),nn={blockquote:Ba(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",an).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Ja,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Ha,html:rn,lheading:Ya,list:Za,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:on,table:qa,text:/^[^\n]+/},ln=Ba("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ha).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",en).getRegex(),dn={...nn,lheading:Ka,table:ln,paragraph:Ba(Qa).replace("hr",Ha).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ln).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",en).getRegex()},cn={...nn,html:Ba("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",tn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ba(Qa).replace("hr",Ha).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ya).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hn=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,un=/[\p{P}\p{S}]/u,pn=/[\s\p{P}\p{S}]/u,fn=/[^\s\p{P}\p{S}]/u,mn=Ba(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,pn).getRegex(),gn=/(?!~)[\p{P}\p{S}]/u,bn=Ba(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ja?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),vn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,yn=Ba(vn,"u").replace(/punct/g,un).getRegex(),_n=Ba(vn,"u").replace(/punct/g,gn).getRegex(),wn=Ba(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,/[\p{Pi}\p{Ps}"']/u).replace(/punct/g,un).getRegex(),kn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xn=Ba(kn,"gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,pn).replace(/punct/g,un).getRegex(),$n=Ba(kn,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,gn).getRegex(),Sn=Ba("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,pn).replace(/punct/g,un).getRegex(),Cn=Ba("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,pn).replace(/punct/g,un).getRegex(),En=Ba("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,pn).replace(/punct/g,un).getRegex(),In=Ba(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,un).getRegex(),Tn=Ba("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,pn).replace(/punct/g,un).getRegex(),An=Ba(/\\(punct)/,"gu").replace(/punct/g,un).getRegex(),Rn=Ba(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pn=Ba(tn).replace("(?:--\x3e|$)","--\x3e").getRegex(),Dn=Ba("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>
4447|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Pn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),On=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,zn=Ba(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",On).getRegex(),Ln=Ba(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",zn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fn=Ba(/^!?\[(label)\]\[(ref)\]/).replace("label",zn).replace("ref",Xa).getRegex(),Nn=Ba(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xa).getRegex(),Mn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,qn=Ba(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",On).getRegex(),Un=Ba("reflink|nolink(?!\\()","g").replace("reflink",Ba(/^!?\[(label)\]\[(ref)\]/).replace("label",qn).replace("ref",Mn).getRegex()).replace("nolink",Ba(/^!?\[(ref)\](?:\[\])?/).replace("ref",Mn).getRegex()).getRegex(),Bn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jn=Ba(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Vn={_backpedal:qa,anyPunctuation:An,autolink:Rn,blockSkip:bn,br:hn,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:qa,delLDelim:qa,delRDelim:qa,emStrongLDelim:yn,emStrongRDelimAst:xn,emStrongRDelimUnd:Cn,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Ln,nolink:Nn,punctuation:mn,reflink:Fn,reflinkSearch:Un,tag:Dn,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:qa},Hn={...Vn,emStrongLDelim:wn,emStrongRDelimAst:Sn,emStrongRDelimUnd:En,link:Ba(/^!?\[(label)\]\((.*?)\)/).replace("label",zn).getRegex(),reflink:Ba(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zn).getRegex()},Wn={...Vn,emStrongRDelimAst:$n,emStrongLDelim:_n,delLDelim:In,delRDelim:Tn,url:Ba(/^emailProtocol|^((?
4447:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",jn).replace("protocol",Bn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ba(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Bn).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Gn={...Wn,br:Ba(hn).replace("{2,}","*").getRegex(),text:Ba(Wn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Yn={normal:nn,gfm:dn,pedantic:cn},Kn={normal:Vn,gfm:Wn,breaks:Gn,pedantic:Hn},Qn={"&":"&","<":"<",">":">",'"':""","'":"'"},Xn=e=>Qn[e];function Jn(e,t){if(t){if(Va.escapeTest.test(e))return e.replace(Va.escapeReplace,Xn)}else if(Va.escapeTestNoEncode.test(e))return e.replace(Va.escapeReplaceNoEncode,Xn);return e}function Zn(e){return e.replace(Va.numericCharacterReference,(e,t,i)=>{let r=void 0===t?Number.parseInt(i,16):Number.parseInt(t,10);return 0===r||r>1114111||r>=55296&&r<=57343?"�":String.fromCodePoint(r)})}function el(e){try{e=encodeURI(e).replace(Va.percentDecode,"%")}catch{return null}return e}function tl(e,t){let i=e.replace(Va.findPipe,(e,t,i)=>{let r=!1,s=t;for(;--s>=0&&"\\"===i[s];)r=!r;return r?"|":" |"}),r=i.split(Va.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(Va.slashPipe,"|");return r}function il(e,t,i){let r=e.length;if(0===r)return"";let s=0;for(;s<r;){if(e.charAt(r-s-1)!==t)break;s++}return e.slice(0,r-s)}function rl(e){let t=e.split("\n"),i=t.length-1;for(;i>=0&&Va.blankLine.test(t[i]);)i--;return t.length-i<=2?e:t.slice(0,i+1).join("\n")}function sl(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function ol(e,t=0){let i=t,r="";for(let t of e)if("\t"===t){let e=4-i%4;r+=" ".repeat(e),i+=e}else r+=t,i++;return r}function al(e,t,i,r,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1"),l="!"===e[0].charAt(0);r.state.inLink=!0;let d=r.state.linkEmitted,c=r.state.inRawBlock;r.state.linkEmitted=!1;let h=r.inlineTokens(n),u=r.state.linkEmitted;if(r.state.linkEmitted=d,r.state.inLink=!1,!l){if(u)return void(r.state.inRawBlock=c);r.state.linkEmitted=!0}return{type:l?"image":"link",raw:i,href:o,title:a,text:n,tokens:h}}function nl(e,t,i,r){if(!t.includes("<"))return!1;for(let s=0;s<t.length;s++){if("\\"===t[s]){s++;continue}if("`"===t[s]){let e=r.inline.code.exec(t.slice(s));if(e){s+=e[0].length-1;continue}}if("<"!==t[s])continue;let o=e.slice(i+s),a=r.inline.tag.exec(o)||r.inline.autolink.exec(o);if(a){if(a[0].length>t.length-s)return!0;s+=a[0].length-1}}return!1}var ll=class{options;rules;lexer;constructor(e){this.options=e||Na}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:rl(t[0]),i=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:i}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],i=function(e,t,i){let r=e.match(i.other.indentCodeCompensation);if(null===r)return t;let s=r[1];return t.split("\n").map(e=>{let t=e.match(i.other.beginningSpace);if(null===t)return e;let[r]=t;return e.slice(Math.min(r.length,s.length))}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=il(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:"heading",raw:il(t[0],"\n"),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:il(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=il(t[0],"\n").split("\n"),i="",r="",s=[];for(;e.length>0;){let t,o=!1,a=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))a.push(e[t]),o=!0;else{if(o)break;a.push(e[t])}e=e.slice(t);let n=a.join("\n"),l=n.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${n}`:n,r=r?`${r}\n${l}`:l;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=d,0===e.length)break;let c=s.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let t=c,o=e.join("\n"),a=t.raw+"\n"+o.replace(this.rules.other.blockquoteSetextReplace2,""),n=this.blockquote(a);s[s.length-1]=n;let l=a.substring(n.raw.length).replace(/^\n/,""),d=l?l.split("\n").length:0,h=d?e.slice(0,-d):e;h.length>0&&(i=`${i}\n${h.join("\n")}`),r=r.substring(0,r.length-t.text.length)+n.text;break}if("list"===c?.type){let t=c,o=t.raw+"\n"+e.join("\n"),a=this.list(o);s[s.length-1]=a,i=i.substring(0,i.length-c.raw.length)+a.raw,r=r.substring(0,r.length-t.raw.length)+a.raw,e=o.substring(s.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:i,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);
vendor: 10,309 bytes, line 4447
4447if(t){let i=t[1].trim(),r=i.length>1,s={type:"list",raw:"",ordered:r,start:r?+i.slice(0,-1):"",loose:!1,items:[]};i=r?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=r?i:"[*+-]");let o=this.rules.other.listItemRegex(i),a=!1;for(;e;){let i=!1,r="",n="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0],d=t[1].length,c=this.options.pedantic?ol(l,d):l.replace(this.rules.other.leadingSpaceTab,e=>ol(e,d)),h=e.split("\n",1)[0],u=!c.trim(),p=0;if(this.options.pedantic?(p=2,n=c.trimStart()):u?p=d+1:(p=c.search(this.rules.other.nonSpaceChar),p=p>4?1:p,n=c.slice(p),p+=d),u&&this.rules.other.blankLine.test(h)&&(r+=h+"\n",e=e.substring(h.length+1),i=!0),!i){let t=this.rules.other.nextBulletRegex(p),i=this.rules.other.hrRegex(p),s=this.rules.other.fencesBeginRegex(p),o=this.rules.other.headingBeginRegex(p),a=this.rules.other.htmlBeginRegex(p),l=this.rules.other.blockquoteBeginRegex(p);for(;e;){let d,f=e.split("\n",1)[0];if(h=f,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),d=h):d=h.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal," ")),s.test(h)||o.test(h)||a.test(h)||l.test(h)||t.test(h)||i.test(h))break;if(d.search(this.rules.other.nonSpaceChar)>=p||!h.trim())n+="\n"+d.slice(p);else{if(u||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||s.test(c)||o.test(c)||i.test(c))break;n+="\n"+h}u=!h.trim(),r+=f+"\n",e=e.substring(f.length+1),c=d.slice(p)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0)),s.items.push({type:"list_item",raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(n),loose:!1,text:n,tokens:[]}),s.raw+=r}let n=s.items.at(-1);if(!n)return;n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e of s.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!s.loose){let t=e.tokens.filter(e=>"space"===e.type),i=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));s.loose=i}for(let e of s.items){let t=e.tokens[0];if(!e.task||"text"!==t?.type&&"paragraph"!==t?.type)e.task&&(e.task=!1);else{e.text=e.text.replace(this.rules.other.listReplaceTask,""),t.raw=t.raw.replace(this.rules.other.listReplaceTask,""),t.text=t.text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}let i=this.rules.other.listTaskCheckbox.exec(e.raw);if(i){let t={type:"checkbox",raw:i[0]+" ",checked:"[ ]"!==i[0]};e.checked=t.checked,s.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:"paragraph",raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}}if(s.loose)for(let e of s.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=rl(t[0]);return{type:"html",block:!0,raw:e,pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=sl(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:il(t[0],"\n"),href:i,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let i=tl(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:il(t[0],"\n"),header:[],align:[],rows:[]};if(i.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?o.align.push("right"):this.rules.other.tableAlignCenter.test(e)?o.align.push("center"):this.rules.other.tableAlignLeft.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e<i.length;e++)o.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:o.align[e]});for(let e of s)o.rows.push(tl(e,o.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:"heading",raw:il(t[0],"\n"),depth:"="===t[2].charAt(0)?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let i="!"===t[0].charAt(0)?2:1;if(!this.options.pedantic&&nl(e,t[1],i,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=il(r.slice(0,-1),"\\");if((r.length-e.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&(i--,i<0))return r;return i>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let s=t[2],o="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(s);e&&(s=e[1],o=e[3])}else o=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(s=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s.slice(1):s.slice(1,-1)),al(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let r="!"===i[0].charAt(0)?2:1;if(!this.options.pedantic&&nl(e,i[1],r,this.rules))return;let s=t[sl((i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "))];if(!s){let e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return al(i,s,i[0],this.lexer,this.rules)}}emStrong(e,t,i=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(r[1]||r[2]||r[3]||r[4])&&(!r[4]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[3]||!i||this.rules.inline.punctuation.exec(i))){let s,o,a=[...r[0]].length-1,n=a,l=0,d=r[0][0],c=i===d,h="*"===d?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);null!==(r=h.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(o=[...s].length,r[3]||r[4]){n+=o;continue}if(r[5]||r[6]){if(a%3&&!((a+o)%3)){l+=o;continue}if(c)break}if(n-=o,n>0)continue;o=Math.min(o,o+n+l);let t=[...r[0]][0].length,i=e.slice(0,a+r.index+t+o);if(Math.min(a,o)%2){let e=i.slice(1,-1);return{type:"em",raw:i,text:e,tokens:this.lexer.inlineTokens(e)}}let d=i.slice(2,-2);return{type:"strong",raw:i,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,i=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!i||this.rules.inline.punctuation.exec(i))){let i,s,o=[...r[0]].length-1,a=o,n=this.rules.inline.delRDelim;for(n.lastIndex=0,t=t.slice(-1*e.length+o);null!==(r=n.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(s=[...i].length,s!==o))continue;if(r[3]||r[4]){a+=s;continue}if(a-=s,a>0)continue;s=Math.min(s,s+a);let t=[...r[0]][0].length,n=e.slice(0,o+r.index+t+s),l=n.slice(o,-o);return{type:"del",raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,autolink:!0,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])e=t[0],i="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,autolink:!0,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:e?t[0]:Zn(t[0]),escaped:e}}}},dl=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Na,this.options.tokenizer=this.options.tokenizer||new ll,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:Va,block:Yn.normal,inline:Kn.normal};this.options.pedantic?(t.block=Yn.pedantic,t.inline=Kn.pedantic):this.options.gfm&&(t.block=Yn.gfm,this.options.breaks?t.inline=Kn.breaks:t.inline=Kn.gfm),this.tokenizer.rules=t}static get rules(){return{block:Yn,inline:Kn}}static lex(t,i){return new e(i).lex(t)}
4447static lexInline(t,i){return new e(i).inlineTokens(t)}lex(e){e=e.replace(Va.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Va.tabCharGlobal," ").replace(Va.spaceLine,""));let r=1/0;for(;e;){if(!(e.length<r)){this.infiniteLoopError(e.charCodeAt(0));break}let s;if(r=e.length,this.options.extensions?.block?.some(i=>!!(s=i.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0)))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let i=t.at(-1);1===s.raw.length&&void 0!==i?i.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let i=t.at(-1);"paragraph"===i?.type||"text"===i?.type?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+s.raw,i.text+="\n"+s.text,this.inlineQueue.at(-1).src=i.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let i=t.at(-1);"paragraph"===i?.type||"text"===i?.type?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+s.raw,i.text+="\n"+s.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let o=e;if(this.options.extensions?.startBlock){let t,i=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(i=Math.min(i,t))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let r=t.at(-1);i&&"paragraph"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+s.raw,r.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(s),i=o.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let i=t.at(-1);"text"===i?.type?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+s.raw,i.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let i of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(i[0])&&"!"!==e.charAt(i.index-1))return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],i=e.lastIndexOf("[");if("!"!==e.charAt(0)&&Object.hasOwn(this.tokens.links,sl(e.slice(i+1,-1)))&&!(i>1&&this.linkInText(e.slice(1,i-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let i=e;if(this.tokens.links&&e.includes("[")){let e=this.tokenizer.rules.inline.reflinkSearch,t=i=>{let r=i.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,sl(i.slice(r+1,-1))))return i;if(r>1&&"!"!==i.charAt(0)){let s=i.slice(1,r-1);if(this.linkInText(s))return"["+s.replace(e,t)+"]["+"a".repeat(i.length-r-2)+"]"}return"["+"a".repeat(i.length-2)+"]"};i=i.replace(e,t)}i=i.replace(this.tokenizer.rules.inline.anyPunctuation,e=>"+".repeat(e.length)),i=i.replace(this.tokenizer.rules.inline.blockSkip,(e,t,i)=>{let r=i?i.length:0;return e.slice(0,r)+"["+"a".repeat(e.length-r-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let r=!1,s="",o=1/0;for(;e;){if(!(e.length<o)){this.infiniteLoopError(e.charCodeAt(0));break}let a;if(o=e.length,r||(s=""),r=!1,this.options.extensions?.inline?.some(i=>!!(a=i.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let i=t.at(-1);"text"===a.type&&"text"===i?.type?(i.raw+=a.raw,i.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,i,s)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e,i,s)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let n=e;if(this.options.extensions?.startInline){let t,i=1/0,r=e.slice(1);
vendor: 11,972 bytes, line 4447
4447this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(i=Math.min(i,t))}),i<1/0&&i>=0&&(n=e.substring(0,i+1))}if(a=this.tokenizer.inlineText(n)){e=e.substring(a.raw.length),"_"!==a.raw.slice(-1)&&(s=a.raw.slice(-1)),r=!0;let i=t.at(-1);"text"===i?.type?(i.raw+=a.raw,i.text+=a.text):t.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(!this.options.silent)throw new Error(t);console.error(t)}},cl=class{options;parser;constructor(e){this.options=e||Na}space(e){return""}code({text:e,lang:t,escaped:i}){let r=(t||"").match(Va.notSpaceStart)?.[0],s=e?e.replace(Va.endingNewline,"")+"\n":"";return r?'<pre><code class="language-'+Jn(r)+'">'+(i?s:Jn(s,!0))+"</code></pre>\n":"<pre><code>"+(i?s:Jn(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,i=e.start,r="";for(let t=0;t<e.items.length;t++){let i=e.items[t];r+=this.listitem(i)}let s=t?"ol":"ul";return"<"+s+(t&&1!==i?' start="'+i+'"':"")+">\n"+r+"</"+s+">\n"}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.tablecell(e.header[t]);t+=this.tablerow({text:i});let r="";for(let t=0;t<e.rows.length;t++){let s=e.rows[t];i="";for(let e=0;e<s.length;e++)i+=this.tablecell(s[e]);r+=this.tablerow({text:i})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Jn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:i,tokens:r,autolink:s}){let o=s?Jn(i,!0):this.parser.parseInline(r),a=el(e);if(null===a)return o;let n='<a href="'+(e=Jn(a,s))+'"';return t&&(n+=' title="'+Jn(t)+'"'),n+=">"+o+"</a>",n}image({href:e,title:t,text:i,tokens:r}){r&&(i=this.parser.parseInline(r,this.parser.textRenderer));let s=el(e);if(null===s)return Jn(i);let o=`<img src="${Jn(e=s)}" alt="${Jn(i)}"`;return t&&(o+=` title="${Jn(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Jn(e.text)}},hl=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ul=class e{options;renderer;textRenderer;constructor(e){this.options=e||Na,this.options.renderer=this.options.renderer||new cl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hl}static parse(t,i){return new e(i).parse(t)}static parseInline(t,i){return new e(i).parseInline(t)}parse(e){this.renderer.parser=this;let t="";for(let i=0;i<e.length;i++){let r=e[i];if(this.options.extensions?.renderers?.[r.type]){let e=r,i=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==i||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(e.type)){t+=i||"";continue}}let s=r;switch(s.type){case"space":t+=this.renderer.space(s);break;case"hr":t+=this.renderer.hr(s);break;case"heading":t+=this.renderer.heading(s);break;case"code":t+=this.renderer.code(s);break;case"table":t+=this.renderer.table(s);break;case"blockquote":t+=this.renderer.blockquote(s);break;case"list":t+=this.renderer.list(s);break;case"checkbox":t+=this.renderer.checkbox(s);break;case"html":t+=this.renderer.html(s);break;case"def":t+=this.renderer.def(s);break;case"paragraph":t+=this.renderer.paragraph(s);break;case"text":t+=this.renderer.text(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let i="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){i+=e||"";continue}}let o=s;switch(o.type){case"escape":case"text":i+=t.text(o);break;case"html":i+=t.html(o);break;case"link":i+=t.link(o);break;case"image":i+=t.image(o);break;case"checkbox":i+=t.checkbox(o);break;case"strong":i+=t.strong(o);break;case"em":i+=t.em(o);break;case"codespan":i+=t.codespan(o);break;case"br":i+=t.br(o);break;case"del":i+=t.del(o);break;default:{let e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}},pl=class{options;block;constructor(e){this.options=e||Na}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?dl.lex:dl.lexInline}provideParser(e=this.block){return e?ul.parse:ul.parseInline}},fl=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ul;Renderer=cl;TextRenderer=hl;Lexer=dl;Tokenizer=ll;Hooks=pl;constructor(...e){this.use(...e)}walkTokens(e,t){let i=[];for(let r of e)switch(i=i.concat(t.call(this,r)),r.type){case"table":{let e=r;for(let r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=r;i=i.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let s=e[r].flat(1/0);i=i.concat(this.walkTokens(s,t))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let i={...e};if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let i=t.renderers[e.name];t.renderers[e.name]=i?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=i.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let i=t[e.level];i?i.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),i.extensions=t),e.renderer){let t=this.defaults.renderer||new cl(this.defaults);for(let i in e.renderer){if(!(i in t))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let r=i,s=e.renderer[r],o=t[r];t[r]=(...e)=>{let i=s.apply(t,e);return!1===i&&(i=o.apply(t,e)),i||""}}i.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ll(this.defaults);for(let i in e.tokenizer){if(!(i in t))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let r=i,s=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let i=s.apply(t,e);return!1===i&&(i=o.apply(t,e)),i}}i.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new pl;for(let i in e.hooks){if(!(i in t))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let r=i,s=e.hooks[r],o=t[r];pl.passThroughHooks.has(i)?t[r]=e=>{if(this.defaults.async&&pl.passThroughHooksRespectAsync.has(i))return(async()=>{let i=await s.call(t,e);return o.call(t,i)})();let r=s.call(t,e);return o.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let i=await s.apply(t,e);return!1===i&&(i=await o.apply(t,e)),i})();let i=s.apply(t,e);return!1===i&&(i=o.apply(t,e)),i}}i.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;i.walkTokens=function(e){let i=[];return i.push(r.call(this,e)),t&&(i=i.concat(t.call(this,e))),i}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return dl.lex(e,t??this.defaults)}parser(e,t){return ul.parse(e,t??this.defaults)}parseMarkdown(e){return(t,i)=>{let r={...i},s={...this.defaults,...r},o=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let i=s.hooks?await s.hooks.preprocess(t):t,r=await(s.hooks?await s.hooks.provideLexer(e):e?dl.lex:dl.lexInline)(i,s),o=s.hooks?await s.hooks.processAllTokens(r):r;s.walkTokens&&await Promise.all(this.walkTokens(o,s.walkTokens));let a=await(s.hooks?await s.hooks.provideParser(e):e?ul.parse:ul.parseInline)(o,s);return s.hooks?await s.hooks.postprocess(a):a})().catch(o);try{s.hooks&&(t=s.hooks.preprocess(t));let i=(s.hooks?s.hooks.provideLexer(e):e?dl.lex:dl.lexInline)(t,s);s.hooks&&(i=s.hooks.processAllTokens(i)),s.walkTokens&&this.walkTokens(i,s.walkTokens);let r=(s.hooks?s.hooks.provideParser(e):e?ul.parse:ul.parseInline)(i,s);return s.hooks&&(r=s.hooks.postprocess(r)),r}catch(e){return o(e)}}}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+Jn(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}};function ml(e,t){return fl.parse(e,t)}ml.options=ml.setOptions=function(e){return fl.setOptions(e),ml.defaults=fl.defaults,Ma(ml.defaults),ml},ml.getDefaults=Fa,ml.defaults=Na,ml.use=function(...e){return fl.use(...e),ml.defaults=fl.defaults,Ma(ml.defaults),ml},ml.walkTokens=function(e,t){return fl.walkTokens(e,t)},ml.parseInline=fl.parseInline,ml.Parser=ul,ml.parser=ul.parse,ml.Renderer=cl,ml.TextRenderer=hl,ml.Lexer=dl,ml.lexer=dl.lex,ml.Tokenizer=ll,ml.Hooks=pl,ml.parse=ml,ml.options,ml.setOptions,ml.walkTokens,ml.parseInline,ul.parse,dl.lex;class gl{static get(e){switch(e){case"mozilla/standards-positions":return new gl("https://avatars.githubusercontent.com/u/131524?s=48&v=4",{"position: defer":{description:"Defer",variant:"neutral"},"position: negative":{description:"Negative",variant:"danger"},"position: neutral":{description:"Neutral",variant:"neutral"},"position: positive":{description:"Positive",variant:"success"},"position: under consideration":{description:"Under Consideration",variant:"neutral"}});case"WebKit/standards-positions":return new gl("https://avatars.githubusercontent.com/u/6458?s=48&v=4",{"position: oppose":{description:"Oppose",variant:"danger"},"position: neutral":{description:"Neutral",variant:"neutral"}
4447,"position: support":{description:"Support",variant:"success"}});case"w3ctag/design-reviews":return new gl("https://avatars.githubusercontent.com/u/3874462?s=48&v=4",{"Resolution: ambivalent":{description:"Ambivalent",variant:"neutral"},"Resolution: decline":{description:"Decline",variant:"neutral"},"Resolution: lack of consensus":{description:"Lack of Consensus",variant:"neutral"},"Resolution: object":{description:"Object",variant:"danger"},"Resolution: out of scope":{description:"Out of Scope",variant:"neutral"},"Resolution: overtaken":{description:"Overtaken",variant:"warning"},"Resolution: satisfied with concerns":{description:"Satisfied with Concerns",variant:"warning"},"Resolution: satisfied":{description:"Satisfied",variant:"success"},"Resolution: timed out":{description:"Timed Out",variant:"warning"},"Resolution: too early":{description:"Too Early",variant:"warning"},"Resolution: unsatisfied":{description:"Unsatisfied",variant:"danger"},"Resolution: validated":{description:"Early Review Validated",variant:"warning"},"Resolution: withdrawn":{description:"Withdrawn",variant:"warning"}})}}label(e){return this._labels[e]}constructor(e,t){this.icon=e,this._labels=t}}var bl=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};function vl(e,t=50){return e.length>t?e.substring(0,35)+"..."+e.substring(e.length-15,e.length):e}const yl=new Intl.DateTimeFormat("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"});function _l(e,t){function i(e){return yl.format(new Date(e))}const r=e.information,s=r.assignee_login,o=new Date(r.created_at),a=r.closed_at,n=r.updated_at,l=r.state,d=r.title,c=r.user_login,h=r.number,u=r.url.split("/").slice(4,6).join("/"),p=e.url.split("/").slice(-2)[0],f="issues"===p?"Issue":"pull"===p?"Pull Request":p,m=gl.get(u);let g,b=W``;if(m)for(const e of r.labels){const t=m.label(e);if(t){({description:b,variant:g}=t);break}}if(void 0===g)if("open"===l){const e=Date.now()-o.getTime();b=W`Opened 4448 <sl-relative-time date=${o.toISOString()} 4449 >on ${yl.format(o)}</sl-relative-time 4450 >`;g="success",m&&(g=e<4*6048e5?"warning":"neutral")}else console.assert("closed"===l),b="Closed",g="neutral";return t||(t=d),W`<a 4451 href="${e.url}" 4452 target="_blank" 4453 rel="noopener noreferrer" 4454 > 4455 <sl-tooltip style="--sl-tooltip-arrow-size: 0;--max-width: 50vw;"> 4456 <div slot="content">${W`<div class="tooltip"> 4457 ${d&&W` 4458 <div> 4459 <strong>Title:</strong> 4460 <span>${d}</span> 4461 </div> 4462 `} 4463 ${u&&W` 4464 <div> 4465 <strong>Repo:</strong> 4466 <span>${u}</span> 4467 </div> 4468 `} 4469 ${f&&W` 4470 <div> 4471 <strong>Type:</strong> 4472 <span>${f}</span> 4473 </div> 4474 `} 4475 ${o&&W` 4476 <div> 4477 <strong>Opened:</strong> 4478 <span>${i(o)}</span> 4479 </div> 4480 `} 4481 ${n&&W` 4482 <div> 4483 <strong>Updated:</strong> 4484 <span>${i(n)}</span> 4485 </div> 4486 `} 4487 ${a&&W` 4488 <div> 4489 <strong>Closed:</strong> 4490 <span>${i(a)}</span> 4491 </div> 4492 `} 4493 ${s&&W` 4494 <div> 4495 <strong>Assignee:</strong> 4496 <span>${s}</span> 4497 </div> 4498 `} 4499 ${c&&W` 4500 <div> 4501 <strong>Owner:</strong> 4502 <span>${c}</span> 4503 </div> 4504 `} 4505 </div>`}</div> 4506 <sl-tag> 4507 <img 4508 src=${m?.icon??"https://docs.github.com/assets/cb-600/images/site/favicon.png"} 4509 alt="icon" 4510 class="icon" 4511 /> 4512 <sl-badge size="small" variant=${g} 4513 >${b}</sl-badge 4514 > 4515 ${vl(`#${h} `+t)} 4516 </sl-tag> 4517 </sl-tooltip> 4518 </a>`}function wl(e,t){const i=e.information,r=i.title,s=i.description;return W`<a 4519 href="${e.url}" 4520 target="_blank" 4521 rel="noopener noreferrer" 4522 > 4523 <sl-tooltip style="--sl-tooltip-arrow-size: 0;--max-width: 50vw;"> 4524 <div slot="content">${W`<div class="tooltip"> 4525 ${r&&W` 4526 <div> 4527 <strong>Title:</strong>
4528 <span>${r}</span> 4529 </div> 4530 `} 4531 ${s&&W` 4532 <div> 4533 <strong>Description:</strong> 4534 <span>${s}</span> 4535 </div> 4536 `} 4537 </div>`}</div> 4538 <sl-tag> 4539 <img src="${t}" alt="icon" class="icon" /> 4540 ${vl(r)} 4541 </sl-tag> 4542 </sl-tooltip> 4543 </a>`}let kl=class extends ce{constructor(){super(...arguments),this.showContentAsLabel=!1,this.class="",this.featureLinks=[],this.ignoreHttpErrorCodes=[],this.alwaysInTag=!1}static{this.styles=[...lo,c` 4544 :host { 4545 display: inline; 4546 white-space: normal; 4547 line-break: anywhere; 4548 color: var(--default-font-color); 4549 } 4550 4551 a:hover { 4552 text-decoration: none; 4553 } 4554 4555 sl-badge::part(base) { 4556 display: inline; 4557 padding: 0 4px; 4558 border-width: 0; 4559 text-transform: capitalize; 4560 font-weight: 400; 4561 } 4562 4563 sl-tag::part(base) { 4564 vertical-align: middle; 4565 height: 18px; 4566 background-color: rgb(232, 234, 237); 4567 color: var(--default-font-color); 4568 border: none; 4569 border-radius: 500px; 4570 display: inline-flex; 4571 align-items: center; 4572 column-gap: 0.3em; 4573 padding: 1px 5px; 4574 margin: 1px 0; 4575 } 4576 4577 sl-tag::part(base):hover { 4578 background-color: rgb(209, 211, 213); 4579 } 4580 4581 sl-relative-time { 4582 margin: 0; 4583 } 4584 4585 .icon { 4586 display: block; 4587 width: 12px; 4588 height: 12px; 4589 } 4590 4591 .tooltip { 4592 display: flex; 4593 flex-direction: column; 4594 row-gap: 0.5em; 4595 } 4596 `]}willUpdate(e){(e.has("href")||e.has("featureLinks"))&&(this._featureLink=this.featureLinks.find(e=>e.url===this.href))}fallback(){const e=W`<slot>${this.href}</slot>`;return W`<a 4597 href=${Ht(this.href)} 4598 target="_blank" 4599 rel="noopener noreferrer" 4600 class=${this.class} 4601 >${this.alwaysInTag?W`<sl-tag>${e}</sl-tag>`:e}</a 4602 >`}withLabel(e){return this.showContentAsLabel?W`<slot></slot>: ${e}`:e}render(){if(!this.href)return console.error("Missing [href] attribute in",this),W`<slot></slot>`;const e=this._featureLink;if(!e)return this.fallback();if(!e.information)return e.http_error_code&&!this.ignoreHttpErrorCodes.includes(e.http_error_code)?W`<sl-tag> 4603 <sl-icon library="material" name="link"></sl-icon> 4604 <sl-badge 4605 size="small" 4606 variant="${e.http_error_code>=500?"danger":"warning"}" 4607 > 4608 ${e.http_error_code} 4609 </sl-badge> 4610 ${this.fallback()} 4611 </sl-tag>`:this.fallback();try{switch(e.type){case"chromium_bug":return this.withLabel(function(e,t){function i(e){return yl.format(new Date(1e3*e))}const r=e.information,s=r.summary,o=r.statusRef,a=r.reporterRef,n=r.ownerRef,l=r.openedTimestamp,d=r.closedTimestamp;return t||(t=s),W`<a 4612 href="${e.url}" 4613 target="_blank" 4614 rel="noopener noreferrer" 4615 > 4616 <sl-tooltip style="--sl-tooltip-arrow-size: 0;--max-width: 50vw;"> 4617 <div slot="content">${W`<div class="tooltip"> 4618 ${s&&W` 4619 <div> 4620 <strong>Summary:</strong> 4621 <span>${s}</span> 4622 </div> 4623 `} 4624 ${l&&W` 4625 <div> 4626 <strong>Opened:</strong> 4627 <span>${i(l)}</span> 4628 </div> 4629 `} 4630 ${d&&W` 4631 <div> 4632 <strong>Closed:</strong> 4633 <span>${i(d)}</span> 4634 </div> 4635 `} 4636 ${a&&W` 4637 <div> 4638 <strong>Reporter:</strong> 4639 <span>${a.displayName}</span> 4640 </div> 4641 `} 4642 ${n&&W` 4643 <div> 4644 <strong>Owner:</strong> 4645 <span>${n.displayName}</span> 4646 </div> 4647 `} 4648 </div>`}</div> 4649 <sl-tag> 4650 <img 4651 src="https://bugs.chromium.org/static/images/monorail.ico" 4652 alt="icon" 4653 class="icon" 4654 /> 4655 <sl-badge 4656 size="small" 4657 variant="${o.meansOpen?"success":"neutral"}" 4658 >${o.status}</sl-badge 4659 > 4660 ${vl(t)} 4661 </sl-tag> 4662 </sl-tooltip> 4663 </a>`}(e));case"github_issue":case"github_pull_request":return this.withLabel(_l(e));case"github_markdown":return this.withLabel(function(e,t){const i=e.information,r=i.path,s=i._parsed_title,o=i.size,a=(o/1024).toFixed(2)+" KB";return t||(t=s),W`<a 4664 href="${e.url}" 4665 target="_blank" 4666 rel="noopener noreferrer" 4667 > 4668 <sl-tooltip style="--sl-tooltip-arrow-size: 0;--max-width: 50vw;"> 4669 <div slot="content">${W`<div class="tooltip"> 4670 ${s&&W` 4671 <div> 4672 <strong>Title:</strong>
4673 <span>${s}</span> 4674 </div> 4675 `} 4676 ${r&&W` 4677 <div> 4678 <strong>File:</strong> 4679 <span>${r}</span> 4680 </div> 4681 `} 4682 ${o&&W` 4683 <div> 4684 <strong>Size:</strong> 4685 <span>${a}</span> 4686 </div> 4687 `} 4688 </div>`}</div> 4689 <sl-tag> 4690 <img 4691 src="https://docs.github.com/assets/cb-600/images/site/favicon.png" 4692 alt="icon" 4693 class="icon" 4694 /> 4695 ${vl("Markdown: "+t)} 4696 </sl-tag> 4697 </sl-tooltip> 4698 </a>`}(e));case"mdn_docs":return this.withLabel(function(e){return wl(e,"https://developer.mozilla.org/favicon-48x48.png")}(e));case"google_docs":return this.withLabel(function(e){const t=e.url.split("/")[3];let i="https://ssl.gstatic.com/docs/documents/images/kix-favicon7.ico";return"spreadsheets"===t?i="https://ssl.gstatic.com/docs/spreadsheets/favicon3.ico":"presentation"===t?i="https://ssl.gstatic.com/docs/presentations/images/favicon5.ico":"forms"===t&&(i="https://ssl.gstatic.com/docs/spreadsheets/forms/favicon_qp2.png"),wl(e,i)}(e));case"mozilla_bug":return this.withLabel(function(e){return wl(e,"https://bugzilla.mozilla.org/favicon.ico")}(e));case"webkit_bug":return this.withLabel(function(e){return wl(e,"https://bugs.webkit.org/images/favicon.ico")}(e));case"specs":return this.withLabel(function(e){const t=e.url,i=`https://www.google.com/s2/favicons?domain_url=${t}`,r=t.split("#")[1],s=e.information,o=s.title,a=s.description;return W`<a 4699 href="${e.url}" 4700 target="_blank" 4701 rel="noopener noreferrer" 4702 > 4703 <sl-tooltip style="--sl-tooltip-arrow-size: 0;--max-width: 50vw;"> 4704 <div slot="content">${W`<div class="tooltip"> 4705 ${o&&W` 4706 <div> 4707 <strong>Title:</strong> 4708 <span>${o}</span> 4709 </div> 4710 `} 4711 ${a&&W` 4712 <div> 4713 <strong>Description:</strong> 4714 <span>${a}</span> 4715 </div> 4716 `} 4717 ${r&&W` 4718 <div> 4719 <strong>Hashtag:</strong> 4720 <span>#${r}</span> 4721 </div> 4722 `} 4723 </div>`}</div> 4724 <sl-tag> 4725 <img src="${i}" alt="icon" class="icon" /> 4726 Spec: ${vl(o)} 4727 </sl-tag> 4728 </sl-tooltip> 4729 </a>`}(e));default:return this.fallback()}}catch(e){return console.log("feature link render error:",this,e),this.fallback()}}};function xl(e,t=[],i){return W`<chromedash-link href=${e} .featureLinks=${t} 4730 >${e}</chromedash-link 4731 >`}bl([Ve({type:String})],kl.prototype,"href",void 0),bl([Ve({type:Boolean})],kl.prototype,"showContentAsLabel",void 0),bl([Ve({type:String})],kl.prototype,"class",void 0),bl([Ve({type:Array})],kl.prototype,"featureLinks",void 0),bl([Ve({type:Array})],kl.prototype,"ignoreHttpErrorCodes",void 0),bl([Ve({type:Boolean})],kl.prototype,"alwaysInTag",void 0),bl([He()],kl.prototype,"_featureLink",void 0),kl=bl([Ue("chromedash-link")],kl);const $l="chromium",Sl="https://bugs.chromium.org",Cl=/((\b(issue|bug)[ \t]*(:|=)?[ \t]*|\bfixed[ \t]*:[ \t]*)?((\b[-a-z0-9]+)[:\#])?(\#?)(\d+))/gi,El=[[null,":"],[null,"."],[null,","],[null,">"],["(",")"],["[","]"],["{","}"],["'","'"],['"','"']],Il=/^(b|t|o|omg|cl|cr|go|g|shortn|who|teams|fxr|fxrev|fxb|tqr)\/.*/gi,Tl=new Map;function Al(e,t,i,r){return function(e,t,i,r){return{tag:"a",content:i,href:`${Sl}/p/${e}/issues/detail?id=${t}${r}`}}(t,i,e,r)}function Rl(e){const t=[];let i=e[0],r="";e[1]&&(t.push({content:e[1]}),i=i.slice(e[1].length)),El.forEach(([e,t])=>{i.endsWith(t)&&(e&&i.slice(0,-t.length).includes(e)||(r=t+r,i=i.slice(0,-t.length)))});let s=i;const o=s.toLowerCase();return o.startsWith("http")||o.startsWith("ftp")||o.startsWith("mailto")||(s=Il.test(o)?"http://"+s:"https://"+s,Il.lastIndex=0),t.push({content:i,tag:"a",href:s}),r.length&&t.push({content:r}),t}function Pl(e,t=[]){const i=[(e=e||"").trim()],r=[];i.filter(Boolean).forEach(e=>{r.push(...function(e){let t=[{content:e}];return Tl.forEach(({refRegs:e,replacer:i})=>{e.forEach(e=>{t=function(e,t,i){const r=[];return e.forEach(e=>{if(e.tag)r.push(e);else{const s=e.content;let o,a=0;for(;null!==(o=i.exec(s));)o.index>a&&r.push({content:s.slice(a,o.index)}),r.push(...t(o)),a=o.index+o[0].length;""!==s.slice(a)&&r.push({content:s.slice(a)})}}),r}(t,i,e)})}),t}(e))});const s=r.map(e=>"a"===e.tag?function(e,t){return W`<chromedash-link href=${e.href} .featureLinks=${t} .ignoreHttpErrorCodes=${[404]}>${e.content}</chromedash-link>`}(e,t):W`${e.content}`);return s}Tl.set("00-commentbug",{refRegs:[/(((\b(issue|bug)[ \t]*(:|=)?[ \t]*)(\#?)(\d+)[ \t*])?((\b((comment)[ \t]*(:|=)?[ \t]*(\#?))|(\B((\#))(c)))(\d+)))/gi],replacer:function(e){let t;const i=e[7],r=e[18];if(i&&r){const s=`${Sl}/p/${$l}/issues/detail?id=${i}#c${r}`;t={content:e[0],tag:"a",href:s}}else if(r){const i=`${Sl}/p/${$l}/issues/detail#c${r}`;t={content:e[0],tag:"a",href:i}}else t={content:e[0]};return[t]}}),Tl.set("02-full-urls",{refRegs:[/()\b(https?:\/\/|ftp:\/\/|mailto:)([^\s<]+)/gi],replacer:Rl}),Tl.set("04-tracker-regular",{refRegs:[/(\b(issues?|bugs?)[ \t]*(:|=|\b)|\bfixed[ \t]*:)([ \t]*((\b[-a-z0-9]+)[:\#])?(\#?)(\d+)\b(,?[ \t]*(and|or)?)?)+/gi],replacer:function(e,t=$l){const i=Cl,r=[];let s,o=0;for(;null!==(s=i.exec(e[0]));)s.index>o&&r.push({content:e[0].slice(o,s.index)}),s[6]&&(t=s[6]),r.push(Al(s[0],t,s[8],"")),o=s.index+s[0].length;""!==e[0].slice(o)&&r.push({content:e[0].slice(o)});return r}}),Tl.set("05-linkify-shorthand",{refRegs:[/(^|[^-\/._])\b(https?:\/\/|ftp:\/\/|mailto:)?(go|g|shortn|who|team
4731s)\/([^\s<]+)/gi,/(^|[^-\/._])\b(https?:\/\/|ftp:\/\/)?(b|t|o|omg|cl|cr|fxr|fxrev|fxb|tqr)\/([0-9]+)/gi,/(?!@)(^|[^-\/._])\b[a-z]((-|\.)?[a-z0-9])+\.(com|net|org|edu|dev)\b(\/[^\s<]*)?/gi],replacer:Rl});const Dl={WEBCOMPONENTS:[1,"Web Components"],MISC:[2,"Miscellaneous"],SECURITY:[3,"Security"],MULTIMEDIA:[4,"Multimedia"],DOM:[5,"DOM"],FILE:[6,"File APIs"],OFFLINE:[7,"Offline / Storage"],DEVICE:[8,"Device"],COMMUNICATION:[9,"Realtime / Communication"],JAVASCRIPT:[10,"JavaScript"],NETWORKING:[11,"Network / Connectivity"],INPUT:[12,"User input"],PERFORMANCE:[13,"Performance"],GRAPHICS:[14,"Graphics"],CSS:[15,"CSS"],HOUDINI:[16,"Houdini"],SERVICEWORKER:[17,"Service Worker"],WEBRTC:[18,"WebRTC"],LAYERED:[19,"Layered APIs"],WEBASSEMBLY:[20,"WebAssembly"],CAPABILITIES:[21,"Capabilities (Fugu)"],IWA:[22,"Isolated Web Apps-specific API"]},Ol={SECURITYANDPRIVACY:[1,"Security / Privacy"],USERPRODUCTIVITYANDAPPS:[2,"User Productivity / Apps"],MANAGEMENT:[3,"Management"]},zl={1:"Security/Privacy",2:"User Productivity/Apps",3:"Management"},Ll={PLATFORM_ANDROID:[1,"Android"],PLATFORM_IOS:[2,"iOS"],PLATFORM_CHROMEOS:[3,"ChromeOS"],PLATFORM_LACROS:[4,"LaCrOS",!0],PLATFORM_LINUX:[5,"Linux"],PLATFORM_MAC:[6,"macOS"],PLATFORM_WINDOWS:[7,"Windows"],PLATFORM_FUCHSIA:[8,"Fuchsia"]},Fl={1:"Android",2:"iOS",3:"ChromeOS",4:"LaCrOS",5:"Linux",6:"macOS",7:"Windows",8:"Fuchsia"},Nl={ROLLOUT_STAGE_PLAN_SLOW:[0,"Feature rolls out gradually"],ROLLOUT_STAGE_PLAN_TRUSTED_TESTERS:[1,"Early preview available to Chrome Enterprise Trusted Tester"],ROLLOUT_STAGE_PLAN_CUSTOM:[2,"Custom rollout (explain in Rollout details field)"]},Ml={0:"Feature rolls out gradually",1:"Early preview available to Chrome Enterprise Trusted Tester",2:"Custom rollout (explain in Rollout details field)"},ql={1:"None",2:"Low",3:"Medium",4:"High"},Ul={IMPACT_NONE:[1,"None"],IMPACT_LOW:[2,"Low"],IMPACT_MEDIUM:[3,"Medium"],IMPACT_HIGH:[4,"High"]},Bl={ROLLOUT_100:[0,"Will ship enabled for all users"],ROLLOUT_0_THEN_100:[1,"(RARE) Ships disabled, then flips on for all users"],ROLLOUT_GRADUAL:[2,"(RARE) Experiment users ramp up over time"],ROLLOUT_OTHER:[3,"(RARE) It's complicated or unusual"]},jl={0:Bl.ROLLOUT_100[1],1:Bl.ROLLOUT_0_THEN_100[1],2:Bl.ROLLOUT_GRADUAL[1],3:Bl.ROLLOUT_OTHER[1]},Vl={WEBFEATURE:[0,"WebFeature",W`The feature's use counter has been added to 4732 <a 4733 target="_blank" 4734 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom" 4735 >
4735web_feature.mojom</a 4736 >.`],WEBDXFEATURE:[1,"WebDXFeature",W`The feature's use counter has been added to 4737 <a 4738 target="_blank" 4739 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/webdx_feature.mojom" 4740 >webdx_feature.mojom</a 4741 >.`],CSS:[2,"CSSSampleID",W`The feature's use counter has been added to 4742 <a 4743 target="_blank" 4744 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom" 4745 >css_property_id.mojom</a 4746 >.`]};var Hl,Wl;!function(e){e[e.Incubate=0]="Incubate",e[e.Existing=1]="Existing",e[e.CodeChange=2]="CodeChange",e[e.Deprecation=3]="Deprecation",e[e.Enterprise=4]="Enterprise"}(Hl||(Hl={})),function(e){e[e.COMPLETE=1]="COMPLETE",e[e.IN_PROGRESS=2]="IN_PROGRESS",e[e.FAILED=3]="FAILED",e[e.DELETED=4]="DELETED"}(Wl||(Wl={}));const Gl={FEATURE_TYPE_INCUBATE_ID:[0,"New or changed feature",W`Choose this if you're still working on the design of a feature and 4747 might need to send an Intent to Prototype or request a TAG review. Note 4748 that backward-incompatible changes sometimes need to be implemented as a 4749 pair of adding the new behavior and a separate entry to remove the old 4750 behavior. This feature type follows the 4751 <a 4752 href="https://www.chromium.org/blink/launching-features/#new-feature-process" 4753 target="_blank" 4754 >New Feature Incubation</a 4755 > 4756 process.`],FEATURE_TYPE_EXISTING_ID:[1,"Chromium catches up",W`Choose this if a standards body already has consensus for a feature, or 4757 it's already shipped in another implementation. This feature type omits 4758 some options that the "New feature" type includes. It follows the 4759 <a 4760 href="https://www.chromium.org/blink/launching-features/#process-existing-standard" 4761 target="_blank" 4762 >Implementations of already-defined consensus-based standards</a 4763 > 4764 process.`],FEATURE_TYPE_CODE_CHANGE_ID:[2,"No developer-visible change",W`Choose this if you're hoping that nobody notices the change you're 4765 going to make, but there's a chance that a bug will make it visible. This 4766 feature type follows the 4767 <a 4768 href="https://www.chromium.org/blink/launching-features/#behavior-changes" 4769 target="_blank" 4770 >Web-developer-facing change to existing behavior</a 4771 > 4772 process.`],FEATURE_TYPE_DEPRECATION_ID:[3,"Feature removal",W`Choose this if you are deprecating and then removing an existing 4773 feature. This feature type follows the 4774 <a 4775 href="https://www.chromium.org/blink/launching-features/#feature-deprecations" 4776 target="_blank" 4777 >Feature deprecations</a 4778 > 4779 process.`]},Yl={...Gl,FEATURE_TYPE_ENTERPRISE_ID:[4,"New Feature or removal affecting enterprises","For features or changes that need to be communicated to enterprises or schools."]},Kl={CHROME_BROWSER_UPDATE:[0,"Chrome Browser update","New features, performance improvements, security fixes and minor updates addressing security vulnerabilities and bugs. These features apply to both consumers and enterprises."],CHROME_ENTERPRISE_CORE:[1,"Chrome Enterprise Core (CEC)","These features allow IT administrators to manage Chrome browser settings, policies, apps and extensions across an organization from a central location (Admin Console)."],CHROME_ENTERPRISE_PREMIUM:[2,"Chrome Enterprise Premium (CEP, paid SKU)","These features add advanced security and enhanced controls for organizations with more custom needs e.g. data masking functionality."]},Ql={0:"Chrome Browser update",1:"Chrome Enterprise Core (CEC)",2:"Chrome Enterprise Premium (CEP, paid SKU)"},Xl=110,Jl=120,Zl=130,ed=140,td=150,id=151,rd=160,sd=220,od=230,ad=250,nd=251,ld=260,dd=320,cd=330,hd=360,ud=410,pd=430,fd=450,md=451,gd=460,bd=1061,vd=1070,yd=new Set([130,230,330,430]),_d=new Set([td,ad,fd]),wd=new Set([rd,ld,hd,gd]),kd={[td]:151,[ad]:251,[fd]:451},xd={[Xl]:"Incubate",[Jl]:"Prototype",[Zl]:"DevTrial",[ed]:"Eval readiness",[td]:"OT",[id]:"Extend OT",[rd]:"Ship",[s
4779d]:"Prototype",[od]:"DevTrial",[ad]:"OT",[nd]:"Extend OT",[ld]:"Ship",[dd]:"Implement",[cd]:"DevTrial",[hd]:"Ship",[ud]:"Plan",[pd]:"DevTrial",[fd]:"Dep Trial",[md]:"Extend Dep Trial",[gd]:"Ship",[bd]:"Rollout",[vd]:"Ship"},$d=new Set(["dt_milestone_desktop_start","dt_milestone_android_start","dt_milestone_ios_start","dt_milestone_webview_start"]),Sd=new Set(["ot_milestone_desktop_start","ot_milestone_android_start","ot_milestone_webview_start"]),Cd=new Set(["shipped_milestone","shipped_android_milestone","shipped_ios_milestone","shipped_webview_milestone"]);var Ed;!function(e){e[e.Prototype=0]="Prototype",e[e.DeveloperTesting=1]="DeveloperTesting",e[e.Experiment=2]="Experiment",e[e.Ship=3]="Ship",e[e.PSA=4]="PSA",e[e.DeprecateAndRemove=5]="DeprecateAndRemove",e[e.CrossFunctionReview=6]="CrossFunctionReview",e[e.ReleaseNotes=7]="ReleaseNotes"}(Ed||(Ed={}));const Id=new Set([Ed.Prototype,Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),Td=new Set([Ed.Prototype,Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),Ad=new Set([Ed.DeveloperTesting,Ed.PSA]),Rd=new Set([Ed.DeprecateAndRemove,Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),Pd={[Hl.Incubate]:Id,[Hl.Existing]:Td,[Hl.CodeChange]:Ad,[Hl.Deprecation]:Rd},Dd=new Set(["shipped_milestone","shipped_android_milestone","shipped_ios_milestone","shipped_webview_milestone","ot_milestone_desktop_start","ot_milestone_desktop_end","ot_milestone_android_start","ot_milestone_android_end","ot_milestone_webview_start","ot_milestone_webview_end","dt_milestone_desktop_start","dt_milestone_android_start","dt_milestone_ios_start","dt_milestone_webview_start","extension_desktop_last","extension_android_last","extension_webview_last","intent_to_implement_url","intent_to_ship_url","intent_to_experiment_url","intent_to_extend_experiment_url","intent_thread_url","ot_creation__intent_to_experiment_url","ot_extension__intent_to_extend_experiment_url","r4dt_url","display_name","ot_display_name","ot_owner_email","origin_trial_feedback_url","ot_chromium_trial_name","ot_description","ot_emails","ot_feedback_submission_url","ot_request_note","ot_webfeature_use_counter","ot_documentation_url","ot_creation__bypass_file_checks","ot_creation__ot_documentation_url","ot_is_deprecation_trial","ot_has_third_party_support","ot_is_critical_trial","ot_creation__milestone_desktop_first","ot_creation__milestone_desktop_last","ot_extension__milestone_desktop_last","ot_require_approvals","ot_approval_buganizer_component","ot_approval_buganizer_custom_field_id","ot_approval_group_email","ot_approval_criteria_url","finch_url","experiment_goals","experiment_risks","experiment_extension_reason","rollout_milestone","rollout_platforms","rollout_details","rollout_stage_plan","enterprise_policies","announcement_url"]),Od={shipped_milestone:"desktop_first",shipped_android_milestone:"android_first",shipped_ios_milestone:"ios_first",shipped_webview_milestone:"webview_first",ot_milestone_desktop_start:"desktop_first",ot_milestone_desktop_end:"desktop_last",ot_milestone_android_start:"android_first",ot_milestone_android_end:"android_last",ot_milestone_webview_start:"webview_first",ot_milestone_webview_end:"webview_last",ot_creation__milestone_desktop_first:"desktop_first",ot_creation__milestone_desktop_last:"desktop_last",ot_creation__ot_documentation_url:"ot_documentation_url",ot_extension__milestone_desktop_last:"desktop_last",dt_milestone_desktop_start:"desktop_first",dt_milestone_android_start:"android_first",dt_milestone_ios_start:"ios_first",dt_milestone_webview_start:"webview_first",extension_desktop_last:"desktop_last",extension_android_last:"android_last",extension_webview_last:"webview_last",rollout_milestone:"desktop_first",intent_to_implement_url:"intent_thread_url",intent_to_ship_url:"intent_thread_url",intent_to_experiment_url:"intent_thread_url",intent_to_extend_experiment_url:"intent_thread_url",intent_to_deprecate_url:"intent_thread_url",ot_creation__intent_to_experiment_url:"intent_thread_url",ot_extension__intent_to_extend_experiment_url:"intent_thread_url",r4dt_url:"intent_thread_url"},zd=1,Ld=2,Fd=3,Nd=4,Md=5,qd=32,Ud=34,Bd=42,jd=44,Vd=54,Hd=55,Wd=62,Gd=64,Yd=65,Kd=74,Qd=75,Xd=84,Jd=85,Zd={NO_RESPONSE:[7,"No response"],NA:[1,"N/a or Ack"],REVIEW_STARTED:[3,"Review started"],NEEDS_WORK:[4,"Needs work"],INTERNAL_REVIEW:[8,"Internal review"],APPROVED:[5,"Approved"],DENIED:[6,"Denied"]},ec=10,tc=11,ic=[2,Zd.REVIEW_STARTED[0],Zd.NEEDS_WORK[0],Zd.INTERNAL_REVIEW[0],9],rc=[Zd.NA[0],Zd.APPROVED[0],Zd.DENIED[0],ec,tc],sc=[Zd.APPROVED[0],Zd.NA[0],ec,tc],oc=2,ac=3,nc=["Privacy","WP Security","Enterprise","Debuggability","Testing","Adoption","API Owners"],lc={ot_milestone_desktop_end:"desktop_last",ot_milestone_android_end:"android_last",ot_milestone_webview_end:"webview_last"},dc=1,cc=2,hc=3,uc=4,pc={NO_ACTIVE_DEV:[1,"No active development"],PROPOSED:[2,"Proposed"],IN_DEVELOPMENT:[3,"In development"],BEHIND_A_FLAG:[4,"In developer trial (Behind a flag)"],ENABLED_BY_DEFAULT:[5,"Enabled by default"],DEPRECATED:[6,"Deprecated"],REMOVED:[7,"Removed"],ORIGIN_TRIAL:[8,"Origin trial"],ON_HOLD:[10,"On hold"],NO_LONGER_PURSUING:[1e3,"No longer pursuing"]},fc={UNKNOWN_STD:[1,"Unknown standards status - check spec link for status"],PROPOSAL_STD:[2,"Proposal in a personal repository, no adoption from community"],INCUBATION_STD:[3,"Specification being incubated in a Community Group"],WORKINGDRAFT_STD:[4,"Specification currently under development in a Working Group"],STANDARD_STD:[5,"Final published standard: Recommendation, Living Standard, Candidate Recommendation, or similar final form"]},mc={REVIEW_PENDING:[1,"Pending"],REVIEW_ISSUES_OPEN:[2,"Issues open"],REVIEW_ISSUES_ADDRESSED:[3,"Issues addressed"],REVIEW_NA:[4,"Not applicable"]},gc={SHIPPED:[1,"Shipped/Shipping"],IN_DEV:[2,"In development"],PUBLIC_SUPPORT:[3,"Positive"],NO_PUBLIC_SIGNALS:[5,"No signal"],OPPOSED:[7,"Negative"],NEUTRAL:[8,"Neutral"],SIGNALS_NA:[9,"N/A"]},bc={NO_PUBLIC_SIGNALS:[5,"No signal"],SIGNALS_NA:[9,"N/A"],GECKO_UNDER_CONSIDERATION:[10,"
4779Under consideration"],GECKO_DEFER:[14,"Defer"],PUBLIC_SUPPORT:[3,"Positive"],OPPOSED:[7,"Negative"],NEUTRAL:[8,"Neutral"],SHIPPED:[1,"Shipped/Shipping"]},vc={DEV_STRONG_POSITIVE:[1,"Strongly positive"],DEV_POSITIVE:[2,"Positive"],DEV_MIXED_SIGNALS:[3,"Mixed signals"],DEV_NO_SIGNALS:[4,"No signals"],DEV_NEGATIVE:[5,"Negative"],DEV_STRONG_NEGATIVE:[6,"Strongly negative"]},yc=["owner","editors","cc_recipients","spec_mentors","search_tags","devrel","i2e_lgtms","i2s_lgtms"],_c=["explainer_links","doc_links","sample_links","screenshot_links"];function wc(e){const t={...e,category:e.category_int,enterprise_feature_categories:Array.from(new Set(e.enterprise_feature_categories||[])).map(e=>parseInt(e).toString()),enterprise_product_category:e.enterprise_product_category,feature_type:e.feature_type_int,intent_stage:e.intent_stage_int,accurate_as_of:!0,spec_link:e.standards.spec,standard_maturity:e.standards.maturity.val,tag_review_status:e.tag_review_status_int,security_review_status:e.security_review_status_int,privacy_review_status:e.privacy_review_status_int,sample_links:e.resources.samples,doc_links:e.resources.docs,search_tags:e.tags,blink_components:e.browsers.chrome.blink_components?.[0],bug_url:e.browsers.chrome.bug,devrel:e.browsers.chrome.devrel,owner:e.browsers.chrome.owners,prefixed:e.browsers.chrome.prefixed,impl_status_chrome:e.browsers.chrome.status.val,shipped_milestone:e.browsers.chrome.desktop,shipped_android_milestone:e.browsers.chrome.android,shipped_webview_milestone:e.browsers.chrome.webview,shipped_ios_milestone:e.browsers.chrome.ios,ff_views:e.browsers.ff.view?.val,ff_views_link:e.browsers.ff.view?.url,ff_views_notes:e.browsers.ff.view?.notes,safari_views:e.browsers.safari.view?.val,safari_views_link:e.browsers.safari.view?.url,safari_views_notes:e.browsers.safari.view?.notes,web_dev_views:e.browsers.webdev.view?.val,web_dev_views_link:e.browsers.webdev.view?.url,web_dev_views_notes:e.browsers.webdev.view?.notes,other_views_notes:e.browsers.other.view?.notes};return yc.forEach(e=>{t[e]&&(t[e]=t[e].join(", "))}),_c.forEach(e=>{t[e]&&(t[e]=t[e].join("\r\n"))}),t}const kc=["name","summary","unlisted","enterprise_impact","enterprise_feature_categories","shipping_year","owner","editors","cc_recipients","blink_components","category","web_feature"],xc=["name","summary","owner","editors","enterprise_feature_categories","enterprise_product_category","first_enterprise_notification_milestone","enterprise_impact","confidential"],$c={name:"Feature metadata",sections:[{name:"Feature metadata",fields:["name","summary","unlisted","enterprise_impact","enterprise_feature_categories","shipping_year","owner","editors","cc_recipients","devrel","category","feature_type","active_stage_id","search_tags","web_feature"]},{name:"Implementation in Chromium",fields:["blink_components","bug_url","launch_bug_url","comments"]}]},Sc={sections:[{name:"Feature metadata",fields:["name","summary","owner","editors","enterprise_feature_categories","enterprise_product_category","enterprise_impact","confidential","first_enterprise_notification_milestone","screenshot_links"]}]},Cc={name:"Prototype a solution",sections:[{name:"Prototype a solution",fields:["motivation","explainer_links","spec_link","standard_maturity","api_spec","automation_spec","spec_mentors","intent_to_implement_url"]}]},Ec={name:"Dev trials and iterate on design",sections:[{name:"Dev trial",fields:["devtrial_instructions","doc_links","interop_compat_risks","safari_views","safari_views_link","safari_views_notes","ff_views","ff_views_link","ff_views_notes","web_dev_views","web_dev_views_link","web_dev_views_notes","other_views_notes","security_review_status","privacy_review_status","ergonomics_risks","activation_risks","security_risks","debuggability","measurement","all_platforms","all_platforms_descr","wpt","wpt_descr","sample_links"]},{name:"Implementation in Chromium",fields:["flag_name","finch_name","non_finch_justification","dt_milestone_desktop_start","dt_milestone_android_start","dt_milestone_ios_start","announcement_url"]}]},Ic=structuredClone(Ec);Ic.sections[0].fields.push("tag_review");const Tc={name:"Origin trial",sections:[{name:"Origin trial",fields:["display_name","experiment_goals","experiment_risks","ongoing_constraints","i2e_lgtms","ot_documentation_url","intent_to_experiment_url","origin_trial_feedback_url"]},{name:"Implementation in Chromium",fields:["ot_milestone_desktop_start","ot_milestone_desktop_end","ot_milestone_android_start","ot_milestone_android_end","ot_milestone_webview_start","ot_milestone_webview_end","experiment_timeline"]}]},Ac={name:"Trial extension",sections:[{name:"Trial extension",fields:["experiment_extension_reason","intent_to_extend_experiment_url","extension_desktop_last"]}]},Rc={name:"Prepare to ship",sections:[{name:"Prepare to ship",fields:["display_name","tag_review_status","webview_risks","anticipated_spec_changes","i2s_lgtms","availability_expectation","adoption_expectation","adoption_plan","
4779non_oss_deps","finch_url","intent_to_ship_url"]},{name:"Implementation in Chromium",fields:["rollout_plan","shipped_milestone","shipped_android_milestone","shipped_ios_milestone","shipped_webview_milestone"]}]},Pc=[{fields:["ot_display_name","ot_description","ot_owner_email","ot_emails","ot_creation__milestone_desktop_first","ot_creation__milestone_desktop_last","ot_creation__intent_to_experiment_url","ot_creation__ot_documentation_url","ot_feedback_submission_url","ot_chromium_trial_name","ot_is_deprecation_trial","ot_webfeature_use_counter","ot_has_third_party_support","ot_is_critical_trial","ot_require_approvals"]}],Dc=[{fields:["ot_extension__milestone_desktop_last","experiment_extension_reason"]}],Oc={name:"Important fields",sections:[{name:"Feature Metadata",fields:["summary","owner","finch_name","non_finch_justification","bug_url"]}]},zc={name:"Prepare to ship",sections:[{name:"Shipping milestones",fields:["shipped_milestone","shipped_android_milestone","shipped_ios_milestone","shipped_webview_milestone"]}]},Lc={name:"Verify Accuracy",sections:[{name:"Verify Accuracy",fields:["accurate_as_of"]}]},Fc={[Xl]:{name:"Identify the need",sections:[{name:"Identify the need",fields:["motivation","initial_public_proposal_url","explainer_links"]},{name:"Implementation in Chromium",fields:["requires_embedder_support"]}]},[Jl]:Cc,[Zl]:Ec,[ed]:{name:"Evaluate readiness to ship",sections:[{name:"Evaluate readiness to ship",fields:["prefixed","tag_review"]}]},[td]:Tc,[id]:Ac,[rd]:Rc,[sd]:Cc,[od]:Ic,[ad]:Tc,[nd]:Ac,[ld]:Rc,[dd]:{name:"Start prototyping",sections:[{name:"Start prototyping",fields:["motivation","explainer_links","spec_link","standard_maturity"]}]},[cd]:Ec,[hd]:{name:"Prepare to ship",sections:[{name:"Prepare to ship",fields:["intent_to_ship_url"]},{name:"Implementation in Chromium",fields:["rollout_plan","shipped_milestone","shipped_android_milestone","shipped_ios_milestone","shipped_webview_milestone"]}]},[ud]:{name:"Write up deprecation plan",sections:[{name:"Write up deprecation plan",fields:["deprecation_motivation","explainer_links","spec_link","intent_to_deprecate_url"]}]},[pd]:{name:"Dev trial of deprecation",sections:[{name:"Dev trial of deprecation",fields:["devtrial_instructions","doc_links","interop_compat_risks","safari_views","safari_views_link","safari_views_notes","ff_views","ff_views_link","ff_views_notes","web_dev_views","web_dev_views_link","web_dev_views_notes","other_views_notes","security_review_status","privacy_review_status","ergonomics_risks","activation_risks","security_risks","webview_risks","debuggability","measurement","all_platforms","all_platforms_descr","wpt","wpt_descr","sample_links"]},{name:"Implementation in Chromium",fields:["flag_name","finch_name","non_finch_justification","dt_milestone_desktop_start","dt_milestone_android_start","dt_milestone_ios_start","announcement_url"]}]},[fd]:{name:"Prepare for Deprecation Trial",sections:[{name:"Prepare for Deprecation Trial",fields:["display_name","experiment_goals","experiment_risks","ongoing_constraints","r4dt_url","r4dt_lgtms","origin_trial_feedback_url"]},{name:"Implementation in Chromium",fields:["ot_milestone_desktop_start","ot_milestone_desktop_end","ot_milestone_android_start","ot_milestone_android_end","ot_milestone_webview_start","ot_milestone_webview_end","experiment_timeline"]}]},[md]:Ac,[gd]:{name:"Prepare to ship",sections:[{name:"Prepare to ship",fields:["display_name","intent_to_ship_url","i2s_lgtms"]},{name:"Implementation in Chromium",fields:["rollout_plan","shipped_milestone","shipped_android_milestone","shipped_ios_milestone","shipped_webview_milestone"]}]},[bd]:{name:"Rollout step",sections:[{name:"Rollout step",fields:["rollout_milestone","rollout_platforms","rollout_details","rollout_stage_plan","enterprise_policies"]}]},[vd]:Rc},Nc={[Yl.FEATURE_TYPE_INCUBATE_ID[0]]:[td,rd,bd],[Yl.FEATURE_TYPE_EXISTING_ID[0]]:[ad,ld,bd],[Yl.FEATURE_TYPE_CODE_CHANGE_ID[0]]:[hd,bd],[Yl.FEATURE_TYPE_DEPRECATION_ID[0]]:[fd,gd,bd],[Yl.FEATURE_TYPE_ENTERPRISE_ID[0]]:[bd]},Mc={[rd]:zc,[ld]:zc,[hd]:zc,[gd]:zc,[bd]:{name:"Rollout step",sections:[{name:"Rollout milestones",fields:["rollout_milestone","rollout_platforms","rollout_details","rollout_stage_plan","enterprise_policies"]}]},[vd]:zc};let qc;const Uc=/Z$|[+-]\d{2}:?\d{2}$/;function Bc(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=700}function jc(e,t=[],i=!1){if(e=e??"",i){const t=ml.parse(e),i=La.sanitize(t);return[W`${Qs(i)}`]}return Pl(e,t)}function Vc(e){qc&&qc.isConnected||(qc=document.querySelector("chromedash-toast")),qc?.showMessage&&qc.showMessage(e)}function Hc(e,t){return t.stages.find(t=>t.stage_type===e.stage_type)||null}function Wc(e,t){return e.filter(e=>e.stage_type===t).length>1}function Gc(e,t){const i=Fc[e.stage_type]?.name;if(!i)return void console.error(`Unexpected stage type ${e.stage_type} in stage ${e.id}.`);if(e.display_name)return`${i}: ${e.display_name}`;const r=t.stages.filter(t=>t.stage_type===e.stage_type).findIndex(t=>t.id===e.id);return r>0?`${i} ${r+1}`:i}
4779function Yc(e,t){if(e)return t in Od?e[Od[t]]:e[t]}function Kc(e,t){if(!e)return;const i=Yc(e,t);!function(e,t){if(!e)return;if(e[`max_${t}`]||!e.extensions)return;let i=Yc(e,t)||0;for(const t of e.extensions)for(const e of Object.values(lc)){const r=Yc(t,e);r&&(i=Math.max(i,r))}e[`max_${t}`]=i}(e,t);const r=`max_${t}`;return e[r]&&!i?`Extended to ${e[r]}`:e[r]&&e[r]>i?`${e[r]} (extended from ${i})`:i}function Qc(e){return null!=e&&("string"!=typeof e&&!Array.isArray(e)||e.length>0)}function Xc(e,t,i){if(Dd.has(e)){const i=Yc(t,e);return"rollout_platforms"===e&&i?i.map(e=>Fl[e]):"rollout_stage_plan"===e?Ml[i]:e in lc?Kc(t,e):i}if(!i)return null;const r={owner:"browsers.chrome.owners",editors:"editors",search_tags:"tags",spec_link:"standards.spec",standard_maturity:"standards.maturity.text",sample_links:"resources.samples",docs_links:"resources.docs",bug_url:"browsers.chrome.bug",blink_components:"browsers.chrome.blink_components",devrel:"browsers.chrome.devrel",prefixed:"browsers.chrome.prefixed",impl_status_chrome:"browsers.chrome.status.text",shipped_milestone:"browsers.chrome.desktop",shipped_android_milestone:"browsers.chrome.android",shipped_webview_milestone:"browsers.chrome.webview",shipped_ios_milestone:"browsers.chrome.ios",ff_views:"browsers.ff.view.text",ff_views_link:"browsers.ff.view.url",ff_views_notes:"browsers.ff.view.notes",safari_views:"browsers.safari.view.text",safari_views_link:"browsers.safari.view.url",safari_views_notes:"browsers.safari.view.notes",web_dev_views:"browsers.webdev.view.text",web_dev_views_link:"browsers.webdev.view.url",web_dev_views_notes:"browsers.webdev.view.notes",other_views_notes:"browsers.other.view.notes"};let s;if(r[e]){let t=i;for(const i of r[e].split("."))t&&(t=t[i]);s=t}else s=i[e];if("enterprise_product_category"===e&&void 0!==s)return Ql[s];if("enterprise_feature_categories"===e&&s)return s.map(e=>zl[e]);if("enterprise_impact"===e&&s)return ql[s];if("rollout_plan"===e&&void 0!==s)return jl[s];if("active_stage_id"!==e||!s)return s;for(const e of i.stages)if(e.id===s)return Gc(e,i)}function Jc(e){return e.sections.reduce((e,t)=>[...e,...t.fields],[])}function Zc(e){const t=t=>{if(t){const i=e.shadowRoot.querySelector(t);if(i){i.input?i.focus():setTimeout(()=>{i.focus()},100);const t=`chromedash-form-field[name="${i.name}"] tr + tr`,r=e.shadowRoot.querySelector(t);r?r.scrollIntoView({block:"center",behavior:"smooth"}):i.scrollIntoView({behavior:"smooth"})}}};if(window.scrollToElement=e=>{t(e)},location.hash){const e=decodeURIComponent(location.hash);t(e)}}function eh(){const e=window.location.href.split("?")[0];window.location.href=e}function th(e,t){return e?t:Y}function ih(e,t=!1){return e?t?e.split(".")[0]:e.split(" ")[0]:""}function rh(e){const t=function(e){e=(e=e||"").replace(" ","T");const t=new Date(`${e}Z`);return isNaN(Number(t))?null:t}(e);return t?W` <span class="relative_date"> 4780 (<sl-relative-time date="${t.toISOString()}"> </sl-relative-time>) 4781 </span>`:Y}function sh(e){return e.toISOString().slice(0,10)}function oh(e){const t=new URLSearchParams(e),i={};for(const e of t.keys()){const r=t.getAll(e);r.length&&(i[e]=r[0])}return i}function ah(e,t){const i=new URL(t);if(i.search="",e)for(const[t,r]of Object.entries(e))r&&i.searchParams.append(t,r.toString());return i}function nh(e,t){return"ot_milestone_desktop_start"!==e&&"ot_milestone_desktop_end"!==e||t?.ot_setup_status!==cc&&t?.ot_setup_status!==hc&&t?.ot_setup_status!==uc?"":"Origin trial milestone cannot be edited while a creation request is in progress"}function lh(e,t){const i=dh(e,t);i.toString()!==window.location.toString()&&window.history.pushState({path:i.toString()},"",i)}function dh(e,t){const i=oh(window.location.search);i[e]=encodeURIComponent(t);const r=ah(i,window.location);return r.hash="",r}function ch(e,t,i,r){const s=e+t;if(!(void 0===r||s<=-i||s>=r))return hh(Math.max(0,s))}function hh(e){return dh("start",e).toString()}function uh(e,t,i){let r=!1;const s={id:t},o={};i&&(o[i]={id:i});for(const{name:t,touched:i,value:a,stageId:n,implicitValue:l,isMarkdown:d}of e){if(!i)continue;let e=a;if(Array.isArray(e)&&(e=e.join(",")),void 0!==l){if(!e)continue;s[t]=l}else n?(n in o||(o[n]={id:n}),o[n][Od[t]||t]={form_field_name:t,value:e}):(s[t]=e,void 0!==d&&(s[t+"_is_markdown"]=d));r=!0}return{feature_changes:s,stages:Object.values(o),has_changes:r}}function ph(e){document.querySelector("chromedash-app").setUnsavedChanges(""!==e)}function fh(e,t){return Boolean(e&&(e.can_edit_all||e.editable_features.includes(t)))}function mh(e,t,i=24192e5){if(!e)return!1;return!(Date.parse(e)+i<t)}const gh={csspopularity:"CSS usage metrics > all properties",cssanimated:"CSS usage metrics > animated properties",featurepopularity:"HTML & JavaScript usage metrics > all features",webfeaturepopularity:"Web features usage metrics > all features"},bh=W`<a 4782 href="https://chromium.googlesource.com/chromium/src/+/HEAD/docs/use_counter_wiki.md" 4783 target="_blank" 4784 >UseCounters</a 4785>`,vh={csspopularity:W`This list shows ${bh} for CSS properties 4786 regardless of animiation.`,cssanimated:W`This list shows ${bh} for CSS properities in 4787 combination with animation.`,featurepopularity:W`This list shows ${bh} for certain 4788 Javascript and HTML features.`,webfeaturepopularity:W`This list shows ${bh} for 4789 <a href="https://github.com/web-platform-dx/web-features" target="_blank" 4790 >Web Features</a 4791 >.`};function yh(e,t,i){return!!t&&(!(!e.accurate_as_of||!i)&&Date.parse(e.accurate_as_of)<Date.parse(i))}
4791async function _h(e,t){const i=e?.stable?.version;if(!i||!t)return{closestShippingDate:"",isUpcoming:!1,hasShipped:!1};let r="",s=!1,o=!1;const a=new Set;for(const e of t)(wd.has(e.stage_type)||e.stage_type===bd)&&(a.add(e.desktop_first),a.add(e.android_first),a.add(e.ios_first),a.add(e.webview_first));const n=new Set([...a]);let l=0;if(n.has(i+1)?(l=i+1,s=!0):n.has(i+2)&&(l=i+2,s=!0),s)Object.keys(e).forEach(t=>{e[t].version===l&&(r=e[t].final_beta||"")});else{const t=a;let s=0;for(const e of t)e&&e<=i&&(s=Math.max(s,e));s===i?(r=e.stable?.final_beta||"",o=!0):(r=await async function(e){if(0===e)return"";try{const t=await window.csClient.getSpecifiedChannels(e,e);return t[e]?.final_beta}catch{return Vc("Some errors occurred. Please refresh the page or try again later."),""}}(s),o=!0)}return{closestShippingDate:r,isUpcoming:s,hasShipped:o}}function wh(e,t,i,r){i||(i=Date.now());const{closestShippingDate:s,hasShipped:o,isUpcoming:a}=t;if(function(e,t,i){return t&&!mh(e.accurate_as_of,i)}(e,a,i))return r?W` 4792 <div class="warning layout horizontal center"> 4793 <span class="tooltip" id="outdated-icon" title="Feature outdated "> 4794 <sl-icon name="exclamation-circle-fill" data-tooltip></sl-icon> 4795 </span> 4796 <span> 4797 Your feature hasn't been verified as accurate since 4798 <sl-relative-time 4799 date=${e.accurate_as_of??""} 4800 ></sl-relative-time 4801 >, but it is scheduled to ship 4802 <sl-relative-time date=${s}></sl-relative-time>. 4803 Please 4804 <a href="/guide/verify_accuracy/${e.id}" 4805 >verify that your feature is accurate</a 4806 >. 4807 </span> 4808 </div> 4809 `:W` 4810 <div class="warning layout horizontal center"> 4811 <span class="tooltip" id="outdated-icon" title="Feature outdated "> 4812 <sl-icon name="exclamation-circle-fill" data-tooltip></sl-icon> 4813 </span> 4814 <span> 4815 This feature hasn't been verified as accurate since 4816 <sl-relative-time 4817 date=${e.accurate_as_of??""} 4818 ></sl-relative-time 4819 >, but it is scheduled to ship 4820 <sl-relative-time date=${s}></sl-relative-time>. 4821 </span> 4822 </div> 4823 `;if(yh(e,o,s)){if(function(e,t,i,r){return t&&yh(e,i,r)}(e,r,o,s))return W` 4824 <div class="warning layout horizontal center"> 4825 <span 4826 class="tooltip" 4827 id="shipped-outdated-author" 4828 title="Feature outdated " 4829 > 4830 <sl-icon name="exclamation-circle-fill" data-tooltip></sl-icon> 4831 </span> 4832 <span> 4833 Your feature hasn't been verified as accurate since 4834 <sl-relative-time 4835 date=${e.accurate_as_of??""} 4836 ></sl-relative-time 4837 >, but it claims to have shipped 4838 <sl-relative-time date=${s}></sl-relative-time>. 4839 Please 4840 <a href="/guide/verify_accuracy/${e.id}" 4841 >verify that your feature is accurate</a 4842 >. 4843 </span> 4844 </div> 4845 `;if(function(e,t,i,r){return!!yh(e,t,r)&&!mh(e.accurate_as_of,i,54432e5)}(e,o,i,s))return W` 4846 <div class="warning layout horizontal center"> 4847 <span 4848 class="tooltip" 4849 id="shipped-outdated-all" 4850 title="Feature outdated " 4851 > 4852 <sl-icon name="exclamation-circle-fill" data-tooltip></sl-icon> 4853 </span> 4854 <span> 4855 This feature hasn't been verified as accurate since 4856 <sl-relative-time 4857 date=${e.accurate_as_of??""} 4858 ></sl-relative-time 4859 >, but it claims to have shipped 4860 <sl-relative-time date=${s}></sl-relative-time>. 4861 </span> 4862 </div> 4863 `}return null}function kh(e){if(!e)return null;let t=e;return Uc.test(e)||(t=`${e}Z`),new Date(t).getTime()}async function xh(){const e=await window.csClient.getChannels();return Number(e.beta.mstone)}function $h(e,t,i){const r=function(e,t){return(e.stages||[]).some(e=>[e.desktop_first,e.android_first,e.ios_first,e.webview_first,e.desktop_last,e.android_last,e.ios_last,e.webview_last].some(e=>"number"==typeof e&&e<=t))}(e,i);if(r){const e=["name","summary","shipped_milestone","shipped_android_milestone","shipped_ios_milestone","shipped_webview_milestone","ot_milestone_desktop_start","ot_milestone_desktop_end","ot_milestone_android_start","ot_milestone_android_end","ot_milestone_webview_start","ot_milestone_webview_end"];t.some(t=>t.touched&&e.includes(t.name))&&alert("You are changing fields that may have already been\nincluded in an announcement. Please follow up by coordinating with the docs team.")}}var Sh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Ch=class extends ce{constructor(){super(...arguments),this.loading=!0,this.user=null,this._editMode=!1,this._client=window.csOpenApiClient}static get styles(){return[lo,oo,co,c` 4864 body { 4865 scroll-behavior: smooth; 4866 } 4867 4868 #spinner { 4869 display: none !important; 4870 } 4871 4872 #subheader .subheader_toggles { 4873 display: flex !important; 4874 justify-content: flex-end; 4875 flex: 1 0 auto; 4876 } 4877 4878 #subheader ul { 4879 list-style-type: none; 4880 margin-left: var(--content-padding); 4881 } 4882 4883 #subheader ul li { 4884 text-align: center; 4885 border-radius: var(--default-border-radius); 4886 box-shadow: 1px 1px 4px var(--bar-shadow-color); 4887 padding: 0.5em; 4888 background: var(--chromium-color-dark); 4889 color: #fff; 4890 font-weight: 500; 4891 text-transform: uppercase; 4892 } 4893 4894 #subheader ul li a { 4895 color: inherit; 4896 text-decoration: none; 4897 } 4898 4899 #subheader .view_owners_linke { 4900 margin-left: var(--content-padding); 4901 } 4902 4903 #components_list { 4904 list-style: none; 4905 margin-bottom: calc(var(--content-padding) * 4); 4906 } 4907 4908 #components_list li { 4909 padding: var(--content-padding) 0; 4910 } 4911 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}fetchData(){this.loading=!0,this._client.listComponentUsers().then(e=>{this.usersMap=new Map(e.users.map(e=>[e.id,e])),this.components=e.components,this.loading=!1}
4911).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}_onEditModeToggle(){this._editMode=!this._editMode}_addComponentUserListener(e){const t=Object.assign({},this.components[e.detail.index]);e.detail.isError?Vc(`"Unable to add ${this.usersMap.get(e.detail.userId).name} to ${t.name}".`):(t.subscriber_ids?.includes(e.detail.userId)||(t.subscriber_ids=[...t.subscriber_ids??[],e.detail.userId]),e.detail.toggleAsOwner&&(t.owner_ids=[...t.owner_ids??[],e.detail.userId]),Vc(`"${this.usersMap.get(e.detail.userId).name} added to ${t.name}".`),this.components[e.detail.index]=t,this.requestUpdate())}_removeComponentUserListener(e){const t=Object.assign({},this.components[e.detail.index]);e.detail.isError?Vc(`"Unable to remove ${this.usersMap.get(e.detail.userId).name} from ${t.name}".`):(t.subscriber_ids=t.subscriber_ids.filter(t=>e.detail.userId!==t),e.detail.toggleAsOwner&&(t.owner_ids=t.owner_ids.filter(t=>e.detail.userId!==t)),Vc(`"${this.usersMap.get(e.detail.userId).name} removed from ${t.name}".`),this.components[e.detail.index]=t,this.requestUpdate())}renderSubheader(){return W` 4912 <div id="subheader"> 4913 <div class="layout horizontal center"> 4914 <div> 4915 <h2>Blink components</h2> 4916 ${this.loading?W`<div>loading components</div>`:W`<div id="component-count"> 4917 listing ${this.components.length} components 4918 </div>`} 4919 </div> 4920 </div> 4921 <div class="layout horizontal subheader_toggles"> 4922 <label 4923 ><input 4924 type="checkbox" 4925 ?checked="${this._editMode}" 4926 @change="${this._onEditModeToggle}" 4927 />Edit mode</label 4928 > 4929 </div> 4930 </div> 4931 `}scrollToPosition(){if(location.hash){const e=decodeURIComponent(location.hash);if(e){this.shadowRoot.querySelector(e).scrollIntoView({behavior:"smooth"})}}}renderComponents(){return W` 4932 <ul id="components_list"> 4933 ${this.components.map((e,t)=>W` 4934 <li class="layout horizontal" id="${e.name}"> 4935 <chromedash-admin-blink-component-listing 4936 .componentId=${e.id} 4937 .name=${e.name} 4938 .subscriberIds=${e.subscriber_ids??[]} 4939 .ownerIds=${e.owner_ids??[]} 4940 .index=${t} 4941 .usersMap=${this.usersMap} 4942 ?editing=${this._editMode} 4943 @adminRemoveComponentUser=${this._removeComponentUserListener} 4944 @adminAddComponentUser=${this._addComponentUserListener} 4945 ></chromedash-admin-blink-component-listing> 4946 </li> 4947 `)} 4948 </ul> 4949 `}render(){return W` 4950 ${this.renderSubheader()} 4951 ${this.loading?W``:this.renderComponents()} 4952 `}};Sh([Ve({type:Boolean})],Ch.prototype,"loading",void 0),Sh([Ve({type:Object})],Ch.prototype,"user",void 0),Sh([Ve({type:Boolean})],Ch.prototype,"_editMode",void 0),Sh([He()],Ch.prototype,"components",void 0),Sh([He()],Ch.prototype,"usersMap",void 0),Ch=Sh([Ue("chromedash-admin-blink-page")],Ch);var Eh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Ih=class extends ce{constructor(){super(...arguments),this.sampleId="",this.samplesLoading=!1,this.loading=!0,this.featureLinksSamples=[]}static get styles(){return[lo,oo,co,c` 4953 .feature-links-summary .line { 4954 padding: var(--content-padding-half); 4955 display: flex; 4956 align-items: center; 4957 justify-content: space-between; 4958 font-size: 16px; 4959 } 4960 .feature-links-samples .line { 4961 background: rgb(232, 234, 237); 4962 } 4963 sl-icon-button::part(base) { 4964 padding: 0; 4965 margin-left: 8px; 4966 } 4967 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}async fetchData(){try{this.loading=!0,this.featureLinksSummary=await window.csClient.getFeatureLinksSummary()}catch{Vc("Some errors occurred. Please refresh the page or try again later.")}finally{this.loading=!1}}calcSampleId(e,t,i){return`domain=${e}&type=${t}&isError=${i}`}async fetchLinkSamples(e,t,i){this.sampleId=this.calcSampleId(e,t,i),this.featureLinksSamples=[],this.samplesLoading=!0;try{this.featureLinksSamples=await window.csClient.getFeatureLinksSamples(e,t,i)}catch{Vc("Some errors occurred. Please refresh the page or try again later.")}finally{this.samplesLoading=!1}}renderSamples(){return this.samplesLoading?W`<sl-spinner></sl-spinner>`:W` 4968 <div class="feature-links-samples"> 4969 ${this.featureLinksSamples.map(e=>W` 4970 <div class="line"> 4971 <div> 4972 <a href=${e.url}><i>${e.url}</i></a> 4973 ${e.http_error_code?W`<i>(${e.http_error_code})</i>`:Y} 4974 </div> 4975 <a 4976 href=${`/feature/${e.feature_ids}`} 4977 target="_blank" 4978 rel="noopener" 4979 > 4980 <sl-icon 4981 library="material" 4982 name="link" 4983 slot="prefix" 4984 title="linked feature" 4985 ></sl-icon> 4986 </a> 4987 </div> 4988 `)} 4989 </div> 4990 `}renderComponents(){return W` 4991 <div class="feature-links-summary"> 4992 <sl-details summary="Link Summary" open> 4993 <div class="line"> 4994 All Links <b>${this.featureLinksSummary.total_count}</b> 4995 </div> 4996 <div class="line"> 4997 Covered Links <b>${this.featureLinksSummary.covered_count}</b> 4998 </div> 4999 <div class="line"> 5000 Uncovered (aka "web") Links 5001 <b>${this.featureLinksSummary.uncovered_count}</b> 5002 </div> 5003 <div class="line"> 5004 All Error Links<b>${this.featureLinksSummary.error_count}</b> 5005 </div> 5006 <div class="line"> 5007 HTTP Error Links<b>${this.featureLinksSummary.http_error_count}</b> 5008 </div> 5009 </sl-details> 5010 <sl-details summary="Link Types" open> 5011 ${this.featureLinksSummary.link_types.map(e=>W` 5012 <div class="line"> 5013 ${e.key.toUpperCase()} <b>${e.count}</b> 5014 </div> 5015 `)} 5016 </sl-details> 5017 <sl-details summary="Uncovered Link Domains" open> 5018 ${this.featureLinksSummary.uncovered_link_domains.map(e=>W` 5019 <div class="line"> 5020 <div> 5021 <a href=${e.key}>${e.key}</a> 5022 <sl-icon-button 5023 library="material" 5024 name="search" 5025 slot="prefix" 5026 title="Samples" 5027 @click=${()=>this.fetchLinkSamples(e.key,"web",void 0)} 5028 > 5029 ></sl-icon-button 5030 > 5031 </div> 5032 <b>${e.count}</b> 5033 </div> 5034 ${this.sampleId===this.calcSampleId(e.key,"web",void 0)?this.renderSamples():Y} 5035 `)} 5036 </sl-details> 5037 <sl-details summary="Error Link Domains" open> 5038 ${this.featureLinksSummary.error_link_domains.map(e=>W` 5039 <div class="line"> 5040 <div> 5041 <a href=${e.key}>${e.key}</a> 5042 <sl-icon-button 5043 library="material" 5044 name="search" 5045 slot="prefix" 5046 title="Samples" 5047 @click=${()=>this.fetchLinkSamples(e.key,void 0,!0)} 5048 > 5049 ></sl-icon-button 5050 > 5051 </div> 5052 <b>${e.count}</b> 5053 </div> 5054 ${this.sampleId===this.calcSampleId(e.key,void 0,!0)?this.renderSamples():Y} 5055 `)} 5056 </sl-details> 5057 </div> 5058 `}render(){return W` ${this.loading?W``:this.renderComponents()} `}};Eh([He()],Ih.prototype,"sampleId",void 0),Eh([He()],Ih.prototype,"samplesLoading",void 0),Eh([He()],Ih.prototype,"loading",void 0),Eh([He()],Ih.prototype,"featureLinksSamples",void 0),Eh([He()],Ih.prototype,"featureLinksSummary",void 0),Ih=Eh([Ue("chromedash-admin-feature-links-page")],Ih);const Th="text",Ah="milestone",Rh="YYYY-MM-DD",Ph="[email protected]",Dh="enum",Oh=[{name:"created.when",kind:Rh,doc:"Date that the feature entry was created"},{name:"updated.when",kind:Rh,doc:"Date that the feature was most recently edited"},{name:"name",kind:Th,doc:"The name of the feature"},{name:"tag",kind:Th,doc:"Search tags for finding feature entries"},{name:"web_feature_id",kind:Th,doc:"String ID of a related WebDX feature"},{name:"owner",kind:Ph,doc:"One of the feature owners"},{name:"shipping_year",kind:"number",doc:"Estimated shipping year"},{name:"browsers.chrome.devrel",kind:Ph,doc:"Developer relations contact"},{name:"browsers.chrome.desktop",kind:Ah,doc:"Desktop shipping milestone"},{name:"browsers.chrome.android",kind:Ah,doc:"Android shipping milestone"},{name:"browsers.chrome.ios",kind:Ah,doc:"iOS shipping milestone"},{name:"browsers.chrome.webview",kind:Ah,doc:"Webview shipping milestone"},{name:"browsers.chrome.flag_name",kind:Th,doc:"Flag name that allows developers to enable the feature"},{name:"browsers.chrome.finch_name",kind:Th,doc:"Finch name"},{name:"browsers.chrome.devtrial.desktop.start",kind:Ah,doc:"Desktop DevTrial start"},{name:"browsers.chrome.devtrial.android.start",kind:Ah,doc:"Android DevTrial start"},{name:"browsers.chrome.devtrial.ios.start",kind:Ah,doc:"iOS DevTrial start"},{name:"browsers.chrome.devtrial.webview.start",kind:Ah,doc:"WebView DevTrial start"},{name:"browsers.chrome.ot.desktop.start",kind:Ah,doc:"Desktop Origin Trial start"},{name:"browsers.chrome.ot.desktop.end",kind:Ah,doc:"Desktop Origin Trial end"},{name:"browsers.chrome.ot.android.start",kind:Ah,doc:"Android Origin Trial start"},{name:"browsers.chrome.ot.android.end",kind:Ah,doc:"Android Origin Trial end"},{name:"browsers.chrome.ot.webview.start",kind:Ah,doc:"WebView Origin Trial start"},{name:"browsers.chrome.ot.webview.end",kind:Ah,doc:"WebView Origin Trial end"},{name:"rollout_milestone",kind:Ah,doc:"Stable rollout milestone"},{name:"rollout_stage_plan",kind:Dh,doc:"Stage rollout plan"},{name:"any_start_milestone",kind:Ah,doc:"A milestone in which the feature is scheduled to ship or start an origin trial or dev trial, on any platform"},{name:"category",kind:Dh,doc:"Feature category",choices:Dl},{name:"enterprise_product_category",kind:Dh,doc:"Enterprise product category",choices:Kl},{name:"feature_type",kind:Dh,doc:"Feature type",choices:Yl},{name:"impl_status_chrome",kind:Dh,doc:"Implementation status",choices:pc},{name:"intent_stage",kind:Dh,doc:"Spec process stage",choices:{INTENT_NONE:[0,"None"],INTENT_INCUBATE:[7,"Start incubating"],INTENT_IMPLEMENT:[1,"Start prototyping"],INTENT_EXPERIMENT:[2,"Dev trials"],INTENT_IMPLEMENT_SHIP:[4,"Evaluate readiness to ship"],INTENT_ORIGIN_TRIAL:[3,"Origin Trial"],INTENT_EXTEND_ORIGIN_TRIAL:[11,"Extend Trial"],INTENT_SHIP:[5,"Prepare to ship"],INTENT_REMOVED:[6,"Removed"],INTENT_SHIPPED:[8,"Shipped"],INTENT_PARKED:[9,"Parked"],INTENT_ROLLOUT:[10,"Rollout"]}},{name:"security_review_status",kind:Dh,doc:"Security review status",choices:mc},{name:"privacy_review_status",kind:Dh,doc:"Privacy review status",choices:mc},{name:"tag_review_status",kind:Dh,doc:"TAG Specification Review Status",choices:mc},{name:"browsers.webkit.view",kind:Dh,doc:"WebKit views",choices:gc},{name:"browsers.ff.view",kind:Dh,doc:"Firefox views",choices:bc},{name:"browsers.webdev.view",kind:Dh,doc:"Web / Framework developer views",choices:vc},{name:"accurate_as_of",kind:Rh,doc:"When the feature's fields were last verified"}];var zh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Lh;let Fh=class extends ce{static get styles(){return[...lo,c` 5059 h3 { 5060 margin: var(--content-padding-large) 0; 5061 } 5062 section { 5063 margin-left: var(--content-padding); 5064 } 5065 p { 5066 margin: var(--content-padding-half) 0; 5067 } 5068 #dialog-content { 5069 max-width: 60rem; 5070 } 5071 li { 5072 margin-left: var(--content-padding); 5073 } 5074 `]}show(){this.renderRoot.querySelector("sl-dialog")?.show()}hide(){this.renderRoot.querySelector("sl-dialog")?.hide()}renderExampleRow(e,t){return W` 5075 <tr> 5076 <td>${e.map(e=>W`<div><code>${e}</code></div>`)}</td> 5077 <td>${t}</td> 5078 </tr> 5079 `}renderCommonSearchExamples(){return W` 5080 <h3>Common search examples</h3> 5081 <section> 5082 <table class="data-table"> 5083 ${this.renderExampleRow(["memory","memory pool","memory -pool"],"Features that include or exclude words in any field.")} 5084 ${this.renderExampleRow(["browsers.chrome.desktop:123","browsers.chrome.desktop:current_stable+1"],"Features shipping in the specified milestone.")} 5085 ${this.renderExampleRow(["browsers.chrome.desktop:120..122","browsers.chrome.desktop:current_stable-1..current_stable+1"],"Features shipping in a milestone range.")} 5086 ${this.renderExampleRow(["owner:[email protected]"],"Features with the specified owner.")} 5087 ${this.renderExampleRow(["created.when>2024-01-01","created.when<now-8w","updated.when:2023-01-01..2023-12-31"],"Features created or modified before or after a date.")} 5088 ${this.renderExampleRow(['feature_type:"Feature deprecation"','feature_type!="Feature deprecation"','-feature_type:"Feature deprecation"'],"Features of a specific type or excluding a type.")} 5089 ${this.renderExampleRow(["category:CSS,DOM"],"Features that have a value in a comma-separated list.")} 5090 ${this.renderExampleRow(["category:CSS OR category:DOM"],"Combine two query clauses with a logical-OR.")} 5091 </table> 5092 </section> 5093 `}renderSearchSyntax(){return W` 5094 <h3>Search syntax</h3> 5095 <section> 5096 <p> 5097 A search query consists of a series of terms that are separated by
5098 spaces. Terms can be single words or conditions. 5099 </p> 5100 5101 <p> 5102 When searching for words, the results will include features that 5103 include those words in any field of the feature entry. We do not 5104 support searching for wildcards, partial words, punctuation, or quoted 5105 phrases. 5106 </p> 5107 5108 <p> 5109 When searching using conditions, each condition consists of three 5110 parts: FIELD OPERATOR VALUE(S) 5111 </p> 5112 5113 <ul> 5114 <li>FIELD: One of the fields listed below.</li> 5115 <li> 5116 OPERATOR: Usually a colon, but it can be an inequality for numeric, 5117 date, or enum fields. The colon operator does case-insensitive 5118 matching of words within a text field, while an equals-sign does 5119 exact matching of an entire string value. 5120 </li> 5121 <li> 5122 VALUE(S): A single word, number, date, or enum value listed below. 5123 If the value contains spaces, it must be inside double quotes. 5124 <ul> 5125 <li> 5126 Use the equals operator with a comma-separated list to match any 5127 value in that list. 5128 </li> 5129 <li> 5130 Use the equals operator with two number or date values separated 5131 by "<code>..</code>" to find any value between or including 5132 those endpoints. The left value must be less than the right 5133 value. 5134 </li> 5135 <li> 5136 For dates, you can compute a date a certain number of days or 5137 weeks before or after now. "<code>now-3d</code>" is 3 days ago, 5138 and "<code>now+2w</code>" is 2 weeks from now. 5139 </li> 5140 <li> 5141 For milestones, you can compute a milestone relative to the 5142 current stable version of Chrome. 5143 "<code>current_stable+1</code>" is 1 version after the current 5144 stable version. 5145 </li> 5146 </ul> 5147 </li> 5148 </ul> 5149 5150 <p> 5151 You may negate any search term by prefixing it with a minus sign. 5152 Search terms are implicitly joined together by a logical-AND. However, 5153 you may type the keyword <code>OR</code> between terms as a logical-OR 5154 operator. We do not support parenthesis in queries. 5155 </p> 5156 </section> 5157 `}renderFieldRow(e){if(e.choices){const t=Object.values(e.choices).map(t=>W` <div>${e.name}:"${t[1]}"</div> `);return W` 5158 <tr> 5159 <td> 5160 <code>${t}</code> 5161 </td> 5162 <td>${e.doc}</td> 5163 </tr> 5164 `}return W` 5165 <tr> 5166 <td> 5167 <code>${e.name}:<i>${e.kind}</i></code> 5168 </td> 5169 <td>${e.doc}</td> 5170 </tr> 5171 `}renderFieldList(){return W` 5172 <h3>Available search fields</h3> 5173 <section> 5174 <table class="data-table"> 5175 ${Oh.map(e=>this.renderFieldRow(e))} 5176 </table> 5177 </section> 5178 `}renderDialogContent(){return W` 5179 <div id="dialog-content"> 5180 ${this.renderCommonSearchExamples()} ${this.renderSearchSyntax()} 5181 ${this.renderFieldList()} 5182 </div> 5183 `}render(){return W` 5184 <sl-dialog 5185 class="missing-prereqs" 5186 label="Feature Search Help" 5187 style="--width:fit-content" 5188 > 5189 ${this.renderDialogContent()} 5190 </sl-dialog> 5191 `}};Fh=zh([Ue("chromedash-search-help-dialog")],Fh);var Nh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Mh=Oh.map(function(e){if(void 0===e.choices)return[{group:e.name,name:e.name+":",doc:e.doc}];const t=[];for(const i in e.choices){const r=e.choices[i][1];t.push({group:e.name,name:e.name+':"'+r+'"',doc:e.doc})}return t}).flat();let qh=class extends ce{constructor(){super(...arguments),this.typeaheadRef=ws(),this.query="",this.handleDocumentKeyUp=e=>{const t=e.composedPath().some(e=>["INPUT","TEXTAREA","SL-POPUP","SL-DIALOG"].includes(e.tagName));
5191"/"!==e.key||t||(e.preventDefault(),e.stopPropagation(),(this.typeaheadRef?.value).focus())}}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),document.addEventListener("keyup",this.handleDocumentKeyUp)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keyup",this.handleDocumentKeyUp)}handleSearchClick(){const e=this.typeaheadRef.value;if(!e)return;e.hide();const t=e.value.trim();this._fireEvent("search",{query:t})}static get styles(){return[...lo,c` 5192 sl-icon-button { 5193 font-size: 1.6rem; 5194 margin: 0 !important; 5195 } 5196 `]}showHelp(e){e.stopPropagation();const t=this.typeaheadRef.value;t&&(t.hide(),async function(){Lh||(Lh=document.createElement("chromedash-search-help-dialog"),document.body.appendChild(Lh),await Lh.updateComplete),Lh.show()}())}render(){return W` 5197 <chromedash-typeahead 5198 ${$s(this.typeaheadRef)} 5199 value=${this.query} 5200 placeholder="Search" 5201 .vocabulary=${Mh} 5202 @sl-change=${this.handleSearchClick} 5203 > 5204 <sl-icon-button 5205 library="material" 5206 name="search" 5207 slot="prefix" 5208 @click="${this.handleSearchClick}" 5209 > 5210 </sl-icon-button> 5211 <sl-icon-button 5212 library="material" 5213 name="help_20px" 5214 slot="suffix" 5215 @click="${this.showHelp}" 5216 > 5217 </sl-icon-button> 5218 </chromedash-typeahead> 5219 `}}; 5220/** 5221 * @license 5222 * Copyright 2021 Google LLC 5223 * SPDX-License-Identifier: BSD-3-Clause 5224 */ 5225function*Uh(e,t,i=1){const r=void 0===t?0:e;t??=e;for(let e=r;i>0?e<t:t<e;e+=i)yield e} 5226/** 5227 * @license 5228 * Copyright 2021 Google LLC 5229 * SPDX-License-Identifier: BSD-3-Clause 5230 */function*Bh(e,t){if(void 0!==e){let i=0;for(const r of e)yield t(r,i++)}}Nh([Ve({type:String})],qh.prototype,"query",void 0),qh=Nh([Ue("chromedash-feature-filter")],qh);var jh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Vh=class extends ce{constructor(){super(...arguments),this.totalCount=0,this.start=0,this.pageSize=100}static get styles(){return[lo,c` 5231 .active { 5232 background: var(--light-grey); 5233 } 5234 .stepper { 5235 width: 7em; 5236 } 5237 .pagination { 5238 padding: var(--content-padding-half) 0; 5239 min-height: 50px; 5240 } 5241 .pagination span { 5242 color: var(--unimportant-text-color); 5243 margin-right: var(--content-padding); 5244 } 5245 sl-button::part(base):hover { 5246 background: var(--sl-color-blue-100); 5247 } 5248 .pagination sl-icon-button { 5249 font-size: 1.6rem; 5250 } 5251 .pagination sl-icon-button::part(base) { 5252 padding: 0; 5253 } 5254 #items-per-page { 5255 align-self: center; 5256 color: var(--unimportant-text-color); 5257 font-size: var(--sl-input-font-size-small); 5258 } 5259 sl-select { 5260 align-self: center; 5261 display: inline-block; 5262 margin: 0 var(--content-padding-quarter) 0 var(--content-padding); 5263 width: 7em; 5264 } 5265 `]}renderPageButtons(){if(void 0===this.totalCount||0===this.totalCount)return W``;const e=Math.floor(this.start/this.pageSize),t=Math.ceil(this.totalCount/this.pageSize);let i=!1,r=!1,s=t>1,o=[];const a=new Set;for(const s of Uh(t))0!==s&&s!==t-1&&(t<=10?a.add(s):s<e-4?i=!0:s>e+4?r=!0:a.add(s));return o=Array.from(a),W` 5266 <sl-button 5267 variant="text" 5268 id="jump_1" 5269 class="page-button ${0===e?"active":""}" 5270 href=${hh(0)} 5271 > 5272 ${1} 5273 </sl-button> 5274 ${i?W`<div>...</div>`:Y} 5275 ${Bh(o,t=>W` 5276 <sl-button 5277 variant="text" 5278 id="jump_${t+1}" 5279 class="page-button ${t===e?"active":""}" 5280 href=${hh(t*this.pageSize)} 5281 > 5282 ${t+1} 5283 </sl-button> 5284 `)} 5285 ${r?W`<div>...</div>`:Y} 5286 ${s?W`<sl-button 5287 variant="text" 5288 id="jump_${t}" 5289 class="page-button ${t-1===e?"active":""}" 5290 href=${hh((t-1)*this.pageSize)} 5291 > 5292 ${t} 5293 </sl-button>`:Y} 5294 `}setItemsPerPage(e){const t=e.target,i=dh("num",parseInt(t.value)).toString();window.location.href=i}renderItemsPerPage(){const e=[25,50,100];return e.includes(this.pageSize)||(e.push(this.pageSize),e.sort((e,t)=>
5294e-t)),W` 5295 <sl-select 5296 value="${this.pageSize}" 5297 size="small" 5298 @sl-change=${this.setItemsPerPage} 5299 > 5300 ${e.map(e=>W` 5301 <sl-option id="opt_${e}" value=${e}>${e}</sl-option> 5302 `)} 5303 </sl-select> 5304 <span id="items-per-page"> items per page </span> 5305 `}render(){if(void 0===this.totalCount||0===this.totalCount)return W``;const e=ch(this.start,-this.pageSize,this.pageSize,this.totalCount),t=ch(this.start,this.pageSize,this.pageSize,this.totalCount);return W` 5306 <div id="main" class="pagination hbox halign-items-space-between"> 5307 <div class="spacer"></div> 5308 <sl-button 5309 variant="text" 5310 id="previous" 5311 class="stepper" 5312 href=${Ht(e)} 5313 ?disabled=${void 0===e} 5314 >Previous</sl-button 5315 > 5316 5317 ${this.renderPageButtons()} 5318 5319 <sl-button 5320 variant="text" 5321 id="next" 5322 class="stepper" 5323 href=${Ht(t)} 5324 ?disabled=${void 0===t} 5325 >Next</sl-button 5326 > 5327 5328 ${this.renderItemsPerPage()} 5329 5330 <div class="spacer"></div> 5331 </div> 5332 `}};jh([Ve({type:Number})],Vh.prototype,"totalCount",void 0),jh([Ve({type:Number})],Vh.prototype,"start",void 0),jh([Ve({type:Number})],Vh.prototype,"pageSize",void 0),Vh=jh([Ue("chromedash-feature-pagination")],Vh);var Hh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Wh=class extends ce{constructor(){super(...arguments),this.columns=void 0,this.canEdit=!1,this.signedIn=!1,this.starredFeatures=new Set,this.gates={},this.selectedGateId=0}static get styles(){return[...lo,c` 5333 :host { 5334 display: table-row; 5335 background: var(--table-row-background); 5336 } 5337 td { 5338 padding: var(--content-padding-half); 5339 border-bottom: var(--table-divider); 5340 } 5341 td.name_col { 5342 width: 100%; 5343 } 5344 td.icon_col { 5345 white-space: nowrap; 5346 vertical-align: top; 5347 } 5348 td.icon_col a { 5349 padding: 2px 4px; 5350 } 5351 td.icon_col a:hover { 5352 text-decoration: none; 5353 } 5354 .quick_actions { 5355 white-space: nowrap; 5356 float: right; 5357 } 5358 .highlights { 5359 padding-left: var(--content-padding); 5360 } 5361 .highlights div { 5362 color: var(--unimportant-text-color); 5363 padding: var(--content-padding-quarter); 5364 } 5365 sl-icon-button { 5366 font-size: 1.3rem; 5367 } 5368 sl-icon-button::part(base) { 5369 color: var(--link-color); 5370 } 5371 `]}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}toggleStar(e){e.preventDefault(),e.stopPropagation();const t=e.target,i=Number(t.dataset.featureId),r=!this.starredFeatures.has(i);this._fireEvent("star-toggle-event",{featureId:i,doStar:r})}renderStarIcon(e){return W` 5372 <sl-icon-button 5373 @click=${this.toggleStar} 5374 title="Receive an email notification when there are updates" 5375 library="material" 5376 name="${this.starredFeatures.has(Number(e.id))?"star":"star_border"}" 5377 data-feature-id="${e.id}" 5378 ></sl-icon-button> 5379 `}renderIcons(e){return this.signedIn?W` ${this.renderStarIcon(e)} `:Y}renderQuickActions(e){if("approvals"==this.columns){return W` <span class="quick_actions"> ${[]} </span> `}return Y}isActiveGate(e){return ic.includes(e.state)}getActiveStages(e){const t=this.gates[e.id]||[],i=t.filter(e=>this.isActiveGate(e)),r=new Set(i.map(e=>e.stage_id)),s=[];for(const i of e.stages){r.has(i.id)&&s.push({stage:i,gates:t.filter(e=>e.stage_id==i.id)});for(const e of i.extensions||[])r.has(e.id)&&s.push({stage:e,gates:t.filter(t=>t.stage_id==e.id)})}return s}getStageShortName(e){return xd[e.stage_type]?`${xd[e.stage_type]}: `:Y}renderActiveStageAndGates(e){const t=e.gates;return t.sort((e,t)=>
5379nc.indexOf(e.team_name)-nc.indexOf(t.team_name)),W` 5380 <div> 5381 ${this.getStageShortName(e.stage)} 5382 ${t.map(t=>W` 5383 <chromedash-gate-chip 5384 .feature=${this.feature} 5385 .stage=${e.stage} 5386 .gate=${t} 5387 selectedGateId=${this.selectedGateId} 5388 ></chromedash-gate-chip> 5389 `)} 5390 </div> 5391 `}renderHighlights(e){if("approvals"==this.columns){const t=this.getActiveStages(e);return W` 5392 <div class="highlights"> 5393 ${t.length>0?W` 5394 <div> 5395 ${t.map(e=>this.renderActiveStageAndGates(e))} 5396 </div> 5397 `:Y} 5398 ${this.renderQuickActions(e)} 5399 </div> 5400 `}return Y}render(){const e=this.feature;return W` 5401 <td class="name_col"> 5402 <a href="/feature/${e.id}">${e.name}</a> 5403 ${this.renderHighlights(e)} 5404 </td> 5405 <td class="icon_col">${this.renderIcons(e)}</td> 5406 `}};Hh([Ve({attribute:!1})],Wh.prototype,"feature",void 0),Hh([Ve({type:String})],Wh.prototype,"columns",void 0),Hh([Ve({type:Boolean})],Wh.prototype,"canEdit",void 0),Hh([Ve({type:Boolean})],Wh.prototype,"signedIn",void 0),Hh([Ve({attribute:!1})],Wh.prototype,"starredFeatures",void 0),Hh([Ve({attribute:!1})],Wh.prototype,"gates",void 0),Hh([Ve({type:Number})],Wh.prototype,"selectedGateId",void 0),Wh=Hh([Ue("chromedash-feature-row")],Wh);var Gh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Yh=class extends ce{constructor(){super(...arguments),this.loading=!0,this.reloading=!1,this.features=[],this.totalCount=0,this.start=0,this.query="",this.showEnterprise=!1,this.sortSpec="",this.showQuery=!1,this.starredFeatures=new Set,this.num=100,this.alwaysOfferPagination=!1,this.noResultsMessage="No results",this.noPaginatedResultsMessage="No results on this pagination page",this.canEdit=!1,this.gates={},this.selectedGateId=0,this.nameOnly=!1}connectedCallback(){super.connectedCallback(),this.fetchFeatures(!0)}fetchFeatures(e=!1){this.loading=e,this.reloading=!e,window.csClient.searchFeatures(this.query,this.showEnterprise,this.sortSpec,this.start,this.num,this.nameOnly).then(e=>{this.features=e.features,this.totalCount=e.total_count,this.loading=!1,this.reloading=!1}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")}),"approvals"==this.columns&&this.loadGateData()}refetch(){this.fetchFeatures()}loadGateData(){window.csClient.getPendingGates().then(e=>{const t={};for(const i of e.gates)t.hasOwnProperty(i.feature_id)||(t[i.feature_id]=[]),t[i.feature_id].push(i);this.gates=t}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}updated(e){"starred-by:me"==this.query&&!this.loading&&e.has("starredFeatures")&&this.fetchFeatures()}handleSearch(e){this.loading=!0,this.query=e.detail.query,this.start=0,this.fetchFeatures()}static get styles(){return[...lo,c` 5407 .status-and-count { 5408 padding: var(--content-padding-half) 0; 5409 min-height: 50px; 5410 } 5411 .status-and-count span { 5412 color: var(--unimportant-text-color); 5413 margin-right: var(--content-padding); 5414 } 5415 .status-and-count sl-icon-button { 5416 font-size: 1.6rem; 5417 } 5418 .status-and-count sl-icon-button::part(base) { 5419 padding: 0; 5420 } 5421 table { 5422 width: 100%; 5423 } 5424 .skel td { 5425 background: white; 5426 padding: 14px; 5427 border-bottom: var(--table-divider); 5428 } 5429 sl-skeleton { 5430 height: 24px; 5431 } 5432 .message { 5433 padding: var(--content-padding); 5434 } 5435 `]}renderMessages(){return this.loading?W` 5436 <tr class="skel"> 5437 <td> 5438 <sl-skeleton effect="sheen" style="width: 50%"></sl-skeleton> 5439 </td> 5440 </tr> 5441 <tr class="skel"> 5442 <td> 5443 <sl-skeleton effect="sheen" style="width: 65%"></sl-skeleton> 5444 </td> 5445 </tr> 5446 <tr class="skel"> 5447 <td> 5448 <sl-skeleton effect="sheen" style="width: 40%"></sl-skeleton> 5449 </td> 5450 </tr> 5451 <tr class="skel"> 5452 <td> 5453 <sl-skeleton effect="sheen" style="width: 50%"></sl-skeleton> 5454 </td> 5455 </tr> 5456 `:0==this.totalCount?W` 5457 <tr> 5458 <td class="message">${this.noResultsMessage}</td> 5459 </tr> 5460 `:0==this.features.length&&this.start>0&&W` 5461 <tr> 5462 <td class="message">${this.noPaginatedResultsMessage}</td> 5463 </tr> 5464 `}renderSearch(){return this.showQuery?W` 5465 <chromedash-feature-filter 5466 .query=${this.query} 5467 @search="${this.handleSearch}" 5468 ></chromedash-feature-filter> 5469 `:Y}renderLoadingStatusAndCount(){const e=this.start+1,t=this.start+this.features.length,i=ch(this.start,-this.num,this.num,this.totalCount),r=ch(this.start,this.num,this.num,this.totalCount);if(this.alwaysOfferPagination){if(this.loading)return W` <div class="status-and-count"> 5470 <sl-skeleton effect="sheen" style="float: right; width: 12em"> 5471 </sl-skeleton> 5472 </div>`}else if(this.loading||1==e&&t==this.totalCount)return Y;return 0===this.features.length?Y:W` 5473 <div class="status-and-count hbox">
5474 <span>${this.reloading?"Reloading...":Y}</span> 5475 <div class="spacer"></div> 5476 <span>${e} - ${t} of ${this.totalCount}</span> 5477 <sl-icon-button 5478 library="material" 5479 name="navigate_before" 5480 title="Previous page" 5481 href=${Ht(i)} 5482 ?disabled=${void 0===i} 5483 ></sl-icon-button> 5484 <sl-icon-button 5485 library="material" 5486 name="navigate_next" 5487 title="Next page" 5488 href=${Ht(r)} 5489 ?disabled=${void 0===r} 5490 ></sl-icon-button> 5491 </div> 5492 `}renderPagination(e){const t=this.start+1,i=this.start+e.length;if(this.alwaysOfferPagination){if(this.loading)return W` <div class="pagination"> 5493 <sl-skeleton effect="sheen" style="float: right; width: 12em"> 5494 </sl-skeleton> 5495 </div>`}else if(this.loading||1==t&&i==this.totalCount)return Y;return 0===e.length?Y:W` 5496 <chromedash-feature-pagination 5497 pageSize=${this.num} 5498 start=${this.start} 5499 totalCount=${this.totalCount} 5500 > 5501 </chromedash-feature-pagination> 5502 `}renderFeature(e){return W` 5503 <chromedash-feature-row 5504 .feature=${e} 5505 columns=${this.columns} 5506 ?signedIn=${this.signedIn} 5507 ?canEdit=${this.canEdit} 5508 .starredFeatures=${this.starredFeatures} 5509 .gates=${this.gates} 5510 selectedGateId=${this.selectedGateId} 5511 ></chromedash-feature-row> 5512 `}render(){return W` 5513 ${this.renderSearch()} ${this.renderLoadingStatusAndCount()} 5514 <table> 5515 ${this.renderMessages()||this.features.map(e=>this.renderFeature(e))} 5516 </table> 5517 ${this.renderPagination(this.features)} 5518 `}};Gh([He()],Yh.prototype,"loading",void 0),Gh([He()],Yh.prototype,"reloading",void 0),Gh([He()],Yh.prototype,"features",void 0),Gh([He()],Yh.prototype,"totalCount",void 0),Gh([Ve({type:Number,attribute:!1})],Yh.prototype,"start",void 0),Gh([Ve({type:String})],Yh.prototype,"query",void 0),Gh([Ve({type:Boolean})],Yh.prototype,"showEnterprise",void 0),Gh([Ve({type:String,attribute:!1})],Yh.prototype,"sortSpec",void 0),Gh([Ve({type:Boolean})],Yh.prototype,"showQuery",void 0),Gh([Ve({type:Object,attribute:!1})],Yh.prototype,"starredFeatures",void 0),Gh([Ve({type:Number,attribute:!1})],Yh.prototype,"num",void 0),Gh([Ve({type:Boolean})],Yh.prototype,"alwaysOfferPagination",void 0),Gh([Ve({type:String})],Yh.prototype,"noResultsMessage",void 0),Gh([Ve({type:String})],Yh.prototype,"noPaginatedResultsMessage",void 0),Gh([Ve({type:Boolean})],Yh.prototype,"canEdit",void 0),Gh([Ve({type:Object})],Yh.prototype,"gates",void 0),Gh([Ve({type:Number})],Yh.prototype,"selectedGateId",void 0),Gh([Ve({type:String})],Yh.prototype,"columns",void 0),Gh([Ve({type:Boolean})],Yh.prototype,"signedIn",void 0),Gh([Ve({type:Boolean})],Yh.prototype,"nameOnly",void 0),Yh=Gh([Ue("chromedash-feature-table")],Yh);var Kh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Qh=class extends ce{constructor(){super(...arguments),this.title="Features",this.showQuery=!0,this.selectedGateId=0,this.rawQuery={},this.query="",this.columns="normal",this.showEnterprise=!1,this.sortSpec="",this.start=0,this.num=100,this.starredFeatures=new Set,this.isNewfeaturesPage=!1,this.nameOnly=!1}static get styles(){return[lo,c` 5519 #content-title { 5520 padding-top: var(--content-padding); 5521 } 5522 `]}connectedCallback(){super.connectedCallback(),this.initializeParams(),this.fetchData()}initializeParams(){this.rawQuery&&(null!=this.rawQuery.q&&(this.query=this.rawQuery.q),null!=this.rawQuery.columns&&(this.columns=this.rawQuery.columns),null!=this.rawQuery.enterprise&&(this.showEnterprise=!0),null!=this.rawQuery.sort&&(this.sortSpec=this.rawQuery.sort),null==this.rawQuery.start||Number.isNaN(parseInt(this.rawQuery.start))||(this.start=parseInt(this.rawQuery.start)),null==this.rawQuery.num||Number.isNaN(parseInt(this.rawQuery.num))||(this.num=parseInt(this.rawQuery.num),this.num=Math.max(1,Math.min(this.num,1e3))),this.isNewfeaturesPage&&(this.nameOnly=!0))}fetchData(){window.csClient.getStars().then(e=>{this.starredFeatures=new Set(e)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}refetch(){const e=this.chromedashFeatureTables;for(const t of e)t.refetch()}handleStarToggle(e){const t=new Set(this.starredFeatures);window.csClient.setStar(e.detail.featureId,e.detail.doStar).then(()=>{e.detail.doStar?t.add(e.detail.featureId):t.delete(e.detail.featureId),this.starredFeatures=t}).catch(()=>{alert("Unable to star the Feature. Please Try Again.")}
5522)}renderFeatureList(){return W` 5523 <chromedash-feature-table 5524 .query=${this.query} 5525 ?showEnterprise=${this.showEnterprise} 5526 .sortSpec=${this.sortSpec} 5527 .start=${this.start} 5528 .num=${this.num} 5529 .nameOnly=${this.nameOnly} 5530 ?showQuery=${this.showQuery} 5531 ?signedIn=${Boolean(this.user)} 5532 ?canEdit=${this.user&&this.user.can_edit_all} 5533 .starredFeatures=${this.starredFeatures} 5534 @star-toggle-event=${this.handleStarToggle} 5535 selectedGateId=${this.selectedGateId} 5536 alwaysOfferPagination 5537 columns=${this.columns} 5538 > 5539 </chromedash-feature-table> 5540 `}render(){const e=this.user?.is_admin&&"approvals"===this.columns?W`<p> 5541 You see all pending approvals because you're a site admin. 5542 </p>`:Y;return W` 5543 <div id="content-title"> 5544 <h2>${this.title}</h2> 5545 </div> 5546 ${e} ${this.renderFeatureList()} 5547 `}};Kh([Ve({type:String})],Qh.prototype,"title",void 0),Kh([Ve({type:Boolean})],Qh.prototype,"showQuery",void 0),Kh([Ve({type:Object})],Qh.prototype,"user",void 0),Kh([Ve({type:Number})],Qh.prototype,"selectedGateId",void 0),Kh([Ve({type:Object})],Qh.prototype,"rawQuery",void 0),Kh([He()],Qh.prototype,"query",void 0),Kh([He()],Qh.prototype,"columns",void 0),Kh([He()],Qh.prototype,"showEnterprise",void 0),Kh([He()],Qh.prototype,"sortSpec",void 0),Kh([He()],Qh.prototype,"start",void 0),Kh([He()],Qh.prototype,"num",void 0),Kh([He()],Qh.prototype,"starredFeatures",void 0),Kh([He()],Qh.prototype,"isNewfeaturesPage",void 0),Kh([He()],Qh.prototype,"nameOnly",void 0),Kh([function(e){return(t,i)=>Ge(t,i,{get(){return(this.renderRoot??(Ke??=document.createDocumentFragment())).querySelectorAll(e)}})} 5548/** 5549 * @license 5550 * Copyright 2017 Google LLC 5551 * SPDX-License-Identifier: BSD-3-Clause 5552 */("chromedash-feature-table")],Qh.prototype,"chromedashFeatureTables",void 0),Qh=Kh([Ue("chromedash-all-features-page")],Qh);var Xh=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Jh extends ce{constructor(){super(...arguments),this.amendment={field_name:"",old_value:"",new_value:""}}static get styles(){return[...lo,c` 5553 details { 5554 color: var(--unimportant-text-color); 5555 } 5556 `]}render(){return W` 5557 <details> 5558 <summary> 5559 <b>${this.amendment.field_name}</b>: 5560 <span id="preview">${this.amendment.new_value}</span> 5561 </summary> 5562 5563 <div> 5564 <b>Old</b>: 5565 <div>${this.amendment.old_value}</div> 5566 </div> 5567 5568 <div> 5569 <b>New</b>: 5570 <div>${this.amendment.new_value}</div> 5571 </div> 5572 </details> 5573 `}}Xh([Ve({type:Object})],Jh.prototype,"amendment",void 0),customElements.define("chromedash-amendment",Jh);class Zh extends ce{constructor(){super(...arguments),this.user=null,this.featureId=0,this.activity=null,this.narrow=!1}static get styles(){return[...lo,c` 5574 .comment_header { 5575 min-height: 24px; 5576 } 5577 5578 .comment_header.narrow .author { 5579 font-weight: 500; 5580 } 5581 .comment_header.narrow .preposition { 5582 display: none; 5583 } 5584 .comment_header.narrow .date { 5585 display: block; 5586 padding-bottom: var(--content-padding); 5587 } 5588 5589 .comment {
5590 background: var(--accordion-background); 5591 border-radius: var(--large-border-radius); 5592 padding: var(--content-padding-half); 5593 margin-bottom: var(--content-padding); 5594 margin-right: var(--content-padding); 5595 } 5596 5597 .comment-menu-icon { 5598 float: right; 5599 margin-right: 8px; 5600 cursor: pointer; 5601 } 5602 5603 .comment_body { 5604 padding: var(--content-padding-half); 5605 white-space: pre-wrap; 5606 } 5607 5608 p { 5609 padding: 1em; 5610 } 5611 `]}isEditable(){return!!this.user&&(this.activity.deleted_by?this.user.is_admin||this.activity.deleted_by===this.user.email:this.user.email===this.activity.author||this.user.is_admin)}renderDeletedPreface(){return this.isEditable()&&this.activity.deleted_by?W`<div style="color: darkred"> 5612 [Deleted] (comment hidden for other users) 5613 </div>`:Y}formatEditMenu(){if(!this.isEditable())return Y;let e=W` <sl-menu-item 5614 @click="${()=>this.handleDelete(!1)}" 5615 >Delete Comment</sl-menu-item 5616 >`;return this.activity.deleted_by&&(e=W` <sl-menu-item @click="${()=>this.handleDelete(!0)}" 5617 >Undelete Comment</sl-menu-item 5618 >`),W` <sl-dropdown class="comment-menu-icon"> 5619 <sl-icon-button 5620 library="material" 5621 name="more_vert_24px" 5622 label="Comment menu" 5623 slot="trigger" 5624 ></sl-icon-button> 5625 <sl-menu>${e}</sl-menu> 5626 </sl-dropdown>`}render(){if(!this.activity)return Y;const e=this.renderDeletedPreface();return W` 5627 <div class="comment"> 5628 <div class="comment_header ${this.narrow?"narrow":""}"> 5629 ${this.formatEditMenu()} 5630 <span class="author">${this.activity.author}</span> 5631 <span class="preposition">on</span> 5632 <span class="date"> 5633 ${ih(this.activity.created,!0)} 5634 ${rh(this.activity.created)} 5635 </span> 5636 </div> 5637 <div id="amendments"> 5638 ${this.activity.amendments.map(e=>W` 5639 <chromedash-amendment .amendment=${e}></chromedash-amendment> 5640 `)} 5641 </div> 5642 <!-- prettier-ignore --> 5643 <div class="comment_body">${e}${jc(this.activity.content)}</div> 5644 </div> 5645 `}async handleDelete(e){let t;t=e?await window.csClient.undeleteComment(this.featureId,this.activity.comment_id):await window.csClient.deleteComment(this.featureId,this.activity.comment_id),t&&"Done"===t.message&&(this.activity.deleted_by=e?null:this.user.email,this.requestUpdate())}}Xh([Ve({type:Object})],Zh.prototype,"user",void 0),Xh([Ve({type:Number})],Zh.prototype,"featureId",void 0),Xh([Ve({type:Object})],Zh.prototype,"activity",void 0),Xh([Ve({type:Boolean})],Zh.prototype,"narrow",void 0),customElements.define("chromedash-activity",Zh);class eu extends ce{constructor(){super(...arguments),this.user=null,this.featureId=0,this.comments=[],this.narrow=!1,this.reverse=!1,this.loading=!1}static get styles(){return[...lo,c` 5646 p { 5647 padding: var(--content-padding); 5648 } 5649 `]}render(){if(this.loading)return W`<p>Loading...</p>`;if(void 0===this.comments||0===this.comments.length)return W`<p>No comments yet.</p>`;return(this.reverse?this.comments.slice(0).reverse():this.comments).map(e=>W` 5650 <chromedash-activity 5651 .user=${this.user} 5652 .featureId=${this.featureId} 5653 .narrow=${this.narrow} 5654 .activity=${e} 5655 > 5656 </chromedash-activity> 5657 `)}}Xh([Ve({type:Object})],eu.prototype,"user",void 0),Xh([Ve({type:Number})],eu.prototype,"featureId",void 0),Xh([Ve({type:Array})],eu.prototype,"comments",void 0),Xh([Ve({type:Boolean})],eu.prototype,"narrow",void 0),Xh([He()],eu.prototype,"reverse",void 0),Xh([He()],eu.prototype,"loading",void 0),customElements.define("chromedash-activity-log",eu);var tu=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let iu=class extends ce{constructor(){super(...arguments),this.commentAreaRef=ws(),this.featureId=0,this.comments=[],this.loading=!0,this.needsPost=!1,this.contextLink=""}static get styles(){return[...lo,c` 5658 .instructions { 5659 padding: var(--content-padding-half); 5660 margin-bottom: var(--content-padding-large); 5661 margin-left: 10px; 5662 } 5663 5664 #comment_area { 5665 margin: 0 var(--content-padding); 5666 } 5667 #header { 5668 margin-bottom: 10px; 5669 margin-left: 15px; 5670 } 5671 #controls { 5672 padding: var(--content-padding); 5673 text-align: right; 5674 display: flex; 5675 justify-content: space-between; 5676 align-items: center; 5677 } 5678 #controls * + * { 5679 padding-left: var(--content-padding); 5680 } 5681 `]}connectedCallback(){super.connectedCallback(),this.fetchComments()}fetchComments(){this.loading=!0,Promise.all([window.csClient.getComments(this.featureId,null)]).then(([e])=>{this.comments=e.comments,this.needsPost=!1,this.loading=!1}
5681).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}reloadComments(){this.commentAreaRef.value.value="",this.needsPost=!1,Promise.all([window.csClient.getComments(this.featureId,null)]).then(([e])=>{this.comments=e.comments}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}checkNeedsPost(){let e=!1;const t=this.commentAreaRef.value;""!=(t&&t.value.trim()||"")&&(e=!0),this.needsPost=e}handlePost(){const e=this.commentAreaRef.value.value.trim();""!=e&&window.csClient.postComment(this.featureId,null,e,0).then(()=>{this.reloadComments()}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}renderCommentsSkeleton(){return W` 5682 <h2>Comments</h2> 5683 <sl-skeleton effect="sheen"></sl-skeleton> 5684 `}renderControls(){if(!this.user||!this.user.can_comment)return Y;const e=W` 5685 <sl-button 5686 variant="primary" 5687 @click=${this.handlePost} 5688 ?disabled=${!this.needsPost} 5689 size="small" 5690 >Post</sl-button 5691 > 5692 `;return W` 5693 <sl-textarea 5694 id="comment_area" 5695 rows="2" 5696 cols="40" 5697 resize="auto" 5698 ${$s(this.commentAreaRef)} 5699 @sl-change=${this.checkNeedsPost} 5700 @keypress=${this.checkNeedsPost} 5701 placeholder="Add a comment" 5702 ></sl-textarea> 5703 <div class="instructions"> 5704 Comments will be visible publicly. Only reviewers will be notified when 5705 a comment is posted. 5706 </div> 5707 <div id="controls">${e}</div> 5708 `}renderComments(){return W` 5709 <div id="header"> 5710 <h2 id="breadcrumbs"> 5711 <a href="/feature/${this.featureId}"> 5712 <sl-icon name="arrow-left"></sl-icon> 5713 Comments & Activity 5714 </a> 5715 </h2> 5716 </div> 5717 ${this.renderControls()} 5718 <chromedash-activity-log 5719 .user=${this.user} 5720 .featureId=${this.featureId} 5721 .narrow=${!0} 5722 .reverse=${!0} 5723 .comments=${this.comments} 5724 > 5725 </chromedash-activity-log> 5726 `}render(){return W` 5727 ${this.loading?this.renderCommentsSkeleton():this.renderComments()} 5728 `}};tu([Ve({type:Object})],iu.prototype,"user",void 0),tu([Ve({type:Number})],iu.prototype,"featureId",void 0),tu([Ve({type:Array})],iu.prototype,"comments",void 0),tu([He()],iu.prototype,"loading",void 0),tu([Ve({type:Boolean})],iu.prototype,"needsPost",void 0),tu([Ve({type:String})],iu.prototype,"contextLink",void 0),iu=tu([Ue("chromedash-activity-page")],iu);var ru=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)},su=bu,ou=cu,au=function(e){return hu(cu(e))},nu=hu,lu=gu,du=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function cu(e){for(var t,i=[],r=0,s=0,o="";null!=(t=du.exec(e));){var a=t[0],n=t[1],l=t.index;if(o+=e.slice(s,l),s=l+a.length,n)o+=n[1];else{o&&(i.push(o),o="");var d=t[2],c=t[3],h=t[4],u=t[5],p=t[6],f=t[7],m="+"===p||"*"===p,g="?"===p||"*"===p,b=d||"/",v=h||u||(f?".*":"[^"+b+"]+?");i.push({name:c||r++,prefix:d||"",delimiter:b,optional:g,repeat:m,pattern:pu(v)})}}return s<e.length&&(o+=e.substr(s)),o&&i.push(o),i}function hu(e){for(var t=new Array(e.length),i=0;i<e.length;i++)"object"==typeof e[i]&&(t[i]=new RegExp("^"+e[i].pattern+"$"));return function(i){for(var r="",s=i||{},o=0;o<e.length;o++){var a=e[o];if("string"!=typeof a){var n,l=s[a.name];if(null==l){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to be defined')}if(ru(l)){if(!a.repeat)throw new TypeError('Expected "'+a.name+'" to not repeat, but received "'+l+'"');if(0===l.length){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to not be empty')}for(var d=0;d<l.length;d++){if(n=encodeURIComponent(l[d]),!t[o].test(n))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but received "'+n+'"');r+=(0===d?a.prefix:a.delimiter)+n}}else{if(n=encodeURIComponent(l),!t[o].test(n))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but received "'+n+'"');r+=a.prefix+n}}else r+=a}return r}}function uu(e){return e.replace(/([.+*?=^!:${}()[\]|\/])/g,"\\$1")}function pu(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function fu(e,t){return e.keys=t,e}function mu(e){return e.sensitive?"":"i"}function gu(e,t){for(var i=(t=t||{}).strict,r=!1!==t.end,s="",o=e[e.length-1],a="string"==typeof o&&/\/$/.test(o),n=0;n<e.length;n++){var l=e[n];if("string"==typeof l)s+=uu(l);else{var d=uu(l.prefix),c=l.pattern;l.repeat&&(c+="(?:"+d+c+")*"),s+=c=l.optional?d?"(?:"+d+"("+c+"))?":"("+c+")?":d+"("+c+")"}}
5728return i||(s=(a?s.slice(0,-2):s)+"(?:\\/(?=$))?"),s+=r?"$":i&&a?"":"(?=\\/|$)",new RegExp("^"+s,mu(t))}function bu(e,t,i){return ru(t=t||[])?i||(i={}):(i=t,t=[]),e instanceof RegExp?function(e,t){var i=e.source.match(/\((?!\?)/g);if(i)for(var r=0;r<i.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return fu(e,t)}(e,t):ru(e)?function(e,t,i){for(var r=[],s=0;s<e.length;s++)r.push(bu(e[s],t,i).source);return fu(new RegExp("(?:"+r.join("|")+")",mu(i)),t)}(e,t,i):function(e,t,i){for(var r=cu(e),s=gu(r,i),o=0;o<r.length;o++)"string"!=typeof r[o]&&t.push(r[o]);return fu(s,t)}(e,t,i)}su.parse=ou,su.compile=au,su.tokensToFunction=nu,su.tokensToRegExp=lu;var vu,yu="undefined"!=typeof document,_u="undefined"!=typeof window,wu="undefined"!=typeof history,ku="undefined"!=typeof process,xu=yu&&document.ontouchstart?"touchstart":"click",$u=_u&&!(!window.history.location&&!window.location);function Su(){this.callbacks=[],this.exits=[],this.current="",this.len=0,this._decodeURLComponents=!0,this._base="",this._strict=!1,this._running=!1,this._hashbang=!1,this.clickHandler=this.clickHandler.bind(this),this._onpopstate=this._onpopstate.bind(this)}function Cu(e,t){if("function"==typeof e)return Cu.call(this,"*",e);if("function"==typeof t)for(var i=new Tu(e,null,this),r=1;r<arguments.length;++r)this.callbacks.push(i.middleware(arguments[r]));else"string"==typeof e?this["string"==typeof t?"redirect":"show"](e,t):this.start(e)}function Eu(e){if(!e.handled){var t=this,i=t._window;(t._hashbang?$u&&this._getBase()+i.location.hash.replace("#!",""):$u&&i.location.pathname+i.location.search)!==e.canonicalPath&&(t.stop(),e.handled=!1,$u&&(i.location.href=e.canonicalPath))}}function Iu(e,t,i){var r=this.page=i||Cu,s=r._window,o=r._hashbang,a=r._getBase();"/"===e[0]&&0!==e.indexOf(a)&&(e=a+(o?"#!":"")+e);var n=e.indexOf("?");this.canonicalPath=e;var l=new RegExp("^"+function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}(a));if(this.path=e.replace(l,"")||"/",o&&(this.path=this.path.replace("#!","")||"/"),this.title=yu&&s.document.title,this.state=t||{},this.state.path=e,this.querystring=~n?r._decodeURLEncodedURIComponent(e.slice(n+1)):"",this.pathname=r._decodeURLEncodedURIComponent(~n?e.slice(0,n):e),this.params={},this.hash="",!o){if(!~this.path.indexOf("#"))return;var d=this.path.split("#");this.path=this.pathname=d[0],this.hash=r._decodeURLEncodedURIComponent(d[1])||"",this.querystring=this.querystring.split("#")[0]}}function Tu(e,t,i){var r=this.page=i||Au,s=t||{};s.strict=s.strict||r._strict,this.path="*"===e?"(.*)":e,this.method="GET",this.regexp=su(this.path,this.keys=[],s)}Su.prototype.configure=function(e){var t=e||{};this._window=t.window||_u&&window,this._decodeURLComponents=!1!==t.decode
5728URLComponents,this._popstate=!1!==t.popstate&&_u,this._click=!1!==t.click&&yu,this._hashbang=!!t.hashbang;var i=this._window;this._popstate?i.addEventListener("popstate",this._onpopstate,!1):_u&&i.removeEventListener("popstate",this._onpopstate,!1),this._click?i.document.addEventListener(xu,this.clickHandler,!1):yu&&i.document.removeEventListener(xu,this.clickHandler,!1),this._hashbang&&_u&&!wu?i.addEventListener("hashchange",this._onpopstate,!1):_u&&i.removeEventListener("hashchange",this._onpopstate,!1)},Su.prototype.base=function(e){if(0===arguments.length)return this._base;this._base=e},Su.prototype._getBase=function(){var e=this._base;if(e)return e;var t=_u&&this._window&&this._window.location;return _u&&this._hashbang&&t&&"file:"===t.protocol&&(e=t.pathname),e},Su.prototype.strict=function(e){if(0===arguments.length)return this._strict;this._strict=e},Su.prototype.start=function(e){var t=e||{};if(this.configure(t),!1!==t.dispatch){var i;if(this._running=!0,$u){var r=this._window.location;i=this._hashbang&&~r.hash.indexOf("#!")?r.hash.substr(2)+r.search:this._hashbang?r.search+r.hash:r.pathname+r.search+r.hash}this.replace(i,null,!0,t.dispatch)}},Su.prototype.stop=function(){if(this._running){this.current="",this.len=0,this._running=!1;var e=this._window;this._click&&e.document.removeEventListener(xu,this.clickHandler,!1),_u&&e.removeEventListener("popstate",this._onpopstate,!1),_u&&e.removeEventListener("hashchange",this._onpopstate,!1)}},Su.prototype.show=function(e,t,i,r){var s=new Iu(e,t,this),o=this.prevContext;return this.prevContext=s,this.current=s.path,!1!==i&&this.dispatch(s,o),!1!==s.handled&&!1!==r&&s.pushState(),s},Su.prototype.back=function(e,t){var i=this;if(this.len>0){var r=this._window;wu&&r.history.back(),this.len--}else e?setTimeout(function(){i.show(e,t)}):setTimeout(function(){i.show(i._getBase(),t)})},Su.prototype.redirect=function(e,t){var i=this;"string"==typeof e&&"string"==typeof t&&Cu.call(this,e,function(e){setTimeout(function(){i.replace(t)},0)}),"string"==typeof e&&void 0===t&&setTimeout(function(){i.replace(e)},0)},Su.prototype.replace=function(e,t,i,r){var s=new Iu(e,t,this),o=this.prevContext;return this.prevContext=s,this.current=s.path,s.init=i,s.save(),!1!==r&&this.dispatch(s,o),s},Su.prototype.dispatch=function(e,t){var i=0,r=0,s=this;function o(){var t=s.callbacks[i++];if(e.path===s.current)return t?void t(e,o):Eu.call(s,e);e.handled=!1}t?function e(){var i=s.exits[r++];if(!i)return o();i(t,e)}():o()},Su.prototype.exit=function(e,t){if("function"==typeof e)return this.exit("*",e);for(var i=new Tu(e,null,this),r=1;r<arguments.length;++r)this.exits.push(i.middleware(arguments[r]))},Su.prototype.clickHandler=function(e){if(1===this._which(e)&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){var t=e.target,i=e.path||(e.composedPath?e.composedPath():null);if(i)for(var r=0;r<i.length;r++)if(i[r].nodeName&&"A"===i[r].nodeName.toUpperCase()&&i[r].href){t=i[r];break}for(;t&&"A"!==t.nodeName.toUpperCase();)t=t.parentNode;if(t&&"A"===t.nodeName.toUpperCase()){var s="object"==typeof t.href&&"SVGAnimatedString"===t.href.constructor.name;if(!t.hasAttribute("download")&&"external"!==t.getAttribute("rel")){var o=t.getAttribute("href");if((this._hashbang||!this._samePath(t)||!t.hash&&"#"!==o)&&!(o&&o.indexOf("mailto:")>-1)&&!(s?t.target.baseVal:t.target)&&(s||this.sameOrigin(t.href))){var a=s?t.href.baseVal:t.pathname+t.search+(t.hash||"");a="/"!==a[0]?"/"+a:a,ku&&a.match(/^\/[a-zA-Z]:\//)&&(a=a.replace(/^\/[a-zA-Z]:\//,"/"));var n=a,l=this._getBase();0===a.indexOf(l)&&(a=a.substr(l.length)),this._hashbang&&(a=a.replace("#!","")),(!l||n!==a||$u&&"file:"===this._window.location.protocol)&&(e.preventDefault(),this.show(n))}}}}},Su.prototype._onpopstate=(vu=!1,_u?(yu&&"complete"===document.readyState?vu=!0:window.addEventListener("load",function(){setTimeout(function(){vu=!0},0)}),function(e){if(vu){var t=this;if(e.state){var i=e.state.path;t.replace(i,e.state)}else if($u){var r=t._window.location;t.show(r.pathname+r.search+r.hash,void 0,void 0,!1)}}}):function(){}),Su.prototype._which=function(e){return null==(e=e||_u&&this._window.event).which?e.button:e.which},Su.prototype._toURL=function(e){var t=this._window;if("function"==typeof URL&&$u)return new URL(e,t.location.toString());if(yu){var i=t.document.createElement("a");return i.href=e,i}},Su.prototype.sameOrigin=function(e){if(!e||!$u)return!1;var t=this._toURL(e),i=this._window.location;return i.protocol===t.protocol&&i.hostname===t.hostname&&(i.port===t.port||""===i.port&&(80==t.port||443==t.port))},Su.prototype._samePath=function(e){if(!$u)return!1;var t=this._window.location;return e.pathname===t.pathname&&e.search===t.search},Su.prototype._decodeURLEncodedURIComponent=function(e){return"string"!=typeof e?e:this._decodeURLComponents?decodeURIComponent(e.replace(/\+/g," ")):e},Iu.prototype.pushState=function(){var e=this.page,t=e._window,i=e._hashbang;e.len++,wu&&t.history.pushState(this.state,this.title,i&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},Iu.prototype.save=function(){var e=this.page;wu&&e._window.history.replaceState(this.state,this.title,e._hashbang&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},Tu.prototype.middleware=function(e){var t=this;return function(i,r){if(t.match(i.path,i.params))return i.routePath=t.path,e(i,r);r()}},Tu.prototype.match=function(e,t){var i=this.keys,r=e.indexOf("?"),s=~r?e.slice(0,r):e,o=this.regexp.exec(decodeURIComponent(s));if(!o)return!1;delete t[0];for(var a=1,n=o.length;a<n;++a){var l=i[a-1],d=this.page._decodeURLEncodedURIComponent(o[a]);void 0===d&&hasOwnProperty.call(t,l.name)||(t[l.name]=d)}return!0};var Au=function e(){var t=new Su;function i(){return Cu.apply(t,arguments)}return i.callbacks=t.callbacks,i.exits=t.exits,i.base=t.base.bind(t),i.strict=t.strict.bind(t),i.start=t.start.bind(t),i.stop=t.stop.bind(t),i.show=t.show.bind(t),i.back=t.back.bind(t),i.redirect=t.redirect.bind(t),i.replace=t.replace.b
5728ind(t),i.dispatch=t.dispatch.bind(t),i.exit=t.exit.bind(t),i.configure=t.configure.bind(t),i.sameOrigin=t.sameOrigin.bind(t),i.clickHandler=t.clickHandler.bind(t),i.create=e,Object.defineProperty(i,"len",{get:function(){return t.len},set:function(e){t.len=e}}),Object.defineProperty(i,"current",{get:function(){return t.current},set:function(e){t.current=e}}),i.Context=Iu,i.Route=Tu,i}(),Ru=Au,Pu=Au;Ru.default=Pu;var Du=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Ou=class extends ce{constructor(){super(...arguments),this.currentPage="",this.devMode="False",this.googleSignInClientId="",this.defaultOpen=!1,this.loading=!1}static get styles(){return[...lo,c` 5729 :host { 5730 --nav-link-color: var(--sl-color-neutral-700); 5731 --nav-link-font-size: 16px; 5732 --nav-link-hover-background: var(--sl-color-neutral-100); 5733 --nav-link-active-color: var(--sl-color-primary-900); 5734 --nav-link-active-background: var(--light-accent-color); 5735 } 5736 nav { 5737 display: flex; 5738 flex: 1; 5739 align-items: baseline; 5740 user-select: none; 5741 background: var(--card-background); 5742 border: none; 5743 align-items: center; 5744 margin: 0 var(--content-padding-half); 5745 -webkit-font-smoothing: initial; 5746 } 5747 nav a { 5748 text-decoration: none !important; 5749 cursor: pointer; 5750 font-size: var(--nav-link-font-size); 5751 text-align: left; 5752 padding: var(--content-padding-half); 5753 color: var(--nav-link-color); 5754 white-space: nowrap; 5755 border-radius: var(--pill-border-radius); 5756 } 5757 nav a:hover { 5758 color: black; 5759 background: var(--nav-link-hover-background); 5760 } 5761 nav a.disabled { 5762 opacity: 0.5; 5763 pointer-events: none; 5764 } 5765 nav [active] { 5766 color: var(--nav-link-active-color); 5767 background: var(--nav-link-active-background); 5768 } 5769 nav [active]:hover { 5770 background: var(--sl-color-neutral-100); 5771 } 5772 hr { 5773 margin: 15px var(--content-padding-half); 5774 } 5775 5776 .section-header { 5777 margin: 0px var(--content-padding-half) 10px; 5778 font-weight: bold; 5779 } 5780 sl-drawer a { 5781 display: flex; 5782 align-items: center; 5783 justify-content: space-between; 5784 gap: var(--content-padding-half); 5785 } 5786 sl-drawer::part(header) { 5787 display: none; 5788 } 5789 sl-button { 5790 margin-left: 10px; 5791 } 5792 @media only screen and (max-width: 700px) { 5793 header { 5794 --logoSize: 24px; 5795 5796 margin: 0; 5797 display: block; 5798 } 5799 sl-drawer a { 5800 display: block; 5801 } 5802 sl-drawer::part(header) { 5803 display: none; 5804 } 5805 } 5806 `]}connectedCallback(){super.connectedCallback(),this.user&&this.user.email||(this.loading=!0,window.csClient.getPermissions().then(e=>{this.user=e,!this.user&&Bc()&&(window.isPlaywright||this.initializeGoogleSignIn(),"True"==this.devMode&&this.initializeTestingSignIn())}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")}).finally(()=>{this.loading=!1}))}initializeGoogleSignIn(){google.accounts.id.initialize({client_id:this.googleSignInClientId,callback:this.handleCredentialResponse}),google.accounts.id.prompt();const e=document.createElement("div");google.accounts.id.renderButton(e,{type:"standard"}),this.insertAdjacentElement("afterbegin",e)}initializeTestingSignIn(){const e=document.createElement("button");e.innerText="Sign in as [email protected]",e.setAttribute("type","button"),e.setAttribute("data-testid","dev-mode-sign-in-button"),e.setAttribute("style","position:fixed;
5806 right:0; z-index:1000; background: lightblue; border: 1px solid blue;"),e.addEventListener("click",()=>{fetch("/dev/mock_login",{method:"POST"}).then(e=>{if(!e.ok)throw new Error(`Sign in failed! Response: ${e.status}`)}).then(()=>{const e=window.location.href.split("?")[0];window.location.href=e}).catch(e=>{console.error("Sign in failed.",e)})});const t=document.querySelector("body");t&&t.insertAdjacentElement("afterbegin",e)}handleCredentialResponse(e){window.csClient.signIn(e).then(()=>{setTimeout(()=>{const e=window.location.href.split("?")[0];window.location.href=e},1e3)}).catch(()=>{console.error("Sign in failed, so signing out to allow retry"),this.signOut()})}handleSignOutClick(e){e.preventDefault(),this.signOut()}signOut(){window.csClient.signOut().then(()=>{window.location.reload()})}userCanApprove(){return this.user&&(this.user.is_admin||this.user.approvable_gate_types?.length>0)}isCurrentPage(e){return this.currentPage===e||this.currentPage.startsWith(e+"/")}toggleDrawerActions(){const e=this.shadowRoot.querySelector(".drawer-placement-start");return e.open?e.hide():e.show(),e.open}renderNavItem(e,t,i=Y){return W`<a href="${e}" ?active=${this.isCurrentPage(e)}> 5807 <span>${t}</span> 5808 ${i} 5809 </a>`}renderDrawer(){let e=Y;Bc()&&!this.loading&&(e=this.renderAccountMenu());const t=this.renderMyFeaturesMenu(),i=this.renderAdminMenu(),r=new Date,s=r.getFullYear(),o=this.renderNavItem("/features?q=shipping_year:"+s,"Shipping "+s),a=s+1;let n=this.renderNavItem("/features?q=shipping_year:"+a,"Shipping "+a);return r.getMonth()<8&&(n=W``),W` 5810 <sl-drawer 5811 label="Menu" 5812 placement="start" 5813 class="drawer-placement-start" 5814 style="--size: ${Bc()?250:200}px;" 5815 contained 5816 noHeader 5817 ?open=${!Bc()&&this.defaultOpen} 5818 > 5819 ${e} ${this.renderNavItem("/roadmap","Roadmap")} 5820 ${this.renderNavItem("/release-notes","Release notes",W` 5821 <sl-tooltip content="Preview" distance="8"> 5822 <sl-icon name="info-circle" aria-hidden="true"></sl-icon> 5823 </sl-tooltip> 5824 `)} 5825 ${this.renderNavItem("/features","All features")} ${o} 5826 ${n} ${t} 5827 <hr /> 5828 <div class="section-header">Stats</div> 5829 ${this.renderNavItem("/metrics/css/popularity","CSS")} 5830 ${this.renderNavItem("/metrics/css/animated","CSS Animation")} 5831 ${this.renderNavItem("/metrics/feature/popularity","JS/HTML")} 5832 ${this.renderNavItem("/metrics/webfeature/popularity","Web Features")} 5833 <hr /> 5834 <div class="section-header">Reports</div> 5835 ${this.renderNavItem("/reports/spec_mentors","Spec Mentors")} 5836 ${this.renderNavItem("/reports/external_reviews","External Reviews")} 5837 ${i} 5838 </sl-drawer> 5839 `}renderAccountMenu(){return this.user?W` 5840 <div class="section-header">${this.user.email}</div> 5841 <a href="/settings">Settings</a> 5842 <a 5843 href="#" 5844 id="sign-out-link" 5845 data-testid="sign-out-link" 5846 @click=${this.handleSignOutClick} 5847 >Sign out</a 5848 > 5849 ${this.user.can_create_feature&&!this.isCurrentPage("/guide/new")?W` 5850 <sl-button 5851 data-testid="create-feature-button" 5852 href="/guide/new" 5853 variant="primary" 5854 size="small" 5855 > 5856 Create feature 5857 </sl-button> 5858 `:Y} 5859 <hr /> 5860 `:W`<slot></slot>`}renderMyFeaturesMenu(){return this.user?.email?W` 5861 <hr /> 5862 <div class="section-header">My features</div> 5863 ${this.userCanApprove()?this.renderNavItem("/myfeatures/review","Pending review"):Y} 5864 ${this.renderNavItem("/myfeatures/starred","Starred")} 5865 ${this.renderNavItem("/myfeatures/editable","Owner / editor")} 5866 `:Y}renderAdminMenu(){return this.user?.is_admin?W` 5867 <hr /> 5868 <div class="section-header">Admin</div> 5869 ${this.renderNavItem("/admin/users/new","Users")} 5870 ${this.renderNavItem("/admin/ot_requests","OT requests")} 5871 ${this.renderNavItem("/admin/bulk_edit","Bulk edit")} 5872 ${this.renderNavItem("/admin/feature_links","Feature links")} 5873 ${this.renderNavItem("/reports/feature-latency","Feature latency")} 5874 ${this.renderNavItem("/reports/review-latency","Review latency")} 5875 ${this.renderNavItem("/admin/blink","Subscriptions")} 5876 ${this.renderNavItem("/admin/find_stop_words","Find stop w
5876ords JSON")} 5877 ${this.renderNavItem("/features/stale","Stale features")} 5878 `:Y}render(){return W` <nav>${this.renderDrawer()}</nav> `}};Du([Ve({type:String})],Ou.prototype,"currentPage",void 0),Du([Ve({type:String})],Ou.prototype,"devMode",void 0),Du([Ve({type:String})],Ou.prototype,"googleSignInClientId",void 0),Du([Ve({type:Boolean})],Ou.prototype,"defaultOpen",void 0),Du([He()],Ou.prototype,"user",void 0),Du([He()],Ou.prototype,"loading",void 0),Ou=Du([Ue("chromedash-drawer")],Ou);var zu=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Lu=class extends ce{constructor(){super(...arguments),this.gateColumnRef=ws(),this.paired_user=void 0,this.appTitle="",this.googleSignInClientId="",this.devMode="",this.bannerMessage="",this.bannerTime=null,this.loading=!0,this.currentPage="",this.pageComponent=null,this.contextLink="/features",this.sidebarHidden=!0,this.selectedGateId=0,this.beforeUnloadHandler=null,this.drawerOpen=!Bc()}static get styles(){return[...lo,c` 5879 .main-toolbar { 5880 display: flex; 5881 position: relative; 5882 padding: 0; 5883 } 5884 .main-toolbar .toolbar-content { 5885 width: 100%; 5886 } 5887 5888 #rollout { 5889 width: 100%; 5890 text-align: center; 5891 padding: 1em; 5892 color: black; 5893 background: lightgrey; 5894 } 5895 5896 #app-content-container { 5897 display: flex; 5898 flex-direction: column; 5899 height: 100%; 5900 } 5901 5902 #content { 5903 margin: 0; 5904 position: relative; 5905 flex: 1; 5906 } 5907 5908 #content-flex-wrapper { 5909 display: flex; 5910 justify-content: center; 5911 width: 100%; 5912 } 5913 5914 #content-component-wrapper { 5915 width: var(--max-content-width); 5916 max-width: 95%; 5917 } 5918 #content-component-wrapper[wide] { 5919 width: 100%; 5920 } 5921 5922 #content-sidebar-space { 5923 position: sticky; 5924 flex-shrink: 100; 5925 width: var(--sidebar-space); 5926 } 5927 5928 #sidebar { 5929 position: absolute; 5930 top: 0; 5931 right: 0; 5932 width: var(--sidebar-width); 5933 max-width: var(--sidebar-max-width); 5934 bottom: 0; 5935 } 5936 #sidebar[hidden] { 5937 display: none; 5938 } 5939 #sidebar-content { 5940 position: sticky; 5941 top: 10px; 5942 height: 85vh; 5943 overflow-y: auto; 5944 border: var(--sidebar-border); 5945 border-radius: var(--sidebar-radius); 5946 background: var(--sidebar-bg); 5947 padding: var(--content-padding); 5948 } 5949 5950 @media only screen and (max-width: 700px) { 5951 #content { 5952 margin-left: 0; 5953 margin-right: 0; 5954 } 5955 } 5956 `]}firstUpdated(){const e=document.createElement("chromedash-toast");document.body.appendChild(e)}connectedCallback(){super.connectedCallback(),this.loading=!0,window.csClient.getPermissions().then(e=>{this.user=e}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")}).finally(()=>{this.setUpRoutes(),this.loading=!1})}fetchPairedUser(){void 0!==this.paired_user&&this.pageComponent?this.pageComponent.paired_user=this.paired_user:window.csClient.getPermissions(!0).then(e=>{this.paired_user=e,this.pageComponent&&(this.pageComponent.paired_user=e)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}removeBeforeUnloadHandler(){this.beforeUnloadHandler&&(window.removeEventListener("beforeunload",this.beforeUnloadHandler),this.beforeUnloadHandler=null)}addBeforeUnloadHandler(){this.removeBeforeUnloadHandler(),this.beforeUnloadHandler=e=>{this.getUnsavedChanges()&&(e.preventDefault(),e.returnValue="You made changes that have not been saved.\n Are you sure you want to leave?")},window.addEventListener("beforeunload",this.beforeUnloadHandler)}getUnsavedChanges(){if(this.pageComponent)return this.pageComponent.unsavedChanges}setUnsavedChanges(e){this.pageComponent&&(this.pageComponent.unsavedChanges=e)}handleFormSubmit(){const e=this.pageComponent,t=this.pageComponent.unsavedChanges;this.setUnsavedChanges(!1),this.removeBeforeUnloadHandler(),window.setTimeout(()=>{this.pageComponent==e&&this.getUnsavedChanges()&&(this.setUnsavedChanges(t),this.addBeforeUnloadHandler())},1e3)}setupNewPage(e,t,i=!1,r=!0){if(this.currentPage==e.path&&e.hash)return window.scrollToElement&&window.scrollToElement(`#${e.hash}`),!1;if(this.pageComponent&&this.getUnsavedChanges()&&!confirm("You will lose unsaved changes. Proceed anyway?"))return e.handled=!1,!1;const s=e.querystring.search("loginStatus=False")>-1;return this.pageComponent=document.createElement(s?"chromedash-login-required-page":t),this.setUnsavedChanges(!1),this.removeBeforeUnloadHandler(),this.pageComponent.allFormFieldComponentsList=[],window.setTimeout(()=>{const e=this.pageComponent.shadowRoot?.querySelector("form");e&&(this.addBeforeUnloadHandler(),this.pageComponent.addEventListener("sl-change",()=>{this.setUnsavedChanges(!0)}),e.addEventListener("submit",()=>{this.handleFormSubmit()}))},1e3),this.pageComponent.contextLink=this.contextLink,i&&(this.contextLink=e.path),this.currentPage=e.path,r&&this.hideSidebar(),!0}setUpRoutes(){Ru.strict(!0),Ru("/",()=>Ru.redirect("/roadmap")),Ru("/roadmap",e=>{this.setupNewPage(e,"chromedash-roadmap-page",!0)&&(this.pageComponent.user=this.user)}),Ru("/myfeatures",()=>Ru.redirect("/myfeatures/editable")),Ru("/myfeatures/",()=>Ru.redirect("/myfeatures/editable")),Ru("/myfeatures/review",e=>{this.setupNewPage(e,"chromedash-all-features-page",!0)&&(this.pageComponent.user=this.user,this.pageComponent.title="Features pending my review",this.pageComponent.query="pending-approval-by:me",this.pageComponent.columns="approvals",this.pageComponent.sortSpec="gate.requested_on",this.pageComponent.showEnterprise=!0,this.pageComponent.showQuery=!1,this.pageComponent.rawQuery=oh(e.querystring))}),Ru("/myfeatures/starred",e=>{this.setupNewPage(e,"chromedash-all-features-page",!0)&&(this.pageComponent.user=this.user,this.pageComponent.title="Features I starred",this.pageComponent.query="starred-by:me",this.pageComponent.showEnterprise=!0,this.pageComponent.showQuery=!1,this.pageComponent.rawQuery=oh(e.querystring))}),Ru("/myfeatures/editable",e=>{this.setupNewPage(e,"chromedash-all-features-page",!0)&&(this.pageComponent.user=this.user,this.pageComponent.title="Features I can edit",this.pageComponent.query="can_edit:me",this.pageComponent.showEnterprise=!0,this.pageComponent.showQuery=!1,this.pageComponent.rawQuery=oh(e.querystring))}),Ru("/features",e=>{this.setupNewPage(e,"chromedash-all-features-page",!0)&&(this.pageComponent.user=this.user,this.pageComponent.rawQuery=oh(e.querystring),this.pageComponent.isNewfeaturesPage=!0,this.pageComponent.addEventListener("search",this.handleSearchQuery.bind(this)))}),Ru("/feature/:featureId(\\d+)",e=>{this.setupNewPage(e,"chromedash-feature-page",!0,!1)&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.user=this.user,this.fetchPairedUser(),this.pageComponent.selectedGateId=this.selectedGateId,this.pageComponent.appTitle=this.appTitle,this.pageComponent.featureId!=this.gateColumnRef.value?.feature?.id&&this.hideSidebar())}),Ru("/feature/:featureId(\\d+)/activity",e=>{this.setupNewPage(e,"chromedash-activity-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.user=this.user)}),Ru("/feature/:featureId(\\d+)/ai-coverage-analysis",e=>{this.setupNewPage(e,"chromedash-wpt-eval-page",!0,!1)&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.user=this.user,this.pageComponent.appTitle=this.appTitle)}),Ru("/feature/:featureId(\\d+)/ai-coverage-evaluation",e=>{this.setupNewPage(e,"chromedash-wpt-eval-page",!0,!1)&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.user=this.user,this.pageComponent.appTitle=this.appTitle)}),Ru("/guide/new",e=>{this.setupNewPage(e,"chromedash-guide-new-page")&&-1==e.querystring.search("loginStatus=False")&&(this.pageComponent.userEmail=this.user.email)}),Ru("/guide/enterprise/new",e=>{this.setupNewPage(e,"chromedash-guide-new-page")&&(-1==e.querystring.search("loginStatus=False")&&(this.pageComponent.userEmail=this.user.email),this.pageComponent.isEnterpriseFeature=!0)}),Ru("/guide/editall/:featureId(\\d+)",e=>{this.setupNewPage(e,"chromedash-guide-editall-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.user=this.user,this.pageComponent.appTitle=this.appTitle)}),Ru("/guide/verify_accuracy/:featureId(\\d+)",e=>{this.setupNewPage(e,"chromedash-guide-verify-accuracy-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.appTitle=this.appTitle)}),Ru("/guide/stage/:featureId(\\d+)/:stageId(\\d+)",e=>{this.setupNewPage(e,"chromedash-guide-stage-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.stageId=parseInt(e.params.stageId),this.pageComponent.appTitle=this.appTitle)}),Ru("/guide/stage/:featureId(\\d+)/:intentStage(\\d+)/:stageId(\\d+)",e=>{this.setupNewPage(e,"chromedash-guide-stage-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.stageId=parseInt(e.params.stageId),this.pageComponent.appTitle=this.appTitle)}),Ru("/feature/:featureId(\\d+)/gate/:gateId(\\d+/intent)",e=>{this.setupNewPage(e,"chromedash-intent-preview-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.gateId=parseInt(e.params.gateId),this.pageComponent.appTitle=this.appTitle,this.hideSidebar())}),Ru("/feature/:featureId(\\d+)/stage/:stageId(\\d+/intent)",e=>{this.setupNewPage(e,"chromedash-intent-preview-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.stageId=parseInt(e.params.stageId),this.pageComponent.appTitle=this.appTitle,this.hideSidebar())}),Ru("/ot_creation_request/:featureId(\\d+)/:stageId(\\d+)",e=>{this.setupNewPage(e,"chromedash-ot-creation-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.stageId=parseInt(e.params.stageId),this.pageComponent.appTitle=this.appTitle,this.pageComponent.userEmail=this.user.email)}),Ru("/ot_extension_request/:featureId(\\d+)/:stageId(\\d+)",e=>{this.setupNewPage(e,"chromedash-ot-extension-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.stageId=parseInt(e.params.stageId),this.pageComponent.appTitle=this.appTitle,this.pageComponent.userEmail=this.user.email)}),Ru("/guide/stage/:featureId(\\d+)/metadata",e=>{this.setupNewPage(e,"chromedash-guide-metadata-page")&&(this.pageComponent.featureId=parseInt(e.params.featureId),this.pageComponent.appTitle=this.appTitle)}),Ru("/settings",e=>{this.setupNewPage(e,"chromedash-settings-page")}),Ru("/metrics/:type/:view",e=>{this.setupNewPage(e,"chromedash-stack-rank-page")&&(this.pageComponent.type=e.params.type,this.pageComponent.view=e.params.view)}),Ru("/metrics/:type/timeline/:view/:bucketId",e=>{this.setupNewPage(e,"chromedash-timeline-page")&&(this.pageComponent.type=e.params.type,this.pageComponent.view=e.params.view,this.pageComponent.selectedBucketId=e.params.bucketId)}),Ru("/features/stale",e=>{this.setupNewPage(e,"chromedash-stale-features-page")}),Ru("/metrics",()=>Ru.redirect("/metrics/css/popularity")),Ru("/metrics/css",()=>Ru.redirect("/metrics/css/popularity")),Ru("/metrics/css/timeline/popularity",()=>Ru.redirect("/metrics/css/popularity")),Ru("/metrics/css/timeline/animated",()=>Ru.redirect("/metrics/css/animated")),Ru("/metrics/feature/timeline/popularity",()=>Ru.redirect("/metrics/feature/popularity")),Ru("/metrics/webfeature/timeline/popularity",()=>Ru.redirect("/metrics/webfeature/popularity")),Ru("/reports/external_reviews",e=>{this.setupNewPage(e,"chromedash-report-external-reviews-dispatch-page")}),Ru("/reports/external_reviews/:reviewer",e=>{["tag","gecko","webkit"].includes(e.params.reviewer)?this.setupNewPage(e,"chromedash-report-external-reviews-page")&&(this.pageComponent.reviewer=e.params.reviewer):Ru.redirect("/reports/external_reviews")}),Ru("/reports/spec_mentors",e=>{this.setupNewPage(e,"chromedash-report-spec-mentors-page")&&(this.pageComponent.rawQuery=oh(e.querystring),this.pageComponent.addEventListener("afterchanged",e=>lh("after",sh(e.detail.after))))}),Ru("/reports/feature-latency",e=>{this.setupNewPage(e,"chromedash-report-feature-latency-page")&&(this.pageComponent.rawQuery=oh(e.querystring),this.pageComponent.addEventListener("afterchanged",e=>lh("after",sh(e.detail.after))))}),Ru("/reports/review-latency",e=>{this.setupNewPage(e,"chromedash-report-review-latency-page")}),Ru("/enterprise",e=>{this.setupNewPage(e,"chromedash-enterprise-page",!0)&&(this.pageComponent.user=this.user)}),Ru("/admin/blink",e=>{this.pageComponent=document.createElement("chromedash-admin-blink-page"),this.pageComponent.user=this.user,this.currentPage=e.path,this.hideSidebar()}),Ru("/admin/feature_links",e=>{this.setupNewPage(e,"chromedash-admin-feature-links-page")&&(this.pageComponent.user=this.user)}),Ru("/admin/bulk_edit",e=>{this.pageComponent=document.createElement("chromedash-bulk-edit-page"),this.pageComponent.user=this.user,this.currentPage=e.path}),Ru("/enterprise/releasenotes",e=>{this.setupNewPage(e,"chromedash-enterprise-release-notes-page",!0)&&(this.pageComponent.user=this.user)}),Ru.start()}handleSearchQuery(e){lh("q",e.detail.query),function(e){const t=oh(window.location.search);delete t[e];const i=ah(t,window.location);i.hash="",i.toString()!==window.location.toString()&&window.history.pushState({path:i.toString()},"",i)}("start")}showSidebar(){this.sidebarHidden=!1}hideSidebar(){this.sidebarHidden=!0,this.selectedGateId=0,this.pageComponent.selectedGateId=0}showGateColumn(e,t,i){this.gateColumnRef.value?.setContext(e,t,i),this.selectedGateId=i.id,this.pageComponent.selectedGateId=i.id,this.showSidebar()}handleShowGateColumn(e){this.showGateColumn(e.detail.feature,e.detail.stage.id,e.detail.gate)}handleShowDrawer(){const e=this.renderRoot.querySelector("chromedash-drawer");this.drawerOpen=e.toggleDrawerActions()}refetch(){this.pageComponent?.refetch&&this.pageComponent.refetch(),this.gateColumnRef.value?.refetch&&this.gateColumnRef.value.refetch()}renderContentAndSidebar(){return this.pageComponent&&"CHROMEDASH-ROADMAP-PAGE"==this.pageComponent.tagName?W` 5957 <div id="content-component-wrapper" wide>${this.pageComponent}</div> 5958 `:W` 5959 <div 5960 id="content-component-wrapper" 5961 @show-gate-column=${this.handleShowGateColumn} 5962 @refetch-needed=${this.refetch} 5963 > 5964 ${this.pageComponent} 5965 </div> 5966 <div id="content-sidebar-space"> 5967 <div id="sidebar" ?hidden=${this.sidebarHidden}> 5968 <div id="sidebar-content"> 5969 <chromedash-gate-column 5970 .user=${this.user} 5971 ${$s(this.gateColumnRef)} 5972 @close=${this.hideSidebar} 5973 @refetch-needed=${this.refetch} 5974 > 5975 </chromedash-gate-column> 5976 </div> 5977 </div> 5978 </div> 5979 `}renderRolloutBanner(e){return Y}render(){let e={"margin-left":"20px"};
5979return!Bc()&&this.drawerOpen&&(e={"margin-left":"210px"}),this.loading?Y:W` 5980 <div id="app-content-container"> 5981 <div class="main-toolbar"> 5982 <div class="toolbar-content"> 5983 <chromedash-header 5984 .user=${this.user} 5985 .appTitle=${this.appTitle} 5986 .devMode=${this.devMode} 5987 .googleSignInClientId=${this.googleSignInClientId} 5988 .currentPage=${this.currentPage} 5989 @drawer-clicked=${this.handleShowDrawer} 5990 > 5991 <slot></slot> 5992 </chromedash-header> 5993 </div> 5994 </div> 5995 5996 <div id="content"> 5997 <div> 5998 <chromedash-drawer 5999 .user=${this.user} 6000 .currentPage=${this.currentPage} 6001 ?defaultOpen=${!0} 6002 .devMode=${this.devMode} 6003 .googleSignInClientId=${this.googleSignInClientId} 6004 > 6005 </chromedash-drawer> 6006 </div> 6007 <div style=${Ps(e)}> 6008 <chromedash-banner 6009 .message=${this.bannerMessage} 6010 .timestamp=${this.bannerTime} 6011 > 6012 </chromedash-banner> 6013 <div id="content-flex-wrapper"> 6014 ${this.renderContentAndSidebar()} 6015 </div> 6016 ${this.renderRolloutBanner(this.currentPage)} 6017 </div> 6018 </div> 6019 <chromedash-footer></chromedash-footer> 6020 </div> 6021 `}};zu([Ve({attribute:!1})],Lu.prototype,"user",void 0),zu([Ve({attribute:!1})],Lu.prototype,"paired_user",void 0),zu([Ve({type:String})],Lu.prototype,"appTitle",void 0),zu([Ve({type:String})],Lu.prototype,"googleSignInClientId",void 0),zu([Ve({type:String})],Lu.prototype,"devMode",void 0),zu([Ve({type:String})],Lu.prototype,"bannerMessage",void 0),zu([Ve({type:Number})],Lu.prototype,"bannerTime",void 0),zu([He()],Lu.prototype,"loading",void 0),zu([He()],Lu.prototype,"currentPage",void 0),zu([He()],Lu.prototype,"pageComponent",void 0),zu([He()],Lu.prototype,"contextLink",void 0),zu([He()],Lu.prototype,"sidebarHidden",void 0),zu([He()],Lu.prototype,"selectedGateId",void 0),zu([He()],Lu.prototype,"beforeUnloadHandler",void 0),zu([He()],Lu.prototype,"drawerOpen",void 0),Lu=zu([Ue("chromedash-app")],Lu);var Fu=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Nu=class extends ce{constructor(){super(...arguments),this.timestamp=null,this.message=""}static get styles(){return[...lo,c` 6022 div { 6023 display: inline-block; 6024 background: var(--warning-background); 6025 color: var(--warning-color); 6026 border-radius: var(--border-radius); 6027 padding: var(--content-padding); 6028 width: 100%; 6029 } 6030 `]}computeLocalDateString(){if(!this.timestamp)return Y;return new Date(1e3*this.timestamp).toLocaleString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"})}render(){return this.message?W` <div>${this.message} ${this.computeLocalDateString()}</div> `:Y}};Fu([Ve({type:Number})],Nu.prototype,"timestamp",void 0),Fu([Ve({type:String})],Nu.prototype,"message",void 0),Nu=Fu([Ue("chromedash-banner")],Nu);const Mu=[oo,c` 6031 table tr[hidden] th, table tr[hidden] td { 6032 padding: 0; 6033 } 6034 6035 table th { 6036 padding: 12px 10px 5px 0; 6037 vertical-align: top; 6038 } 6039 6040 table td { 6041 padding: 6px 10px; 6042 vertical-align: top; 6043 } 6044 6045 table td:first-of-type { 6046 width: 60%; 6047 } 6048 6049 table .helptext { 6050 display: block; 6051 font-size: small; 6052 margin-top: 2px; 6053 } 6054 6055 table input[type="text"], table input[type="url"], 6056 table input[type="email"], table textarea { 6057 width: 100%; 6058 font: var(--form-element-font); 6059 } 6060 6061 table select { 6062 max-width: 350px; 6063 } 6064 6065 table:required { 6066 border: 1px solid $chromium-color-dark; 6067 } 6068 6069 table .interacted:valid { 6070 border: 1px solid green; 6071 } 6072 6073 table .interacted:invalid {
6074 border: 1px solid $invalid-color; 6075 } 6076 6077 table input:not([type="submit"]):not([type="search"]) { 6078 outline: 1px dotted var(--error-border-color); 6079 background-color: #FFEDF5; 6080 } 6081 6082 input, textarea { 6083 padding: 7px; 6084 } 6085 6086 form[name="feature_form"] h3 { 6087 margin: var(--content-padding-half) 0; 6088 } 6089 form[name="feature_form"] input[type="submit"] { 6090 margin-top: var(--content-padding); 6091 } 6092 6093 form[name="feature_form"] .stage_form { 6094 margin-bottom: 2em; 6095 } 6096 6097 form section.flat_form + h3, .final_buttons { 6098 margin-top: 2em; 6099 } 6100 6101 .fade-in { 6102 animation:fadeIn 0.5s linear; 6103 } 6104 6105 @keyframes fadeIn { 6106 0% { 6107 opacity:0 6108 } 6109 100% { 6110 opacity:1; 6111 } 6112 } 6113 6114 #metadata, .stage_form, .flat_form, .final_buttons { 6115 max-width: 67em; 6116 padding: 1em; 6117 } 6118 6119 #metadata, .stage_form, .flat_form { 6120 color: #444; 6121 background: white; 6122 border: 1px solid #ccc; 6123 box-shadow: rgba(0, 0, 0, 0.067) 1px 1px 4px; 6124 } 6125 6126 #metadata-readonly div + div { 6127 margin-top: 4px; 6128 } 6129 6130 sl-input::part(base) { 6131 overflow: visible; 6132 } 6133 6134 sl-input[invalid]::part(input), 6135 sl-checkbox[invalid]::part(input), 6136 chromedash-textarea[invalid]::part(textarea) 6137 { 6138 outline: 1px dotted red; 6139 background-color: #FFEDF5; 6140 } 6141 6142 sl-select[size="small"] sl-menu-item::part(base) { 6143 font-size: var(--sl-font-size-x-small); 6144 padding: 0px; 6145 } 6146 6147 /* Hide select until loading is done and the component is defined. */ 6148 :not(:defined) { 6149 visibility: hidden; 6150 } 6151 6152 /* menu items for selects should not be displayed at all, until defined */ 6153 sl-select sl-menu-item:not(:defined) { 6154 display: none; 6155 } 6156 6157 chromedash-form-field { 6158 display: table-row-group; 6159 } 6160 6161 chromedash-form-field tr[hidden] th, 6162 chromedash-form-field tr[hidden] td { 6163 padding: 0; 6164 } 6165 6166 chromedash-form-field th, 6167 chromedash-form-field td { 6168 text-align: left; 6169 vertical-align: top; 6170 } 6171 6172 chromedash-form-field th { 6173 padding: 12px 10px 5px 0; 6174 } 6175 6176 chromedash-form-field td { 6177 padding: 6px 10px; 6178 } 6179 6180 chromedash-form-field td:first-of-type { 6181 width: 60%; 6182 max-width: 35em; 6183 } 6184 6185 chromedash-form-field .check-warning { 6186 color: orange; 6187 } 6188 6189 chromedash-form-field .check-error { 6190 color: red; 6191 } 6192 6193 chromedash-form-field .helptext { 6194 display: block; 6195 font-size: small; 6196 margin-top: 2px; 6197 } 6198 6199 chromedash-form-field .helptext > *:first-child { 6200 margin-top: 0; 6201 } 6202 chromedash-form-field .helptext > *:last-child { 6203 margin-bottom: 0; 6204 } 6205 6206 chromedash-form-field .helptext p { 6207 margin: 1em 0; 6208 } 6209 6210 chromedash-form-field .helptext ul { 6211 margin: 1em 0; 6212 } 6213 6214 chromedash-form-field .helptext blockquote { 6215 margin: 1em; 6216 border: 1px solid lightgrey; 6217 padding: 0.5em; 6218 } 6219 6220 chromedash-form-field .errorlist { 6221 color: red; 6222 } 6223 6224 chromedash-form-field sl-input[data-user-invalid]::part(base), 6225 chromedash-form-field chromedash-textarea[data-user-invalid]::part(base) { 6226 border-color: red; 6227 } 6228 6229 chromedash-form-field sl-details::part(base) { 6230 border-width: 0; 6231 } 6232 6233 chromedash-form-field sl-details::part(header) { 6234 padding: 0; 6235 display: none; 6236 } 6237 6238 chromedash-form-field sl-details::part(content) { 6239 padding-top: 0; 6240 } 6241 6242 chromedash-form-field sl-icon-button::part(base) { 6243 font-size: 16px; 6244 color: var(--link-color); 6245 padding: 0; 6246 margin: 4px; 6247 } 6248 6249 chromedash-form-field td.extrahelp { 6250 padding-left: 2em; 6251 } 6252 chromedash-form-field .extrahelp > span, chromedash-form-field .webdx > span { 6253 margin: 0; 6254 } 6255 6256 chromedash-form-field .datalist-input { 6257 width: 100%; 6258 height: 30px; 6259 border-radius: 4px; 6260 padding-left: 12px; 6261 font-family: inherit; 6262 font-size: inherit; 6263 color: #27272a; 6264 } 6265 chromedash-form-field .datalist-input:hover { 6266 border-color: #aaa; 6267 } 6268 chromedash-form-field .datalist-input:focus { 6269 outline: none; 6270 border-color: #0ea5e9; 6271 } 6272 6273 chromedash-form-field .datalist-input-wrapper { 6274 border-radius: 4px; 6275 } 6276 chromedash-form-field .datalist-input-wrapper:focus-within { 6277 box-shadow: 0 0 0 3px #0ea5e966; 6278 } 6279 6280 chromedash-form-field .form-field-header { 6281 display: flex; 6282 justify-content: space-between; 6283 align-items: center; 6284 width: 100%; 6285 } 6286 chromedash-form-field .usage-tag { 6287 padding: 2px 6px; 6288 margin-inline-start: 4px; 6289 border-radius: 12px; 6290 font-size: 0.85em; 6291 font-weight: 700; 6292 text-align: center; 6293 white-space: nowrap; 6294 vertical-align: middle; 6295 cursor: help; 6296 color: #424242; 6297 background-color: #f5f5f5; 6298 border: 1px solid #bdbdbd; 6299 } 6300 6301 sl-skeleton { 6302 margin-bottom: 1em; 6303 width: 60%; 6304 } 6305 sl-skeleton:nth-of-type(even) { 6306 width: 50%; 6307 } 6308 6309 h3 sl-skeleton { 6310 margin-top: 1em; 6311 width: 30%; 6312 height: 1.5em; 6313 } 6314 6315 .choices label { 6316 font-weight: bold; 6317 } 6318 .choices div { 6319 margin-top: 1em; 6320 } 6321 .choices p { 6322 margin: 0.5em 1.5em 1em; 6323 } 6324 `];var qu="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Uu=[],Bu=[],ju="undefined"!=typeof Uint8Array?Uint8Array:Array,Vu=!1;function Hu(){Vu=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 5,826 bytes, line 6324
6324+/",t=0;t<64;++t)Uu[t]=e[t],Bu[e.charCodeAt(t)]=t;Bu["-".charCodeAt(0)]=62,Bu["_".charCodeAt(0)]=63}function Wu(e){return Uu[e>>18&63]+Uu[e>>12&63]+Uu[e>>6&63]+Uu[63&e]}function Gu(e,t,i){for(var r,s=[],o=t;o<i;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],s.push(Wu(r));return s.join("")}function Yu(e){var t;Vu||Hu();for(var i=e.length,r=i%3,s="",o=[],a=16383,n=0,l=i-r;n<l;n+=a)o.push(Gu(e,n,n+a>l?l:n+a));return 1===r?(t=e[i-1],s+=Uu[t>>2],s+=Uu[t<<4&63],s+="=="):2===r&&(t=(e[i-2]<<8)+e[i-1],s+=Uu[t>>10],s+=Uu[t>>4&63],s+=Uu[t<<2&63],s+="="),o.push(s),o.join("")}function Ku(e,t,i,r,s){var o,a,n=8*s-r-1,l=(1<<n)-1,d=l>>1,c=-7,h=i?s-1:0,u=i?-1:1,p=e[t+h];for(h+=u,o=p&(1<<-c)-1,p>>=-c,c+=n;c>0;o=256*o+e[t+h],h+=u,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+h],h+=u,c-=8);if(0===o)o=1-d;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=d}return(p?-1:1)*a*Math.pow(2,o-r)}function Qu(e,t,i,r,s,o){var a,n,l,d=8*o-s-1,c=(1<<d)-1,h=c>>1,u=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(n=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?u/l:u*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(n=0,a=c):a+h>=1?(n=(t*l-1)*Math.pow(2,s),a+=h):(n=t*Math.pow(2,h-1)*Math.pow(2,s),a=0));s>=8;e[i+p]=255&n,p+=f,n/=256,s-=8);for(a=a<<s|n,d+=s;d>0;e[i+p]=255&a,p+=f,a/=256,d-=8);e[i+p-f]|=128*m}var Xu={}.toString,Ju=Array.isArray||function(e){return"[object Array]"==Xu.call(e)};function Zu(){return tp.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ep(e,t){if(Zu()<t)throw new RangeError("Invalid typed array length");return tp.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=tp.prototype:(null===e&&(e=new tp(t)),e.length=t),e}function tp(e,t,i){if(!(tp.TYPED_ARRAY_SUPPORT||this instanceof tp))return new tp(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return sp(this,e)}return ip(this,e,t,i)}function ip(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);tp.TYPED_ARRAY_SUPPORT?(e=t).__proto__=tp.prototype:e=op(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!tp.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|lp(t,i);e=ep(e,r);var s=e.write(t,i);s!==r&&(e=e.slice(0,s));return e}(e,t,i):function(e,t){if(np(t)){var i=0|ap(t.length);return 0===(e=ep(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?ep(e,0):op(e,t);if("Buffer"===t.type&&Ju(t.data))return op(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function rp(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function sp(e,t){if(rp(t),e=ep(e,t<0?0:0|ap(t)),!tp.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function op(e,t){var i=t.length<0?0:0|ap(t.length);e=ep(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function ap(e){if(e>=Zu())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Zu().toString(16)+" bytes");return 0|e}function np(e){return!(null==e||!e._isBuffer)}function lp(e,t){if(np(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return zp(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Lp(e).length;default:if(r)return zp(e).length;t=(""+t).toLowerCase(),r=!0}}function dp(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return $p(this,t,i);case"utf8":case"utf-8":return _p(this,t,i);case"ascii":return kp(this,t,i);case"latin1":case"binary":return xp(this,t,i);case"base64":return yp(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sp(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function cp(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function hp(e,t,i,r,s){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=s?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(s)return-1;i=e.length-1}else if(i<0){if(!s)return-1;i=0}if("string"==typeof t&&(t=tp.from(t,r)),np(t))return 0===t.length?-1:up(e,t,i,r,s);if("number"==typeof t)return t&=255,tp.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):up(e,[t],i,r,s);throw new TypeError("val must be string, number or Buffer")}function up(e,t,i,r,s){var o,a=1,n=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,n/=2,l/=2,i/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(s){var c=-1;for(o=i;o<n;
vendor: 1,153 bytes, line 6324
6324o++)if(d(e,o)===d(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(i+l>n&&(i=n-l),o=i;o>=0;o--){for(var h=!0,u=0;u<l;u++)if(d(e,o+u)!==d(t,u)){h=!1;break}if(h)return o}return-1}function pp(e,t,i,r){i=Number(i)||0;var s=e.length-i;r?(r=Number(r))>s&&(r=s):r=s;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var n=parseInt(t.substr(2*a,2),16);if(isNaN(n))return a;e[i+a]=n}return a}function fp(e,t,i,r){return Fp(zp(t,e.length-i),e,i,r)}function mp(e,t,i,r){return Fp(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function gp(e,t,i,r){return mp(e,t,i,r)}function bp(e,t,i,r){return Fp(Lp(t),e,i,r)}function vp(e,t,i,r){return Fp(function(e,t){for(var i,r,s,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(i=e.charCodeAt(a))>>8,s=i%256,o.push(s),o.push(r);return o}(t,e.length-i),e,i,r)}function yp(e,t,i){return 0===t&&i===e.length?Yu(e):Yu(e.slice(t,i))}function _p(e,t,i){i=Math.min(e.length,i);for(var r=[],s=t;s<i;){var o,a,n,l,d=e[s],c=null,h=d>239?4:d>223?3:d>191?2:1;if(s+h<=i)switch(h){case 1:d<128&&(c=d);break;
vendor: 11,888 bytes, line 6324
6324case 2:128==(192&(o=e[s+1]))&&(l=(31&d)<<6|63&o)>127&&(c=l);break;case 3:o=e[s+1],a=e[s+2],128==(192&o)&&128==(192&a)&&(l=(15&d)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[s+1],a=e[s+2],n=e[s+3],128==(192&o)&&128==(192&a)&&128==(192&n)&&(l=(15&d)<<18|(63&o)<<12|(63&a)<<6|63&n)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),s+=h}return function(e){var t=e.length;if(t<=wp)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=wp));return i}(r)}tp.TYPED_ARRAY_SUPPORT=void 0===qu.TYPED_ARRAY_SUPPORT||qu.TYPED_ARRAY_SUPPORT,Zu(),tp.poolSize=8192,tp._augment=function(e){return e.__proto__=tp.prototype,e},tp.from=function(e,t,i){return ip(null,e,t,i)},tp.TYPED_ARRAY_SUPPORT&&(tp.prototype.__proto__=Uint8Array.prototype,tp.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&tp[Symbol.species]),tp.alloc=function(e,t,i){return function(e,t,i,r){return rp(t),t<=0?ep(e,t):void 0!==i?"string"==typeof r?ep(e,t).fill(i,r):ep(e,t).fill(i):ep(e,t)}(null,e,t,i)},tp.allocUnsafe=function(e){return sp(null,e)},tp.allocUnsafeSlow=function(e){return sp(null,e)},tp.isBuffer=Np,tp.compare=function(e,t){if(!np(e)||!np(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,s=0,o=Math.min(i,r);s<o;++s)if(e[s]!==t[s]){i=e[s],r=t[s];break}return i<r?-1:r<i?1:0},tp.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},tp.concat=function(e,t){if(!Ju(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return tp.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=tp.allocUnsafe(t),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!np(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,s),s+=o.length}return r},tp.byteLength=lp,tp.prototype._isBuffer=!0,tp.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)cp(this,t,t+1);return this},tp.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)cp(this,t,t+3),cp(this,t+1,t+2);return this},tp.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)cp(this,t,t+7),cp(this,t+1,t+6),cp(this,t+2,t+5),cp(this,t+3,t+4);return this},tp.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?_p(this,0,e):dp.apply(this,arguments)},tp.prototype.equals=function(e){if(!np(e))throw new TypeError("Argument must be a Buffer");return this===e||0===tp.compare(this,e)},tp.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},tp.prototype.compare=function(e,t,i,r,s){if(!np(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||i>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=i)return 0;if(r>=s)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(s>>>=0)-(r>>>=0),a=(i>>>=0)-(t>>>=0),n=Math.min(o,a),l=this.slice(r,s),d=e.slice(t,i),c=0;c<n;++c)if(l[c]!==d[c]){o=l[c],a=d[c];break}return o<a?-1:a<o?1:0},tp.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},tp.prototype.indexOf=function(e,t,i){return hp(this,e,t,i,!0)},tp.prototype.lastIndexOf=function(e,t,i){return hp(this,e,t,i,!1)},tp.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var s=this.length-t;if((void 0===i||i>s)&&(i=s),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return pp(this,e,t,i);case"utf8":case"utf-8":return fp(this,e,t,i);case"ascii":return mp(this,e,t,i);case"latin1":case"binary":return gp(this,e,t,i);case"base64":return bp(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vp(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},tp.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var wp=4096;function kp(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(127&e[s]);return r}function xp(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(e[s]);return r}function $p(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var s="",o=t;o<i;++o)s+=Op(e[o]);return s}function Sp(e,t,i){for(var r=e.slice(t,i),s="",o=0;o<r.length;o+=2)s+=String.fromCharCode(r[o]+256*r[o+1]);return s}function Cp(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function Ep(e,t,i,r,s,o){if(!np(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<o)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function Ip(e,t,i,r){t<0&&(t=65535+t+1);for(var s=0,o=Math.min(e.length-i,2);s<o;++s)e[i+s]=(t&255<<8*(r?s:1-s))>>>8*(r?s:1-s)}function Tp(e,t,i,r){t<0&&(t=4294967295+t+1);for(var s=0,o=Math.min(e.length-i,4);s<o;++s)e[i+s]=t>>>8*(r?s:3-s)&255}function Ap(e,t,i,r,s,o){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Rp(e,t,i,r,s){return s||Ap(e,0,i,4),Qu(e,t,i,r,23,4),i+4}function Pp(e,t,i,r,s){return s||Ap(e,0,i,8),Qu(e,t,i,r,52,8),i+8}tp.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),tp.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=tp.prototype;else{var s=t-e;i=new tp(s,void 0);for(var o=0;o<s;++o)i[o]=this[o+e]}return i},tp.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||Cp(e,t,this.length);for(var r=this[e],s=1,o=0;++o<t&&(s*=256);)r+=this[e+o]*s;return r},tp.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||Cp(e,t,this.length);for(var r=this[e+--t],s=1;t>0&&(s*=256);)r+=this[e+--t]*s;return r},tp.prototype.readUInt8=function(e,t){return t||Cp(e,1,this.length),this[e]},tp.prototype.readUInt16LE=function(e,t){return t||Cp(e,2,this.length),this[e]|this[e+1]<<8},tp.prototype.readUInt16BE=function(e,t){return t||Cp(e,2,this.length),this[e]<<8|this[e+1]},tp.prototype.readUInt32LE=function(e,t){return t||Cp(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},tp.prototype.readUInt32BE=function(e,t){return t||Cp(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},tp.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||Cp(e,t,this.length);for(var r=this[e],s=1,o=0;++o<t&&(s*=256);)r+=this[e+o]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*t)),r},tp.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||Cp(e,t,this.length);for(var r=t,s=1,o=this[e+--r];r>0&&(s*=256);)o+=this[e+--r]*s;return o>=(s*=128)&&(o-=Math.pow(2,8*t)),o},tp.prototype.readInt8=function(e,t){return t||Cp(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},tp.prototype.readInt16LE=function(e,t){t||Cp(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},tp.prototype.readInt16BE=function(e,t){t||Cp(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},tp.prototype.readInt32LE=function(e,t){return t||Cp(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},tp.prototype.readInt32BE=function(e,t){return t||Cp(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},tp.prototype.readFloatLE=function(e,t){return t||Cp(e,4,this.length),Ku(this,e,!0,23,4)},tp.prototype.readFloatBE=function(e,t){return t||Cp(e,4,this.length),Ku(this,e,!1,23,4)},tp.prototype.readDoubleLE=function(e,t){return t||Cp(e,8,this.length),Ku(this,e,!0,52,8)},tp.prototype.readDoubleBE=function(e,t){return t||Cp(e,8,this.length),Ku(this,e,!1,52,8)},tp.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||Ep(this,e,t,i,Math.pow(2,8*i)-1,0);var s=1,o=0;for(this[t]=255&e;++o<i&&(s*=256);)this[t+o]=e/s&255;return t+i},tp.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||Ep(this,e,t,i,Math.pow(2,8*i)-1,0);var s=i-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+i},tp.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,1,255,0),tp.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},tp.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,2,65535,0),tp.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ip(this,e,t,!0),t+2},tp.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,2,65535,0),tp.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ip(this,e,t,!1),t+2},tp.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,4,4294967295,0),tp.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Tp(this,e,t,!0),t+4},tp.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,4,4294967295,0),tp.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Tp(this,e,t,!1),t+4},tp.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var s=Math.pow(2,8*i-1);Ep(this,e,t,i,s-1,-s)}var o=0,a=1,n=0;for(this[t]=255&e;++o<i&&(a*=256);)e<0&&0===n&&0!==this[t+o-1]&&(n=1),this[t+o]=(e/a|0)-n&255;return t+i},tp.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var s=Math.pow(2,8*i-1);Ep(this,e,t,i,s-1,-s)}var o=i-1,a=1,n=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===n&&0!==this[t+o+1]&&(n=1),this[t+o]=(e/a|0)-n&255;return t+i},tp.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,1,127,-128),tp.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},tp.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,2,32767,-32768),tp.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ip(this,e,t,!0),t+2},tp.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,2,32767,-32768),tp.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ip(this,e,t,!1),t+2},tp.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,4,2147483647,-2147483648),tp.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Tp(this,e,t,!0),t+4},tp.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||Ep(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),tp.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Tp(this,e,t,!1),t+4},tp.prototype.writeFloatLE=function(e,t,i){return Rp(this,e,t,!0,i)},tp.prototype.writeFloatBE=function(e,t,i){return Rp(this,e,t,!1,i)},tp.prototype.writeDoubleLE=function(e,t,i){return Pp(this,e,t,!0,i)},tp.prototype.writeDoubleBE=function(e,t,i){return Pp(this,e,t,!1,i)},tp.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var s,o=r-i;
6324if(this===e&&i<t&&t<r)for(s=o-1;s>=0;--s)e[s+t]=this[s+i];else if(o<1e3||!tp.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+o),t);return o},tp.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!tp.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var a=np(e)?e:zp(new tp(e,r).toString()),n=a.length;for(o=0;o<i-t;++o)this[o+t]=a[o%n]}return this};var Dp=/[^+\/0-9A-Za-z-_]/g;function Op(e){return e<16?"0"+e.toString(16):e.toString(16)}function zp(e,t){var i;t=t||1/0;for(var r=e.length,s=null,o=[],a=0;a<r;++a){if((i=e.charCodeAt(a))>55295&&i<57344){if(!s){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}s=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),s=i;continue}i=65536+(s-55296<<10|i-56320)}else s&&(t-=3)>-1&&o.push(239,191,189);if(s=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function Lp(e){return function(e){var t,i,r,s,o,a;Vu||Hu();var n=e.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[n-2]?2:"="===e[n-1]?1:0,a=new ju(3*n/4-o),r=o>0?n-4:n;var l=0;for(t=0,i=0;t<r;t+=4,i+=3)s=Bu[e.charCodeAt(t)]<<18|Bu[e.charCodeAt(t+1)]<<12|Bu[e.charCodeAt(t+2)]<<6|Bu[e.charCodeAt(t+3)],a[l++]=s>>16&255,a[l++]=s>>8&255,a[l++]=255&s;return 2===o?(s=Bu[e.charCodeAt(t)]<<2|Bu[e.charCodeAt(t+1)]>>4,a[l++]=255&s):1===o&&(s=Bu[e.charCodeAt(t)]<<10|Bu[e.charCodeAt(t+1)]<<4|Bu[e.charCodeAt(t+2)]>>2,a[l++]=s>>8&255,a[l++]=255&s),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Dp,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Fp(e,t,i,r){for(var s=0;s<r&&!(s+i>=t.length||s>=e.length);++s)t[s+i]=e[s];return s}function Np(e){return null!=e&&(!!e._isBuffer||Mp(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Mp(e.slice(0,0))}(e))}function Mp(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}class qp extends Error{constructor(e,t,i,...r){Array.isArray(t)&&(t=t.join(" ").trim()),super(t),void 0!==Error.captureStackTrace&&Error.captureStackTrace(this,qp),this.code=e;for(const e of r)for(const t in e){const r=e[t];this[t]=Np(r)?r.toString(i.encoding):null==r?r:JSON.parse(JSON.stringify(r))}}}const Up=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},Bp=function(e){const t=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];if(null==r||!1===r)t[i]={disabled:!0};else if("string"==typeof r||"number"==typeof r)t[i]={name:`${r}`};else{if(!Up(r))throw new qp("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(r)} at position ${i}`]);if("string"!=typeof r.name)throw new qp("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${i}`,"when column is an object literal"]);t[i]=r}}return t};class jp{constructor(e=100){this.size=e,this.length=0,this.buf=tp.allocUnsafe(e)}prepend(e){if(Np(e)){const t=this.length+e.length;if(t>=this.size&&(this.resize(),t>=this.size))throw Error("INVALID_BUFFER_STATE");const i=this.buf;this.buf=tp.allocUnsafe(this.size),e.copy(this.buf,0),i.copy(this.buf,e.length),this.length+=e.length}else{const t=this.length++;t===this.size&&this.resize();const i=this.clone();this.buf[0]=e,i.copy(this.buf,1,0,t)}}append(e){const t=this.length++;t===this.size&&this.resize(),this.buf[t]=e}clone(){return tp.from(this.buf.slice(0,this.length))}resize(){const e=this.length;this.size=2*this.size;const t=tp.allocUnsafe(this.size);this.buf.copy(t,0,0,e),this.buf=t}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}}const Vp=function(e){const t=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,i)=>{const r=tp.from(String.fromCharCode(i),e.encoding);return 63!==i&&1===r.length&&63===r[0]||t.push(r),t},[]),i=new Uint8Array(256);for(const e of t)i[e[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:e.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:1===e.from_line,escaping:!1,escapeIsQuote:Np(e.escape)&&Np(e.quote)&&0===tp.compare(e.escape,e.quote),expectedRecordLength:Array.isArray(e.columns)?e.columns.length:void 0,field:new jp(20),firstLineToHeaders:e.cast_first_line_to_header,needMoreDataSize:Math.max(null!==e.comment?e.comment.length:0,...e.delimiter?e.delimiter.map(e=>e.length):[],e.delimiter_auto?1:0,null!==e.quote?e.quote.length:0,...t.map(e=>e.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new jp(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:0===e.record_delimiter.length?0:Math.max(...e.record_delimiter.map(e=>e.length)),trimChars:[tp.from(" ",e.encoding)[0],tp.from("\t",e.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:t,timcharFirstBytes:i}},Hp=function(e){return e.replace(/([A-Z])/g,function(e,t){return"_"+t.toLowerCase()})},Wp=function(e){const t={};for(const i in e)t[Hp(i)]=e[i];if(void 0===t.encoding||!0===t.encoding)t.encoding="utf8";else if(null===t.encoding||!1===t.encoding)t.encoding=null;else if("string"!=typeof t.encoding&&null!==t.encoding)throw new qp("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(t.encoding)}`],t);if(void 0===t.bom||null===t.bom||!1===t.bom)t.bom=!1;else if(!0!==t.bom)throw new qp("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(t.bom)}`],t);if(t.cast_function=null,void 0===t.cast||null===t.cast||!1===t.cast||""===t.cast)t.cast=void 0;else if("function"==typeof t.cast)t.cast_function=t.cast,t.cast=!0;else if(!0!==t.cast)throw new qp("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(t.cast)}`],t);if(void 0===t.cast_date||null===t.cast_date||!1===t.cast_date||""===t.cast_date)t.cast_date=!1;else if(!0===t.cast_date)t.cast_date=function(e){const t=Date.parse(e);
6324return isNaN(t)?e:new Date(t)};else if("function"!=typeof t.cast_date)throw new qp("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(t.cast_date)}`],t);if(t.cast_first_line_to_header=void 0,!0===t.columns)t.cast_first_line_to_header=void 0;else if("function"==typeof t.columns)t.cast_first_line_to_header=t.columns,t.columns=!0;else if(Array.isArray(t.columns))t.columns=Bp(t.columns);else{if(void 0!==t.columns&&null!==t.columns&&!1!==t.columns)throw new qp("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(t.columns)}`],t);t.columns=!1}if(void 0===t.group_columns_by_name||null===t.group_columns_by_name||!1===t.group_columns_by_name)t.group_columns_by_name=!1;else{if(!0!==t.group_columns_by_name)throw new qp("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(t.group_columns_by_name)}`],t);if(!1===t.columns)throw new qp("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],t)}if(void 0===t.comment||null===t.comment||!1===t.comment||""===t.comment)t.comment=null;else if("string"==typeof t.comment&&(t.comment=tp.from(t.comment,t.encoding)),!Np(t.comment))throw new qp("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(t.comment)}`],t);if(void 0===t.comment_no_infix||null===t.comment_no_infix||!1===t.comment_no_infix)t.comment_no_infix=!1;else if(!0!==t.comment_no_infix)throw new qp("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(t.comment_no_infix)}`],t);if(void 0===t.delimiter_auto||null===t.delimiter_auto||!1===t.delimiter_auto)t.delimiter_auto=!1;else if(!0===t.delimiter_auto)t.delimiter_auto={};else if(!Up(t.delimiter_auto))throw new qp("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(t.delimiter_auto)}`],t);if(t.delimiter_auto){if(void 0===t.delimiter_auto.preferred)t.delimiter_auto.preferred={[",".charCodeAt(0)]:1.8,["\t".charCodeAt(0)]:1.8,[";".charCodeAt(0)]:1.6,[" ".charCodeAt(0)]:1.6,[":".charCodeAt(0)]:1.5,[".".charCodeAt(0)]:1.4,["/".charCodeAt(0)]:1.4};else if(!Up(t.delimiter_auto.preferred))throw new qp("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(t.delimiter_auto.preferred)}`],t);if(void 0===t.delimiter_auto.score)t.delimiter_auto.score=(e,t)=>(e.total-e.std)*(t.preferred[e.char_code]||1);else if("function"!=typeof t.delimiter_auto.score)throw new qp("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(t.delimiter_auto.score)}`],t);if(void 0===t.delimiter_auto.size)t.delimiter_auto.size=2048;else if("number"!=typeof t.delimiter_auto.size)throw new qp("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(t.delimiter_auto.size)}`],t)}const i=JSON.stringify(t.delimiter);if(!1!==t.delimiter_auto&&(t.delimiter=[]),Array.isArray(t.delimiter)||(void 0!==t.delimiter&&null!==t.delimiter&&!1!==t.delimiter||(t.delimiter=tp.from(",",t.encoding)),t.delimiter=[t.delimiter]),t.delimiter=t.delimiter.map(function(e){if("string"==typeof e&&(e=tp.from(e,t.encoding)),!Np(e)||0===e.length)throw new qp("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${i}`],t);return e}),void 0===t.escape||!0===t.escape?t.escape=tp.from('"',t.encoding):"string"==typeof t.escape?t.escape=tp.from(t.escape,t.encoding):null!==t.escape&&!1!==t.escape||(t.escape=null),null!==t.escape&&!Np(t.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(t.escape)}`);if(void 0===t.from||null===t.from)t.from=1;else{if("string"==typeof t.from&&/\d+/.test(t.from)&&(t.from=parseInt(t.from)),!Number.isInteger(t.from))throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(t.from)}`);
6324if(t.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(e.from)}`)}if(void 0===t.from_line||null===t.from_line)t.from_line=1;else{if("string"==typeof t.from_line&&/\d+/.test(t.from_line)&&(t.from_line=parseInt(t.from_line)),!Number.isInteger(t.from_line))throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(e.from_line)}`);if(t.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(e.from_line)}`)}if(void 0===t.ignore_last_delimiters||null===t.ignore_last_delimiters)t.ignore_last_delimiters=!1;else if("number"==typeof t.ignore_last_delimiters)t.ignore_last_delimiters=Math.floor(t.ignore_last_delimiters),0===t.ignore_last_delimiters&&(t.ignore_last_delimiters=!1);else if("boolean"!=typeof t.ignore_last_delimiters)throw new qp("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(t.ignore_last_delimiters)}`],t);if(!0===t.ignore_last_delimiters&&!1===t.columns)throw new qp("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],t);if(void 0===t.info||null===t.info||!1===t.info)t.info=!1;else if(!0!==t.info)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(t.info)}`);if(void 0===t.max_record_size||null===t.max_record_size||!1===t.max_record_size)t.max_record_size=0;else if(Number.isInteger(t.max_record_size)&&t.max_record_size>=0);else{if("string"!=typeof t.max_record_size||!/\d+/.test(t.max_record_size))throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(t.max_record_size)}`);t.max_record_size=parseInt(t.max_record_size)}if(void 0===t.objname||null===t.objname||!1===t.objname)t.objname=void 0;else if(Np(t.objname)){if(0===t.objname.length)throw new Error("Invalid Option: objname must be a non empty buffer");null===t.encoding||(t.objname=t.objname.toString(t.encoding))}else if("string"==typeof t.objname){if(0===t.objname.length)throw new Error("Invalid Option: objname must be a non empty string")}else if("number"!=typeof t.objname)throw new Error(`Invalid Option: objname must be a string or a buffer, got ${t.objname}`);if(void 0!==t.objname)if("number"==typeof t.objname){if(!1!==t.columns)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(!1===t.columns)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index");if(void 0===t.on_record||null===t.on_record)t.on_record=void 0;else if("function"!=typeof t.on_record)throw new qp("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(t.on_record)}`],t);if(void 0!==t.on_skip&&null!==t.on_skip&&"function"!=typeof t.on_skip)throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(t.on_skip)}`);if(null===t.quote||!1===t.quote||""===t.quote)t.quote=null;else if(void 0===t.quote||!0===t.quote?t.quote=tp.from('"',t.encoding):"string"==typeof t.quote&&(t.quote=tp.from(t.quote,t.encoding)),!Np(t.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(t.quote)}`);if(void 0===t.raw||null===t.raw||!1===t.raw)t.raw=!1;else if(!0!==t.raw)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(t.raw)}`);if(void 0===t.record_delimiter)t.record_delimiter=[];else if("string"==typeof t.record_delimiter||Np(t.record_delimiter)){if(0===t.record_delimiter.length)throw new qp("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(t.record_delimiter)}`],t);t.record_delimiter=[t.record_delimiter]}else if(!Array.isArray(t.record_delimiter))throw new qp("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(t.record_delimiter)}`],t);if(t.record_delimiter=t.record_delimiter.map(function(e,i){if("string"!=typeof e&&!Np(e))throw new qp("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of str
6324ing|buffer",`at index ${i},`,`got ${JSON.stringify(e)}`],t);if(0===e.length)throw new qp("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${i},`,`got ${JSON.stringify(e)}`],t);return"string"==typeof e&&(e=tp.from(e,t.encoding)),e}),"boolean"==typeof t.relax_column_count);else{if(void 0!==t.relax_column_count&&null!==t.relax_column_count)throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(t.relax_column_count)}`);t.relax_column_count=!1}if("boolean"==typeof t.relax_column_count_less);else{if(void 0!==t.relax_column_count_less&&null!==t.relax_column_count_less)throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(t.relax_column_count_less)}`);t.relax_column_count_less=!1}if("boolean"==typeof t.relax_column_count_more);else{if(void 0!==t.relax_column_count_more&&null!==t.relax_column_count_more)throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(t.relax_column_count_more)}`);t.relax_column_count_more=!1}if("boolean"==typeof t.relax_quotes);else{if(void 0!==t.relax_quotes&&null!==t.relax_quotes)throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(t.relax_quotes)}`);t.relax_quotes=!1}if("boolean"==typeof t.skip_empty_lines);else{if(void 0!==t.skip_empty_lines&&null!==t.skip_empty_lines)throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(t.skip_empty_lines)}`);t.skip_empty_lines=!1}if("boolean"==typeof t.skip_records_with_empty_values);else{if(void 0!==t.skip_records_with_empty_values&&null!==t.skip_records_with_empty_values)throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(t.skip_records_with_empty_values)}`);t.skip_records_with_empty_values=!1}if("boolean"==typeof t.skip_records_with_error);else{if(void 0!==t.skip_records_with_error&&null!==t.skip_records_with_error)throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(t.skip_records_with_error)}`);t.skip_records_with_error=!1}if(void 0===t.rtrim||null===t.rtrim||!1===t.rtrim)t.rtrim=!1;else if(!0!==t.rtrim)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(t.rtrim)}`);if(void 0===t.ltrim||null===t.ltrim||!1===t.ltrim)t.ltrim=!1;else if(!0!==t.ltrim)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(t.ltrim)}`);if(void 0===t.trim||null===t.trim||!1===t.trim)t.trim=!1;else if(!0!==t.trim)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(t.trim)}`);if(!0===t.trim&&!1!==e.ltrim?t.ltrim=!0:!0!==t.ltrim&&(t.ltrim=!1),!0===t.trim&&!1!==e.rtrim?t.rtrim=!0:!0!==t.rtrim&&(t.rtrim=!1),void 0===t.to||null===t.to)t.to=-1;else if(-1!==t.to){if("string"==typeof t.to&&/\d+/.test(t.to)&&(t.to=
6324parseInt(t.to)),!Number.isInteger(t.to))throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(e.to)}`);if(t.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(e.to)}`)}if(void 0===t.to_line||null===t.to_line)t.to_line=-1;else if(-1!==t.to_line){if("string"==typeof t.to_line&&/\d+/.test(t.to_line)&&(t.to_line=parseInt(t.to_line)),!Number.isInteger(t.to_line))throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(e.to_line)}`);if(t.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(e.to_line)}`)}return t},Gp=function(e,t){t||({delimiter_auto:t}=Wp({delimiter_auto:!0})),"string"==typeof e&&(e=tp.from(e)),Np(e)&&(e=(e=>{const t=[],i=Xp({delimiter:[]}).parse(e,!0,e=>t.push(e),()=>{});if(void 0!==i)throw i;return t})(e));const i=Array(127).fill().map(()=>({lines:[]}));e.map(([e],t)=>{for(let r=0,s=e.length;r<s;r++){const s=e.charCodeAt(r);void 0===i[s].lines[t]&&(i[s].lines[t]=0),i[s].lines[t]++}}),i.map((e,i)=>{e.char_code=i,e.std=Yp(e.lines),e.total=e.lines.reduce((e,t)=>e+t,0),e.preferred=!!t.preferred[i],e.score=t.score(e,t)});const r=i.reduce((e,t)=>e.score>t.score?e:t,{});return String.fromCharCode(r.char_code)},Yp=function(e){const t=e.length;if(0===t)return 0;const i=e.reduce((e,t)=>e+t)/t;return Math.sqrt(e.map(e=>Math.pow(e-i,2)).reduce((e,t)=>e+t)/t)},Kp=function(e){return e.every(e=>null==e||e.toString&&""===e.toString().trim())},Qp={utf8:tp.from([239,187,191]),utf16le:tp.from([255,254])},Xp=function(e={}){const t=Wp(e);return{info:{bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},original_options:e,options:t,state:Vp(t),__needMoreData:function(e,t,i){if(i)return!1;const{encoding:r,escape:s,quote:o}=this.options,{quoting:a,needMoreDataSize:n,recordDelimiterMaxLength:l}=this.state;return t-e-1<Math.max(n,0===l?tp.from("\r\n",r).length:l,a?(null===s?0:s.length)+o.length:0,a?o.length+l:0)},parse:function(e,t,i,r){const{bom:s,comment_no_infix:o,delimiter_auto:a,encoding:n,from_line:l,ltrim:d,max_record_size:c,raw:h,relax_quotes:u,rtrim:p,skip_empty_lines:f,to:m,to_line:g}=this.options;let{comment:b,escape:v,quote:y,record_delimiter:_}=this.options;const{bomSkipped:w,delimiterDiscovered:k,delimiterBufPrevious:x,rawBuffer:$,escapeIsQuote:S}=this.state;if(!k&&a){let i;if(i=void 0===x?e:void 0!==x&&void 0===e?x:tp.concat([x,e]),e=void 0,!(t||i.length>a.size))return void(this.state.delimiterBufPrevious=i);this.options.delimiter=[tp.from(Gp(i,this.options.delimiter_auto))],this.state.previousBuf=i,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0}const{previousBuf:C}=this.state;let E;if(void 0===C){if(void 0===e)return void r();E=e}else E=void 0!==C&&void 0===e?C:tp.concat([C,e]);if(!1===w)if(!1===s)this.state.bomSkipped=!0;else if(E.length<3){if(!1===t)return void(this.state.previousBuf=E)}else{for(const e in Qp)if(0===Qp[e].compare(E,0,Qp[e].length)){const t=Qp[e].length;this.state.bufBytesStart+=t,E=E.slice(t);const i=Wp({...this.original_options,encoding:e});for(const e in i)this.options[e]=i[e];({comment:b,escape:v,quote:y}=this.options);break}this.state.bomSkipped=!0}const I=E.length;let T;for(T=0;T<I&&!this.__needMoreData(T,I,t);T++){if(!0===this.state.wasRowDelimiter&&(this.info.lines++,this.state.wasRowDelimiter=!1),-1!==g&&this.info.lines>g)return this.state.stop=!0,void r();if(!1===this.state.quoting&&0===_.length){this.__autoDiscoverRecordDelimiter(E,T)&&(_=this.options.record_delimiter)}const e=E[T];if(!0===h&&$.append(e),13!==e&&10!==e||!1!==this.state.wasRowDelimiter||(this.state.wasRowDelimiter=!0),!0===this.state.escaping)this.state.escaping=!1;else{if(null!==v&&!0===this.state.quoting&&this.__isEscape(E,T,e)&&T+v.length<I){if(!S){this.state.escaping=!0,T+=v.length-1;continue}if(this.__isQuote(E,T+v.length)){this.state.escaping=!0,T+=v.length-1;continue}}if(!1===this.state.commenting&&this.__isQuote(E,T))if(!0===this.state.quoting){const t=E[T+y.length],i=p&&this.__isCharTrimable(E,T+y.length),r=null!==b&&this.__compareBytes(b,E,T+y.length,t),s=this.__isDelimiter(E,T+y.length,t),o=0===_.length?this.__autoDiscoverRecordDelimiter(E,T+y.length):this.__isRecordDelimiter(t,E,T+y.length);if(null!==v&&this.__isEscape(E,T,e)&&this.__isQuote(E,T+v.length))T+=v.length-1;else{if(!t||s||o||r||i){this.state.quoting=!1,this.state.wasQuoting=!0,T+=y.length-1;continue}if(!1===u){const e=this.__error(new qp("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(t)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(void 0!==e)return e}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(y),T+=y.length-1}}else{if(0===this.state.field.length){this.state.quoting=!0,T+=y.length-1;continue}if(!1===u){const e=this.__infoField(),t=Object.keys(Qp).map(e=>
6324!!Qp[e].equals(this.state.field.toString())&&e).filter(Boolean)[0],i=this.__error(new qp("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(e.column)} at line ${e.lines}, value is ${JSON.stringify(this.state.field.toString(n))}`,t?`(${t} bom)`:void 0],this.options,e,{field:this.state.field}));if(void 0!==i)return i}}if(!1===this.state.quoting){const t=this.__isRecordDelimiter(e,E,T);if(0!==t){if(this.state.commenting&&!1===this.state.wasQuoting&&0===this.state.record.length&&0===this.state.field.length)this.info.comment_lines++;else{if(!1===this.state.enabled&&this.info.lines+(!0===this.state.wasRowDelimiter?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),T+=t-1;continue}if(!0===f&&!1===this.state.wasQuoting&&0===this.state.record.length&&0===this.state.field.length){this.info.empty_lines++,T+=t-1;continue}this.info.bytes=this.state.bufBytesStart+T;const e=this.__onField();if(void 0!==e)return e;this.info.bytes=this.state.bufBytesStart+T+t;const s=this.__onRecord(i);if(void 0!==s)return s;if(-1!==m&&this.info.records>=m)return this.state.stop=!0,void r()}this.state.commenting=!1,T+=t-1;continue}if(this.state.commenting)continue;if(null!==b&&(!1===o||0===this.state.record.length&&0===this.state.field.length)){if(0!==this.__compareBytes(b,E,T,e)){this.state.commenting=!0;continue}}const s=this.__isDelimiter(E,T,e);if(0!==s){this.info.bytes=this.state.bufBytesStart+T;const e=this.__onField();if(void 0!==e)return e;T+=s-1;continue}}}if(!1===this.state.commenting&&0!==c&&this.state.record_length+this.state.field.length>c)return this.__error(new qp("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${c}`,`at line ${this.info.lines}`],this.options,this.__infoField()));const t=!1===d||!0===this.state.quoting||0!==this.state.field.length||!this.__isCharTrimable(E,T),s=!1===p||!1===this.state.wasQuoting;if(!0!==t||!0!==s){if(!0!==p||this.__isCharTrimable(E,T)){!1===t&&(T+=this.__isCharTrimable(E,T)-1);continue}return this.__error(new qp("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()))}this.state.field.append(e)}if(!0===t)if(!0===this.state.quoting){const e=this.__error(new qp("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(void 0!==e)return e}else if(!0===this.state.wasQuoting||0!==this.state.record.length||0!==this.state.field.length){this.info.bytes=this.state.bufBytesStart+T;const e=this.__onField();if(void 0!==e)return e;const t=this.__onRecord(i);if(void 0!==t)return t}else!0===this.state.wasRowDelimiter?this.info.empty_lines++:!0===this.state.commenting&&this.info.comment_lines++;else this.state.bufBytesStart+=T,this.state.previousBuf=E.slice(T);!0===this.state.wasRowDelimiter&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(e){const{columns:t,group_columns_by_name:i,encoding:r,info:s,from:o,relax_column_count:a,relax_column_count_less:n,relax_column_count_more:l,raw:d,skip_records_with_empty_values:c}=this.options,{enabled:h,record:u}=this.state;if(!1===h)return this.__resetRecord();const p=u.length;if(!0===t)return!0===c&&Kp(u)?void this.__resetRecord():this.__firstLineToColumns(u);if(!1===t&&0===this.info.records&&(this.state.expectedRecordLength=p),p!==this.state.expectedRecordLength){const e=!1===t?new qp("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${p} on line ${this.info.lines}`],this.options,this.__infoField(),{record:u}):new qp("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${t.length},`,`got ${p} on line ${this.info.lines}`],this.options,this.__infoField(),{record:u});if(!0===a||!0===n&&p<this.state.expectedRecordLength||!0===l&&p>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=e;else{const t=this.__error(e);if(t)return t}}if(!0===c&&Kp(u))this.__resetRecord();else{if(!0===this.state.recordHasError)return this.__resetRecord(),void(this.state.recordHasError=!1);if(this.info.records++,1===o||this.info.records>=o){const{objname:o}=this.options;if(!1!==t){const a={};for(let e=0,r=u.length;e<r;e++)void 0===t[e]||t[e].disabled||(!0===i&&Object.hasOwn(a,t[e].name)?Array.isArray(a[t[e].name])?a[t[e].name]=a[t[e].name].concat(u[e]):a[t[e].name]=[a[t[e].name],u[e]]:Object.defineProperty(a,t[e].name,{value:u[e],enumerable:!0,writable:!0,configurable:!0}));if(!0===d||!0===s){const t=Object.assign({record:a},!0===d?{raw:this.state.rawBuffer.toString(r)}:{},!0===s?{info:this.__infoRecord()}:{}
6324),i=this.__push(void 0===o?t:[a[o],t],e);if(i)return i}else{const t=this.__push(void 0===o?a:[a[o],a],e);if(t)return t}}else if(!0===d||!0===s){const t=Object.assign({record:u},!0===d?{raw:this.state.rawBuffer.toString(r)}:{},!0===s?{info:this.__infoRecord()}:{}),i=this.__push(void 0===o?t:[u[o],t],e);if(i)return i}else{const t=this.__push(void 0===o?u:[u[o],u],e);if(t)return t}}this.__resetRecord()}},__firstLineToColumns:function(e){const{firstLineToHeaders:t}=this.state;try{const i=void 0===t?e:t.call(null,e);if(!Array.isArray(i))return this.__error(new qp("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(i)}`],this.options,this.__infoField(),{headers:i}));const r=Bp(i);return this.state.expectedRecordLength=r.length,this.options.columns=r,void this.__resetRecord()}catch(e){return e}},__resetRecord:function(){!0===this.options.raw&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){const{cast:e,encoding:t,rtrim:i,max_record_size:r}=this.options,{enabled:s,wasQuoting:o}=this.state;if(!1===s)return this.__resetField();let a=this.state.field.toString(t);if(!0===i&&!1===o&&(a=a.trimRight()),!0===e){const[e,t]=this.__cast(a);if(void 0!==e)return e;a=t}this.state.record.push(a),0!==r&&"string"==typeof a&&(this.state.record_length+=a.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(e,t){const{on_record:i}=this.options;if(void 0!==i){const t=this.__infoRecord();try{e=i.call(null,e,t)}catch(e){return e}if(null==e)return}this.info.bytes_records+=this.info.bytes,t(e)},__cast:function(e){const{columns:t,relax_column_count:i}=this.options;if(!0===Array.isArray(t)&&i&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(null!==this.state.castField)try{const t=this.__infoField();return[void 0,this.state.castField.call(null,e,t)]}catch(e){return[e]}if(this.__isFloat(e))return[void 0,parseFloat(e)];if(!1!==this.options.cast_date){const t=this.__infoField();return[void 0,this.options.cast_date.call(null,e,t)]}return[void 0,e]},__compareBytes:function(e,t,i,r){if(e[0]!==r)return 0;const s=e.length;for(let r=1;r<s;r++)if(e[r]!==t[i+r])return 0;return s},__isCharTrimable:function(e,t){const{timchars:i,timcharFirstBytes:r}=this.state,s=e[t];if(void 0===s||0===r[s])return 0;e:for(let r=0;r<i.length;r++){const s=i[r];for(let i=0;i<s.length;i++)if(s[i]!==e[t+i])continue e;return s.length}return 0},__isDelimiter:function(e,t,i){const{delimiter:r,ignore_last_delimiters:s}=this.options;if(!0===s&&this.state.record.length===this.options.columns.length-1)return 0;if(!1!==s&&"number"==typeof s&&this.state.record.length===s-1)return 0;e:for(let s=0;s<r.length;s++){const o=r[s];if(o[0]===i){for(let i=1;i<o.length;i++)if(o[i]!==e[t+i])continue e;return o.length}}return 0},__isEscape:function(e,t,i){const{escape:r}=this.options;if(null===r)return!1;const s=r.length;if(r[0]===i){for(let i=0;i<s;i++)if(r[i]!==e[t+i])return!1;return!0}return!1},__isFloat:function(e){return e-parseFloat(e)+1>=0},__isQuote:function(e,t){const{quote:i}=this.options;if(null===i)return!1;const r=i.length;for(let s=0;s<r;s++)if(i[s]!==e[t+s])return!1;return!0},__isRecordDelimiter:function(e,t,i){const{record_delimiter:r}=this.options,s=r.length;e:for(let o=0;o<s;o++){const s=r[o],a=s.length;if(s[0]===e){for(let e=1;e<a;e++)if(s[e]!==t[i+e])continue e;return s.length}}return 0},__autoDiscoverRecordDelimiter:function(e,t){const{encoding:i}=this.options,r=[tp.from("\r\n",i),tp.from("\n",i),tp.from("\r",i)];e:for(let i=0;i<r.length;i++){const s=r[i].length;for(let o=0;o<s;o++)if(r[i][o]!==e[t+o])continue e;return this.options.record_delimiter.push(r[i]),this.state.recordDelimiterMaxLength=r[i].length,r[i].length}return 0},__error:function(e){const{encoding:t,raw:i,skip_records_with_error:r}=this.options,s="string"==typeof e?new Error(e):e;if(!r)return s;if(this.state.recordHasError=!0,void 0!==this.options.on_skip)try{this.options.on_skip(s,i?this.state.rawBuffer.toString(t):void 0)}catch(s){return s}},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){const{columns:e,raw:t,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:!0===e,index:this.state.record.length,raw:t?this.state.rawBuffer.toString(i):void 0}},__infoField:function(){const{columns:e}=this.options,t=Array.isArray(e),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:!0===t?e.length>this.state.record.length?e[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var Jp=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Zp=new RegExp("^[a-z0-9]+(-[a-z0-9]+)*$"),ef=new RegExp("https://(wwww.)?chromestatus.com/feature/(?<id>[0-9]+)");let tf=class extends ce{constructor(){super(...arguments),this.parsing=!1,this.cells=[],this.featureIdIndex=-1,this.chromestatusUrlIndex=-1,this.items=[],this.submitting=!1}static get styles(){return[...lo,...Mu,c` 6325 section { 6326 margin: var(--content-padding); 6327 } 6328 .diff.old { 6329 background: #fdd; 6330 } 6331 .diff.new { 6332 background: #dfd; 6333 } 6334 `]}parseChromestatusIdFromURL(e){const t=e.match(ef);if(t)return Number(t.groups?.id);const i=Number(e);return isNaN(i)?0:i}isFeatureIdHeader(e,t){const i="feature id"===e||"web-features"===e||e.includes("feature")&&!e.includes("chrome"),r=this.cells.length>1&&this.cells[1][t].match(Zp);return i&&r}isChromestatusURL(e,t){const i=e.includes("chromestatus")||e.includes("chrome")&&e.includes("status")||"id"===e,r=this.cells.length>1&&this.parseChromestatusIdFromURL(this.cells[1][t]);return i&&r}detectColumns(){if(!this.cells.length)return;const e=this.cells[0].map(e=>e.toLowerCase());this.featureIdIndex=e.findIndex(this.isFeatureIdHeader.bind(this)),this.chromestatusUrlIndex=e.findIndex(this.isChromestatusURL.bind(this))}selectItems(){if(this.items=[],-1!==this.featureIdIndex&&-1!==this.chromestatusUrlIndex)for(let e=1;e<this.cells.length;e++){const t=this.cells[e],i=t[this.featureIdIndex],r=t[this.chromestatusUrlIndex],s=this.parseChromestatusIdFromURL(r);if(s>0){const t={row:e+1,csFid:s,existing:"Loading...",desired:i};this.items.push(t)}}}fetchFeature(e){return window.csClient.getFeature(e.csFid).then(t=>{e.entryName=t.name,e.existing=t.web_feature,this.requestUpdate()})}parseFileContent(e){try{this.cells=function(e,t={}){"string"==typeof e&&(e=tp.from(e));const i=t&&t.objname?Object.create(null):[],r=Xp(t),s=r.parse(e,!0,e=>{void 0===r.options.objname?i.push(e):i[e[0]]=e[1]},()=>{});if(void 0!==s)throw s;return i}(e)}catch(e){Vc(`An error occurred in parsing CSV file. ${JSON.stringify(e)}`)}try{this.detectColumns()}catch(e){Vc(`An error occurred while detecting columns. ${JSON.stringify(e)}`)}try{this.selectItems()}catch(e){Vc(`An error occurred while converting cells. ${JSON.stringify(e)}`)}}async getFileAndParse(){const e=this.shadowRoot.querySelector("#id_file_form_field");if(!e?.files?.length)return this.cells=[],this.featureIdIndex=-1,this.chromestatusUrlIndex=-1,this.items=[],void(this.parsing=!1);try{const t=e.files[0],i=await t.text();this.parseFileContent(i),await Promise.all(this.items.map(e=>this.fetchFeature(e)))}catch(e){Vc(`An error occurred while processing the file. ${JSON.stringify(e)}`)}finally{this.parsing=!1}}
6334saveFeature(e){const t={feature_changes:{id:e.csFid,web_feature:e.desired},stages:[],has_changes:!0};return window.csClient.updateFeature(t).then(t=>{this.fetchFeature(e)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}async handleSubmit(e){e.preventDefault(),this.submitting=!0;for(const e of this.items)e.existing!=e.desired&&await this.saveFeature(e);this.submitting=!1}async handleChange(){this.parsing=!0,await this.getFileAndParse()}renderForm(){return W` 6335 <form name="bulk_edit_form"> 6336 <table cellspacing="6"> 6337 <tbody> 6338 <tr> 6339 <th> 6340 <label for="id_file_form_field">CSV file:</label> 6341 </th> 6342 <td> 6343 <input 6344 id="id_file_form_field" 6345 name="file_form_field" 6346 type="file" 6347 accept="text/csv" 6348 @change=${this.handleChange} 6349 /> 6350 </td> 6351 </tr> 6352 </tbody> 6353 </table> 6354 </form> 6355 `}isDifferent(e){return"Loading..."!=e.existing&&e.existing!=e.desired}renderItemRow(e){const t=this.isDifferent(e),i=t?"diff":"";return W` 6356 <tr> 6357 <td style="text-align: right; width: 4em">${e.row}</td> 6358 <td> 6359 <a href="/feature/${e.csFid}" target="_blank" 6360 >${e.entryName||e.csFid}</a 6361 > 6362 </td> 6363 <td class="${i} old">${e.existing||"Not set"}</td> 6364 <td>${t?W`←`:"=="}</td> 6365 <td class="${i} new">${e.desired}</td> 6366 </tr> 6367 `}renderPreview(){if(0==this.items.length)return W` 6368 <p id="instructions"> 6369 Select a CSV file to see the preview. The CSV file should have one 6370 column labeled "Chrome Status Entry" and one column labled "Feature 6371 ID", although some variations may work. Once the file is parsed, the 6372 table below will preview changes that will be made. 6373 </p> 6374 `;const e=this.items.length,t=this.items.filter(e=>!this.isDifferent(e)).length,i=this.items.filter(e=>this.isDifferent(e)).length;return W` 6375 <table class="data-table"> 6376 <tr> 6377 <th>Row</th> 6378 <th>ChromeStatus feature</th> 6379 <th>Existing web feature ID</th> 6380 <th></th> 6381 <th>Desired web feature ID</th> 6382 </tr> 6383 ${this.items.map(e=>this.renderItemRow(e))} 6384 </table> 6385 <p> 6386 ${e} rows: ${t} already matching and ${i} to 6387 be updated. 6388 </p> 6389 `}renderControls(){return W` 6390 <sl-button 6391 ?disabled=${this.parsing||this.submitting||0==this.items.length} 6392 @click=${this.handleSubmit} 6393 size="small" 6394 variant="primary" 6395 > 6396 Update all 6397 </sl-button> 6398 `}render(){return W` 6399 <div id="subheader"> 6400 <h2>Bulk edit</h2> 6401 </div> 6402 <section>${this.renderForm()}</section> 6403 <section> 6404 <h3>Preview</h3> 6405 ${this.renderPreview()} 6406 </section> 6407 <section>${this.renderControls()}</section> 6408 ${this.parsing||this.submitting?W` <div class="loading"> 6409 <div id="spinner"><img src="/static/img/ring.svg" /></div> 6410 </div>`:Y} 6411 `}};Jp([He()],tf.prototype,"parsing",void 0),Jp([He()],tf.prototype,"cells",void 0),Jp([He()],tf.prototype,"featureIdIndex",void 0),Jp([He()],tf.prototype,"chromestatusUrlIndex",void 0),Jp([He()],tf.prototype,"items",void 0),Jp([He()],tf.prototype,"submitting",void 0),tf=Jp([Ue("chromedash-bulk-edit-page")],tf);var rf=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let sf=class extends ce{constructor(){super(...arguments),this.targetId="",this.side="south",this.cue="",this.dismissedCues=[],this.signedIn=!1,this.hidden=!0,this.top=0,this.left=0}connectedCallback(){if(super.connectedCallback(),!this.dismissedCues.includes(this.cue))try{this.attachToTarget(this.parentNode.querySelector("#"+this.targetId))}catch(e){console.error("Failed to attach target",e)}}static get styles(){return[...lo,c` 6412 #bubble { 6413 position: absolute; 6414 display: inline-block; 6415 background: var(--callout-bg-color); 6416 border-radius: var(--large-border-radius); 6417 padding: var(--content-padding-half); 6418 max-width: 24em; 6419 color: var(--callout-text-color); 6420 font-weight: bold; 6421 } 6422 #bubble[hidden] { 6423 display: none; 6424 } 6425 #bubble:after { 6426 content: ''; 6427 position: absolute; 6428 border: 20px solid transparent; 6429 } 6430 /* Bubble will be located on the south side of target element. */ 6431 #bubble.south:after { 6432 top: -20px; 6433 left: 20px; 6434 width: 0; 6435 height: 0; 6436 border-bottom-color: var(--callout-bg-color); 6437 border-top: 0; 6438 } 6439 #closebox { 6440 float: right; 6441 margin-left: var(--content-padding-half); 6442 color: var(--light-icon-fill-color); 6443 } 6444 #cue-content-container { 6445 margin: var(--content-padding-quarter); 6446 } 6447 `]}contentOffsetTop(e){let t=0;for(;e.offsetParent&&e!=this.offsetParent;)t+=e.offsetTop,e=e.offsetParent;return t}contentOffsetLeft(e){let t=0;for(;e.offsetParent&&e!=this.offsetParent;)t+=e.offsetLeft,e=e.offsetParent;return t}attachToTarget(e){if("south"==this.side){const t=this.contentOffsetTop(e)+e.offsetHeight;this.top=t+20,this.left=Math.max(this.contentOffsetLeft(e)-20,0)}this.hidden=!1}dismiss(){this.hidden=!0,this.signedIn&&window.csClient.dismissCue(this.cue)}render(){return W` 6448 <div 6449 id="bubble" 6450 class="${this.side}" 6451 ?hidden=${this.hidden} 6452 style="top:${this.top}px; left:${this.left}px;" 6453 > 6454 <sl-icon id="closebox" name="x" @click=${this.dismiss}></sl-icon> 6455 <div id="cue-content-container"> 6456 <slot></slot> 6457 </div> 6458 </div> 6459 `}};rf([Ve({type:String})],sf.prototype,"targetId",void 0),rf([Ve({type:String})],sf.prototype,"side",void 0),rf([Ve({type:String})],sf.prototype,"cue",void 0),rf([Ve({attribute:!1,type:Array})],sf.prototype,"dismissedCues",void 0),rf([Ve({type:Boolean})],sf.prototype,"signedIn",void 0),rf([Ve({type:Boolean})],sf.prototype,"hidden",void 0),rf([He()],sf.prototype,"top",void 0),rf([He()],sf.prototype,"left",void 0),sf=rf([Ue("chromedash-callout")],sf);var of=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let af,nf;async function lf(e,t,i){af&&nf===e&&i===af.onSubmitCustomHandler||(af=document.createElement("chromedash-add-stage-dialog"),af.featureId=e,af.featureType=t,af.onSubmitCustomHandler=i,document.body.appendChild(af),await af.updateComplete),nf=e,af.show()}let df=class extends ce{constructor(){super(...arguments),this.featureId=0,this.featureType=0,this.canSubmit=!1,this.onSubmitCustomHandler=null}static get styles(){return[...lo,c` 6460 #controls { 6461 padding: var(--content-padding); 6462 text-align: right; 6463 display: flex; 6464 justify-content: space-between; 6465 align-items: center; 6466 } 6467 #controls * + * { 6468 padding-left: var(--content-padding); 6469 } 6470 `]}show(){this.dialog.show()}renderSelectMenuItems(){const e=[];for(const t of Nc[this.featureType]){const i=Fc[t];e.push(W` 6471 <sl-option value="${t}"> ${i.name} </sl-option> 6472 `)}return e}getStageSelectValue(){return this.stageCreateSelect.value}handleStageCreate(){if(this.onSubmitCustomHandler)return this.onSubmitCustomHandler({stage_type:Number(this.getStageSelectValue())}),this.onSubmitCustomHandler=null,void this.dialog.hide();window.csClient.createStage(this.featureId,{stage_type:{form_field_name:"stage_type",value:this.getStageSelectValue()}}).then(()=>{this.dialog.hide(),location.reload()})}checkCanSubmit(){this.canSubmit=0!==this.getStageSelectValue()}renderStageSelect(){return W` 6473 <div id="controls"> 6474 <sl-select 6475 placement="top" 6476 hoist
6477 value="0" 6478 id="stage_create_select" 6479 size="small" 6480 @sl-change=${this.checkCanSubmit} 6481 style="width:16rem" 6482 > 6483 <sl-option value="0" disabled>Select a stage to create</sl-option> 6484 ${this.renderSelectMenuItems()} 6485 </sl-select> 6486 <sl-button 6487 variant="primary" 6488 @click=${this.handleStageCreate} 6489 ?disabled=${!this.canSubmit} 6490 size="small" 6491 >Create stage</sl-button 6492 > 6493 </div> 6494 `}render(){return W` 6495 <sl-dialog label="Create a new stage"> 6496 <p>Here, you can add additional stages to your feature as needed.</p> 6497 ${this.renderStageSelect()} 6498 </sl-dialog> 6499 `}};of([Ve({type:Number})],df.prototype,"featureId",void 0),of([Ve({type:Number})],df.prototype,"featureType",void 0),of([Ve({type:Boolean})],df.prototype,"canSubmit",void 0),of([Ve({attribute:!1})],df.prototype,"onSubmitCustomHandler",void 0),of([Ye("#stage_create_select")],df.prototype,"stageCreateSelect",void 0),of([Ye("sl-dialog")],df.prototype,"dialog",void 0),df=of([Ue("chromedash-add-stage-dialog")],df);var cf=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let hf,uf,pf;const ff=1,mf=2,gf=3,bf=4;async function vf(e,t,i,r){hf&&uf===e&&pf===t.id||(hf=document.createElement("chromedash-ot-prereqs-dialog"),hf.featureId=e,hf.stage=t,hf.dialogType=r,hf.milestone=i,document.body.appendChild(hf),await hf.updateComplete),hf.dialogType=r,uf=e,pf=t.id,hf.show()}let yf=class extends ce{constructor(){super(...arguments),this.featureId=0,this.milestone=0,this.dialogType=0}static get styles(){return[...lo,c` 6500 #prereqs-list li { 6501 margin-left: 8px; 6502 margin-bottom: 8px; 6503 } 6504 #prereqs-header { 6505 margin-bottom: 8px; 6506 } 6507 #update-button { 6508 margin-right: 8px; 6509 } 6510 .float-right { 6511 float: right; 6512 } 6513 `]}show(){this.renderRoot.querySelector("sl-dialog")?.show()}renderEndMilestoneExplanationDialog(){return W` <sl-dialog label="End milestone date"> 6514 <p> 6515 When a specific milestone is approved by API owners, the trial's end 6516 date is set based on the stable release date of (end milestone +2). Most 6517 of the time when a trial ends, the feature will be enabled by default 6518 within the next Chrome release. This additional trial time window 6519 ensures users don't see breakage before upgrading to the version with 6520 the feature enabled by default. 6521 </p> 6522 </sl-dialog>`}submitTrialExtension(){window.csClient.extendOriginTrial(this.featureId,this.stage.id).then(()=>{Vc("Extension processed!"),setTimeout(()=>{location.assign(`/feature/${this.featureId}`)},1e3)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}renderThreadMissingDialog(){return W`<sl-dialog label="Intent thread not found"> 6523 <p> 6524 LGTMs have been detected for this trial extension, but 6525 <strong>no intent thread link has been detected or provided</strong>. 6526 All extension proposals must be discussed publicly on blink-dev. Please 6527 add the value to the "Intent to Extend Experiment link" field by 6528 selecting "Edit fields" button on your feature's "Origin Trial" section. 6529 </p> 6530 </sl-dialog>`}renderFinalizeExtensionDialog(){return this.stage.intent_thread_url?W` <sl-dialog label="Finalize trial extension"> 6531 <p> 6532 LGTMs have been detected for this trial extension. This origin trial 6533 will be extended <strong>through milestone ${this.milestone}</strong>. 6534 Is this correct? 6535 </p> 6536 <br /> 6537 <sl-button 6538 class="float-right" 6539 variant="primary" 6540 size="small" 6541 @click=${()=>this.submitTrialExtension()} 6542 >Proceed</sl-button 6543 > 6544 <sl-button 6545 class="float-right" 6546 id="update-button" 6547 variant="info" 6548 size="small" 6549 @click=${()=>location.assign(`/guide/stage/${this.featureId}/${this.stage.id}?updateExtension`)} 6550 >Change milestone</sl-button 6551 > 6552 </sl-dialog>`:this.renderThreadMissingDialog()}renderExtensionPrereqs(){return W` <sl-dialog label="Origin trial extension prerequisites"> 6553 <div id="prereqs-header"> 6554 <strong>Before submitting an extension request</strong>, please ensure 6555 that your Intent to Extend Experiment has been drafted, and the required 6556 LGTMs have been received. 6557 <br /> 6558 <a 6559 target="_blank" 6560 href="https://www.chromium.org/blink/origin-trials/running-an-origin-trial/#what-is-the-process-to-extend-an-origin-trial" 6561 > 6562 View documentation on the trial extension process 6563 </a> 6564 </div> 6565 <br /> 6566 <sl-button 6567 id="continue-button" 6568 variant="primary" 6569 @click=${()=>location.assign(`/ot_extension_request/${this.featureId}/${this.stage.id}`)} 6570 size="small" 6571 >Proceed</sl-button 6572 > 6573 </sl-dialog>`}renderCreationPrereqs(){return W` <sl-dialog label="Origin trial creation prerequisites"> 6574 <div id="prereqs-header"> 6575 <strong>Before submitting a creation request</strong>, please ensure the 6576 following prerequisite steps have been completed: 6577 </div> 6578 <br /> 6579 <ul id="prereqs-list"> 6580 <li> 6581 The trial's UseCounter has landed on 6582 <a 6583 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom" 6584 target="_blank" 6585 > 6586 web_feature.mojom 6587 </a> 6588 and is being properly used. 6589 </li> 6590 <li> 6591 A Chromium trial name has landed on 6592 <a 6593 href="https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/runtime_enabled_features.json5" 6594 target="_blank" 6595 > 6596 runtime_enabled_features.json5 6597 </a> 6598 <strong>that has not been used for any previous trials</strong>. No 6599 trial names can be reused, even if used for the same feature! 6600 </li> 6601 <li> 6602 For a third-party trial, the feature entry in 6603 <a 6604 href="https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/runtime_enabled_features.json5" 6605 target="_blank" 6606 > 6607 runtime_enabled_features.json5 6608 </a> 6609 contains the key "origin_trial_allows_third_party: true". 6610 </li> 6611 <li> 6612 For a critical trial, the feature name has been added to the 6613 <a 6614 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/common/origin_trials/manual_completion_origin_trial_features.cc;l=17" 6615 target="_blank" 6616 > 6617 kHasExpiryGracePeriod array </a 6618 >. 6619 </li> 6620 </ul> 6621 <br /> 6622 <p> 6623 If you haven't already, please review the docs for 6624 <a 6625 href="https://www.chromium.org/blink/origin-trials/running-an-origin-trial/" 6626 >
6627 running an origin trial </a 6628 >. If you have any further questions, contact us at 6629 [email protected]. 6630 </p> 6631 <br /> 6632 <sl-button 6633 class="float-right" 6634 variant="primary" 6635 @click=${()=>location.assign(`/ot_creation_request/${this.featureId}/${this.stage.id}`)} 6636 size="small" 6637 >Proceed</sl-button 6638 > 6639 </sl-dialog>`}render(){return this.dialogType===gf?this.renderEndMilestoneExplanationDialog():this.dialogType===bf?this.renderFinalizeExtensionDialog():this.dialogType===mf?this.renderExtensionPrereqs():this.renderCreationPrereqs()}};cf([Ve({type:Number})],yf.prototype,"featureId",void 0),cf([Ve({attribute:!1})],yf.prototype,"stage",void 0),cf([Ve({type:Number})],yf.prototype,"milestone",void 0),cf([Ve({type:Number})],yf.prototype,"dialogType",void 0),yf=cf([Ue("chromedash-ot-prereqs-dialog")],yf);var _f=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let wf;async function kf(e,t,i,r,s,o,a,n){wf||(wf=document.createElement("chromedash-preflight-dialog"),document.body.appendChild(wf),await wf.updateComplete),wf.openWithContext(e,t,i,r,s,o,a,n)}function xf(e,t){const i=t?.[e];return null!=i&&(i.state===oc||i.state===ac)}function $f(e,t){return e.prerequisites.some(e=>!xf(e,t))}function Sf(e,t){return Cf(e,t).length>0}function Cf(e,t){const i=e.filter(e=>e.stage_id==t.id),r=i.filter(e=>"API Owners"!=e.team_name),s=r.filter(e=>!rc.includes(e.state));return s.sort((e,t)=>nc.indexOf(e.team_name)-nc.indexOf(t.team_name)),s}let Ef=class extends ce{static get styles(){return[...lo,c` 6640 li { 6641 margin-top: 0.5em; 6642 } 6643 6644 .missing-prereqs-list { 6645 padding-bottom: 1em; 6646 } 6647 6648 .edit-progress-item { 6649 visibility: hidden; 6650 margin-left: var(--content-padding-half); 6651 } 6652 6653 .active .edit-progress-item, 6654 .missing-prereqs .edit-progress-item, 6655 .pending:hover .edit-progress-item, 6656 .done:hover .edit-progress-item { 6657 visibility: visible; 6658 } 6659 6660 sl-button { 6661 float: right; 6662 margin: var(--content-padding-half); 6663 } 6664 `]}openWithContext(e,t,i,r,s,o,a,n){this._feature=e,this._progress=t,this._process=i,this._action=r,this._stage=s,this._feStage=o,this._featureGates=a,this._url=n,this.renderRoot.querySelector("sl-dialog")?.show()}hide(){this.renderRoot.querySelector("sl-dialog")?.hide()}handleCancel(){this.hide()}handleProceed(){this.hide()}renderEditLink(e,t,i){if(!i.field)return Y;const r=e&&t?`${e.outgoing_stage}/${t.id}`:"metadata";return W` 6665 <a 6666 class="edit-progress-item" 6667 href="/guide/stage/${this._feature.id}/${r}#id_${i.field}" 6668 @click=${this.hide} 6669 > 6670 Edit 6671 </a> 6672 `}makePrereqItem(e){let t={name:"TBD",stage:null};for(const i of this._process.stages||[])for(const r of i.progress_items)e==r.name&&(t={...r,stage:i});if($c.sections.some(e=>void 0!==t.field&&e.fields.includes(t.field))&&(t.stage=null),null!==t)return t;throw new Error("prerequiste is not a defined progress item: "+e)}renderDialogContent(){if(null==this._feature)return Y;const e=[];for(const t of this._action.prerequisites||[])xf(t,this._progress)||e.push(this.makePrereqItem(t));const t=Cf(this._featureGates,this._feStage);return W` 6673 Before you ${this._action.name}, it is strongly recommended that you do 6674 the following: 6675 <ul class="missing-prereqs-list"> 6676 ${e.map(e=>W` <li class="pending"> 6677 ${e.stage?.name||"Metadata"}: ${e.name} 6678 ${this.renderEditLink(e.stage,void 0!==e.stage?.outgoing_stage?function(e,t,i){return e===t.intent_stage?t:i.stages.find(t=>e===t.intent_stage)||null}(e.stage.outgoing_stage,this._stage,this._feature):null,e)} 6679 </li>`)} 6680 ${t.map(e=>W` 6681 <li class="pending"> 6682 Get approval or NA from the 6683 <a 6684 href="/feature/${this._feature.id}?gate=${e.id}" 6685 @click=${this.hide} 6686 >${e.team_name}</a 6687 > 6688 team 6689 </li> 6690 `)} 6691 </ul> 6692 6693 <sl-button 6694 href="${this._url}" 6695 target="_blank" 6696 size="small" 6697 @click=${this.handleProceed} 6698 >Proceed anyway 6699 </sl-button> 6700 <sl-button size="small" variant="warning" @click=${this.handleCancel} 6701 >Don't draft email yet</sl-button 6702 > 6703 `}render(){return W` 6704 <sl-dialog 6705 class="missing-prereqs" 6706 label="Missing Prerequisites" 6707 style="--width:fit-content" 6708 > 6709 ${this.renderDialogContent()} 6710 </sl-dialog> 6711 `}};_f([He()],Ef.prototype,"_feature",void 0),_f([He()],Ef.prototype,"_featureGates",void 0),_f([He()],Ef.prototype,"_progress",void 0),_f([He()],Ef.prototype,"_process",void 0),_f([He()],Ef.prototype,"_action",void 0),_f([He()],Ef.prototype,"_stage",void 0),_f([He()],Ef.prototype,"_feStage",void 0),_f([He()],Ef.prototype,"_url",void 0),Ef=_f([Ue("chromedash-preflight-dialog")],Ef);const If=String.raw`[A-Za-z0-9_#$&*+\/=?\{\}~^.\-]+`,Tf=String.raw`(([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6})`,Af="("+Tf+"|"+String.raw`(localhost|127\.0\.0\.1)`+")",Rf=String.raw`[\-_a-zA-Z0-9,]*`,Pf=If+"@"+Tf,Df=`${If}@google.com`,Of=Pf+"([ ]*,[ ]*"+Pf+")*",zf="(https?)://"+Af+"(:[0-9]+)?"+String.raw`(/\S*)?`,Lf={title:"Enter a full URL https://...",type:"url",placeholder:"https://...",pattern:String.raw`\s*`+zf+String.raw`\s*`},Ff={title:"Enter one or more comma-separated complete email addresses.",type:"text",multiple:!0,placeholder:"[email protected], [email protected]",pattern:Of},Nf={type:"text"},Mf={maxlength:1400};function qf(e){if(e&&"string"==typeof e&&e.length>0){const t=e.length;if(t>1e3)return{warning:`Length ${t} / 1400`}}}const Uf={type:"number",placeholder:"Milestone number"},Bf={earlier:"ot_milestone_desktop_start",later:"ot_milestone_desktop_end"},jf={earlier:"ot_milestone_android_start",later:"ot_milestone_android_end"},Vf={earlier:"ot_milestone_webview_start",later:"ot_milestone_webview_end"},Hf={earlier:"ot_milestone_desktop_start",allLater:"shipped_milestone",warning:"Origin trial starting milestone should be before all feature shipping milestones."},Wf={allEarlier:"ot_milestone_desktop_start",later:"shipped_milestone",warning:"All origin trials starting milestones should be before feature shipping milestone."},Gf={earlier:"ot_milestone_webview_start",allLater:"shipped_webview_milestone",warning:"Origin trial starting milestone should be before all feature shipping milestones."},Yf={allEarlier:"ot_milestone_webview_start",later:"shipped_webview_milestone",warning:"All origin trials starting milestones should be before feature shipping milestone."},Kf={earlier:"ot_milestone_android_start",allLater:"shipped_android_milestone",warning:"Origin trial starting milestone should be before all feature shipping milestones."},Qf={allEarlier:"ot_milestone_android_start",later:"shipped_android_milestone",warning:"All origin trials starting milestones should be before feature shipping milestone."},Xf={earlier:"dt_milestone_desktop_start",allLater:"shipped_milestone",warning:"Shipped milestone should be later than dev trial."},Jf={allEarlier:"dt_milestone_desktop_start",later:"shipped_milestone",warning:"Shipped milestone should be later than dev trial."},Zf={earlier:"dt_milestone_android_start",allLater:"shipped_android_milestone",warning:"Shipped milestone should be later than dev trial start milestone."},em={allEarlier:"dt_milestone_android_start",later:"shipped_android_milestone",warning:"Shipped milestone should be later than dev trial start milestone."},tm={earlier:"dt_milestone_ios_start",allLater:"shipped_ios_milestone",warning:"Shipped milestone should be later than dev trial start milestone."},im={allEarlier:"dt_milestone_ios_start",later:"shipped_ios_milestone",warning:"Shipped milestone should be later than dev trial start milestone."},rm={title:"Enter one or more full URLs, one per line:\nhttps://...\nhttps://...",multiple:!0,placeholder:"https://...\nhttps://...",rows:4,cols:50,maxlength:5e3,chromedash_single_pattern:zf,chromedash_split_pattern:String.raw`\s+`},sm=W` First milestone to ship with this status. Applies 6712to: Enabled by default, Deprecated, and Removed.`,om=W` First milestone to ship with this status. 6713Applies to Enabled by default, Deprecated, and Removed.`,am={name:{type:"input",attrs:Nf,required:!0,label:"Feature name",usage:Pd,help_text:W` <p> 6714 Capitalize only the first letter and the beginnings of proper nouns. 6715 </p>`,extra_help:W` <p> 6716 Each feature should have a unique name that is written as a noun phrase. 6717 </p> 6718 <ul> 6719 <li> 6720 Capitalize only the first letter and the beginnings of proper nouns. 6721 </li> 6722 <li> 6723 Avoid using verbs such as "add", "enhance", "deprecate", or "delete". 6724 Instead, simply name the feature itself and use the feature type and 6725 stage fields to indicate the intent of change. 6726 </li> 6727 <li> 6728 Do not include markup or markdown because they will not be rendered.. 6729 </li> 6730 <li> 6731 Write keywords and identifiers as they would appear to a web 6732 developer, not as they are in source code. In particular, do not use 6733 static method/property syntax for instance methods/properties. For 6734 example, for an instance method doStuff() on an interface 6735 NewInterface, write "NewInterface's doStuff() method" (not 6736 "NewInterface.doStuff() method"). Or for a method on a well-known 6737 global like Document, write "document.doStuff()" (not 6738 "Document.doStuff()"). 6739 </li> 6740 </ul> 6741 6742 <h4>Examples</h4> 6743 <ul> 6744 <li>Conversion Measurement API</li> 6745 <li>CSS Flexbox: intrinsic size algorithm</li> 6746 <li>Permissions-Policy header</li> 6747 </ul>`,check:(e,t)=>pm(t)},summary:{type:"textarea",required:!0,label:"Summary",usage:Pd,enterprise_offer_markdown:!0,enterprise_help_text:W` <p> 6748 This text will be used in the 6749 <a 6750 href="https://support.google.com/chrome/a/answer/7679408" 6751 target="_blank" 6752 >enterprise release notes</a 6753 >, which are publicly visible and primarily written for IT admins. All 6754 Enterprise policies must be included in this summary section. 6755 </p> 6756 <p> 6757 Explain what's changing from the point of view of an end-user, 6758 developer, or administrator. Indicate what the motivation is for this 6759 change, especially if thereâs security or privacy benefits to the 6760 change. If an admin should do something (like test or set a flag or an 6761 enterprise policy), please explain. Finally, if the change has a 6762 user-visible benefit (eg. better security or privacy), explain that 6763 motivation. If there are already publicly visible comms (e.g. blog 6764 posts), you should link to them here as well. 6765 </p> 6766 <p> 6767 See 6768 <a 6769 href="https://docs.google.com/document/d/1SdQ-DKeA5O7I8ju5Cb8zSM5S4NPwUACNJ9qbEhz-AYU" 6770 target="_blank" 6771 >go/releasenotes-examples</a 6772 > 6773 for examples. 6774 </p>`,help_text:W` 6775 <p> 6776 Text in the beta release post, the enterprise release notes, and other 6777 external sources will be based on this text. 6778 </p> 6779 <p> 6780 Write from a web developer's point of view. Begin with one line
6781 explaining what the feature does. Add one or two lines explaining how 6782 this feature helps developers. Write in a matter-of-fact manner and in 6783 the present tense. (This summary will be visible long after your project 6784 is finished.) Avoid language such as "a new feature" and "we propose". 6785 </p> 6786 `,extra_help:W` 6787 <p> 6788 Provide a one sentence description followed by one or two lines 6789 explaining how this feature works and how it helps web developers. 6790 </p> 6791 6792 <p> 6793 Note: This text communicates with more than just the rest of Chromium 6794 development. It's the part most visible to external readers and is used 6795 in the beta release announcement, enterprise release notes, and other 6796 communications. 6797 </p> 6798 6799 <ul> 6800 <li> 6801 Write from a web developer's point of view, not a browser developer's 6802 </li> 6803 <li> 6804 Do not use markup or markdown because they will not be rendered. 6805 </li> 6806 <li> 6807 Do not use hard or soft returns because they will not be rendered. 6808 </li> 6809 <li> 6810 Avoid phrases such as "a new feature". Every feature on the site was 6811 new when it was created. You don't need to repeat that information. 6812 </li> 6813 6814 <li> 6815 The first line should be a sentence fragment beginning with a verb. 6816 (See below.) This is the rare exception to the requirement to always 6817 use complete sentences. 6818 </li> 6819 6820 <li> 6821 "Conformance with spec" is not adequate. Most if not all features are 6822 in conformance to spec. 6823 </li> 6824 </ul> 6825 6826 <h4>Example</h4> 6827 <blockquote> 6828 Splits the HTTP cache using the top frame origin (and possibly subframe 6829 origin) to prevent documents from one origin from knowing whether a 6830 resource from another origin was cached. The HTTP cache is currently one 6831 per profile, with a single namespace for all resources and subresources 6832 regardless of origin or renderer process. Splitting the cache on top 6833 frame origins helps the browser deflect side-channel attacks where one 6834 site can detect resources in another site's cache. 6835 </blockquote> 6836 `,enterprise_extra_help:"",check:e=>{if(e&&"string"==typeof e&&e.length>0&&(e.length<100||e.length>5e3))return{warning:"Feature summary should be between 100 and 5000 characters long."}}},owner:{type:"input",name:"owner_emails",attrs:Ff,required:!0,label:"Feature owners",usage:Pd,help_text:W` Comma separated list of full email addresses.`},editors:{type:"input",name:"editor_emails",attrs:Ff,required:!1,label:"Feature editors",usage:{},help_text:W` Comma separated list of full email addresses. These users 6837 will be allowed to edit this feature, but will not be listed as feature 6838 owners. User groups are not supported.`},cc_recipients:{type:"input",name:"cc_emails",attrs:Ff,required:!1,label:"CC",usage:{},help_text:W` Comma separated list of full email addresses. These users 6839 will be notified of any changes to the feature, but do not gain permission 6840 to edit. User groups must allow posting from 6841 [email protected].`},unlisted:{type:"checkbox",label:"Unlisted",initial:!1,usage:{},help_text:W` Check this box to hide draft features in list views. Anyone 6842 with a link will be able to view the feature's detail page.`},accurate_as_of:{type:"checkbox",label:"Confirm accuracy",initial:!0,usage:{},help_text:W` Check this box to indicate that feature information is 6843 accurate as of today. (Selecting this avoids reminder emails for four 6844 weeks.)`},blink_components:{type:"datalist",required:!0,choices:void 0,label:"Blink component",usage:Pd,attrs:{placeholder:"Please select a Blink component"},help_text:W` Select the most specific component. If unsure, leave as 6845 "Blink".`},web_feature:{type:"datalist",required:!1,choices:void 0,label:"Web Feature ID",attrs:{placeholder:"Please select a Web feature ID"},usage:Pd,help_text:W` Select the web feature this belongs to in the 6846 <a href="https://github.com/web-platform-dx/web-features" target="_blank" 6847 >web-features project</a 6848 >. If your feature is not listed, 6849 <a 6850 href="https://github.com/web-platform-dx/web-features/issues/new?template=new-feature.yml" 6851 target="_blank" 6852 >propose a new web feature ID</a 6853 >, then return to this tab and choose "Missing feature".`},category:{type:"select",choices:Dl,initial:Dl.MISC[0],label:"Category",usage:{},help_text:W` Select the most specific category. If unsure, leave as 6854 "Miscellaneous".`},enterprise_product_category:{type:"radios",name:"enterprise_product_category",choices:Kl,label:"Enterprise product category",usage:{},help_text:W` Select the appropriate category.`},feature_type:{type:"select",disabled:!0,choices:Yl,label:"Feature type",usage:{},help_text:W` Feature type chosen at time of creation. 6855 <br /> 6856 <p style="color: red"> 6857 <strong>Note:</strong> The feature type field cannot be changed. If this 6858 field needs to be modified, a new feature would need to be created. 6859 </p>`,check:(e,t)=>pm(t)},feature_type_radio_group:{name:"feature_type",type:"radios",choices:Gl,label:"Feature type",usage:{},help_text:W`If all goes well, how will developers experience the change 6860 you're planning to make to Chromium? 6861 <br /> 6862 <p style="color: red"> 6863 <strong>Note:</strong> The feature type field cannot be changed. If this 6864 field needs to be modified, a new feature would need to be created. 6865 </p>`,check:(e,t)=>pm(t)},active_stage_id:{type:"select",computedChoices(e){const t={};for(const i of e.stages){const r=Gc(i,e);r&&(t[i.id]=[i.id,r])}return t},label:"Active stage",usage:{},help_text:W`The active stage opens by default in this feature's page. 6866 And, it roughly indicates progress in the process.`},search_tags:{type:"input",attrs:Nf,required:!1,label:"Search tags",usage:Pd,help_text:W` Comma separated keywords used only in search.`},bug_url:{type:"input",attrs:Lf,required:!1,label:"Tracking bug URL",usage:Pd,help_text:W` Tracking bug url (https://bugs.chromium.org/...). This bug 6867 should have "Type=Feature" set and be world readable. Note: This field 6868 only accepts one URL. 6869 <br /><br /> 6870 <a 6871 target="_blank" 6872 href="https://bugs.chromium.org/p/chromium/issues/entry" 6873 > 6874 Create tracking bug</a 6875 >`},launch_bug_url:{type:"input",attrs:Lf,required:!1,label:"Launch URL",usage:Pd,help_text:W` Launch URL (https://launch.corp.google.com/...) to track 6876 internal approvals, if any. 6877 <br /><br /> 6878 <a target="_blank" href="https://launch.corp.google.com/"> 6879 Create a launch</a 6880 >.`},screenshot_links:{type:"attachments",attrs:rm,required:!1,label:"Screenshot link(s)",usage:{[Hl.Incubate]:new Set([Ed.ReleaseNotes]),[Hl.Existing]:new Set([Ed.ReleaseNotes]),[Hl.CodeChange]:new Set([Ed.ReleaseNotes]),[Hl.Deprecation]:new Set([Ed.ReleaseNotes]),[Hl.Enterprise]:new Set([Ed.ReleaseNotes])},help_text:W` Optional: Links to screenshots showcasing this feature (one 6881 URL per line). Be sure to link directly to the image with a URL ending in 6882 .png, .gif, or .jpg, rather than linking to an HTML page that contains the 6883 image. Or, use the upload button to upload an image to be served from 6884 chromestatus.com. These will be shared publicly.`,check:async e=>{const t={warning:"One or more urls are not actual images or requires the consumer some kind\n of authentication to access them. Use a valid link to an actual image free\n of authentication or upload your image."},i=e.split("\n").filter(e=>!!e).map(e=>e.trim());if(!i.length)return;if(i.some(e=>{try{return new URL(e),!1}catch{return!0}}))return t;return(await Promise.all(i.map(e=>fetch(e,{method:"HEAD"}).then(e=>e.blob()).then(e=>e.type).catch(()=>"error")))).some(e=>!e.startsWith("image"))?t:void 0}},first_enterprise_notification_milestone:{type:"input",attrs:Uf,required:!1,label:"First notification milestone",usage:{},help_text:W` Optional: Unless you're sure you need to use this, leave it 6885 blank. 6886 <br /><br /> 6887 If you leave this blank, we will automatically find the right milestone. 6888 <br /><br /> 6889 If you're not ready to communicate this feature to enterprises yet, what 6890 is the earliest milestone that you expect to be ready to communicate it? 6891 You can change this later. In general, you should provide enterprises 6892 notice at least 3 milestones before making an impactful change.`,check:(e,t,i)=>async function(e,t){if(!e)return;const i=await window.csClient.getSpecifiedChannels(e,e).then(t=>t[e]?.stable_date),r=t?await window.csClient.getSpecifiedChannels(t,t).then(t=>t[e]?.stable_date):void 0;if(!i)return{error:`Unknown milestone ${e}`};if(r&&Date.parse(r)<Date.now())return{warning:`Feature was already shown in milestone ${t}, this cannot be changed`};if(Date.parse(i)<=Date.now())return{warning:`Milestone ${e} was already released, choose a future milestone`};return}(e,i)},motivation:{type:"textarea",required:!1,label:"Motivation",usage:{[Hl.Incubate]:new Set([Ed.Prototype]),[Hl.Existing]:new Set([Ed.Prototype]),[Hl.Deprecation]:new Set([Ed.DeprecateAndRemove])},help_text:W` Explain why the web needs this change. It may be useful to 6893 describe what web developers are forced to do without it. When possible, 6894 add links to your explainer (under 6895 <a href="#id_explainer_links">Explainer link(s)</a>) backing up your 6896 claims. <br /><br /> 6897 This text is sometimes included with the summary in the beta post, 6898 enterprise release notes and other external documents. Write in a 6899 matter-of-fact manner and in the present tense. 6900 <br /><br /> 6901 <a 6902 target="_blank" 6903 href="https://github.com/GoogleChrome/chromium-dashboard/wiki/EditingHelp#motivation-example" 6904 > 6905 Example</a 6906 >`},deprecation_motivation:{name:"motivation",type:"textarea",required:!1,label:"Motivation",usage:{[Hl.Deprecation]:new Set([Ed.DeprecateAndRemove])},help_text:W` Deprecations and removals must have strong reasons, backed 6907 up by measurements. There must be clear and actionable paths forward for 6908 developers. 6909 <br /><br /> 6910 This text is sometimes included with the summary in the beta post, 6911 enterprise release notes and other external documents. Write in a 6912 matter-of-fact manner and in the present tense. 6913 <br /><br /> 6914 Please see 6915 <a 6916 target="_blank" 6917 href="https://docs.google.com/a/chromium.org/document/d/1LdqUfUILyzM5WEcOgeAWGupQILKrZHidEXrUxevyi_Y/edit?usp=sharing" 6918 > 6919 Removal guidelines</a 6920 >.`},initial_public_proposal_url:{type:"input",attrs:Lf,required:!1,label:"Initial public proposal URL",usage:Pd,help_text:W` Link to the first public proposal to create this feature.`,extra_help:W` If there isn't another obvious place to propose your 6921 feature, create a 6922 <a 6923 target="_blank" 6924 href="https://github.com/WICG/proposals#what-does-a-proposal-look-like" 6925 > 6926 WICG proposal</a 6927 >. You can use your proposal document to help you socialize the problem 6928 with other vendors and developers.`},explainer_links:{type:"textarea",attrs:rm,required:!1,label:"Explainer link(s)",usage:{[Hl.Incubate]:Id,[Hl.Deprecation]:Rd},help_text:W`Link to explainer(s) (one URL per line). See the 6929 <a 6930 target="_blank" 6931 href="https://www.chromium.org/blink/launching-features/#start-incubating" 6932 >launch process</a 6933 > 6934 for detailed advice, or expand the extra help here for a summary.`,extra_help:W`<p>
6935 Host your explainer somewhere like Github (and <i>not</i> Google Docs) 6936 that makes it easy to file issues. Your organization may recommend a 6937 <a 6938 target="_blank" 6939 href="https://www.chromium.org/blink/launching-features/#start-incubating" 6940 >particular place</a 6941 >. 6942 </p> 6943 <p> 6944 See the TAG guide to writing 6945 <a target="_blank" href="https://tag.w3.org/explainers/">Explainers</a> 6946 for several examples of good explainers and tips for effective 6947 explainers. 6948 </p> 6949 <p> 6950 If you've already made an initial public proposal (see above), post your 6951 explainer to that thread. Otherwise, make an initial proposal based on 6952 your explainer. 6953 </p> 6954 <p> 6955 Once a second organization is interested in the WICG proposal, you can 6956 move the explainer into the WICG. The 6957 <a href="https://wicg.github.io/admin/charter.html#chairs" 6958 >WICG co-chairs</a 6959 > 6960 can help you. 6961 </p> 6962 <p> 6963 If you want help, ask for a 6964 <a 6965 target="_blank" 6966 href="https://sites.google.com/a/chromium.org/dev/blink/spec-mentors" 6967 >specification mentor</a 6968 >. 6969 </p>`,check:e=>fm(e,"Explainers should not be hosted on Google Docs.")},spec_link:{type:"input",attrs:Lf,required:!1,label:"Spec link",usage:Pd,help_text:W` Link to the spec, if and when available. When implementing 6970 a spec update, please link to a heading in a published spec rather than a 6971 pull request when possible.`,extra_help:W`<p> 6972 Specifications should be written in the format and hosted in the URL space 6973 expected by your target standards body. For example, the W3C expects 6974 <a href="https://respec.org/" target="_blank">Respec</a> or 6975 <a href="https://speced.github.io/bikeshed/" target="_blank">Bikeshed</a> 6976 hosted on w3.org or in Github Pages. The IETF expects an 6977 <a href="https://authors.ietf.org/" target="_blank">Internet-Draft</a> 6978 hosted in the 6979 <a href="https://datatracker.ietf.org/" target="_blank">Datatracker</a>. 6980 </p>`,check:e=>fm(e,"Specifications should not be hosted on Google Docs.")},comments:{type:"textarea",name:"feature_notes",attrs:{rows:4},required:!1,label:"Comments",usage:{},help_text:W` Additional comments, caveats, info...`},standard_maturity:{type:"select",choices:fc,initial:fc.PROPOSAL_STD[0],label:"Standard maturity",usage:{},help_text:W` How far along is the standard that this feature implements?`},api_spec:{type:"checkbox",initial:!1,label:"API spec",usage:{},help_text:W` The spec document has details in a specification language 6981 such as Web IDL, or there is an existing MDN page.`},automation_spec:{type:"checkbox",initial:!1,label:"Automation spec",usage:{},help_text:W` The platform has sufficient automation features for website 6982 authors to test use of this new feature. These automation features can 6983 include new automation APIs, like WebDriver BiDi modules, that are defined 6984 in this feature's specification.`},spec_mentors:{type:"input",name:"spec_mentor_emails",attrs:Ff,required:!1,label:"Spec mentors",usage:{},help_text:W` Experienced 6985 <a target="_blank" href="https://www.chromium.org/blink/spec-mentors"> 6986 spec mentors</a 6987 > 6988 are available to help you improve your feature spec.`},intent_to_implement_url:{type:"input",attrs:Lf,required:!1,label:"Intent to Prototype link",usage:Pd,help_text:W` After you have started the "Intent to Prototype" discussion 6989 thread, link to it here.`},intent_to_deprecate_url:{type:"input",attrs:Lf,required:!1,label:"Intent to Deprecate and Remove link",usage:Pd,help_text:W` After you have started the "Intent to Deprecate and Remove" 6990 discussion thread, link to it here.`},doc_links:{type:"textarea",attrs:rm,required:!1,label:"Doc link(s)",usage:Pd,help_text:W` Links to design doc(s) (one URL per line), if and when 6991 available. [This is not required to send out an Intent to Prototype. Please 6992 update the intent thread with the design doc when ready]. An explainer 6993 and/or design doc is sufficient to start this process. [Note: Please include
6994 links and data, where possible, to support any claims.`},measurement:{type:"textarea",attrs:{rows:4},required:!1,label:"Measurement",usage:Pd,help_text:W` It's important to measure the adoption and success of 6995 web-exposed features. Note here what measurements you have added to track 6996 the success of this feature, such as a link to the UseCounter(s) you have 6997 set up.`},availability_expectation:{type:"textarea",attrs:{rows:4},required:!1,label:"Availability expectation",usage:Pd,help_text:W` What is your availability expectation for this feature? 6998 Examples:`,extra_help:W` 6999 <ul> 7000 <li> 7001 Feature is available on Web Platform Baseline within 12 months of 7002 launch in Chrome. 7003 </li> 7004 7005 <li> 7006 Feature is available only in Chromium browsers for the foreseeable 7007 future. 7008 </li> 7009 </ul> 7010 `},adoption_expectation:{type:"textarea",attrs:{rows:4},required:!1,label:"Adoption expectation",usage:Pd,help_text:W` What is your adoption expectation for this feature? 7011 Examples:`,extra_help:W` 7012 <ul> 7013 <li> 7014 Feature is considered a best practice for some use case within 12 7015 months of reaching Web Platform baseline. 7016 </li> 7017 7018 <li> 7019 Feature is used by specific partner(s) to provide functionality within 7020 12 months of launch in Chrome. 7021 </li> 7022 7023 <li> 7024 At least 3 major abstractions replace their use of an existing feature 7025 with this feature within 24 months of reaching mainline. 7026 </li> 7027 </ul> 7028 `},adoption_plan:{type:"textarea",attrs:{rows:4},required:!1,label:"Adoption plan",usage:Pd,help_text:W` What is the plan to achieve the stated expectations? Please 7029 provide a plan that covers availability and adoption for the feature.`},security_review_status:{type:"select",choices:mc,initial:mc.REVIEW_PENDING[0],label:"Security review status",usage:{},help_text:W` Status of the security review.`},privacy_review_status:{type:"select",choices:mc,initial:mc.REVIEW_PENDING[0],label:"Privacy review status",usage:{},help_text:W`Status of the privacy review.`},tag_review:{type:"textarea",attrs:{...Mf,rows:2},required:!1,label:"TAG specification review",usage:Pd,help_text:W` Link(s) to TAG specification review(s), or explanation why 7030 this is not needed.`,extra_help:W` <p> 7031 The 7032 <a target="_blank" href="https://www.w3.org/2001/tag/" 7033 >W3C Technical Architecture Group</a 7034 > 7035 (TAG) is a special working group of the W3C that consists of a few 7036 appointed and elected members, all of whom are experienced members of 7037 the web standards community. The Blink launch process has a 7038 <a 7039 target="_blank" 7040 href="https://www.chromium.org/blink/launching-features/wide-review/#tag" 7041 >formal requirement for requesting a TAG specification review</a 7042 > 7043 for all features. The review happens publicly on a GitHub issue. 7044 </p> 7045 <p> 7046 You will likely have asked for an "<a 7047 target="_blank" 7048 href="https://github.com/w3ctag/design-reviews/issues/new?template=000-incubation-review.yaml" 7049 >Early design/incubation review</a 7050 >" earlier in the process to get the TAG familiar with your feature. 7051 This isn't that. 7052 </p> 7053 <p> 7054 It's recommended that you file a TAG specification review as soon as 7055 your specification is written, and at least a month ahead of sending an 7056 Intent to Ship. There may be some work involved in preparing your 7057 feature for review. See the 7058 <a 7059 target="_blank" 7060 href="https://www.chromium.org/blink/launching-features/wide-review/#tag" 7061 >launch process</a 7062 > 7063 for help picking which kind of specification review to file, and then 7064 look through that template to find what data to collect. 7065 </p> 7066 <p> 7067 A large number of Intents to Ship are delayed because a TAG 7068 specification review was only recently filed and engagement from the TAG 7069 can take multiple weeks to multiple months. Note that the API owners can 7070 approve shipping even if the TAG hasn't replied to your review request, 7071 as long as you've made a reasonable effort to obtain their review with 7072 enough time for them to give feedback. 7073 </p>`,check:qf},tag_review_status:{type:"select",choices:mc,initial:mc.REVIEW_PENDING[0],label:"TAG specification review status",usage:Pd,help_text:W`Status of the TAG specification review.`},intent_to_ship_url:{type:"input",attrs:Lf,required:!1,label:"Intent to Ship link",usage:Pd,help_text:W`After you have started the "Intent to Ship" discussion 7074 thread, link to it here.`},announcement_url:{type:"input",attrs:Lf,required:!1,label:"Ready for Developer Testing link",usage:Pd,help_text:W`After you have started the "Ready for Developer Testing" 7075 discussion thread, link to it here.`},intent_to_experiment_url:{type:"input",attrs:Lf,required:!1,label:"Intent to Experiment link",usage:Pd,help_text:W`After you have started the "Intent to Experiment" discussion 7076 thread, link to it here.`},intent_to_extend_experiment_url:{type:"input",attrs:Lf,required:!1,label:"Intent to Extend Experiment link",usage:Pd,help_text:W`If this feature has an "Intent to Extend Experiment" 7077 discussion thread, link to it here.`},ot_extension__intent_to_extend_experiment_url:{type:"input",attrs:Lf,required:!0,label:"Intent to Extend Experiment link",usage:Pd,help_text:W` Link to the approved Intent to Extend Experiment, as per 7078 <a 7079 target="_blank" 7080 href="https://www.chromium.org/blink/origin-trials/running-an-origin-trial/#what-is-the-process-to-extend-an-origin-trial" 7081 > 7082 the trial extension process </a 7083 >.`},r4dt_url:{name:"intent_to_experiment_url",type:"input",attrs:Lf,required:!1,label:"Request for Deprecation Trial link",usage:Pd,help_text:W`After you have started the "Request for Deprecation Trial" 7084 discussion thread, link to it here.`},interop_compat_risks:{type:"textarea",required:!1,label:"Interoperability and compatibility risks",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Describe the degree of 7085 <a 7086 target="_blank" 7087 href="https://www.chromium.org/blink/guidelines/web-platform-changes-guidelines#finding-balance" 7088 > 7089 interoperability risk</a 7090 >. For a new feature, the main risk is that it fails to become an 7091 interoperable part of the web platform if other browsers do not implement 7092 it. For a removal, please review our 7093 <a 7094 target="_blank"
7095 href="https://docs.google.com/document/d/1RC-pBBvsazYfCNNUSkPqAVpSpNJ96U8trhNkfV0v9fk/edit" 7096 > 7097 principles of web compatibility</a 7098 >.<br /> 7099 <br /> 7100 Please include citation links below where possible. Examples include 7101 resolutions from relevant standards bodies (e.g. W3C working group), 7102 tracking bugs, or links to online conversations. 7103 <a 7104 target="_blank" 7105 href="https://github.com/GoogleChrome/chromium-dashboard/wiki/EditingHelp#interoperability-and-compatibility-risks-example" 7106 > 7107 Example</a 7108 >.`},safari_views:{type:"select",choices:gc,initial:gc.NO_PUBLIC_SIGNALS[0],label:"WebKit views",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` See 7109 <a 7110 target="_blank" 7111 href="https://www.chromium.org/blink/launching-features/wide-review/" 7112 > 7113 chromium.org/blink/launching-features/wide-review 7114 </a>`},safari_views_link:{type:"input",attrs:Lf,required:!1,label:"",displayLabel:"WebKit views link",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W`Citation link.`},safari_views_notes:{type:"textarea",attrs:{rows:2,placeholder:"Notes"},required:!1,label:"",displayLabel:"WebKit views notes",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:""},ff_views:{type:"select",choices:bc,initial:bc.NO_PUBLIC_SIGNALS[0],label:"Firefox views",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` See 7115 <a 7116 target="_blank" 7117 href="https://www.chromium.org/blink/launching-features/wide-review/" 7118 > 7119 chromium.org/blink/launching-features/wide-review 7120 </a>`},ff_views_link:{type:"input",attrs:Lf,required:!1,label:"",displayLabel:"Firefox views link",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Citation link.`},ff_views_notes:{type:"textarea",attrs:{...Mf,rows:2,placeholder:"Notes"},required:!1,label:"",displayLabel:"Firefox views notes",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:"",check:qf},web_dev_views:{type:"select",choices:vc,initial:vc.DEV_NO_SIGNALS[0],label:"Web / Framework developer views",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` If unsure, default to "No signals". See 7121 <a target="_blank" href="https://goo.gle/developer-signals"> 7122 https://goo.gle/developer-signals</a 7123 >`},web_dev_views_link:{type:"input",attrs:Lf,required:!1,label:"",displayLabel:"Web / Framework developer views link",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Citation link.`},web_dev_views_notes:{type:"textarea",attrs:{rows:2,placeholder:"Notes"},required:!1,label:"",displayLabel:"Web / Framework developer views notes",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Reference known representative examples of opinions, both 7124 positive and negative.`},other_views_notes:{type:"textarea",attrs:{rows:4,placeholder:"Notes"},required:!1,label:"Other views",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` For example, other browsers.`},ergonomics_risks:{type:"textarea",required:!1,label:"Ergonomics risks",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Are there any other platform APIs this feature will 7125 frequently be used in tandem with? Could the default usage of this API make 7126 it hard for Chrome to maintain good performance (i.e. synchronous return, 7127 must run on a certain thread, guaranteed return timing)?`},activation_risks:{type:"textarea",required:!1,label:"Activation risks",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Will it be challenging for developers to take advantage of
7128 this feature immediately, as-is? Would this feature benefit from having 7129 polyfills, significant documentation and outreach, and/or libraries built on 7130 top of it to make it easier to use?`},security_risks:{type:"textarea",required:!1,label:"Security Risks",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` List any security considerations that were taken into 7131 account when designing this feature.`},webview_risks:{type:"textarea",required:!1,label:"WebView application risks",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Does this feature deprecate or change behavior of existing 7132 APIs, such that it has potentially high risk for Android WebView-based 7133 applications? (See 7134 <a 7135 target="_blank" 7136 href="https://new.chromium.org/developers/webview-changes/" 7137 > 7138 here</a 7139 > 7140 for a definition of "potentially high risk", information on why changes to 7141 this platform carry higher risk, and general rules of thumb for which 7142 changes have higher or lower risk) If so: 7143 <ul> 7144 <li> 7145 Please use a base::Feature killswitch (<a 7146 target="_blank" 7147 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/common/features.h" 7148 >examples here</a 7149 >) that can be flipped off in case of compat issues 7150 </li> 7151 <li>Consider contacting [email protected] for advice</li> 7152 <li> 7153 If you are not sure, just put "not sure" as the answer and the API 7154 owners can help during the review of your Intent to Ship 7155 </li> 7156 </ul>`},experiment_goals:{type:"textarea",required:!1,label:"Experiment goals",usage:Pd,help_text:W` Which pieces of the API surface are you looking to gain 7157 insight on? What metrics/measurement/feedback will you be using to 7158 validate designs? Double check that your experiment makes sense given that 7159 a large developer (e.g. a Google product or Facebook) likely can't use it 7160 in production due to the limits enforced by origin trials. 7161 <br /><br /> 7162 If you send an Intent to Extend Origin Trial, highlight areas for 7163 experimentation. They should not be an exact copy of the goals from the 7164 first Intent to Experiment.`},experiment_timeline:{type:"textarea",attrs:{rows:2,placeholder:"This field is deprecated",disabled:!0},required:!1,label:"Experiment timeline",usage:{[Hl.Incubate]:new Set([Ed.Experiment]),[Hl.Existing]:new Set([Ed.Experiment]),[Hl.Deprecation]:new Set([Ed.Experiment])},help_text:W` When does the experiment start and expire? Deprecated: 7165 Please use the numeric fields above instead.`,deprecated:!0},ot_milestone_desktop_start:{type:"input",attrs:Uf,required:!1,label:"OT desktop start",usage:Pd,help_text:W` First desktop milestone that will support an origin trial 7166 of this feature.`,check:(e,t)=>um([Bf,Hf],t)},ot_milestone_desktop_end:{type:"input",attrs:Uf,required:!1,label:"OT desktop end",usage:Pd,help_text:W` Last desktop milestone that will support an origin trial of 7167 this feature.`,check:(e,t)=>um([Bf],t)},ot_milestone_android_start:{type:"input",attrs:Uf,required:!1,label:"OT Android start",usage:Pd,help_text:W` First android milestone that will support an origin trial 7168 of this feature.`,check:(e,t)=>um([jf,Kf],t)},ot_milestone_android_end:{type:"input",attrs:Uf,required:!1,label:"OT Android end",usage:Pd,help_text:W` Last android milestone that will support an origin trial of 7169 this feature.`,check:(e,t)=>um([jf],t)},ot_milestone_webview_start:{type:"input",attrs:Uf,required:!1,label:"OT WebView start",usage:Pd,help_text:W` First WebView milestone that will support an origin trial 7170 of this feature.`,check:(e,t)=>um([Vf,Gf],t)},ot_milestone_webview_end:{type:"input",attrs:Uf,required:!1,label:"OT WebView end",usage:Pd,help_text:W` Last WebView milestone that will support an origin trial of 7171 this feature.`,check:(e,t)=>um([Vf],t)},experiment_risks:{type:"textarea",required:!1,label:"Experiment risks",usage:{},help_text:W` When this experiment comes to an end are there any risks to 7172 the sites that were using it, for example losing access to important storage 7173 due to an experimental storage API?`},experiment_extension_reason:{type:"textarea",required:!1,label:"Experiment extension reason",usage:{[Hl.Incubate]:new Set([Ed.Experiment]),[Hl.Existing]:new Set([Ed.Experiment]),[Hl.Deprecation]:new Set([Ed.Experiment])},help_text:W` If this is a repeated or extended experiment, explain why 7174 it's being repeated or extended. Also, fill in discussion link fields below.`},extension_desktop_last:{type:"input",attrs:Uf,required:!0,label:"Trial extension end milestone",usage:Pd,help_text:W` The last desktop milestone in which the trial will be 7175 available after extension.`},extension_android_last:{type:"input",attrs:Uf,required:!1,label:"Trial extension Android end",usage:Pd,help_text:W` The last android milestone in which the trial will be 7176 available after extension.`},extension_webview_last:{type:"input",attrs:Uf,required:!1,label:"Trial extension WebView end",usage:Pd,help_text:W` The last WebView milestone in which the trial will be 7177 available after extension.`},ot_extension__milestone_desktop_last:{type:"input",attrs:Uf,required:!0,label:"Trial extension end milestone",usage:{},help_text:W` The last milestone in which the trial will be available 7178 after extension.`,check:e=>async function(e){if("number"==typeof e&&isNaN(e))return{error:"Invalid milestone format."};for(let t=0;t<e.length;t++)if(e[t]<"0"||e[t]>"9")return{error:"Invalid milestone format."};const t=parseInt(e);if(t>=1e3)return{error:"Milestone is too distant."};const i=await fetch("https://chromiumdash.appspot.com/fetch_milestone_schedule"),r=await i.json();if(parseInt(r.mstones[0].mstone)>t)return{error:"End milestone cannot be in the past."};return}(e)},ongoing_constraints:{type:"textarea",required:!1,label:"Ongoing Constraints",usage:{[Hl.Incubate]:new Set([Ed.Experiment]),[Hl.Existing]:new Set([Ed.Experiment]),[Hl.Deprecation]:new Set([Ed.Experiment])},help_text:W` Do you anticipate adding any ongoing technical constraints 7179 to the codebase while implementing this feature? We prefer to avoid features 7180 that require or assume a specific architecture. For most features, the 7181 answer is "None."`},rollout_plan:{type:"select",choices:Bl,initial:Bl.ROLLOUT_100[0],label:"Rollout plan",usage:{[Hl.Incubate]:new Set([Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.PSA]),[Hl.Deprecation]:new Set([Ed.Experiment,Ed.Ship])},help_text:W`Normally, WP features that ship in a milestone go to all 7182 users of that milestone. If your feature needs to roll out in any other way, 7183 mark that here.`},origin_trial_feedback_url:{type:"input",attrs:Lf,required:!1,label:"Origin trial feedback summary",usage:Pd,help_text:W` If your feature was available as an origin trial, link to a 7184 summary of usage and developer feedback. If not, leave this empty. DO NOT 7185 USE FEEDBACK VERBATIM without prior consultation with the Origin Trials 7186 team.`},ot_chromium_trial_name:{type:"input",attrs:Nf,required:!0,label:"Chromium trial name",usage:Pd,help_text:W` Name for the trial, given as the value of the property 7187 "origin_trial_feature_name" as specified in 7188 <a 7189 target="_blank" 7190 href="https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/runtime_enabled_features.json5" 7191 >runtime_enabled_features.json5</a 7192 >. 7193 <br /> 7194 <p style="color: red"> 7195 <strong>Note:</strong> This name should be unique and should not be used 7196 by any previous origin trials! 7197 </p>`},ot_documentation_url:{type:"input",attrs:Lf,label:"Documentation link",usage:Pd,help_text:W` Link to more information to help developers use the trial's 7198 feature (e.g. blog post, Github explainer, etc.).`},ot_creation__ot_documentation_url:{type:"input",attrs:Lf,required:!0,label:"Documentation link",usage:{},help_text:W` Link to more information to help developers use the trial's 7199 feature (e.g. blog post, Github explainer, etc.).`},ot_emails:{type:"input",attrs:Ff,required:!1,label:"Origin trial contacts",usage:{},help_text:W` List any other individuals or groups to include on the 7200 contact list (e.g. for reminders on trial milestones). Mailing list emails 7201 can be used here, but only email addresses of individuals will receive 7202 access to view registrant data on 7203 <a target="_blank" href="http://go/ot-registrants-dashboard" 7204 >go/ot-registrants-dashboard</a 7205 >. 7206 <p> 7207 <strong> 7208 Please prefer using "@google.com" domain email addresses for any 7209 contacts that have one. 7210 </strong> 7211 </p>`},ot_has_third_party_support:{type:"checkbox",initial:!1,label:"Origin trial supports third party origins",usage:{},help_text:W` Whether this trial supports third party origins. See 7212 <a href="https://web.dev/third-party-origin-trials/">this article</a> 7213 for more information. The feature should have 7214 "origin_trial_allows_third_party" set to "true" in 7215 <a 7216 target="_blank" 7217 href="https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/runtime_enabled_features.json5" 7218 >runtime_enabled_features.json5</a 7219 >`},ot_is_critical_trial:{type:"checkbox",initial:!1,label:"Critical origin trial",usage:{},help_text:W` See 7220 <a href="https://goto.google.com/running-an-origin-trial" 7221 >go/running-an-origin-trial</a 7222 > 7223 for criteria and additional process requirements. The feature name must be 7224 added to the "kHasExpiryGracePeriod" array in 7225 <a 7226 target="_blank" 7227 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/common/origin_trials/manual_completion_origin_trial_features.cc" 7228 >manual_completion_origin_trial_features.cc</a 7229 >`},ot_is_deprecation_trial:{type:"checkbox",initial:!1,label:"Deprecation trial",usage:{},help_text:W` Is this a deprecation trial? See the 7230 <a 7231 href="https://www.chromium.org/blink/launching-features/#deprecation-trial" 7232 >deprecation trial section</a 7233 > 7234 for more information.`},ot_request_note:{type:"textarea",required:!1,label:"Anything else?",usage:{},help_text:W`<p> 7235 Let us know if you have any further questions or comments. 7236 </p>`},ot_webfeature_use_counter:{type:"input",attrs:{...Nf,placeholder:'e.g. "kWebFeature"',pattern:String.raw`k\S*`},label:"UseCounter name",usage:Pd,help_text:W` For measuring usage, this must be a single named value from 7237 the WebFeature, WebDXFeature, or CSSSampleId enum, e.g. kWorkerStart. The 7238 use counter must be landed in either 7239 <a 7240 target="_blank" 7241 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom" 7242 >
7242web_feature.mojom</a 7243 >, 7244 <a 7245 target="_blank" 7246 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/webdx_feature.mojom" 7247 >webdx_feature.mojom</a 7248 >, or 7249 <a 7250 target="_blank" 7251 href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom" 7252 >css_property_id.mojom</a 7253 >. Not required for deprecation trials.`},ot_webfeature_use_counter__type:{type:"radios",label:"Use counter type",choices:Vl,usage:{},help_text:W`Which type of use counter the feature is using. This can be 7254 determined by which file the use counter is defined in.`},ot_require_approvals:{type:"checkbox",initial:!1,label:"Trial participation requires approval",usage:{},help_text:W` <p> 7255 Will this trial require registrants to receive approval before 7256 participating? Please reach out to [email protected] 7257 beforehand to discuss options here. 7258 </p>`},ot_approval_buganizer_component:{type:"input",attrs:{type:"number"},required:!0,label:"Approvals Buganizer component ID",usage:{},help_text:W`Buganizer component ID used for approvals requests.`},ot_approval_buganizer_custom_field_id:{type:"input",attrs:{type:"number"},required:!0,label:"Approvals Buganizer custom field ID",usage:{},help_text:W`The Buganizer custom field ID for trial registration 7259 approval. This custom field in Buganizer provides approval/rejection 7260 rationales for registration requests under ot_approval_buganizer_component.`},ot_approval_group_email:{type:"input",required:!0,attrs:{...Nf,pattern:Df,placeholder:'ex. "[email protected]"'},label:"Registration request notifications group",usage:{},help_text:W` <p> 7261 Google group email to be used for new registration request notifications. 7262 Please supply a '@google.com' domain email address only. 7263 </p>`},ot_approval_criteria_url:{type:"input",attrs:Lf,required:!0,label:"Approval criteria link",usage:{},help_text:W` <p> 7264 Link to public documentation describing the requirements to be approved 7265 for trial participation. 7266 </p>`},ot_creation__intent_to_experiment_url:{type:"input",attrs:Lf,required:!0,label:"Intent to Experiment link",usage:{},help_text:W`Your "Intent to Experiment" discussion thread. The necessary 7267 LGTMs should already have been received.`},ot_creation__milestone_desktop_first:{type:"input",attrs:Uf,required:!0,label:"Trial milestone start",usage:{},help_text:W` First milestone that will support an origin trial of this 7268 feature.`,check:(e,t)=>um([Bf,Hf],t)},ot_creation__milestone_desktop_last:{type:"input",attrs:Uf,required:!0,label:"Trial milestone end",usage:{},help_text:W` Last milestone that will support an origin trial of this 7269 feature.`,check:(e,t)=>um([Bf],t)},ot_creation__bypass_file_checks:{type:"checkbox",initial:!1,label:"Bypass Chromium file checks (staging testing)",usage:{},help_text:W`This option should only be visible in ChromeStatus staging 7270 environments. Allow this form to be submitted without verifying Chromium 7271 code has landed.`},anticipated_spec_changes:{type:"textarea",attrs:{rows:4},required:!1,label:"Anticipated spec changes",usage:{[Hl.Incubate]:Id,[Hl.Existing]:Td,[Hl.Deprecation]:Rd},help_text:W` Open questions about a feature may be a source of future 7272 web compat or interop issues. Please list open issues (e.g. links to known 7273 github issues in the repo for the feature specification) whose resolution 7274 may introduce web compat/interop risk (e.g., changing the naming or 7275 structure of the API in a non-backward-compatible way).`},finch_url:{type:"input",attrs:Lf,required:!1,label:"Finch experiment",usage:{},help_text:W` If your feature will roll out gradually via a 7276 <a target="_blank" href="http://go/finch">Finch experiment</a>, link to it 7277 here.`},i2e_lgtms:{type:"input",attrs:{...Ff,placeholder:"This field is deprecated",disabled:!0},required:!1,label:"Intent to Experiment LGTM by",usage:{},help_text:W` Full email address of API owner who LGTM'd the Intent to 7278 Experiment email thread.`,deprecated:!0},i2s_lgtms:{type:"input",attrs:{...Ff,placeholder:"This field is deprecated",disabled:!0},required:!1,label:"Intent to Ship LGTMs by",usage:{},help_text:W` 7279 Comma separated list of email addresses of API owners who LGTM'd the 7280 Intent to Ship email thread. 7281 `,deprecated:!0},r4dt_lgtms:{name:"i2e_lgtms",type:"input",attrs:{...Ff,placeholder:"This field is deprecated",disabled:!0},required:!1,label:"Request for Deprecation Trial LGTM by",usage:{},help_text:W` Full email addresses of API owners who LGTM'd the Request 7282 for Deprecation Trial email thread.`,deprecated:!0},debuggability:{type:"textarea",required:!1,label:"Debuggability",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Description of the DevTools debugging support for your 7283 feature. Please follow the 7284 <a target="_blank" href="https://goo.gle/devtools-checklist"> 7285 DevTools support checklist</a 7286 > 7287 for guidance.`},all_platforms:{type:"checkbox",initial:!1,label:"Supported on all platforms?",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Will this feature be supported on all six Blink platforms 7288 (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?`},all_platforms_descr:{type:"textarea",attrs:{rows:2},required:!1,label:"Platform support explanation",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Explain why this feature is, or is not, supported on all 7289 platforms.`},wpt:{type:"checkbox",initial:!1,label:"Web Platform Tests",usage:Pd,help_text:W` Is this feature fully tested in Web Platform Tests?`},wpt_descr:{type:"textarea",required:!1,label:"Web Platform Tests or other automated test description",usage:Pd,help_text:W` Please link to the 7290 <a target="_blank" href="https://wpt.fyi/results">results on wpt.fyi</a>. 7291 If any part of the feature is not tested by web-platform-tests, please 7292 include links to other automated tests or links to issues, e.g. a 7293 web-platform-tests issue with the "infra" label explaining why a certain 7294 thing cannot be tested (<a 7295 target="_blank" 7296 href="https://github.com/w3c/web-platform-tests/issues/3867" 7297 >example</a 7298 >), a spec issue for some change that would make it possible to test. (<a 7299 target="_blank" 7300 href="https://github.com/whatwg/fullscreen/issues/70" 7301 >example</a 7302 >), or a Chromium issue to upstream some existing tests (<a 7303 target="_blank" 7304 href="https://bugs.chromium.org/p/chromium/issues/detail?id=695486" 7305 >example</a 7306 >).`},sample_links:{type:"textarea",attrs:rm,required:!1,label:"Demo and sample links",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Links to demos and samples (one URL per line).`},non_oss_deps:{type:"textarea",required:!1,label:"Non-OSS dependencies",usage:Pd,help_text:W` Does the feature depend on any code or APIs outside the 7307 Chromium open source repository and its open-source dependencies to 7308 function? (e.g. server-side APIs, operating system APIs tailored to this 7309 feature or closed-source code bundles) Yes or no. If yes, explain why this 7310 is necessary.`},devrel:{type:"input",name:"devrel_emails",attrs:Ff,required:!1,label:"Developer relations emails",usage:{},help_text:W` Comma separated list of full email addresses.`},shipped_milestone:{type:"input",attrs:Uf,required:!1,label:"Chrome for desktop",usage:Pd,help_text:sm,check:(e,t)=>um([Wf,Jf],t)},shipped_android_milestone:{type:"input",attrs:Uf,required:!1,label:"Chrome for Android",usage:Pd,help_text:sm,check:(e,t)=>um([Qf,em],t)},shipped_ios_milestone:{type:"input",attrs:Uf,required:!1,label:"Chrome for iOS (RARE)",usage:Pd,help_text:sm,check:(e,t)=>um([im],t)},shipped_webview_milestone:{type:"input",attrs:Uf,required:!1,label:"Android Webview",usage:Pd,help_text:om,check:(e,t)=>um([Yf],t)},requires_embedder_support:{type:"checkbox",initial:!1,label:"Requires embedder support",usage:{[Hl.Incubate]:Id,[Hl.Existing]:Td,[Hl.Deprecation]:Rd},help_text:W` Will this feature require support in //chrome? That 7311 includes any code in //chrome, even if that is for functionality on top of 7312 the spec. Other //content embedders will need to be aware of that 7313 functionality. Please add a row to this 7314 <a 7315 target="_blank" 7316 href="https://docs.google.com/spreadsheets/d/1QV4SW4JBG3IyLzaonohUhim7nzncwK4ioop2cgUYevw/edit#gid=0" 7317 > 7318 tracking spreadsheet</a 7319 >.`},devtrial_instructions:{type:"input",attrs:Lf,required:!1,label:"DevTrial instructions",usage:Pd,help_text:W` Link to a HOWTO or FAQ describing how developers can get 7320 started using this feature in a DevTrial. 7321 <br /><br /> 7322 <a 7323 target="_blank" 7324 href="https://github.com/samuelgoto/WebID/blob/master/HOWTO.md" 7325 > 7326 Example 1</a 7327 >. 7328 <a 7329 target="_blank" 7330 href="https://github.com/WICG/idle-detection/blob/main/HOWTO.md" 7331 > 7332 Example 2</a 7333 >.`},dt_milestone_desktop_start:{type:"input",attrs:Uf,required:!1,label:"DevTrial on desktop",usage:Pd,help_text:W` First milestone that allows web developers to try this 7334 feature on desktop platforms by setting a flag. When flags are enabled by 7335 default in preparation for shipping or removal, please use the fields in the 7336 ship stage.`,check:(e,t)=>um([Xf],t)},dt_milestone_android_start:{type:"input",attrs:Uf,required:!1,label:"DevTrial on Android",usage:Pd,help_text:W` First milestone that allows web developers to try this 7337 feature on Android by setting a flag. When flags are enabled by default in 7338 preparation for shipping or removal, please use the fields in the ship 7339 stage.`,check:(e,t)=>um([Zf],t)},dt_milestone_ios_start:{type:"input",attrs:Uf,required:!1,label:"DevTrial on iOS (RARE)",usage:Pd,help_text:W` First milestone that allows web developers to try this 7340 feature on iOS by setting a flag. When flags are enabled by default in 7341 preparation for shipping or removal, please use the fields in the ship 7342 stage.`,check:(e,t)=>um([tm],t)},flag_name:{type:"input",attrs:Nf,required:!1,label:"Flag name on about://flags",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` Name of the flag on about://flags that allows a web 7343 developer to enable this feature in their own browser to try it out. E.g., 7344 "storage-buckets". These are defined in 7345 <a 7346 target="_blank" 7347 href="https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/about_flags.cc" 7348 >about_flags.cc</a 7349 >.`},finch_name:{type:"input",attrs:{...Nf,placeholder:'e.g. "StorageBuckets"',pattern:Rf},required:!1,label:"Finch feature name",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` String name of the <code>base::Feature</code> defined via 7350 the <code>BASE_FEATURE</code> macro in your feature implementation code. 7351 E.g., "StorageBuckets". These names are used in 7352 <a 7353 target="_blank" 7354 href="https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/runtime_enabled_features.json5" 7355 >runtime_enabled_features.json5</a 7356 > 7357 (or 7358 <a 7359 target="_blank" 7360 href="https://chromium.googlesource.com/chromium/src/+/main/content/public/common/content_features.cc" 7361 >content_features.cc</a 7362 >), and finch GCL files`},non_finch_justification:{type:"textarea",required:!1,label:"Non-finch justification",usage:{[Hl.Incubate]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.Existing]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship]),[Hl.CodeChange]:new Set([Ed.DeveloperTesting,Ed.PSA]),[Hl.Deprecation]:new Set([Ed.DeveloperTesting,Ed.Experiment,Ed.Ship])},help_text:W` The 7363 <a 7364 target="_blank" 7365 href="https://chromium.googlesource.com/chromium/src/+/main/docs/flag_guarding_guidelines.md" 7366 >Flag Guarding Guidelines</a 7367 > 7368 require new features to have a finch flag. If your feature does not have a 7369 finch flag, explain why.`},prefixed:{type:"checkbox",label:"Prefixed?",initial:!1,usage:{},help_text:""},display_name:{type:"input",attrs:Nf,required:!1,label:"Stage display name",usage:{},help_text:W` <p> 7370 Optional. Stage name to display on the feature detail page. 7371 </p>`,extra_help:W` <p> 7372 This name is only used for displaying stages on this site. Use this to 7373 differentiate stages of the same type. 7374 </p> 7375 <h4>Examples</h4> 7376 <ul> 7377 <li>Extended deprecation trial</li> 7378 <li>Second origin trial run</li> 7379 <li>Delayed ship for Android</li> 7380 </ul>`},ot_display_name:{type:"input",attrs:Nf,required:!0,label:"Origin trial display name",usage:{},help_text:W` <p> 7381 Name shown in the 7382 <a href="https://developer.chrome.com/origintrials/" target="_blank"> 7383 Origin Trials Console 7384 </a> 7385 and included in reminder emails. 7386 </p>`},ot_description:{type:"textarea",required:!0,label:"Trial description",usage:{},help_text:W` <p> 7387 A brief description of the feature to interest web developers in joining 7388 the trial (1-2 sentences). Shown as the trial description in the 7389 <a href="https://developer.chrome.com/origintrials/" target="_blank"> 7390 Origin Trials Console </a 7391 >. 7392 </p>`},ot_owner_email:{type:"input",required:!0,attrs:{...Nf,pattern:Df},usage:{},label:"Google point of contact",help_text:W` <p> 7393 A Googler contact for this origin trial. Please supply a '@google.com' 7394 domain email address only. 7395 </p>`},ot_feedback_submission_url:{type:"input",attrs:Lf,required:!0,label:"Feature feedback link",usage:{},help_text:W` Link for developers to file feedback on the feature (e.g. 7396 GitHub issues, or WICG page).`},shipping_year:{type:"input",attrs:{type:"number",min:2e3,max:2050},required:!0,label:"Estimated shipping year",usage:{},help_text:W` Estimate of the calendar year in which this will first ship 7397 on any platform. E.g., 2024.`},enterprise_policies:{type:"input",attrs:{title:"Enter one or more comma-separated complete words.",type:"text",multiple:!0,placeholder:"EnableFeature1, Feature1Policy"},required:!1,label:"Enterprise policies",usage:{[Hl.Incubate]:new Set([Ed.CrossFunctionReview]),[Hl.Existing]:new Set([Ed.CrossFunctionReview]),[Hl.CodeChange]:new Set([Ed.CrossFunctionReview]),[Hl.Deprecation]:new Set([Ed.CrossFunctionReview]),[Hl.Enterprise]:new Set([Ed.CrossFunctionReview])},help_text:W` List the policies that are being introduced, removed, or 7398 can be used to control the feature at this stage, if any.`,disabled:!0,deprecated:!0},enterprise_feature_categories:{type:"multiselect",choices:Ol,required:!1,label:"Enterprise feature categories",usage:{},help_text:W` If your feature impacts enterprise users, select at least 7399 one.`,enterprise_help_text:W` Select at least one.`},enterprise_impact:{type:"select",choices:Ul,in
7399itial:Ul.IMPACT_NONE[0],enterprise_initial:Ul.IMPACT_MEDIUM[0],label:"Enterprise impact / risk",usage:{},help_text:W` 7400 <b>Low Risk:</b> Important for Admin Awareness. Negligible disruption, but 7401 provides value (new APIs, optional features, strictly additive) or 7402 requires minor internal documentation updates. Select this to ensure the 7403 feature is published in the Release Notes. 7404 <br /> 7405 <b>Med Risk:</b>Noticeable impact. Potential to alter some workflows or 7406 cause minor confusion/help desk calls. Admins may want to review and set a 7407 policy. An escape hatch is often recommended. 7408 <br /> 7409 <b>High Risk:</b> Significant disruption. Intentional "breaking changes" 7410 or major new functionality that will require mandatory preparation, 7411 testing, and communication from IT admins. Requires an escape hatch or 7412 permanent policy. 7413 `},rollout_milestone:{type:"input",attrs:{...Uf,min:100},required:!0,label:"Chrome milestone",usage:{},help_text:W` The milestone in which this stage rolls out to the stable 7414 channel (even a 1% rollout). If you don't yet know which milestone it will 7415 be, put in your best estimate. You can always change this later.`},rollout_platforms:{type:"multiselect",choices:Ll,required:!0,label:"Rollout platforms",usage:{},help_text:W` The platform(s) affected by this stage`},rollout_details:{type:"textarea",always_markdown:!0,attrs:{rows:4},required:!1,label:"Rollout details (optional)",usage:{},help_text:W` Explain what specifically is changing in this milestone, 7416 for the given platforms. Many features are composed of multiple stages on 7417 different milestones. For example, you may have a stage that introduces a 7418 change and a temporary policy to control it, then another stage on a 7419 subsequent milestone that removes the policy. Alternatively, you may ship 7420 the feature to different platforms in different milestones.`},rollout_stage_plan:{type:"select",choices:Nl,initial:Nl.ROLLOUT_STAGE_PLAN_SLOW[0],required:!0,label:"Rollout plan",usage:{},help_text:W` Select the type of rollout that matches what will happen in 7421 the stage`},breaking_change:{type:"checkbox",label:"Breaking change",initial:!1,usage:{},help_text:W` This is a breaking change: customers or developers must 7422 take action to continue using some existing functionaity.`},confidential:{type:"checkbox",label:"Confidential",initial:!0,usage:{},help_text:W`Most enterprise feature entries should be marked 7423 confidential until they have been reviewed for publication. Confidential 7424 entrys are only visible to admins, chromium contributors and the feature's 7425 owners, contributors and creator.`},intent_cc_emails:{type:"input",attrs:Ff,required:!1,label:"Intent email CC list",usage:{},help_text:W`Add emails to the CC list of the intent email.<br /> 7426 Comma separated list of full email addresses.`}};
7426function nm(e){const t=am[e],i=t.label||t.displayLabel||function(e){return(e=e.replace("_"," ")).charAt(0).toUpperCase()+e.slice(1)}(e);var r;return[e,i,(r=t).attrs===rm?"multi-url":r.attrs===Lf?"url":"checkbox"===r.type?"checkbox":"text",t.deprecated,t.always_markdown]}function lm(e){return e.map(e=>nm(e))}function dm(e,t){const{earlier:i,allLater:r,warning:s}=e,o=r&&Cd.has(r)?wd:null,a=hm(i,t);if(o&&r){const e=function(e,t,i){let r=1/0;const s=i.feature;for(const o of s.stages)if(t.has(o.stage_type)){const t=i(e,o);null!=t&&""!==t&&(r=Math.min(r,t))}if(r!==1/0)return r}(r,o,t);if(null!=a&&null!=e&&Number(a)>=e)return s?{warning:s}:{error:`Earlier milestone #${a} should be before shipped milestone #${e}.`}}}function cm(e,t){const{allEarlier:i,later:r,warning:s,error:o}=e,a=i&&Sd.has(i)?_d:i&&$d.has(i)?yd:null;if(a&&i){const e=function(e,t,i){let r=-1/0;const s=i.feature;for(const o of s.stages)if(t.has(o.stage_type)){const t=i(e,o);null!=t&&""!==t&&(r=Math.max(r,t))}if(r!==-1/0)return r}(i,a,t),n=hm(r,t);if(null!=e&&null!=n&&e>=Number(n))return s?{warning:s}:{error:o||`Earlier milestone #${e} should be before shipped milestone #${n}.`}}}function hm(e,t){const i=t(e,"current stage");if("string"==typeof i){if(""===i)return;return Number(i)}return i}function um(e,t){let i;for(const r of e){const{earlier:e,allEarlier:s,later:o,allLater:a,warning:n,error:l}=r;if(a)i=dm(r,t);else if(s)i=cm(r,t);else{const r=hm(e,t),s=hm(o,t);null!=r&&null!=s&&s<=r&&(i=n?{warning:n}:{error:l||"Start milestone must be before end milestone"})}if(i)return i}}function pm(e){const t=String(e("name")||"").toLowerCase(),i=Number(e("feature_type")||"0"),r=t.includes("deprecat")||t.includes("remov");if(r!==(i===Yl.FEATURE_TYPE_DEPRECATION_ID[0]))return r?{warning:'If the feature name contains "deprecate" or "remove",\n the feature type should be "Feature deprecation"'}:{warning:'If the feature type is "Feature deprecation",\n the feature name should contain "deprecate" or "remove"'}}function fm(e,t="Avoid using Google Docs"){if(/docs\.google\.com\/document/.test(e))return{warning:t}}var mm=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const gm={0:"Preparing",1:"Not applicable",2:"Pending",3:"Pending",4:"Needs work",5:"Approved",6:"Denied",8:"Internal review",9:"N/A requested",10:"N/A (self-certified)",11:"N/A (self-certified then verified)"},bm={0:"arrow_circle_right_20px",2:"pending_20px",3:"pending_20px",4:"autorenew_20px",5:"check_circle_filled_20px",6:"block_20px"},vm={1:"N/A",8:"INT",9:"N/A?",10:"N/A (self)",11:"N/A (ver)"};let ym=class extends ce{constructor(){super(...arguments),this.selectedGateId=0}static get styles(){return[...lo,c` 7427 sl-icon { 7428 font-size: 1.2rem; 7429 } 7430 7431 sl-button::part(label) { 7432 padding: 0 4px; 7433 } 7434 7435 sl-button::part(suffix) { 7436 padding-right: 4px; 7437 } 7438 7439 sl-button::part(base) { 7440 border: var(--chip-border); 7441 padding: 0 0 0 4px; 7442 align-items: center; 7443 } 7444 7445 sl-button.selected::part(base) { 7446 box-shadow: 0 0 0 2px var(--dark-spot-color); 7447 } 7448 7449 sl-button:hover .teamname { 7450 text-decoration: underline; 7451 } 7452 7453 sl-button.not_applicable::part(base), 7454 sl-button.na_self-certified::part(base) { 7455 background: var(--gate-not-applicable-background); 7456 color: var(--gate-not-applicable-color); 7457 } 7458 sl-button.na_self-certified_then_verified::part(base) { 7459 background: var(--gate-not-applicable-background); 7460 color: var(--gate-not-applicable-color); 7461 } 7462 sl-button.not_applicable::part(prefix), 7463 sl-button.na_self-certified::part(prefix) { 7464 align-items: baseline; 7465 } 7466 7467 sl-button.preparing::part(base) { 7468 background: var(--gate-preparing-background); 7469 color: var(--gate-preparing-color); 7470 } 7471 .preparing sl-icon { 7472 color: var(--gate-preparing-icon-color); 7473 } 7474 7475 sl-button.pending::part(base) { 7476 background: var(--gate-pending-background); 7477 color: var(--gate-pending-color); 7478 } 7479 .pending sl-icon { 7480 color: var(--gate-pending-icon-color); 7481 } 7482 7483 sl-button.needs_work::part(base) { 7484 background: var(--gate-needs-work-background); 7485 color: var(--gate-needs-work-color); 7486 } 7487 .needs_work sl-icon { 7488 color: var(--gate-needs-work-icon-color); 7489 } 7490 7491 sl-button.approved::part(base) { 7492 background: var(--gate-approved-background); 7493 color: var(--gate-approved-color); 7494 } 7495 .approved sl-icon { 7496 color: var(--gate-approved-icon-color); 7497 } 7498 7499 sl-button.denied::part(base) { 7500 background: var(--gate-denied-background); 7501 color: var(--gate-denied-color); 7502 }
7503 .denied sl-icon { 7504 color: var(--gate-denied-icon-color); 7505 } 7506 7507 sl-button.internal_review::part(base) { 7508 background: var(--gate-pending-background); 7509 color: var(--gate-pending-color); 7510 } 7511 sl-button.internal_review::part(prefix) { 7512 align-items: baseline; 7513 } 7514 7515 sl-button.na_requested::part(base) { 7516 background: var(--gate-pending-background); 7517 color: var(--gate-pending-color); 7518 } 7519 sl-button.na_requested::part(prefix) { 7520 align-items: baseline; 7521 } 7522 7523 .abbrev { 7524 padding-left: var(--content-padding-quarter); 7525 font-weight: 900; 7526 } 7527 7528 sl-button sl-icon.overdue { 7529 color: var(--slo-overdue-color); 7530 } 7531 `]}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}handleClick(){lh("gate",this.gate.id),this._fireEvent("show-gate-column",{feature:this.feature,stage:this.stage,gate:this.gate})}render(){if(void 0===this.gate||null==this.gate)return Y;const e=this.gate.team_name,t=gm[this.gate.state],i=t.toLowerCase().replaceAll(" ","_").replaceAll("(","").replaceAll(")","").replaceAll("/",""),r=this.gate.id==this.selectedGateId?"selected":"",s=bm[this.gate.state],o=vm[this.gate.state]||t;let a=W`<b class="abbrev" slot="prefix">${o}</b>`;s&&(a=W` 7532 <sl-icon 7533 slot="prefix" 7534 library="material" 7535 name=${s} 7536 ></sl-icon> 7537 `);const n=this.gate.slo_initial_response_remaining<0,l=n?W`<sl-icon 7538 slot="suffix" 7539 library="material" 7540 class="overdue" 7541 name="clock_loader_60_20px" 7542 ></sl-icon>`:Y;return W` 7543 <sl-button 7544 pill 7545 size="small" 7546 class="${i} ${r}" 7547 title="${e}: ${t}${n?". Overdue.":""}" 7548 @click=${this.handleClick} 7549 > 7550 ${a} 7551 <span class="teamname">${e}</span> 7552 ${l} 7553 </sl-button> 7554 `}};mm([Ve({type:Object})],ym.prototype,"feature",void 0),mm([Ve({type:Object})],ym.prototype,"stage",void 0),mm([Ve({type:Object})],ym.prototype,"gate",void 0),mm([Ve({type:Number})],ym.prototype,"selectedGateId",void 0),ym=mm([Ue("chromedash-gate-chip")],ym);var _m=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let wm=class extends ce{constructor(){super(...arguments),this.featureId=0}static{this.styles=c` 7555 :host { 7556 display: inline-block; 7557 } 7558 7559 .gemini-icon { 7560 width: 1.5em; 7561 height: 1.5em; 7562 transform-origin: center center; 7563 transition: transform 0.7s ease-in-out; 7564 } 7565 7566 sl-button:hover .gemini-icon { 7567 transform: rotate(360deg); 7568 } 7569 `}render(){return W` 7570 <sl-button href="/feature/${this.featureId}/ai-coverage-analysis"> 7571 <img 7572 slot="prefix" 7573 class="gemini-icon" 7574 src="https://www.gstatic.com/images/branding/productlogos/gemini_2025/v1/192px.svg" 7575 alt="Gemini AI Logo" 7576 /> 7577 Analyze test coverage 7578 </sl-button> 7579 `}};_m([Ve({type:Number})],wm.prototype,"featureId",void 0),wm=_m([Ue("chromedash-wpt-eval-button")],wm);var km=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const xm=[c` 7580 sl-details { 7581 border: var(--card-border);
7582 box-shadow: var(--card-box-shadow); 7583 margin: var(--content-padding-half); 7584 border-radius: 4px; 7585 background: var(--card-background); 7586 } 7587 sl-details::part(base), 7588 sl-details::part(header) { 7589 background: transparent; 7590 } 7591 sl-details::part(header) { 7592 padding-bottom: 8px; 7593 } 7594 7595 .card { 7596 background: var(--card-background); 7597 max-width: var(--max-content-width); 7598 padding: 16px; 7599 } 7600 `];class $m extends ce{constructor(){super(...arguments),this.appTitle="",this.canEdit=!1,this.selectedGateId=0,this.anyCollapsed=!0,this.openStage=0}static get styles(){return[...lo,...xm,c` 7601 :host { 7602 display: block; 7603 position: relative; 7604 box-sizing: border-box; 7605 contain: content; 7606 overflow: hidden; 7607 background: inherit; 7608 } 7609 7610 h2 { 7611 margin-top: var(--content-padding); 7612 display: flex; 7613 } 7614 h2 span { 7615 flex: 1; 7616 } 7617 7618 .description, 7619 .gates { 7620 padding: 8px 16px; 7621 } 7622 7623 sl-details sl-button, 7624 sl-details sl-dropdown { 7625 float: right; 7626 margin-right: 4px; 7627 } 7628 sl-details sl-dropdown sl-icon-button { 7629 font-size: 1.4rem; 7630 } 7631 7632 sl-details sl-button[variant='default']::part(base) { 7633 color: var(--sl-color-primary-600); 7634 border: 1px solid var(--sl-color-primary-600); 7635 } 7636 7637 dl { 7638 padding: 0 var(--content-padding-half); 7639 } 7640 7641 dt { 7642 font-weight: 500; 7643 display: flex; 7644 gap: ${10}px; 7645 align-items: center; 7646 } 7647 dt sl-icon { 7648 color: var(--gate-approved-color); 7649 font-size: 1.3em; 7650 } 7651 7652 dd { 7653 padding: var(--content-padding-half); 7654 padding-left: ${44}px; 7655 padding-bottom: var(--content-padding-large); 7656 } 7657 7658 .inline-list { 7659 display: inline-block; 7660 padding: 0; 7661 } 7662 7663 .longtext { 7664 display: block; 7665 white-space: pre-wrap; 7666 } 7667 7668 .longurl { 7669 display: block; 7670 padding: var(--content-padding-half); 7671 } 7672 7673 #new-stage { 7674 margin-left: 8px; 7675 margin-bottom: 4px; 7676 } 7677 7678 #footnote { 7679 margin-left: 8px; 7680 margin-bottom: 4px; 7681 margin-top: 4px; 7682 } 7683 `]}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.initializeGateColumn()}initializeExtensionDialog(e){if(!("initiateExtension"in e))return;const t=parseInt(e.gate),i=this.gates.find(e=>e.id===t);if(!i||!sc.includes(i.state))return;let r;for(const e of this.feature.stages){const t=e.extensions.find(e=>e.id===i.stage_id);if(t){r=t;break}}r&&r.ot_action_requested&&vf(this.feature.id,r,r.desktop_last,bf)}initializeGateColumn(){const e=oh(window.location.search);if(!e.hasOwnProperty("gate"))return;const t=Number(e.gate),i=this.gates.filter(e=>e.id==t);if(!i.length)return;const r=i[0],s=this.feature.stages.filter(e=>e.id===r.stage_id||e.extensions.some(e=>e.id===r.stage_id));if(!s.length)return;let o=s[0];this.openStage=o.id,this.updateComplete.then(()=>{const e=this.renderRoot.querySelector(`#stage-${this.openStage}`);e?.scrollIntoView({behavior:"smooth"})}),r.gate_type===Fd&&(o=o.extensions.find(e=>e.id===r.stage_id)),this._fireEvent("show-gate-column",{feature:this.feature,stage:o,gate:r}),this.initializeExtensionDialog(e)}isAnyCollapsed(){const e=this.renderRoot.querySelectorAll(".stage");return this.renderRoot.querySelectorAll(".stage[open]").length<e.length}updateCollapsed(){this.anyCollapsed=this.isAnyCollapsed()}toggleAll(){const e=this.anyCollapsed;this.renderRoot.querySelectorAll(".stage").forEach(t=>{t.open=e})}handleAddXfnGates(e){confirm('Would you like to add gates for Privacy, Security, etc.? \n\nThis is needed if the API Owners ask you to add them, or if you send an "Intent to Ship" rather than a PSA.')&&window.csClient.addXfnGates(e.feature_id,e.id).then(()=>{this._fireEvent("refetch-needed",{})})}renderControls(){const e=W` 7684 <sl-button variant="text" href="/guide/editall/${this.feature.id}"> 7685 Edit all fields 7686 </sl-button> 7687 `;let t=W`${Y}`;(this.user?.email?.endsWith("@google.com")||this.user?.email?.endsWith("@chromium.org"))&&this.canEdit&&this.feature.feature_type_int!==Yl.FEATURE_TYPE_ENTERPRISE_ID[0]&&(t=W` <chromedash-wpt-eval-button 7688 .featureId=${this.feature.id} 7689 ></chromedash-wpt-eval-button>`);const i=this.anyCollapsed?"Expand all":"Collapse all";return W` 7690 ${t} ${this.canEdit?e:Y} 7691 <sl-button 7692 variant="text" 7693 title="Expand or collapse all sections" 7694 @click=${this.toggleAll} 7695 > 7696 ${i} 7697 </sl-button> 7698 `}renderText(e,t=!1){const i=jc(e=String(e),this.featureLinks,t);return t?W`${i}`:e.length>60||e.includes("\n")?W`<span class="longtext">${i}</span>`:W`<span class="text">${i}</span>`}renderUrl(e){return e.startsWith("http")?W`<chromedash-link 7699 href=${e} 7700 class="url ${e.length>60?"longurl":""}" 7701 .featureLinks=${this.featureLinks} 7702 ></chromedash-link>`:this.renderText(e)}renderValue(e,t,i){return"checkbox"==e?this.renderText(t?"True":"False"):"url"==e?this.renderUrl(t):"multi-url"==e?W` 7703 <ul class="inline-list"> 7704 ${t.map(e=>W`<li>${this.renderUrl(e)}</li>`)} 7705 </ul> 7706 `:this.renderText(t,i)}renderField(e,t){const[i,r,s,o,a]=e,n=Xc(i,t,this.feature),l=Qc(n);if(!l&&o)return Y;const d=(this.feature.markdown_fields||[]).includes(i)||a,c=l?W`<sl-icon library="material" name="check_circle_20px"></sl-icon>`:W`<sl-icon library="material" name="blank_20px"></sl-icon>`;return W` 7707 <dt id=${i}>${c} ${r}</dt> 7708 <dd> 7709 ${l?this.renderValue(s,n,d):W`<i>No information provided yet</i>`} 7710 </dd> 7711 `}stageHasAnyFilledFields(e,t){return e.some(e=>function(e,t,i){return Qc(Xc(e,t,i))}(e[0],t,this.feature))}renderExtensionFields(e){const t=[],i=lm(Jc(Ac));return e.forEach((e,r)=>{this.stageHasAnyFilledFields(i,e)&&t.push(W` 7712 <div> 7713 <h3>Trial extension ${0!==r?r+1:Y}</h3> 7714 <br /> 7715 ${i.map(t=>this.renderField(t,e))} 7716 </div> 7717 `)}),t}renderSectionFields(e,t){if(this.stageHasAnyFilledFields(e,t)){const i=t.extensions?this.renderExtensionFields(t.extensions):[];return W` <dl> 7718 ${e.map(e=>this.renderField(e,t))} 7719 ${i} 7720 </dl>`}return W`<p>No relevant fields have been filled in.</p>`}renderSection(e,t,i=!1,r=!1,s=!0,o=0){return W` 7721 <sl-details 7722 id=${o?`stage-${o}`:Y} 7723 summary=${e}
7724 @sl-after-show=${this.updateCollapsed} 7725 @sl-after-hide=${this.updateCollapsed} 7726 ?open=${i||r} 7727 class="${s?"stage":""}" 7728 > 7729 ${t} 7730 </sl-details> 7731 `}getStageForm(e){return Fc[e]||null}renderMetadataSection(){const e=Jc(this.feature.is_enterprise_feature?Sc:$c);if(void 0===e||0===e.length)return Y;const t=lm(e),i=W` 7732 <sl-button 7733 size="small" 7734 style="float:right" 7735 href="/guide/stage/${this.feature.id}/metadata" 7736 >Edit fields</sl-button 7737 > 7738 `,r=W` 7739 <p class="description">${this.canEdit?i:Y}</p> 7740 <section class="card"> 7741 ${this.renderSectionFields(t,{})} 7742 </section> 7743 `;return this.renderSection("Metadata",r,!1,this.feature.is_enterprise_feature,!1)}renderGateChip(e,t){return W` 7744 <chromedash-gate-chip 7745 .feature=${this.feature} 7746 .stage=${e} 7747 .gate=${t} 7748 selectedGateId=${this.selectedGateId} 7749 > 7750 </chromedash-gate-chip> 7751 `}hasActiveGates(e){const t=this.gates.filter(t=>t.stage_id==e.id);return t.some(e=>ic.includes(e.state))}hasMixedGates(e){const t=this.gates.filter(t=>t.stage_id==e.id);return t.some(e=>rc.includes(e.state))&&t.some(e=>0==e.state)}renderGateChips(e){const t=this.gates.filter(t=>(this.feature.feature_type_int!==Yl.FEATURE_TYPE_CODE_CHANGE_ID[0]||t.gate_type!==Nd)&&t.stage_id===e.id);return t.sort((e,t)=>nc.indexOf(e.team_name)-nc.indexOf(t.team_name)),t.map(t=>this.renderGateChip(e,t))}hasStageActions(e,t){if(e?.actions?.length>0&&this.feature.feature_type_int===Yl.FEATURE_TYPE_CODE_CHANGE_ID[0])return!0;const i=this.gates.some(e=>"API Owners"===e.team_name&&e.stage_id===t.id);return e?.actions?.length>0&&!i}renderStageAction(e,t,i){const r=e.name,s=e.url.replace("{feature_id}",this.feature.id).replace("{stage_id}",i.id).replace("{gate_id}","0"),o=this.gates.filter(e=>e.stage_id==i.id);return W` 7752 <sl-button size="small" @click=${()=>{if($f(e,this.progress)||Sf(o,i))kf(this.feature,this.progress,this.process,e,t,i,o,s);else{const e=window.open(s,"_blank");e?.focus()}}}>${r}</sl-button> 7753 `}renderStageActions(e,t){return this.canEdit?W` 7754 ${e.actions.map(i=>this.renderStageAction(i,e,t))} 7755 `:Y}renderProcessStage(e,t){const i=this.getStageForm(e.stage_type),r=null===i?[]:Jc(i);if(void 0===r||0==r.length)return Y;const s=lm(r),o=Hc(e,this.process);if(!o)return Y;let a="";t>1&&(a=` ${t}`);let n=`${o.name}${a}`;e.display_name&&(n=`${o.name}: ${e.display_name}`);const l=this.feature.active_stage_id===e.id,d=this.renderStageMenu(e),c=this.renderExtensionButton(e),h=this.renderEditButton(e,o),u=this.renderOriginTrialButton(e),p=this.renderRegistrantsDashboardButton(e),f=e.extensions?.map(e=>W` <div class="gates"> 7756 ${xd[e.stage_type]}: 7757 ${this.renderGateChips(e)} 7758 </div>`);let m="";f.length>0&&(m=`${xd[e.stage_type]}: `);const g=W` 7759 <p class="description"> 7760 ${d} ${u} ${p} 7761 ${this.hasStageActions(o,e)?this.renderStageActions(o,e):Y} 7762 ${h} ${c} ${o.description} 7763 </p> 7764 <div class="gates">${m}${this.renderGateChips(e)}</div> 7765 ${f} 7766 <section class="card"> 7767 ${this.renderSectionFields(s,e)} 7768 </section> 7769 `,b=this.feature.is_enterprise_feature||e.id==this.openStage||this.hasActiveGates(e)||this.hasMixedGates(e);return this.renderSection(n,g,l,b,!0,e.id)}renderEditButton(e,t){return this.canEdit?W` <sl-button 7770 size="small" 7771 href="/guide/stage/${this.feature.id}/${t.outgoing_stage}/${e.id}" 7772 >Edit fields</sl-button 7773 >`:Y}renderFinalizeExtensionButton(e){return W` <sl-button 7774 size="small" 7775 variant="primary" 7776 @click=${()=>vf(this.feature.id,e,e.desktop_last,bf)} 7777 >Finalize Extension</sl-button 7778 >`}renderDisabledExtensionButton(){return W` <sl-tooltip content=${"A pending extension request exists. Follow the process for obtaining extension approval, or contact [email protected] for help."}> 7779 <sl-button size="small" disabled>Trial Extension Pending</sl-button> 7780 </sl-tooltip>`}renderExtensionButton(e){const t=!this.user||!this.user.email.endsWith("@chromium.org")&&!this.user.email.endsWith("@google.com"),i=!_d.has(e.stage_type),r=!e.origin_trial_id;if(t||i||r)return Y;const s=e.extensions.find(e=>{const t=this.gates.find(t=>t.stage_id===e.id);return e.ot_action_requested&&t&&sc.includes(t.state)});if(s)return this.renderFinalizeExtensionButton(s);const o=e.extensions&&e.extensions.some(e=>e.ot_action_requested);if(o)return this.renderDisabledExtensionButton();let a="Request a trial extension";e.extensions&&e.extensions.length>0&&(a="Request another trial extension");const n=e.id;return W` <sl-button 7781 size="small" 7782 @click=${()=>location.assign(`/ot_extension_request/${this.feature.id}/${n}`)} 7783 >${a}</sl-button 7784 >`}renderOriginTrialButton(e){if(!_d.has(e.stage_type))return Y;if(e.origin_trial_id){let t=`https://origintrials-staging.corp.google.com/origintrials/#/view_trial/${e.origin_trial_id}`;return"Chrome Platform Status"===this.appTitle&&(t=`https://developer.chrome.com/origintrials/#/view_trial/${e.origin_trial_id}`),W` <sl-button 7785 size="small" 7786 variant="primary" 7787 href=${t} 7788 target="_blank" 7789 >View Origin Trial</sl-button 7790 >`}if(!(this.user&&(this.user.email.endsWith("@chromium.org")||this.user.email.endsWith("@google.com"))))return Y;const t=this.gates.every(t=>t.stage_id!==e.id||sc.includes(t.state));return e.ot_setup_status&&e.ot_setup_status!==dc?W` <sl-tooltip 7791 content="Action already requested. For further inquiries, contact [email protected]." 7792 > 7793 <sl-button size="small" variant="primary" disabled 7794 >Request Trial Creation</sl-button 7795 > 7796 </sl-tooltip>`:t?W` <sl-button 7797 size="small" 7798 variant="primary" 7799 @click="${()=>async function(e,t,i){hf&&uf===e&&pf===t.id||(hf=document.createElement("chromedash-ot-prereqs-dialog"),hf.featureId=e,hf.stage=t,hf.dialogType=i,document.body.appendChild(hf),await hf.updateComplete),uf=e,pf=t.id,hf.show()}(this.feature.id,e,ff)}" 7800 >Request Trial Creation</sl-button 7801 >`:W` <sl-tooltip 7802 content="Approvals must be obtained before submission. For questions, contact [email protected]." 7803 > 7804 <sl-button size="small" variant="primary" disabled 7805 >Request Trial Creation</sl-button 7806 > 7807 </sl-tooltip>`}renderRegistrantsDashboardButton(e){return _d.has(e.stage_type)&&this.canEdit&&e.origin_trial_id&&this.user&&(this.user.email.endsWith("@chromium.org")||this.user.email.endsWith("@google.com"))?W` <sl-button 7808 size="small" 7809 style="float:right" 7810 href="http://go/ot-registrants-dashboard?f=trial_id:in:${e.origin_trial_id}" 7811 >Registrant data</sl-button 7812 >`:Y}offerAddXfnGates(e){const t=this.gates.filter(t=>t.stage_id==e.id);return e.stage_type==hd&&t.length<6}renderFootnote(){return W` 7813 <section id="footnote"> 7814 Please see the 7815 <a 7816 href="https://www.chromium.org/blink/launching-features" 7817 target="_blank" 7818 rel="noopener" 7819 > 7820 Launching features 7821 </a> 7822 page for process instructions. 7823 </section> 7824 `}renderStageMenu(e){const t=[];return this.offerAddXfnGates(e)&&t.push(W`
7825 <sl-menu-item @click=${()=>this.handleAddXfnGates(e)}> 7826 Add cross-functional gates 7827 </sl-menu-item> 7828 `),0===t.length?Y:W` 7829 <sl-dropdown> 7830 <sl-icon-button 7831 library="material" 7832 name="more_vert_24px" 7833 label="Stage menu" 7834 slot="trigger" 7835 ></sl-icon-button> 7836 <sl-menu>${t}</sl-menu> 7837 </sl-dropdown> 7838 `}renderAddStageButton(){if(!this.canEdit)return Y;const e=this.feature.is_enterprise_feature?"Add Step":"Add Stage";return W` <sl-button 7839 id="new-stage" 7840 size="small" 7841 @click="${()=>lf(this.feature.id,this.feature.feature_type_int)}" 7842 > 7843 ${e} 7844 </sl-button>`}renderSectionHeader(){const e=this.feature.is_enterprise_feature?"Rollout steps":"Development stages";return W` <span 7845 >${e} 7846 <sl-icon-button 7847 name="info-circle" 7848 href="https://www.chromium.org/blink/launching-features" 7849 style="font-size: 0.8rem;" 7850 target="_blank" 7851 label="Launching feature guide" 7852 > 7853 </sl-icon-button> 7854 </span>`}render(){let e=0,t=0;return W` 7855 ${this.renderMetadataSection()} 7856 <h2>${this.renderSectionHeader()} ${this.renderControls()}</h2> 7857 ${this.feature.stages.map(i=>(e===i.stage_type?t++:(e=i.stage_type,t=1),this.renderProcessStage(i,t)))} 7858 ${this.renderAddStageButton()} ${this.renderFootnote()} 7859 `}}km([Ve({type:String})],$m.prototype,"appTitle",void 0),km([Ve({attribute:!1})],$m.prototype,"featureLinks",void 0),km([Ve({attribute:!1})],$m.prototype,"user",void 0),km([Ve({type:Boolean})],$m.prototype,"canEdit",void 0),km([Ve({attribute:!1})],$m.prototype,"feature",void 0),km([Ve({attribute:!1})],$m.prototype,"gates",void 0),km([Ve({attribute:!1})],$m.prototype,"process",void 0),km([Ve({attribute:!1})],$m.prototype,"progress",void 0),km([Ve({type:Number})],$m.prototype,"selectedGateId",void 0),km([He()],$m.prototype,"anyCollapsed",void 0),km([He()],$m.prototype,"openStage",void 0),customElements.define("chromedash-feature-detail",$m);var Sm=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Cm=class extends ce{static get styles(){return[...lo,c` 7860 :host { 7861 width: 600px; 7862 } 7863 ul { 7864 padding: 0; 7865 } 7866 7867 label { 7868 display: block; 7869 font-weight: 500; 7870 margin-right: 5px; 7871 padding-top: var(--content-padding); 7872 } 7873 7874 .platform-row { 7875 margin: var(--content-padding) 0; 7876 list-style: none; 7877 } 7878 7879 .platform { 7880 display: inline-block; 7881 padding-top: 7px; 7882 vertical-align: top; 7883 width: 100px; 7884 } 7885 7886 /* On small displays, show milestones as a bullet list. */ 7887 .chart li { 7888 margin-left: var(--content-padding); 7889 } 7890 7891 .empty { 7892 display: none; 7893 } 7894 7895 /* On large displays, show milestones as a gantt chart. */ 7896 @media only screen and (min-width: 701px) { 7897 .chart { 7898 display: inline-grid; 7899 grid-auto-columns: 50px; 7900 grid-auto-rows: 30px; 7901 gap: 2px; 7902 } 7903 7904 .chart li { 7905 list-style: none; 7906 margin-left: 0; 7907 height: 30px; 7908 overflow: visible; 7909 white-space: nowrap; 7910 padding: 4px; 7911 line-height: 22px; 7912 } 7913 7914 .empty { 7915 display: block; 7916 background: #eee; 7917 } 7918 7919 .chart .dev_trial { 7920 background: #cfe2f3ff; 7921 } 7922 7923 .chart .origin_trial { 7924 background: #6fa8dcff; 7925 } 7926 7927 .chart .shipping { 7928 background: #0b5394ff; 7929 color: white; 7930 } 7931 } 7932 `]}_isInactive(){const e=this.feature.browsers.chrome.status.text;return"No active development"===e||"On hold"===e||"No longer pursuing"===e}renderChartRow(e,t,i,r,s,o){const a=[];for(let s=0;s<r.length;s++){const o=r[s];(o<t||o>i)&&a.push(W` 7933 <li 7934 style="grid-row: ${e}; 7935 grid-column: ${s+1}" 7936 class="empty" 7937 ></li> 7938 `)}const n=r.indexOf(t),l=r.indexOf(i),d=Math.max(0,l-n)+1;return a.push(W` 7939 <li 7940 style="grid-row: ${e}; 7941 grid-column: ${n+1} / span ${d}" 7942 class="${s}" 7943 > 7944 ${o} 7945 </li> 7946 `),a}getByStageType(){const e=[],t=[],i=[];for(const r of this.feature.stages)yd.has(r.stage_type)?e.push(r):_d.has(r.stage_type)?t.push(r):wd.has(r.stage_type)&&i.push(r);return[e,t,i]}renderPlatform(e,t,i,r,s,o){const a=i.map(e=>e[`${t}_first`]),n=r.map(e=>e[`${t}_first`]),l=r.map(e=>{let i=e[`${t}_last`];for(const t of e.extensions)t.desktop_last&&!i?i=t.desktop_last:t.desktop_last&&i&&(i=Math.max(i,t.desktop_last));return i}),d=s.map(e=>e[`${t}_first`]);if(0===a.length&&0===n.length&&0===d.length)return Y;const c=Math.max(...o);let h=1;const u=d.filter(e=>e),p=[];for(const e of a){if(!e)continue;let t=c;if(u.length>0){const e=o.indexOf(Math.min(...u));t=o[e-1]}p.push(this.renderChartRow(h,e,t,o,"dev_trial","Dev Trial: "+e)),h++}const f=[];for(let e=0;e<n.length;e++){const t=n[e],i=l[e];t&&i&&(f.push(this.renderChartRow(h,t,i,o,"origin_trial",`Origin Trial: ${t} to ${i}`)),h++)}const m=[];
7946for(const e of d)e&&(m.push(this.renderChartRow(h,e,c,o,"shipping",`Shipping: ${e}`)),h++);return W` 7947 <li class="platform-row"> 7948 <div class="platform">${e}</div> 7949 7950 <ul class="chart" id="${t}-chart"> 7951 ${p} ${f} ${m} 7952 </ul> 7953 </li> 7954 `}concatAllMilestones(e,t){return t?e.concat([t.desktop_first,t.desktop_last,t.android_first,t.android_last,t.ios_first,t.ios_last,t.webview_first,t.webview_last]):e}render(){if(!this.feature||this._isInactive())return Y;const[e,t,i]=this.getByStageType();let r=[];for(const s of[...e,...t,...i]){if(s.extensions)for(const e of s.extensions)r=this.concatAllMilestones(r,e);r=this.concatAllMilestones(r,s)}if(r=r.filter(e=>e),0==r.length)return W`<p>No milestones specified</p>`;const s=r.filter(e=>void 0!==e),o=Math.min(...s),a=Math.max(...s),n=a-o+1+1;let l;if(n<=12)l=Array(n).fill(o).map((e,t)=>e+t);else{const e=new Set(s);for(const t of s)e.add(t+1);if(l=Array.from(e).sort((e,t)=>e-t),l.length>12){const e=new Set(s);l=Array.from(e).sort((e,t)=>e-t),l.push(a+1)}}return W` 7955 <label>Estimated milestones:</label> 7956 <ul> 7957 ${this.renderPlatform("Desktop","desktop",e,t,i,l)} 7958 ${this.renderPlatform("Android","android",e,t,i,l)} 7959 ${this.renderPlatform("iOS","ios",e,t,i,l)} 7960 ${this.renderPlatform("Webview","webview",e,t,i,l)} 7961 </ul> 7962 `}};Sm([Ve({type:Object})],Cm.prototype,"feature",void 0),Cm=Sm([Ue("chromedash-gantt")],Cm);var Em=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Im=class extends ce{constructor(){super(...arguments),this.featureLinks=[]}urlIsStandardsPosition(e){return/github.com\/(mozilla|WebKit)\/standards-positions\/issues/.test(e)}render(){return this.href?W`<chromedash-link 7963 href=${this.href} 7964 ?showContentAsLabel=${!this.urlIsStandardsPosition(this.href)} 7965 .featureLinks=${this.featureLinks} 7966 ><slot></slot 7967 ></chromedash-link>`:W`<slot></slot>`}};Em([Ve({type:String})],Im.prototype,"href",void 0),Em([Ve({attribute:!1})],Im.prototype,"featureLinks",void 0),Im=Em([Ue("chromedash-vendor-views")],Im);var Tm=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Am=class extends ce{constructor(){super(...arguments),this.feature={},this.featureLinks=[],this.canDeleteFeature=!1,this.canEditFeature=!1}static get styles(){return[...lo,...xm,c` 7968 section { 7969 margin-bottom: 1em; 7970 } 7971 section h3 { 7972 margin: 24px 0 12px; 7973 } 7974 section label { 7975 font-weight: 500; 7976 margin-right: 5px; 7977 } 7978 7979 #consensus li { 7980 display: flex; 7981 } 7982 #consensus li label { 7983 width: 125px; 7984 } 7985 7986 #history p { 7987 margin-top: var(--content-padding-half); 7988 } 7989 7990 sl-dropdown { 7991 float: right; 7992 margin-right: -16px; 7993 margin-top: -20px; 7994 } 7995 #archive-feature::part(base) { 7996 color: var(--error-color); 7997 } 7998 .suspended { 7999 background: var(--table-header-background); 8000 } 8001 `]}isSuspended(){return this.feature?.browsers.chrome.status.val===pc.ON_HOLD[0]}handleArchiveFeature(){this.dispatchEvent(new Event("archive",{bubbles:!0,composed:!0}))}handleSuspend(){this.dispatchEvent(new Event("suspend",{bubbles:!0,composed:!0}))}handleResume(){this.dispatchEvent(new Event("resume",{bubbles:!0,composed:!0}))}renderSummary(){if(this.feature.summary){const e=(this.feature.markdown_fields||[]).includes("summary"),t=jc(this.feature.summary,this.featureLinks,e);return W` 8002 <section id="summary"> 8003 ${e?t:W`<p class="preformatted">${t}</p>`} 8004 </section> 8005 `}return W``}renderFeatureContent(){return W` 8006 ${this.renderSummary()} 8007 ${this.feature.motivation?W` 8008 <section id="motivation"> 8009 <h3>Motivation</h3> 8010 <!-- prettier-ignore --> 8011 <p class="preformatted">${jc(this.feature.motivation,this.featureLinks)}</p> 8012 </section> 8013 `:Y} 8014 ${this.feature.resources?.samples?.length?W` 8015 <section id="demo"> 8016 <h3>Demos and samples</h3> 8017 <ul> 8018 ${this.feature.resources.samples.map(e=>W` 8019 <li>${xl(e,this.featureLinks)}</li> 8020 `)} 8021 </ul> 8022 </section> 8023 `:Y} 8024 ${this.feature.resources?.docs?.length?W` 8025 <section id="documentation"> 8026 <h3>Documentation</h3> 8027 <ul> 8028 ${this.feature.resources.docs.map(e=>W` 8029 <li>${xl(e,this.featureLinks)}</li> 8030 `)} 8031 </ul> 8032 </section> 8033 `:Y} 8034 ${this.feature.standards.spec?W` 8035 <section id="specification"> 8036 <h3>Specification</h3> 8037 <p> 8038 ${xl(this.feature.standards.spec,this.featureLinks)} 8039 </p> 8040 <p>Spec status: ${this.feature.standards.maturity.text}</p> 8041 </section> 8042 `:this.feature.explainer_links?.length?W` 8043 <section id="specification"> 8044 <h3>Explainer(s)</h3> 8045 <ul> 8046 ${this.feature.explainer_links?.map(e=>W`<li>${xl(e,this.featureLinks)}</li>`)} 8047 </ul> 8048 </section> 8049 `:Y} 8050 `}renderEnterpriseFeatureStatus(){return W` 8051 ${this.feature.browsers.chrome.owners?W` 8052 <section id="owner"> 8053 <h3> 8054 ${1==this.feature.browsers.chrome.owners.length?"Owner":"Owners"} 8055 </h3> 8056 <ul> 8057 ${this.feature.browsers.chrome.owners.map(e=>W` 8058 <li><a href="mailto:${e}">${e}</a></li> 8059 `)} 8060 </ul> 8061 </section> 8062 `:Y} 8063 `}renderFeatureStatus(){return W` 8064 <section id="status"> 8065 <h3>Status in Chromium</h3> 8066 <p> 8067 ${this.isSuspended()?W` <label>Implementation status:</label> 8068 <b>Development work is on hold</b>`:Y} 8069 ${this.feature.browsers.chrome.bug?W`<chromedash-link 8070 href=${this.feature.browsers.chrome.bug} 8071 .featureLinks=${this.featureLinks} 8072 alwaysInTag 8073 >tracking bug</chromedash-link 8074 >`:Y} 8075 <chromedash-gantt .feature=${this.feature}></chromedash-gantt> 8076 </p> 8077 </section> 8078 8079 <section id="consensus"> 8080 <h3>Consensus & Standardization</h3> 8081 <div style="font-size:smaller;"> 8082 After a feature ships in Chrome, the values listed here are not 8083 guaranteed to be up to date. 8084 </div> 8085 <br /> 8086 <ul> 8087 ${this.feature.browsers.ff.view.val?W` 8088 <li> 8089 <label>Firefox:</label> 8090 <chromedash-vendor-views 8091 href=${this.feature.browsers.ff.view.url||Y} 8092 .featureLinks=${this.featureLinks} 8093 >${this.feature.browsers.ff.view.text}</chromedash-vendor-views 8094 > 8095 </li> 8096 `:Y} 8097 ${this.feature.browsers.safari.view.val?W` 8098 <li> 8099 <label>WebKit:</label> 8100 <chromedash-vendor-views 8101 href=${this.feature.browsers.safari.view.url||Y} 8102 .featureLinks=${this.featureLinks} 8103 >${this.feature.browsers.safari.view.text}</chromedash-vendor-views 8104 > 8105 </li> 8106 `:Y} 8107 <li> 8108 <label>Web Developers:</label> ${this.feature.browsers.webdev.view.text} 8109 </li> 8110 </ul> 8111 </section> 8112 8113 ${this.feature.browsers.chrome.owners?W` 8114 <section id="owner"> 8115 <h3> 8116 ${1==this.feature.browsers.chrome.owners.length?"Owner":"Owners"} 8117 </h3> 8118 <ul> 8119 ${this.feature.browsers.chrome.owners.map(e=>W` 8120 <li><a href="mailto:${e}">${e}</a></li> 8121 `)} 8122 </ul> 8123 </section> 8124 `:Y} 8125 ${this.feature.intent_to_implement_url?W` 8126 <section id="intent_to_implement_url"> 8127 <h3>Intent to Prototype url</h3> 8128 <a href=${this.feature.intent_to_implement_url} 8129 >Intent to Prototype thread</a 8130 > 8131 </section> 8132 `:Y} 8133 ${this.feature.comments?W` 8134 <section id="comments"> 8135 <h3>Comments</h3> 8136 <!-- prettier-ignore --> 8137 <p class="preformatted">${jc(this.feature.comments,this.featureLinks)}</p> 8138 </section> 8139 `:Y} 8140 <section id="metadata"> 8141 <h3>Metadata</h3> 8142 <p> 8143 <label>Feature type:</label> 8144 ${this.feature.feature_type} 8145 </p> 8146 <p> 8147 <label>Web feature ID:</label> 8148 ${this.feature.web_feature} 8149 </p> 8150 <p> 8151 <label>Blink components:</label> 8152 ${this.feature.browsers.chrome.blink_components.map(e=>W` 8153 <a 8154 href="https://issues.chromium.org/issues?q=customfield1222907:%22${e}%22" 8155 target="_blank" 8156 rel="noopener" 8157 >${e}</a 8158 > 8159 `)} 8160 </p> 8161 ${this.feature.tags?.length?W` <p> 8162 <label>Search tags:</label> 8163 ${this.feature.tags.map(e=>W` 8164 <a href="/features?q=tag:${e}">${e}</a 8165 ><span class="conditional-comma">, </span> 8166 `)} 8167 </p>`:Y} 8168 </section> 8169 `}renderHistory(){return W` 8170 <section id="history"> 8171 <h3>History</h3> 8172 <p> 8173 Entry created on 8174 ${ih(this.feature.created?.when,!0)} 8175 ${rh(this.feature.created?.when)} 8176 </p> 8177 <p> 8178 Last updated on 8179 ${ih(this.feature.updated?.when,!0)} 8180 ${rh(this.feature.updated?.when)} 8181 </p> 8182 8183 <p> 8184 <a href="/feature/${this.feature.id}/activity"> 8185 All comments & activity 8186 </a> 8187 </p> 8188 </section> 8189 `}
8189renderDotDotDotMenu(){if(!this.canDeleteFeature&&!this.canEditFeature)return Y;let e=W``,t=W``,i=W``;return this.canDeleteFeature&&(e=W` 8190 <sl-menu-item id="archive-feature" @click=${this.handleArchiveFeature}> 8191 Archive feature 8192 </sl-menu-item> 8193 `),this.canEditFeature&&(this.isSuspended()?i=W` 8194 <sl-menu-item @click=${this.handleResume}> 8195 Resume active development 8196 </sl-menu-item> 8197 `:t=W` 8198 <sl-menu-item @click=${this.handleSuspend}> 8199 Suspend development 8200 </sl-menu-item> 8201 `),W` 8202 <sl-dropdown placement="left-start"> 8203 <sl-icon-button 8204 library="material" 8205 name="more_vert_24px" 8206 label="Feature menu" 8207 style="font-size: 1.3rem;" 8208 slot="trigger" 8209 ></sl-icon-button> 8210 <sl-menu> ${t} ${i} ${e} </sl-menu> 8211 </sl-dropdown> 8212 `}render(){return W` 8213 <sl-details summary="Overview" ?open=${!0}> 8214 <section class="card ${this.isSuspended()?"suspended":""}"> 8215 ${this.renderDotDotDotMenu()} ${this.renderFeatureContent()} 8216 ${this.feature.is_enterprise_feature?this.renderEnterpriseFeatureStatus():this.renderFeatureStatus()} 8217 ${this.renderHistory()} 8218 </section> 8219 </sl-details> 8220 `}};Tm([Ve({attribute:!1})],Am.prototype,"feature",void 0),Tm([Ve({attribute:!1})],Am.prototype,"featureLinks",void 0),Tm([Ve({type:Boolean})],Am.prototype,"canDeleteFeature",void 0),Tm([Ve({type:Boolean})],Am.prototype,"canEditFeature",void 0),Am=Tm([Ue("chromedash-feature-highlights")],Am);var Rm=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Pm=["No longer pursuing","Deprecated","Removed"];let Dm=class extends ce{constructor(){super(...arguments),this.featureId=0,this.featureLinks=[],this.gates=[],this.comments=[],this.contextLink="",this.appTitle="",this.selectedGateId=0,this.starred=!1,this.loading=!0,this.currentDate=Date.now(),this.shippingInfo={closestShippingDate:"",hasShipped:!1,isUpcoming:!1}}static get styles(){return[...lo,...xm,c` 8221 #feature { 8222 background: var(--card-background); 8223 border-radius: var(--default-border-radius); 8224 border: var(--card-border);
8225 box-shadow: var(--card-box-shadow); 8226 8227 box-sizing: border-box; 8228 word-wrap: break-word; 8229 margin-bottom: var(--content-padding); 8230 max-width: var(--max-content-width); 8231 } 8232 #feature ul { 8233 list-style-position: inside; 8234 list-style: none; 8235 } 8236 section { 8237 margin-bottom: 1em; 8238 } 8239 section h3 { 8240 margin: 24px 0 12px; 8241 } 8242 section label { 8243 font-weight: 500; 8244 margin-right: 5px; 8245 } 8246 8247 sl-skeleton { 8248 margin-bottom: 1em; 8249 width: 60%; 8250 } 8251 8252 sl-skeleton:nth-of-type(even) { 8253 width: 50%; 8254 } 8255 8256 h3 sl-skeleton { 8257 width: 30%; 8258 height: 1.5em; 8259 } 8260 8261 @media only screen and (max-width: 700px) { 8262 #feature { 8263 border-radius: 0 !important; 8264 margin: 7px initial !important; 8265 } 8266 } 8267 8268 @media only screen and (min-width: 701px) { 8269 #feature { 8270 padding: 30px 40px; 8271 } 8272 } 8273 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}isFeatureLoaded(){return this.feature&&0!==Object.keys(this.feature).length}fetchData(){this.loading=!0,Promise.all([window.csClient.getFeature(this.featureId),window.csClient.getGates(this.featureId),window.csClient.getComments(this.featureId,null),window.csClient.getFeatureProcess(this.featureId),window.csClient.getStars(),window.csClient.getFeatureProgress(this.featureId),window.csClient.getChannels()]).then(async([e,t,i,r,s,o,a])=>{this.feature=e,this.gates=t.gates,this.comments=i.comments,this.process=r,this.progress=o,s.includes(this.featureId)&&(this.starred=!0),this.feature.name&&(document.title=`${this.feature.name} - ${this.appTitle}`),this.shippingInfo=await _h(a,e.stages),this.loading=!1}).catch(t=>{t instanceof e?this.loading=!1:Vc("Some errors occurred. Please refresh the page or try again later.")}),window.csClient.getFeatureLinks(this.featureId).then(e=>{this.featureLinks=e?.data||[],e?.has_stale_links&&setTimeout(this.refetchFeatureLinks.bind(this),1e4)})}async refetchFeatureLinks(){const e=await window.csClient.getFeatureLinks(this.featureId,!1);this.featureLinks=e?.data||[]}refetch(){Promise.all([window.csClient.getFeature(this.featureId),window.csClient.getGates(this.featureId),window.csClient.getComments(this.featureId,null)]).then(([e,t,i])=>{this.feature=e,this.gates=t.gates,this.comments=i.comments}).catch(t=>{t instanceof e?this.loading=!1:Vc("Some errors occurred. Please refresh the page or try again later.")})}disconnectedCallback(){super.disconnectedCallback(),document.title=this.appTitle}handleStarClick(e){e.preventDefault(),window.csClient.setStar(this.featureId,!this.starred).then(()=>{this.starred=!this.starred})}handleShareClick(e){if(e.preventDefault(),navigator.share){const e="/feature/"+this.featureId;navigator.share({title:this.feature.name,text:this.feature.summary,url:e}).then(()=>{ga("send","social",{socialNetwork:"web",socialAction:"share",socialTarget:e})})}}handleCopyLinkClick(e){e.preventDefault();const t=e.currentTarget.href;navigator.clipboard.writeText(t).then(()=>{Vc("Link copied")})}canDeleteFeature(){return this.user?.is_admin||fh(this.user,this.featureId)}handleArchiveFeature(){confirm("Archive feature? It will only be visible to users who can edit it")&&window.csClient.doDelete(`/features/${this.feature.id}`).then(e=>{"Done"===e.message&&(location.href="/features")})}handleSuspend(){if(!confirm("Suspend development of this feature? It will not appear on the roadmap."))return;const e={feature_changes:{id:this.feature.id,impl_status_chrome:pc.ON_HOLD[0]},stages:[],has_changes:!0};window.csClient.updateFeature(e).then(e=>{window.location.reload()})}handleResume(){if(!confirm("Resume active development of this feature? It will appear on the roadmap if it has milestones set."))return;const e={feature_changes:{id:this.feature.id,impl_status_chrome:pc.PROPOSED[0]},stages:[],has_changes:!0};window.csClient.updateFeature(e).then(e=>{window.location.reload()})}renderSkeletonSection(){return W` 8274 <section> 8275 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 8276 <p> 8277 <sl-skeleton effect="sheen"></sl-skeleton> 8278 <sl-skeleton effect="sheen"></sl-skeleton> 8279 </p> 8280 </section> 8281 `}renderSkeletons(){return W` 8282 <div id="feature" style="margin-top: 65px;"> 8283 ${this.renderSkeletonSection()} ${this.renderSkeletonSection()} 8284 ${this.renderSkeletonSection()} ${this.renderSkeletonSection()} 8285 </div> 8286 `}featureIsInactive(){const e=this.feature&&this.feature.browsers.chrome.status.text||"";return Pm.includes(e)}pairedUserCanEdit(){return this.paired_user?.can_edit_all||this.paired_user?.editable_features.includes(this.featureId)}renderSubHeader(){const e="function"==typeof navigator.share;return W` 8287 <div id="subheader" style="display:block"> 8288 <div class="tooltips" style="float:right; font-size:1.1rem"> 8289 ${this.user?W`
8290 <span 8291 class="tooltip" 8292 title="Receive an email notification when there are updates" 8293 > 8294 <a 8295 href="#" 8296 data-tooltip 8297 id="star-when-signed-in" 8298 @click=${this.handleStarClick} 8299 > 8300 <sl-icon 8301 name=${this.starred?"star-fill":"star"} 8302 class="pushicon" 8303 ></sl-icon> 8304 </a> 8305 </span> 8306 `:Y} 8307 <span class="tooltip" title="File a bug against this feature"> 8308 <a 8309 href=${Ht(this.feature.new_crbug_url)} 8310 class="newbug" 8311 data-tooltip 8312 target="_blank" 8313 rel="noopener" 8314 > 8315 <sl-icon name="bug"></sl-icon> 8316 </a> 8317 </span> 8318 <span 8319 class="tooltip ${e?"":"no-web-share"}" 8320 title="Share this feature" 8321 > 8322 <a 8323 href="#" 8324 data-tooltip 8325 id="share-feature" 8326 @click=${this.handleShareClick} 8327 > 8328 <sl-icon name="share"></sl-icon> 8329 </a> 8330 </span> 8331 <span 8332 class="tooltip copy-to-clipboard" 8333 title="Copy link to clipboard" 8334 > 8335 <a 8336 href="/feature/${this.featureId}" 8337 data-tooltip 8338 id="copy-link" 8339 @click=${this.handleCopyLinkClick} 8340 > 8341 <sl-icon library="material" name="link"></sl-icon> 8342 </a> 8343 </span> 8344 </div> 8345 <h2 id="breadcrumbs"> 8346 <a href="${this.contextLink}"> 8347 <sl-icon name="arrow-left"></sl-icon> 8348 </a> 8349 <a href="/feature/${this.featureId}"> 8350 Feature: ${this.feature.name} 8351 </a> 8352 ${this.featureIsInactive()?W`(${this.feature.browsers.chrome.status.text})`:Y} 8353 </h2> 8354 </div> 8355 `}renderWarnings(){const e=[];this.feature.deleted&&e.push(W` 8356 <div id="archived" class="warning"> 8357 This feature is archived. It does not appear in feature lists and is 8358 only viewable by users who can edit it. 8359 </div> 8360 `),this.feature.unlisted&&e.push(W` 8361 <div id="access" class="warning"> 8362 This feature is only shown in the feature list to users with access to 8363 edit this feature. 8364 </div> 8365 `);const t=fh(this.user,this.featureId);!t&&this.pairedUserCanEdit()&&e.push(W` 8366 <div id="switch_to_edit" class="warning"> 8367 User ${this.user.email} cannot edit this feature or request reviews. 8368 But, ${this.paired_user.email} can do that. 8369 <br /> 8370 To switch users: sign out and then sign in again. 8371 </div> 8372 `),0==this.user?.approvable_gate_types.length&&this.paired_user?.approvable_gate_types.length>0&&e.push(W` 8373 <div id="switch_to_review" class="warning"> 8374 User ${this.user.email} cannot review this feature. But, 8375 ${this.paired_user.email} can do that. 8376 <br /> 8377 To switch users: sign out and then sign in again. 8378 </div> 8379 `);const i=wh(this.feature,this.shippingInfo,this.currentDate,t);return i&&e.push(i),e}renderFeatureDetails(){return W` 8380 <chromedash-feature-detail 8381 appTitle=${this.appTitle} 8382 .user=${this.user} 8383 ?canEdit=${fh(this.user,this.featureId)} 8384 .feature=${this.feature} 8385 .gates=${this.gates} 8386 .comments=${this.comments} 8387 .process=${this.process} 8388 .progress=${this.progress} 8389 .featureLinks=${this.featureLinks} 8390 selectedGateId=${this.selectedGateId} 8391 > 8392 </chromedash-feature-detail> 8393 `}render(){return this.loading?this.renderSkeletons():this.isFeatureLoaded()?W` 8394 ${this.renderSubHeader()} ${this.renderWarnings()} 8395 <chromedash-feature-highlights 8396 .feature=${this.feature} 8397 .featureLinks=${this.featureLinks}
8398 ?canDeleteFeature=${this.canDeleteFeature()} 8399 ?canEditFeature=${fh(this.user,this.featureId)} 8400 @archive=${this.handleArchiveFeature} 8401 @suspend=${this.handleSuspend} 8402 @resume=${this.handleResume} 8403 ></chromedash-feature-highlights> 8404 ${this.renderFeatureDetails()} 8405 `:W`Feature not found.`}};Rm([Ve({attribute:!1})],Dm.prototype,"user",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"paired_user",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"featureId",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"feature",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"featureLinks",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"gates",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"comments",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"process",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"progress",void 0),Rm([Ve({attribute:!1})],Dm.prototype,"contextLink",void 0),Rm([Ve({type:String})],Dm.prototype,"appTitle",void 0),Rm([Ve({type:Number})],Dm.prototype,"selectedGateId",void 0),Rm([He()],Dm.prototype,"starred",void 0),Rm([He()],Dm.prototype,"loading",void 0),Rm([He()],Dm.prototype,"currentDate",void 0),Rm([He()],Dm.prototype,"shippingInfo",void 0),Dm=Rm([Ue("chromedash-feature-page")],Dm);var Om=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let zm=class extends ce{static get styles(){return[...lo,c` 8406 footer { 8407 background: var(--page-background); 8408 box-shadow: 0 -2px 5px var(--shadow-color); 8409 display: flex; 8410 flex-direction: column; 8411 justify-content: center; 8412 text-align: center; 8413 align-items: center; 8414 padding: var(--content-padding-half); 8415 position: relative; /* Ensure the z-index has an effect so the box-shadow appears. */ 8416 z-index: 800; 8417 } 8418 8419 footer div > * + * { 8420 margin-left: var(--content-padding); 8421 padding-left: var(--content-padding); 8422 } 8423 8424 #footer-spacer { 8425 display: none; 8426 height: calc(28px + var(--content-padding-half)); 8427 } 8428 8429 @media only screen and (min-width: 601px) and (min-height: 601px) { 8430 footer { 8431 position: fixed; 8432 bottom: 0; 8433 left: 0; 8434 width: 100%; 8435 } 8436 8437 #footer-spacer { 8438 display: block; 8439 } 8440 } 8441 `]}render(){return W` 8442 <div id="footer-spacer"></div> 8443 <footer> 8444 <div> 8445 <a 8446 href="https://github.com/GoogleChrome/chromium-dashboard/wiki/" 8447 target="_blank" 8448 rel="noopener" 8449 >Help</a 8450 > 8451 <a 8452 href="https://groups.google.com/a/chromium.org/forum/#!newtopic/blink-dev" 8453 target="_blank" 8454 rel="noopener" 8455 >Discuss</a 8456 > 8457 <a 8458 href="https://github.com/GoogleChrome/chromium-dashboard/issues" 8459 target="_blank" 8460 rel="noopener" 8461 >File an issue</a 8462 > 8463 <a 8464 href="https://policies.google.com/privacy" 8465 target="_blank" 8466 rel="noopener" 8467 >Privacy</a 8468 > 8469 </div> 8470 </footer> 8471 `}};zm=Om([Ue("chromedash-footer")],zm);var Lm=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Fm=String.raw`\s+`;let Nm=class extends ce{constructor(){super(...arguments),this.textareaRef=ws(),this.fileInputRef=ws(),this.chromedash_single_pattern=zf,this.chromedash_split_pattern=Fm}createRenderRoot(){return this}validate(){this.textareaRef?.value?.validate&&this.textareaRef.value.validate()}handleFieldUpdated(e){let t=e.target.value;this.value=t,this.dispatchEvent(new CustomEvent("sl-change"))}handleFileSelected(e){let t=e.target;if(t.files?.[0]){const e=t.files?.[0];window.csClient.addAttachment(this.featureId,t.name,e).then(e=>{this.value+="\n"+e.attachment_url,this.dispatchEvent(new CustomEvent("sl-change"))})}}renderOneThumbnail(e){if(""==e)return Y;const t={display:"inline-block",padding:"var(--content-padding-quarter)",margin:"var(--content-padding-half)",border:"2px s
8471olid var(--link-color)",cursor:"zoom-in"};var i=e;return e.includes("/feature/"+this.featureId+"/attachment/")&&(i+="/thumbnail"),W` 8472 <a href=${e} target="_blank" style=${Ps(t)}> 8473 <img style=${Ps({maxHeight:"150px",maxWidth:"200px"})} src=${i}></img> 8474 </a> 8475 `}renderThumbnails(){if(!this.value?.length)return Y;return this.value.split(new RegExp(this.chromedash_split_pattern)).map(e=>this.renderOneThumbnail(e))}renderUploadButton(){return W` 8476 <input 8477 ${$s(this.fileInputRef)} 8478 id="file-field" 8479 type="file" 8480 name="screenshots" 8481 @change=${e=>this.handleFileSelected(e)} 8482 accept="image/png, image/jpeg, image/webp, text/plain" 8483 style="display:none" 8484 /> 8485 <div style=${Ps({display:"inline-block",margin:"var(--content-padding-half)"})}> 8486 <sl-button 8487 id="upload-button" 8488 @click=${e=>this.fileInputRef?.value?.click()} 8489 > 8490 <sl-icon slot="prefix" name="upload"></sl-icon> 8491 Upload image 8492 </sl-button> 8493 <div>Max size: 1MB</div> 8494 </div> 8495 `}render(){return W` 8496 <chromedash-textarea 8497 ${$s(this.textareaRef)} 8498 size="small" 8499 name=${this.name} 8500 value=${this.value} 8501 multiple 8502 placeholder=${"https://...\nhttps://..."} 8503 pattern=${this.pattern} 8504 chromedash_single_pattern=${this.chromedash_single_pattern} 8505 chromedash_split_pattern=${this.chromedash_split_pattern} 8506 @sl-change=${this.handleFieldUpdated} 8507 @keyup=${this.handleFieldUpdated} 8508 ></chromedash-textarea> 8509 <div>${this.renderThumbnails()} ${this.renderUploadButton()}</div> 8510 `}firstUpdated(){this.validate()}updated(){this.validate()}};Lm([Ve({type:String})],Nm.prototype,"name",void 0),Lm([Ve({type:String})],Nm.prototype,"value",void 0),Lm([Ve({type:String})],Nm.prototype,"pattern",void 0),Lm([Ve({type:String})],Nm.prototype,"chromedash_single_pattern",void 0),Lm([Ve({type:String})],Nm.prototype,"chromedash_split_pattern",void 0),Lm([Ve({type:Number})],Nm.prototype,"featureId",void 0),Nm=Lm([Ue("chromedash-attachments")],Nm);var Mm=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let qm=class extends eo{constructor(){super(...arguments),this.cols=50,this.rows=10,this.offerMarkdown=!1,this.isMarkdown=!1,this.alwaysMarkdown=!1,this.index=-1,this.showPreview=!1}customCheckValidity(e){if(this.multiple&&this.chromedash_split_pattern&&this.chromedash_single_pattern){const t=e.split(new RegExp(this.chromedash_split_pattern)),i=new RegExp("^"+this.chromedash_single_pattern+"$","");if(!t.every(e=>{if(!e)return!0;return i.test(e)}))return!1}if(this.pattern){return new RegExp("^"+this.pattern+"$","").test(e)}return!0}validate(){if(null===this.input)return;const e=this.customCheckValidity(this.input.value)?"":"invalid";this.setCustomValidity&&this.setCustomValidity(e)}firstUpdated(){this.validate()}updated(){this.input&&this.validate()}handleMarkdownChecked(e){this.isMarkdown=Boolean(e.target?.checked),this.isMarkdown||(this.showPreview=!1)}handlePreviewChecked(e){this.showPreview=Boolean(e.target?.checked),e.stopPropagation()}render(){const e=super.render();if(!this.offerMarkdown&&!this.alwaysMarkdown)return e;const t=W` 8511 <div style="display:none">${e}</div> 8512 <div 8513 id="preview" 8514 style="border:var(--card-border); padding:0 var(--content-padding); min-height:14em; background:var(--table-alternate-background)" 8515 > 8516 ${jc(this.value,[],!0)} 8517 </div> 8518 `;return W` 8519 ${this.showPreview?t:e} 8520 <sl-checkbox 8521 id="use-markdown" 8522 name="${this.name}_is_markdown" 8523 ?checked=${this.isMarkdown||this.alwaysMarkdown} 8524 ?disabled=${this.alwaysMarkdown} 8525 @sl-change=${this.handleMarkdownChecked} 8526 > 8527 Use markdown 8528 </sl-checkbox> 8529 <sl-icon-button 8530 name="info-circle" 8531 id="info-button" 8532 title="GitHub flavored markdown docs" 8533 href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax" 8534 target="_blank" 8535 ></sl-icon-button> 8536 ${this.isMarkdown||this.alwaysMarkdown?W` <sl-checkbox 8537 id="show-preview" 8538 ?checked=${this.showPreview}
8539 @sl-change=${this.handlePreviewChecked} 8540 > 8541 Preview 8542 </sl-checkbox>`:Y} 8543 `}};Mm([Ve({type:Boolean})],qm.prototype,"multiple",void 0),Mm([Ve({type:String})],qm.prototype,"pattern",void 0),Mm([Ve({type:String})],qm.prototype,"chromedash_single_pattern",void 0),Mm([Ve({type:String})],qm.prototype,"chromedash_split_pattern",void 0),Mm([Ve({type:Number})],qm.prototype,"cols",void 0),Mm([Ve({type:Number})],qm.prototype,"rows",void 0),Mm([Ve({type:Boolean})],qm.prototype,"offerMarkdown",void 0),Mm([Ve({type:Boolean})],qm.prototype,"isMarkdown",void 0),Mm([Ve({type:Boolean})],qm.prototype,"alwaysMarkdown",void 0),Mm([Ve({type:Number})],qm.prototype,"index",void 0),Mm([He()],qm.prototype,"showPreview",void 0),qm=Mm([Ue("chromedash-textarea")],qm);var Um=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Bm={[Ed.Prototype]:{abbreviation:"I2P",className:"usage-tag--prototype",title:"Intent to Prototype"},[Ed.DeveloperTesting]:{abbreviation:"R4DT",className:"usage-tag--dev-testing",title:"Ready for Developer Testing"},[Ed.Experiment]:{abbreviation:"I2E",className:"usage-tag--experiment",title:"Intent to Experiment"},[Ed.Ship]:{abbreviation:"I2S",className:"usage-tag--ship",title:"Intent to Ship"},[Ed.PSA]:{abbreviation:"PSA",className:"usage-tag--psa",title:"Web-Facing Change PSA"},[Ed.DeprecateAndRemove]:{abbreviation:"I2D",className:"usage-tag--deprecate",title:"Intent to Deprecate and Remove"},[Ed.ReleaseNotes]:{abbreviation:"RN",className:"usage-tag--rn",title:"Release Notes"},[Ed.CrossFunctionReview]:{abbreviation:"XFN",className:"usage-tag-xfn",title:"Cross-Functional Review"}};let jm=class extends ce{constructor(){super(...arguments),this.name="",this.index=-1,this.checkboxLabel="",this.disabled=!1,this.shouldFadeIn=!1,this.forEnterprise=!1,this.disabledReason="",this.forceRequired=!1,this.value="",this.initialValue="",this.loading=!1,this.fetchedChoices={},this.checkMessage=""}getValue(){const e=this.forEnterprise&&void 0!==this.fieldProps.enterprise_initial?this.fieldProps.enterprise_initial:this.fieldProps.initial;return!this.value&&e?e:this.value}connectedCallback(){super.connectedCallback(),this.fieldProps=function(e,t){const i={...e};return e.computedChoices&&(i.choices=e.computedChoices(t)),i}(am[this.name]||{},this.feature);const e=document.querySelector("chromedash-app");e?.pageComponent&&e.pageComponent.allFormFieldComponentsList.push(this),"blink_components"===this.name?this.fetchChoices(window.csClient.getBlinkComponents(),"Error fetching Blink Components. Please refresh the page or try again later."):"web_feature"===this.name&&this.fetchChoices(window.csClient.getWebFeatureIDs().then(e=>{let t={missing_feature:["Missing feature","Missing feature"]};for(let i of e)t[i]=[i,i];return t}),"Error fetching Web feature IDs. Please refresh the page or try again later.")}fetchChoices(e,t){this.loading=!0,e.then(e=>{this.fetchedChoices=e,this.loading=!1}).catch(()=>{Vc(t)})}willUpdate(e){super.willUpdate(e),this.hasUpdated||(this.initialValue=JSON.parse(JSON.stringify(this.value)))}firstUpdated(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{this.doSemanticCheck()}):setTimeout(()=>this.doSemanticCheck(),0)}updateAttributes(e){if(!e)return;const t=this.fieldProps.attrs||{};Object.keys(t).map(i=>{e.setAttribute(i,t[i])})}toggleExtraHelp(){const e=this.renderRoot.querySelector("sl-details");e.open=!e.open;this.renderRoot.querySelector("sl-icon-button").name=e.open?"dash-square":"plus-square"}shouldDisplayFeatureLink(e,t){return"web_feature"===e&&(!!t&&("Missing feature"!==t&&"TBD"!=t))}createRenderRoot(){return this}handleFieldUpdated(e){const t=this.fieldProps.type;let i,r;i="checkbox"===t?e.target.checked:"multiselect"===t?e.target.value.join(","):e.target.value,this.value=i,e.target.offerMarkdown&&(r=e.target.isMarkdown);const s={detail:{value:i,index:this.index,isMarkdown:r}};this.dispatchEvent(new CustomEvent("form-field-update",s));const o=document.querySelector("chromedash-app");o?.pageComponent?o.pageComponent.allFormFieldComponentsList.forEach(e
8543=>e.doSemanticCheck()):this.doSemanticCheck()}async doSemanticCheck(){const e=(e,t)=>("current stage"===t&&(t=this.stageId),function(e,t,i){let r;"number"==typeof t?r=t:"object"==typeof t&&(r=t.id);for(const t of i)if(t.name===e&&(null==r||t.stageId==r))return t.value;const s=i?.feature;if(null==s)return null;const o="object"==typeof t?t:null!=r?s.stages.find(e=>e.id==r):s.stages[0];if(!o)return null;const a=Xc(e,o,s);return a}(e,t,this.fieldValues||[]));e.feature=this.fieldValues?.feature;const t=async t=>{const i=this.getValue(),r=this.initialValue;if(null==i)return!1;const s=await t(i,e,r);return null!=s&&(this.checkMessage=W` <span 8544 class="check-${s.message?"message":s.warning?"warning":s.error?"error":"unknown"}" 8545 > 8546 ${s.message?s.message:s.warning?W`<b>Warning</b>: ${s.warning}`:s.error?W`<b>Error</b>: ${s.error}`:""} 8547 </span>`,!0)},i=this.fieldProps.check||[],r="function"==typeof i?[i]:i;r.length>0&&(this.checkMessage="");for(const e of r)if(await t(e))return}renderWidget(){const e=this.fieldProps.type,t=this.fieldProps.disabled,i=this.getValue(),r=this.fieldProps.required||this.forceRequired,s=Boolean(this.forEnterprise?this.fieldProps.enterprise_offer_markdown:this.fieldProps.offer_markdown),o=this.fieldProps.name||this.name,a=(this.feature?.markdown_fields||[]).includes(o),n=this.fieldProps.choices||this.fetchedChoices;let l=W``;if("checkbox"===e){const e=this.checkboxLabel||this.fieldProps.label;l=W` 8548 <sl-checkbox 8549 name="${o}" 8550 id="id_${this.name}" 8551 size="small" 8552 ?checked=${!0===i||"true"===i||"True"===i} 8553 ?disabled=${this.disabled||t} 8554 @sl-change="${this.handleFieldUpdated}" 8555 > 8556 ${e} 8557 </sl-checkbox> 8558 `}else if("select"===e)l=W` 8559 <sl-select 8560 name="${o}" 8561 id="id_${this.name}" 8562 value="${i}" 8563 size="small" 8564 hoist 8565 ?disabled=${t||this.disabled||this.loading} 8566 @sl-change="${this.handleFieldUpdated}" 8567 > 8568 ${Object.values(n).map(([e,t])=>W` 8569 <sl-option value="${e}"> ${t} </sl-option> 8570 `)} 8571 </sl-select> 8572 `;else if("multiselect"===e){const e=i.split(","),s=Object.values(n).filter(([t,i,r])=>!r||e.includes(""+t));l=W` 8573 <sl-select 8574 name="${o}" 8575 id="id_${this.name}" 8576 .value=${e} 8577 size="small" 8578 hoist 8579 multiple 8580 cleareable 8581 ?required=${r} 8582 ?disabled=${t||this.disabled||this.loading} 8583 @sl-change="${this.handleFieldUpdated}" 8584 > 8585 ${s.map(([e,t])=>W` 8586 <sl-option value="${e}"> ${t} </sl-option> 8587 `)} 8588 </sl-select> 8589 `}else"input"===e?l=W` 8590 <sl-input 8591 ${$s(this.updateAttributes)} 8592 name="${o}" 8593 id="id_${this.name}" 8594 stageId="${this.stageId}" 8595 size="small" 8596 autocomplete="off" 8597 .value=${i} 8598 help-text="${this.disabledReason}" 8599 ?disabled=${this.disabled||this.disabledReason||t} 8600 ?required=${r} 8601 @sl-change="${this.handleFieldUpdated}" 8602 > 8603 </sl-input> 8604 `:"textarea"===e?l=W` 8605 <chromedash-textarea 8606 ${$s(this.updateAttributes)} 8607 name="${o}" 8608 id="id_${this.name}" 8609 size="small" 8610 resize="auto" 8611 value=${i} 8612 index=${this.index} 8613 ?required=${r} 8614 ?offerMarkdown=${s} 8615 ?isMarkdown=${a} 8616 ?alwaysMarkdown=${this.fieldProps.always_markdown} 8617 @sl-change="${this.handleFieldUpdated}" 8618 > 8619 </chromedash-textarea> 8620 `:"attachments"===e?l=W` 8621 <chromedash-attachments 8622 ${$s(this.updateAttributes)} 8623 name="${o}" 8624 featureId=${this.feature.id} 8625 id="id_${this.name}" 8626 size="small" 8627 value=${i} 8628 ?required=${r} 8629 @sl-change="${this.handleFieldUpdated}" 8630 > 8631 </chromedash-attachments> 8632 `:"radios"===e?l=W` 8633 ${Object.values(n).map(([e,t,r])=>W` 8634 <input 8635 id="id_${this.name}_${e}" 8636 name="${o}" 8637 value="${e}" 8638 .checked="${e===Number(i)}" 8639 type="radio" 8640 required 8641 @change=${this.handleFieldUpdated} 8642 /> 8643 <label for="id_${this.name}_${e}">${t}</label> 8644 <p>${r}</p> 8645 `)} 8646 `:"datalist"===e?l=W` 8647 <div class="datalist-input-wrapper" data-testid="${this.name}_wrapper"> 8648 <input 8649 ${$s(this.updateAttributes)} 8650 name="${o}" 8651 id="id_${this.name}" 8652 value="${i}" 8653 class="datalist-input" 8654 type="search" 8655 list="${this.name}_list" 8656 ?required=${r} 8657 @change=${this.handleFieldUpdated} 8658 /> 8659 </div> 8660 <datalist id="${this.name}_list"> 8661 ${Object.values(n).map(([e])=>W` <option value="${e}"></option> `)} 8662 </datalist> 8663 `:console.error(`unknown form field type: ${e}`);return l}renderUsageIcons(e,t){if(void 0===t)return[];const i=e[t];if(!i)return[];if(Pd[t]?.isSubsetOf(i))return[W`<span 8664 class="usage-tag usage-tag--all" 8665 title="This field is used to populate all intent templates when provided" 8666 > 8667 All 8668 </span>`];const r=[];for(const e of i){const t=Bm[e];if(t){const e=`This field is used to populate the ${t.title} template`;r.push(W`
8669 <span class="usage-tag ${t.className}" title="${e}" 8670 >${t.abbreviation}</span 8671 > 8672 `)}}return r}render(){if(this.fieldProps.deprecated&&!this.value)return Y;const e=this.forEnterprise&&void 0!==this.fieldProps.enterprise_help_text?this.fieldProps.enterprise_help_text:this.fieldProps.help_text,t=this.forEnterprise&&void 0!==this.fieldProps.enterprise_extra_help?this.fieldProps.enterprise_extra_help:this.fieldProps.extra_help,i=this.shouldFadeIn?"fade-in":"";return W` 8673 ${this.fieldProps.label?W` 8674 <tr class="${i}"> 8675 <th class="form-field-header"> 8676 <div> 8677 <b>${this.fieldProps.label}:</b> 8678 </div> 8679 <div> 8680 ${this.renderUsageIcons(this.fieldProps.usage,this.feature?.feature_type_int)} 8681 </div> 8682 </th> 8683 </tr> 8684 `:Y} 8685 <tr class=${i}> 8686 <td>${this.renderWidget()} ${this.checkMessage}</td> 8687 <td> 8688 ${e?W`<span class="helptext"> ${e} </span>`:Y} 8689 ${t?W` 8690 <sl-icon-button 8691 name="plus-square" 8692 label="Toggle extra help" 8693 style="position:absolute" 8694 @click="${this.toggleExtraHelp}" 8695 > 8696 + 8697 </sl-icon-button> 8698 `:Y} 8699 </td> 8700 </tr> 8701 8702 ${t?W` 8703 <tr> 8704 <td colspan="2" class="extrahelp"> 8705 <sl-details summary=""> 8706 <span class="helptext"> ${t} </span> 8707 </sl-details> 8708 </td> 8709 </tr> 8710 `:Y} 8711 ${this.shouldDisplayFeatureLink(this.name,this.value)?W` 8712 <tr> 8713 <td colspan="2" class="webdx"> 8714 See web feature 8715 <a 8716 href="https://webstatus.dev/features/${function(e){let t="";for(let i=0;i<e.length;i++){const r=e[i];0!==i?r===r.toUpperCase()&&/[a-zA-Z]/.test(r)?t+="-"+r.toLowerCase():(i>0&&/[a-zA-Z]/.test(e[i-1])&&r>="0"&&r<="9"&&(t+="-"),t+=r):t+=r.toLowerCase()}return t}(this.value)}" 8717 target="_blank" 8718 > 8719 ${this.value} 8720 </a> 8721 in webstatus.dev 8722 </td> 8723 </tr> 8724 `:Y} 8725 `}};Um([Ve({type:String})],jm.prototype,"name",void 0),Um([Ve({type:Number})],jm.prototype,"index",void 0),Um([Ve({type:Object})],jm.prototype,"fieldValues",void 0),Um([Ve({type:Object,attribute:!1})],jm.prototype,"feature",void 0),Um([Ve({type:String})],jm.prototype,"checkboxLabel",void 0),Um([Ve({type:Boolean})],jm.prototype,"disabled",void 0),Um([Ve({type:Boolean})],jm.prototype,"shouldFadeIn",void 0),Um([Ve({type:Boolean})],jm.prototype,"forEnterprise",void 0),Um([Ve({type:String})],jm.prototype,"disabledReason",void 0),Um([Ve({type:Boolean})],jm.prototype,"forceRequired",void 0),Um([Ve({type:Number})],jm.prototype,"stageId",void 0),Um([Ve({type:Number})],jm.prototype,"stageType",void 0),Um([Ve({type:String})],jm.prototype,"value",void 0),Um([He()],jm.prototype,"initialValue",void 0),Um([He()],jm.prototype,"loading",void 0),Um([He()],jm.prototype,"fetchedChoices",void 0),Um([He()],jm.prototype,"checkMessage",void 0),Um([He()],jm.prototype,"fieldProps",void 0),jm=Um([Ue("chromedash-form-field")],jm);var Vm=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Hm=class extends ce{static get styles(){return[c` 8726 :host { 8727 display: table; 8728 max-width: 80em; 8729 } 8730 `]}render(){return W` <slot>fallback content</slot> `}};Vm([Ve({type:String})],Hm.prototype,"class",void 0),Hm=Vm([Ue("chromedash-form-table")],Hm);const Wm=W` <p> 8731 To request a review, use the "Draft intent..." button above to generate an 8732 intent messsage, and then post that message to [email protected]. 8733 </p> 8734 <p> 8735 Be sure to update your feature entry in response to any suggestions on that 8736 email thread.
8737 </p>`,Gm=W` <p> 8738 <b 8739 >Please fill out the Security & Privacy self-review questionnaire: 8740 <a 8741 href="https://www.w3.org/TR/security-privacy-questionnaire/" 8742 target="_blank" 8743 >https://www.w3.org/TR/security-privacy-questionnaire/</a 8744 ></b 8745 > 8746 </p> 8747 <p> 8748 Share it as a public document, as a file in your repository, or in any other 8749 public format of your choice. 8750 </p> 8751 <p> 8752 You can reuse the same filled-out questionnaire in the security review 8753 below, across all stages of this ChromeStatus entry, and across all entries 8754 related to the same API. If you updated an existing questionnaire to reflect 8755 new changes to the API, please highlight them for an easier review. 8756 </p> 8757 <p> 8758 <b>If you believe your feature has no privacy impact</b> and none of the 8759 questions in the questionnaire apply, you can provide a justification 8760 instead, e.g. "Removing a prefix from the API, no changes to functionality" 8761 or "New CSS property that doesn't depend on the user state, therefore 8762 doesn't reveal any user information". Note that if your reviewer disagrees 8763 with the justification, they may ask you to fill out the questionnaire 8764 nevertheless. 8765 </p>`,Ym=W` <p> 8766 <b 8767 >Please fill out the Security & Privacy self-review questionnaire: 8768 <a 8769 href="https://www.w3.org/TR/security-privacy-questionnaire/" 8770 target="_blank" 8771 >https://www.w3.org/TR/security-privacy-questionnaire/</a 8772 ></b 8773 > 8774 </p> 8775 <p> 8776 Share it as a public document, as a file in your repository, or in any other 8777 public format of your choice. 8778 </p> 8779 <p> 8780 You can reuse the same filled-out questionnaire in the privacy review above, 8781 across all stages of this ChromeStatus entry, and across all entries related 8782 to an API. If you updated an existing questionnaire to reflect new changes 8783 to the API, please highlight them for an easier review. 8784 </p> 8785 <p> 8786 <b>If you believe your feature has no security impact</b> and none of the 8787 questions in the questionnaire apply, you can provide a justification 8788 instead. Note that if your reviewer disagrees with the justification, they 8789 may ask you to fill out the questionnaire nevertheless. 8790 </p>`,Km=W` <p> 8791 <b>(1) Does this launch include a breaking change?</b> Does this launch 8792 remove or modify existing behavior or does it interrupt an existing user 8793 flow? (e.g. removing or restricting an API, or significant UI change). 8794 Answer with one of the following options, and/or describe anything you're 8795 unsure about: 8796 </p> 8797 <ul> 8798 <li> 8799 No. There's no change visible to users, developers, or IT admins (e.g. 8800 internal refactoring) 8801 </li> 8802 <li>No. This launch is strictly additive functionality</li> 8803 <li> 8804 Yes. Something that exists is changing or being removed (even if usage is 8805 very small) 8806 </li> 8807 <li> 8808 I don't know. Enterprise reviewers, please help me decide. The relevant 8809 information is: ______ 8810 </li> 8811 </ul> 8812 <p> 8813 <b 8814 >(2) Is there any other reason you expect that enterprises will care about 8815 this launch?</b 8816 > 8817 (e.g. they may perceive a risk of data leaks if the browser is uploading new 8818 information, or it may be a surprise to employees resulting in them calling 8819 their help desk). Answer with one of the following options, and/or describe 8820 anything you're unsure about: 8821 </p> 8822 <ul> 8823 <li>No. Enterprises won't care about this</li> 8824 <li>Yes. They'll probably care because ______</li> 8825 <li> 8826 I don't know. Enterprise reviewers, please help me decide. The relevant 8827 information is: ______ 8828 </li> 8829 </ul> 8830 <p> 8831 <b 8832 >(3) Does your launch have an enterprise policy to control it, and will it 8833 be available when this rolls out to stable (even to 1%)?</b 8834 > 8835 Only required if you answered Yes to either of the first 2 questions. Answer 8836 with one of the following options, and/or describe anything you're unsure 8837 about: 8838 </p> 8839 <ul> 8840 <li> 8841 Yes. It's called ______. It will be a permanent policy, and it will be 8842 available when stable rollout starts 8843 </li> 8844 <li> 8845 Yes. It's called ______. This is a temporary transition period, so the 8846 policy will stop working on milestone ___. It will be available when 8847 stable rollout starts 8848 </li> 8849 <li> 8850 No. A policy is infeasible because ______ (e.g. this launch is a change in 8851 how we compile Chrome) 8852 </li> 8853 <li> 8854 No. A policy isn't necessary because ______ (e.g. there's a better method 8855 of control available to admins) 8856 </li> 8857 </ul> 8858 <p> 8859 <b 8860 >(4) Provide a brief title and description of this launch, which can be 8861 shared with enterprises.</b 8862 > 8863 Only required if you answered Yes to either of the first 2 questions. This 8864 may be added to browser release notes. Where applicable, explain the benefit 8865 to users, and describe the policy to control it. 8866 </p>`,Qm=W` 8867 <b>Basic Support</b> 8868 8869 <p> 8870 (1) Does Chrome DevTools (including the classic UI and 8871 <a href="https://developer.chrome.com/docs/devtools/agents" target="_blank" 8872 >Chrome DevTools for agents</a 8873 >) continue to work without breaking or crashing when the new Web Platform 8874 feature is present? 8875 </p> 8876 8877 <p> 8878 (2) Is the new Web Platform feature introspectable with existing Chrome 8879 DevTools tooling (both UI and agentic)? (e.g., is the feature shown in the 8880 UI similarly to related platform features, and do existing tools exp
8880ose 8881 enough information for an agent to reason about it?) 8882 </p> 8883 8884 <b>Extended Support</b> 8885 8886 <p> 8887 (3) Would the new Web Platform feature's acceptance and/or adoption benefit 8888 from adding dedicated, custom developer workflows to Chrome DevTools (either 8889 UI or agentic)? (e.g., consider what common mistakes developers might make 8890 when using this feature. Do they or their agents need new tools to identify 8891 and fix those mistakes?) 8892 </p> 8893 8894 <b>Testing</b> 8895 8896 <p> 8897 (4) Can web developers write automated tests that cover the feature (e.g., 8898 via a WebDriver BiDi module or other appropriate automation)? 8899 </p> 8900 8901 <hr /> 8902 8903 <p> 8904 When in doubt, please check out 8905 <a href="https://goo.gle/devtools-checklist" target="_blank" 8906 >https://goo.gle/devtools-checklist</a 8907 > 8908 for details! 8909 </p> 8910`,Xm=Qm,Jm=W` <p> 8911 <b 8912 >(1) Does your feature have sufficient automated test coverage (Unit 8913 tests, WPT, browser tests and other integration tests)?</b 8914 > 8915 Chrome requires at least 70% automation code coverage (<a 8916 href="https://analysis.chromium.org/coverage/p/chromium" 8917 target="_blank" 8918 >dashboard</a 8919 >) running on the main/release branch and 70% Changelist 8920 <a 8921 href="https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/code_coverage_in_gerrit.md" 8922 target="_blank" 8923 >code coverage in Gerrit</a 8924 >? Do the automated tests have more than 93% green (flakiness < 7%) on CQ 8925 and CI builders? 8926 </p> 8927 <ul> 8928 <li> 8929 Yes. My feature met the minimum automated test coverage and health 8930 requirements. 8931 </li> 8932 <li>No. My feature does not meet the requirements since __________.</li> 8933 </ul> 8934 <p> 8935 <b>(2) How are performance tests conducted on Chromium builders?</b> List 8936 links to tests if any. 8937 </p> 8938 <p> 8939 <b 8940 >(3) Does this feature have non-automatable test cases that require manual 8941 testing? Do you have a plan to get them tested?</b 8942 > 8943 </p> 8944 <ul> 8945 <li>No. All feature related test cases are automated.</li> 8946 <li> 8947 Yes. There are non-automatable test cases and I have completed test 8948 execution or allocated resources to ensure the coverage of these test 8949 cases. 8950 </li> 8951 <li> 8952 Yes. There are non-automatable test cases and my feature impacts Google 8953 products. 8954 </li> 8955 </ul> 8956 <p> 8957 <b 8958 >(4) If your feature impacts Google products, please fill in 8959 <a href="http://go/chrome-wp-test-survey" target="_blank" 8960 >go/chrome-wp-test-survey</a 8961 >.</b 8962 > 8963 Make a copy, answer the survey questions, and provide a link to your 8964 document here. 8965 </p>`,Zm={[zd]:Wm,[Ld]:Wm,[Fd]:Wm,[Nd]:Wm,[Md]:Wm,[qd]:Gm,[Ud]:Gm,[Bd]:Ym,[jd]:Ym,[Vd]:Km,[Hd]:Km,[Wd]:Qm,[Gd]:Xm,[Yd]:Xm,[Kd]:Jm,[Qd]:Jm},eg=W` 8966 The API Owners review provides a final check on all aspects of your feature 8967 and how you have followed the 8968 <a href=${"https://www.chromium.org/blink/launching-features/"} target="_blank">Blink launch process</a>. 8969`,tg=W` 8970 The Web Platform privacy review puts you in touch with the privacy team so 8971 that they can consult further with you when needed. 8972`,ig=W` 8973 The Web Platform Security review helps ensure that new or changed web APIs 8974 uphold the security principles of the web - the same origin policy, no 8975 cross-site leaks, compliance with CSP, CORS, permission norms, etc. It aims to 8976 show that the API can be implemented safely. It doesnât necessarily try to 8977 prove that it has been implemented safely within Chromium - for Chrome team 8978 features, thatâs done by the Chrome launch review process. 8979`,rg=W` 8980 The enterprise review helps identify the impact of your feature on 8981 enterprises. Features need to be enterprise-friendly. That is: 8982 8983 <ul> 8984 <li>Breaking changes need to have sufficient notice</li> 8985 <li> 8986 Breaking changes need to have a soft deadline and transition period where 8987 feasible 8988 </li> 8989 <li>Admins need to have central controls where appropriate</li> 8990 </ul> 8991`,sg=W` 8992 The debuggability review helps identify opportunities to make your feature 8993 more successful by integrating with Chrome Dev Tools. 8994`,og=W`
8995 The test review helps identify gaps in test coverage and ensures that all 8996 crucial functionalities are thoroughly tested. This can lead to a more 8997 polished final product and reduce the odds of missed defects and issues. 8998`,ag={[zd]:eg,[Ld]:eg,[Fd]:eg,[Nd]:eg,[Md]:eg,[qd]:tg,[Ud]:tg,[Bd]:ig,[jd]:ig,[Vd]:rg,[Hd]:rg,[Wd]:sg,[Gd]:sg,[Yd]:sg,[Kd]:og,[Qd]:og};var ng=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let lg=class extends ce{constructor(){super(...arguments),this.loading=!0}static get styles(){return[...lo,c` 8999 #questionnaire { 9000 padding: var(--content-padding-half); 9001 border-radius: var(--border-radius); 9002 background: var(--accordion-background); 9003 } 9004 #questionnaire * + * { 9005 padding-top: var(--content-padding); 9006 } 9007 #questionnaire ul { 9008 padding-left: var(--content-padding); 9009 } 9010 #questionnaire ol { 9011 padding-left: var(--content-padding); 9012 } 9013 #questionnaire ol li { 9014 list-style: auto; 9015 } 9016 .question { 9017 padding: var(--content-padding-half); 9018 } 9019 .instructions { 9020 padding: var(--content-padding-half); 9021 margin-bottom: var(--content-padding-large); 9022 } 9023 `]}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}canEditSurvey(){return this.user&&(this.user.can_edit_all||this.user.editable_features.includes(this.feature.id))}renderQuestionnaireSkeleton(){return W` 9024 <div id="questionnaire">Loading...</div> 9025 <p class="instructions"> </p> 9026 `}handleFieldChange(e,t){window.csClient.updateGate(this.feature.id,this.gate.id,null,{[e]:t}).then(()=>{this._fireEvent("refetch-needed",{})})}handleFieldKeyup(e,t){(t||"").trim().length<=1&&window.csClient.updateGate(this.feature.id,this.gate.id,null,{[e]:t})}renderBooleanField(e,t){const i=this.gate.survey_answers?.[e];return W` 9027 <li class="question"> 9028 <sl-checkbox 9029 name=${e} 9030 ?checked=${i} 9031 ?disabled=${!this.canEditSurvey()} 9032 @sl-change=${t=>this.handleFieldChange(e,t.target?.checked)} 9033 ></sl-checkbox> 9034 ${t} 9035 </li> 9036 `}renderStringField(e,t){const i=this.gate.survey_answers?.[e];return W` 9037 <li class="question"> 9038 ${t} 9039 <sl-input 9040 name="${e}" 9041 size="small" 9042 value=${i} 9043 ?disabled=${!this.canEditSurvey()} 9044 @sl-change=${t=>this.handleFieldChange(e,t.target?.value)} 9045 @keyup=${t=>this.handleFieldKeyup(e,t.target?.value)} 9046 ></sl-input> 9047 </li> 9048 `}renderTextField(e,t){const i=this.gate.survey_answers?.[e];return W` 9049 <li class="question"> 9050 ${t} 9051 <sl-textarea 9052 name="${e}" 9053 size="small" 9054 rows="2" 9055 resize="auto" 9056 value=${i} 9057 ?disabled=${!this.canEditSurvey()} 9058 @sl-change=${t=>this.handleFieldChange(e,t.target?.value)} 9059 @keyup=${t=>this.handleFieldKeyup(e,t.target?.value)} 9060 ></sl-textarea> 9061 </li> 9062 `}renderPrivacyForm(){return W` 9063 <div id="questionnaire"> 9064 <ol> 9065 ${this.renderBooleanField("is_language_polyfill",W`This is a <b>new JS language construct</b> that has 9066 <b>already been polyfillable</b>.`)} 9067 ${this.renderBooleanField("is_api_polyfill",W`This is a <b>new API</b> that ergonomically provides a function 9068 that was <b>already polyfillable under the same conditions</b>. By 9069 "same conditions" we mean, for example, that if a polyfill was 9070 only possible when the user has granted a certain permission, the 9071 API respects the same permission.`)} 9072 ${this.renderBooleanField("is_same_origin_css",W`This is a <b>CSS addition</b> or change such that the style 9073 <b>
9073only depends on same-origin information</b> and 9074 <b>NOT on user data</b>. CSS changes are usually benign, however: 9075 if the style relies on iframes or subresources, it could reveal 9076 cross-origin information. If the style depends on user data, such 9077 as browsing history (like :visited), cookies, or user input (like 9078 hidden=until-found), the style could be used by the website to 9079 read this data.`)} 9080 ${this.renderStringField("launch_or_contact",W`If there is a Google-internal launch entry filed for this exact 9081 same issue, enter its URL here. Or, if this has previously been 9082 discussed with someone on the privacy team, enter their email 9083 address. Or, enter "None".`)} 9084 ${this.renderTextField("explanation",W`<b>Required</b>: If you checked any box above, explain why you 9085 checked it, and provide any other relevant context.`)} 9086 </ol> 9087 </div> 9088 `}renderTestingForm(){return W` 9089 <div id="questionnaire"> 9090 Does your feature have WPT or other automated tests that cover the 9091 following? 9092 <ol> 9093 ${this.renderBooleanField("covers_existence",W`<b>Feature existence</b>. This is typically done with 9094 surface-level tests like idlharness.js for APIs or 9095 parsing-testcommon.js for CSS. These tests donât verify actual 9096 behavior. 9097 <a 9098 href="https://wpt.fyi/results/idle-detection/idlharness.https.window.html" 9099 target="_blank" 9100 >API example</a 9101 >. 9102 <a 9103 href="https://wpt.fyi/results/css/css-logical/parsing/inset-valid.html" 9104 target="_blank" 9105 >CSS example</a 9106 >.`)} 9107 ${this.renderBooleanField("covers_common_cases",W`<b>Common use cases</b>. Use the feature in a realistic and 9108 straightforward way and verify the expected behavior. 9109 <a 9110 href="https://github.com/web-platform-tests/wpt/blob/master/requestidlecallback/basic.html" 9111 target="_blank" 9112 >API example</a 9113 >. 9114 <a 9115 href="https://wpt.fyi/results/css/css-flexbox/gap-001-ltr.html" 9116 target="_blank" 9117 >CSS example</a 9118 >. 9119 <a href="https://wpt.fyi/results/cors/basic.htm" target="_blank" 9120 >HTML example</a 9121 >.`)} 9122 ${this.renderBooleanField("covers_errors",W`<b>Likely error scenarios</b>. Test realistic error scenarios 9123 like out-of-bounds inputs, network errors, or the user rejecting a 9124 permission prompt. 9125 <a 9126 href="https://wpt.fyi/results/fetch/api/basic/error-after-response.any.html" 9127 target="_blank" 9128 >API example</a 9129 >. 9130 <a 9131 href="https://wpt.fyi/results/css/css-color/hsl-clamp-negative-saturation.html" 9132 target="_blank" 9133 >CSS example</a 9134 >. 9135 <a 9136 href="https://wpt.fyi/results/client-hints/accept-ch-malformed-header.https.html" 9137 target="_blank" 9138 >HTML example</a 9139 >. `)} 9140 ${this.renderBooleanField("covers_invalidation",W`<b>Invalidation</b>. Rendering or other output often needs to 9141 be invalidated when the inputs change. This kind of test is common 9142 for CSS features, but can make sense for other features too. Often 9143 called âdynamicâ when an initial state is updated by script. Or, 9144 if your feature needs no invalidation tests, check this box. 9145 <a 9146 href="https://wpt.fyi/results/dom/nodes/Element-childElementCount-dynamic-add.html" 9147 target="_blank" 9148 >API example</a 9149 >. 9150 <a 9151 href="https://wpt.fyi/results/css/css-content/quotes-lang-dynamic-001.html" 9152 target="_blank" 9153 >CSS example</a 9154 >. `)} 9155 ${this.renderBooleanField("covers_integration",W`<b>Integration with other features</b>. If the feature 9156 integrates with other features in some meaningful way, test that 9157 the combination of the two features behaves as expected. Or, if 9158 your feature needs no integration tests, check this box. 9159 <a 9160 href="https://wpt.fyi/results/permissions-policy/reporting/fullscreen-reporting.html" 9161 target="_blank" 9162 >API example</a 9163 >. 9164 <a 9165 href="https://wpt.fyi/results/css/css-anchor-position/anchor-scroll-to-sticky-001.html" 9166 target="_blank" 9167 >CSS example</a 9168 >. 9169 <a 9170 href="https://wpt.fyi/results/clear-site-data/set-cookie-before-clear-cookies.https.html" 9171 target="_blank" 9172 >HTML example</a 9173 >. `)} 9174 </ol> 9175 </div> 9176 `}renderAdoptionForm(){const e=this.feature.feature_type_int!==Yl.FEATURE_TYPE_CODE_CHANGE_ID[0];return W` 9177 <div id="questionnaire"> 9178 Check the boxes below that are true for your feature, then use the 9179 button at the top of this column to request a review. 9180 <ol> 9181 ${this.renderBooleanField("adoption_fields_up_to_date",W`<b>Details are up-to-date</b>. Your team has reviewed and 9182 updated the feature name, summary, and milestones to accurately 9183 reflect the state of the feature as it will ship.`)} 9184 ${this.renderBooleanField("adoption_style_aligned",W`<b>Style followed</b>. The feature name and summary follow all 9185 the guidelines in the help text shown while editing those fields, 9186 and they are compatible with the length, style, and tone of 9187 previous 9188 <a 9189 href="https://developer.chrome.com/release-notes" 9190 target="_blank" 9191 >Chrome release notes</a 9192 >.`)} 9193 ${this.renderBooleanField("adoption_lead_time",W`<b>Announcement lead time</b>. This feature's name, summary, 9194 and milestones have been unchanged for the past four weeks, or you 9195 have coordinated with the docs team to ensure that the feature is 9196 included in blog posts and other announcements.`)} 9197 ${this.renderBooleanField("adoption_mdn_drafted",W`<b>MDN work tracked</b>. You have 9198 <a 9199 href="https://issuetracker.google.com/issues/new?component=2087577" 9200 target="_blank" 9201 >created an issue</a 9202 > 9203 in the 9204 <a 9205 href="https://issuetracker.google.com/issues?q=componentid:2087577" 9206 target="_blank" 9207 >Chrome Documentation Requests tracker</a 9208 >, providing information to technical writers who will document 9209 this feature on 9210 <a href="https://github.com/mdn/content" target="_blank">MDN</a>.`)} 9211 ${e?this.renderBooleanField("adoption_mwg_drafted",W`<b>MWG work tracked</b>. You have 9212 <a 9213 href="https://github.com/GoogleChrome/modern-web-guidance-src/issues/new?template=new-feature.yml" 9214 target="_blank" 9215 >created an issue</a 9216 > 9217 in the 9218 <a 9219 href="https://github.com/GoogleChrome/modern-web-guidance-src" 9220 target="_blank" 9221 >Modern Web Guidance</a 9222 > 9223 tracker, providing information about how your feature 9224 impacts guidance for LLMs, or you have left a comment here 9225 explaining why there is no impact.`):Y} 9226 </ol> 9227 </div> 9228 `}renderQuestionnaire(){if(this.gate.gate_type===qd||this.gate.gate_type===Ud)return this.renderPrivacyF
9228orm();if(this.gate.gate_type===Qd||this.gate.gate_type===Kd)return this.renderTestingForm();if(this.gate.gate_type===Jd||this.gate.gate_type===Xd)return this.renderAdoptionForm();const e=Zm[this.gate.gate_type];if(!e)return W`No questions`;const t="string"==typeof e?jc(e):e;return W` 9229 <div id="questionnaire">${t}</div> 9230 <p class="instructions">Please post responses in the comments below.</p> 9231 `}render(){return W` 9232 <h2>Survey questions</h2> 9233 ${this.loading?this.renderQuestionnaireSkeleton():this.renderQuestionnaire()} 9234 `}};ng([Ve({type:Object})],lg.prototype,"user",void 0),ng([He()],lg.prototype,"feature",void 0),ng([He()],lg.prototype,"gate",void 0),ng([He()],lg.prototype,"loading",void 0),lg=ng([Ue("chromedash-survey-questions")],lg);var dg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let cg;let hg=class extends ce{constructor(){super(...arguments),this.rationaleDialogRef=ws(),this.rationaleRef=ws(),this.gate=void 0,this.resolve=()=>{console.log("Missing resolve action")}}static get styles(){return[...lo,c``]}openOn(e,t){this.gate=e,this.resolve=t,this.rationaleDialogRef.value?.show()}handlePost(){this.resolve(this.rationaleRef.value?.value),this.rationaleDialogRef.value?.hide()}renderDialogContent(){return void 0===this.gate?Y:W` 9235 <p style="padding: var(--content-padding)"> 9236 Please briefly explain why your feature does not require a review. Your 9237 response will be posted as a comment on this review gate and it will 9238 generate a notification to the reviewers. The ${this.gate.team_name} 9239 reviewers will still evaluate whether to give an "N/A" response or do a 9240 review. 9241 </p> 9242 <sl-textarea ${$s(this.rationaleRef)}></sl-textarea> 9243 <sl-button 9244 slot="footer" 9245 variant="primary" 9246 size="small" 9247 @click=${this.handlePost} 9248 >Post</sl-button 9249 > 9250 `}render(){return W` 9251 <sl-dialog ${$s(this.rationaleDialogRef)} label="Request an N/A"> 9252 ${this.renderDialogContent()} 9253 </sl-dialog> 9254 `}};dg([Ve({type:Object,attribute:!1})],hg.prototype,"gate",void 0),dg([Ve({attribute:!1})],hg.prototype,"resolve",void 0),hg=dg([Ue("chromedash-na-rationale-dialog")],hg);var ug=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let pg;async function fg(e,t){return function(e){return e.self_certify_possible&&e.self_certify_eligible}(e)?new Promise(i=>{!async function(e,t,i){pg||(pg=document.createElement("chromedash-self-certify-dialog"),document.body.appendChild(pg));pg.gate=e,pg.voteValue=t,pg.resolve=i,await pg.updateComplete,pg.show()}(e,t,i)}):Promise.resolve()}let mg=class extends ce{constructor(){super(...arguments),this.resolve=()=>{console.log("Missing resolve action")}}static get styles(){return[...lo,c` 9255 #prereqs-list li { 9256 margin-left: 8px; 9257 margin-bottom: 8px; 9258 } 9259 #prereqs-header { 9260 margin-bottom: 8px; 9261 } 9262 sl-button { 9263 float: right; 9264 margin: var(--content-padding-half); 9265 } 9266 `]}show(){this.renderRoot.querySelector("sl-dialog")?.show()}hide(){this.renderRoot.querySelector("sl-dialog")?.hide()}handleSelfCertify(){this.resolve(!0),this.hide()}handleFullReview(){this.resolve(!1),this.hide()}renderContentWhenEligible(){const e=this.voteValue==Zd.APPROVED[0]?"approval":"N/A";return W` 9267 <div id="prereqs-header"> 9268 Based on your answers to the survey questions, you may self-certify an 9269 ${e} for this gate. Alternatively, if you want to start a 9270 consulation with the review team, you may request a full review. 9271 </div> 9272 <br /> 9273 <sl-button size="small" @click=${this.handleFullReview} 9274 >Request full review</sl-button 9275 > 9276 <sl-button size="small" variant="primary" @click=${this.handleSelfCertify} 9277 >Self-certify ${e}</sl-button 9278 > 9279 `}render(){return void 0===this.gate?W`Loading gates...`:W` <sl-dialog label="Self
9279-certification"> 9280 ${this.renderContentWhenEligible()} 9281 </sl-dialog>`}};ug([Ve({type:Object})],mg.prototype,"gate",void 0),ug([Ve({type:Number})],mg.prototype,"voteValue",void 0),ug([Ve({attribute:!1})],mg.prototype,"resolve",void 0),mg=ug([Ue("chromedash-self-certify-dialog")],mg);var gg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let bg;function vg(e){return e.gate_type===Qd||e.gate_type===Kd}async function yg(e){return function(e){return vg(e)}(e)?new Promise(t=>{!async function(e,t){bg||(bg=document.createElement("chromedash-secondary-survey-dialog"),document.body.appendChild(bg));bg.gate=e,bg.resolve=t,await bg.updateComplete,bg.show()}(e,t)}):Promise.resolve()}let _g=class extends ce{constructor(){super(...arguments),this.resolve=()=>{console.log("Missing resolve action")}}static get styles(){return[...lo,c` 9282 ol { 9283 padding-left: var(--content-padding-half); 9284 } 9285 9286 ol li { 9287 margin-bottom: var(--content-padding); 9288 } 9289 sl-button { 9290 float: right; 9291 margin: var(--content-padding-half); 9292 } 9293 `]}show(){this.renderRoot.querySelector("sl-dialog")?.show()}hide(){this.renderRoot.querySelector("sl-dialog")?.hide()}generateTestingComment(){const e=`Survey answers:\n> 1. Does your feature have sufficient automated\n> test coverage (Unit tests, WPT, browser tests\n> and other integration tests)?\n\n${this.renderRoot.querySelector("#coverage").value}\n\n> 2. How are performance tests conducted on\n> Chromium builders?\n\n${this.renderRoot.querySelector("#performance_tests").value}\n\n> 3. Does this feature have non-automatable test\n> cases that require manual testing? Do you have\n> a plan to get them tested?\n\n${this.renderRoot.querySelector("#automation").value}\n\n> 4. If your feature impacts Google products,\n> please fill in go/chrome-wp-test-survey.\n\n${this.renderRoot.querySelector("#impact").value}\n`;this.resolve(e)}handleGenerateComment(){vg(this.gate)&&this.generateTestingComment(),this.hide()}renderTestingContent(){const e="Yes. My feature met the minimum automated test coverage and health requirements.",t="No. My feature does not meet the requirements.",i="No. All feature related test cases are automated.",r="Yes. There are non-automatable test cases and I have completed test execution or allocated resources to ensure the coverage of these test cases.",s="Yes. There are non-automatable test cases and my feature impacts Google products.";return W` 9294 <ol> 9295 <li> 9296 <b 9297 >Does your feature have sufficient automated test coverage (Unit 9298 tests, WPT, browser tests and other integration tests)?</b 9299 > 9300 Chrome requires at least 70% automation code coverage (<a 9301 href="https://analysis.chromium.org/coverage/p/chromium" 9302 target="_blank" 9303 >dashboard</a 9304 >) running on the main/release branch and 70% Changelist 9305 <a 9306 href="https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/code_coverage_in_gerrit.md" 9307 target="_blank" 9308 >code coverage in Gerrit</a 9309 >? Do the automated tests have more than 93% green (flakiness < 7%) on 9310 CQ and CI builders? 9311 9312 <sl-radio-group id="coverage"> 9313 <sl-radio value="${e}" size="small"> ${e} </sl-radio> 9314 <sl-radio value="${t}" size="small"> ${t} </sl-radio> 9315 </sl-radio-group> 9316 </li> 9317 9318 <li> 9319 <b>How are performance tests conducted on Chromium builders?</b> List 9320 links to tests if any. 9321 9322 <sl-textarea id="performance_tests" size="small" rows="2"> 9323 </sl-textarea> 9324 </li> 9325 9326 <li> 9327 <b 9328 >Does this feature have non-automatable test cases that require 9329 manual testing? Do you have a plan to get them tested?</b 9330 > 9331 9332 <sl-radio-group id="automation"> 9333 <sl-radio value="${i}" size="small"> ${i} </sl-radio> 9334 <sl-radio value="${r}" size="small"> ${r} </sl-radio> 9335 <sl-radio value="${s}" size="small"> ${s} </sl-radio> 9336 </sl-radio-group> 9337 </li> 9338 9339 <li> 9340 <b 9341 >If your feature impacts Google products, please fill in 9342 <a href="http://go/chrome-wp-test-survey" target="_blank" 9343 >go/chrome-wp-test-survey</a 9344 >.</b 9345 > 9346 Make a copy, answer the survey questions, and provide a link to your 9347 document here. 9348 <sl-textarea id="impact" size="small" rows="2"> </sl-textarea> 9349 </li> 9350 </ol> 9351 `}render(){return void 0===this.gate?W`Loading gates...`:W` <sl-dialog label="Additional questions"> 9352 ${vg(this.gate)?this.renderTestingContent():Y} 9353 <div> 9354 <sl-button 9355 id="generate_button" 9356 size="small" 9357 variant="primary" 9358 @click=${this.handleGenerateComment} 9359 >Generate comment and request review</sl-button 9360 > 9361 </div> 9362 </sl-dialog>`}};gg([Ve({type:Object})],_g.prototype,"gate",void 0),gg([Ve({attribute:!1})],_g.prototype,"resolve",void 0),_g=gg([Ue("chromedash-secondary-survey-dialog")],_g);var wg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let kg;function xg(e){const t=[];return e.web_feature&&"Missing feature"!==e.web_feature||t.push({name:"Web feature",field:"web_feature"}),t}async function $g(e,t,i,r,s){const o=Cf(t,i);return function(e,t,i,r){return(t.length>0||xg(e).length>0)&&i.gate_type==Nd&&r==Zd.APPROVED[0]}(e,o,r,s)?new Promise(t=>{!async function(e,t,i){kg||(kg=document.createElement("chromedash-prevote-dialog"),document.body.appendChild(kg));
9362kg.feature=e,kg.pendingGates=t,kg.resolve=i,await kg.updateComplete,kg.show()}(e,o,t)}):Promise.resolve()}let Sg=class extends ce{constructor(){super(...arguments),this.resolve=()=>{console.log("Missing resolve action")}}static get styles(){return[...lo,c` 9363 #prereqs-list li { 9364 margin-left: 8px; 9365 margin-bottom: 8px; 9366 } 9367 #prereqs-header { 9368 margin-bottom: 8px; 9369 } 9370 sl-button { 9371 float: right; 9372 margin: var(--content-padding-half); 9373 } 9374 `]}show(){this.renderRoot.querySelector("sl-dialog")?.show()}hide(){this.renderRoot.querySelector("sl-dialog")?.hide()}handleCancel(){this.hide()}handleProceed(){this.resolve(),this.hide()}renderGateItem(e){return W` 9375 <li> 9376 <a 9377 href="/feature/${e.feature_id}?gate=${e.id}" 9378 @click=${this.hide} 9379 >${e.team_name}</a 9380 > 9381 </li> 9382 `}renderGatesSection(){return void 0===this.pendingGates?W`Loading gates...`:0==this.pendingGates.length?Y:W` 9383 <div id="gates-header">The following gates are missing approvals:</div> 9384 <ul id="gates-list"> 9385 ${this.pendingGates.map(e=>this.renderGateItem(e))} 9386 </ul> 9387 <br /> 9388 `}renderEditLink(e){return W` 9389 <a 9390 class="edit-progress-item" 9391 href="/guide/stage/${this.feature.id}/metadata#id_${e.field}" 9392 @click=${this.hide} 9393 > 9394 Edit 9395 </a> 9396 `}renderFieldItem(e){return W` <li class="pending"> 9397 Metadata: ${e.name} ${this.renderEditLink(e)} 9398 </li>`}renderFieldsSection(){const e=xg(this.feature);return 0==e.length?Y:W` 9399 <div id="fields-header"> 9400 The following prerequisite fields are missing: 9401 </div> 9402 <ul id="fields-list"> 9403 ${e.map(e=>this.renderFieldItem(e))} 9404 </ul> 9405 <br /> 9406 `}render(){return W` <sl-dialog label="Prerequsites for API Owner approval"> 9407 ${this.renderFieldsSection()} ${this.renderGatesSection()} 9408 <sl-button size="small" @click=${this.handleProceed} 9409 >Approve anyway</sl-button 9410 > 9411 <sl-button size="small" variant="warning" @click=${this.handleCancel} 9412 >Don't approve yet</sl-button 9413 > 9414 </sl-dialog>`}};wg([Ve({type:Object})],Sg.prototype,"feature",void 0),wg([Ve({type:Array})],Sg.prototype,"pendingGates",void 0),wg([Ve({attribute:!1})],Sg.prototype,"resolve",void 0),Sg=wg([Ue("chromedash-prevote-dialog")],Sg);var Cg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Eg=class extends ce{constructor(){super(...arguments),this.voteSelectRef=ws(),this.commentAreaRef=ws(),this.postToThreadRef=ws(),this.assigneeSelectRef=ws(),this.votes=[],this.comments=[],this.needsSave=!1,this.showSaved=!1,this.submittingComment=!1,this.submittingVote=!1,this.needsPost=!1,this.loading=!0}static get styles(){return[...lo,c` 9415 #close-button { 9416 font-size: 2em; 9417 position: absolute; 9418 top: var(--content-padding-quarter); 9419 right: var(--content-padding-quarter); 9420 } 9421 9422 #review-status-area { 9423 margin: var(--content-padding-half) 0; 9424 } 9425 .status { 9426 display: flex; 9427 gap: var(--content-padding-half); 9428 align-items: center; 9429 font-weight: 500; 9430 } 9431 sl-icon { 9432 font-size: 1.3rem; 9433 } 9434 .approved { 9435 color: var(--gate-approved-color); 9436 } 9437 .approved sl-icon { 9438 color: var(--gate-approved-icon-color); 9439 } 9440 .denied { 9441 color: var(--gate-denied-color); 9442 } 9443 .denied sl-icon { 9444 color: var(--gate-denied-icon-color); 9445 } 9446 #slo-area sl-icon { 9447 font-size: 16px; 9448 vertical-align: text-bottom; 9449 color: var(--unimportant-text-color); 9450 } 9451 .overdue, 9452 #slo-area .overdue sl-icon { 9453 color: var(--slo-overdue-color); 9454 } 9455 9456 .process-notice { 9457 margin: var(--content-padding-half) 0; 9458 padding: var(--content-padding-half); 9459 background: var(--light-accent-color); 9460 border-radius: 8px; 9461 } 9462 9463 #votes-area { 9464 margin: var(--content-padding) 0; 9465 } 9466 #votes-area table { 9467 border-spacing: var(--content-padding-half) var(--content-padding); 9468 } 9469 #votes-area th { 9470 font-weight: 500; 9471 }
9472 table .your-vote { 9473 font-style: italic; 9474 white-space: nowrap; 9475 } 9476 9477 .instructions { 9478 padding: var(--content-padding-half); 9479 margin-bottom: var(--content-padding-large); 9480 } 9481 9482 #controls { 9483 padding: var(--content-padding); 9484 text-align: right; 9485 display: flex; 9486 justify-content: space-between; 9487 align-items: center; 9488 } 9489 #controls * + * { 9490 padding-left: var(--content-padding); 9491 } 9492 `]}setContext(e,t,i){this.loading=!0,this.feature=e,this.gate=i;const r=this.feature.id;Promise.all([window.csClient.getFeatureProgress(r),window.csClient.getFeatureProcess(r),window.csClient.getStage(r,t),window.csClient.getVotes(r,null),window.csClient.getComments(r,i.id)]).then(([e,t,i,r,s])=>{this.progress=e,this.process=t,this.stage=i,this.votes=r.votes.filter(e=>e.gate_id==this.gate.id),this.comments=s.comments,this.needsSave=!1,this.showSaved=!1,this.submittingComment=!1,this.submittingVote=!1,this.needsPost=!1,this.loading=!1}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later."),this.handleCancel()})}reloadComments(){const e=this.commentAreaRef.value;e&&(e.value=""),this.needsPost=!1,Promise.all([window.csClient.getComments(this.feature.id,this.gate.id)]).then(([e])=>{this.comments=e.comments}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later."),this.handleCancel()})}refetch(){const e=this.feature.id;Promise.all([window.csClient.getGates(e),window.csClient.getVotes(e,null),window.csClient.getComments(e,this.gate.id)]).then(([e,t,i])=>{for(const t of e.gates)t.id==this.gate.id&&(this.gate=t);this.votes=t.votes.filter(e=>e.gate_id==this.gate.id),this.comments=i.comments,this.needsSave=!1}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later."),this.handleCancel()})}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}checkNeedsPost(){let e=!1;const t=this.commentAreaRef.value;""!=(t&&t.value.trim()||"")&&(e=!0),this.needsPost=e}handlePost(){const e=this.commentAreaRef.value,t=e?.value.trim(),i=this.postToThreadRef.value?.checked?this.gate.gate_type:0;this.postComment(t,i)}
9492async postComment(e,t=0){this.submittingVote=!0,""!=e&&await window.csClient.postComment(this.feature.id,this.gate.id,e,Number(t)).then(()=>{this.reloadComments(),this.submittingVote=!1}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later."),this.submittingVote=!1})}handleSelectChanged(){this.needsSave=!0,this.showSaved=!1}saveVote(){this.submittingComment=!0;const e=Number(this.voteSelectRef.value.value);window.csClient.setVote(this.feature.id,this.gate.id,e).then(()=>{this.needsSave=!1,this.showSaved=!0,this.submittingComment=!1,this._fireEvent("refetch-needed",{})}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later."),this.submittingComment=!1})}handleSave(){Promise.all([window.csClient.getGates(this.feature.id)]).then(([e])=>{this.featureGates=e.gates;const t=Number(this.voteSelectRef.value.value);$g(this.feature,this.featureGates,this.stage,this.gate,t).then(()=>{this.saveVote()})}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}handleCancel(){this._fireEvent("close",{})}renderHeadingsSkeleton(){return W` 9493 <h3 class="sl-skeleton-header-container" style="width: 60%"> 9494 <sl-skeleton effect="sheen"></sl-skeleton> 9495 </h3> 9496 <h2 9497 class="sl-skeleton-header-container" 9498 style="margin-top: 4px; width: 75%" 9499 > 9500 <sl-skeleton effect="sheen"></sl-skeleton> 9501 </h2> 9502 `}renderHeadings(){const e=Hc(this.stage,this.process),t=e?e.name:Y;return W` 9503 <h3>${t}</h3> 9504 <h2>${this.gate.team_name}</h2> 9505 `}renderReviewStatusSkeleton(){return W` 9506 <h3 class="sl-skeleton-header-container"> 9507 Status: <sl-skeleton effect="sheen"></sl-skeleton> 9508 </h3> 9509 `}async handleReviewRequested(){const e=this.feature.id;window.csClient.getGates(e).then(e=>{for(const t of e.gates)t.id==this.gate.id&&(this.gate=t);fg(this.gate,ec).then(e=>{e?this.handleSelfCertify(ec):yg(this.gate).then(e=>{e&&this.postComment(e),this.handleFullReviewRequest()})})})}async handleNARequested(){const e=this.feature.id;window.csClient.getGates(e).then(e=>{for(const t of e.gates)t.id==this.gate.id&&(this.gate=t);fg(this.gate,ec).then(e=>{e?this.handleSelfCertify(ec):this.handleFullNARequested()})})}handleFullNARequested(){(async function(e){return cg||(cg=document.createElement("chromedash-na-rationale-dialog"),document.body.appendChild(cg),await cg.updateComplete),new Promise(t=>{cg.openOn(e,t)})})(this.gate).then(e=>{this.handleNARequestSubmitted(e)})}async handleFullReviewRequest(){await window.csClient.setVote(this.feature.id,this.gate.id,2),this._fireEvent("refetch-needed",{})}async handleSelfCertify(e){await window.csClient.setVote(this.feature.id,this.gate.id,e);await this.postComment('This "N/A" was self-certified.'),this._fireEvent("refetch-needed",{})}async handleNARequestSubmitted(e){await window.csClient.setVote(this.feature.id,this.gate.id,9);const t='An "N/A" response is requested because: '+e;await this.postComment(t),this._fireEvent("refetch-needed",{})}userCanRequestReview(){return this.user&&(this.user.can_edit_all||this.user.editable_features.includes(this.feature.id))}userCanVote(){return this.user&&this.user.approvable_gate_types.includes(this.gate.gate_type)}renderAction(e,t){const i=t.name,r=t.url.replace("{feature_id}",this.feature.id).replace("{gate_id}",this.gate.id||0),s=()=>{$f(t,this.progress)||Sf(this.featureGates,this.stage)?kf(this.feature,this.progress,this.process,t,e,this.stage,this.featureGates,r):setTimeout(()=>{window.open(r,"_blank").focus()})};return W` 9510 <sl-button 9511 @click=${()=>{Promise.all([window.csClient.getGates(this.feature.id)]).then(([e])=>{this.featureGates=e.gates,s()}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}} 9512 size="small" 9513 variant="primary" 9514 >${i}</sl-button 9515 > 9516 `}renderReviewStatusPreparing(){if(!this.userCanRequestReview())return W` Review has not been requested yet. `;const e=Hc(this.stage,this.process),t=(e?.actions||[]).filter(e=>e.gate_types.includes(this.gate.gate_type));return t.length>0?t.map(t=>this.renderAction(e,t)):W` 9517 <sl-button 9518 size="small" 9519 variant="primary" 9520 @click=${this.handleReviewRequested} 9521 >Request review</sl-button 9522 > 9523 <sl-button size="small" @click=${this.handleNARequested} 9524 >Request N/A</sl-button 9525 > 9526 `}renderReviewStatusNeedsWork(){const e=this.userCanRequestReview()?W` 9527 <div> 9528 <sl-button 9529 size="small" 9530 variant="primary" 9531 @click=${this.handleReviewRequested} 9532 >Re-request review</sl-button 9533 > 9534 </div> 9535 `:Y;return W` 9536 <div>
9536Reviewer has indicated a need for rework.</div> 9537 ${e} 9538 `}renderReviewRequest(){for(const e of this.votes)if(2===e.state||9===e.state){const t=e.set_by.split("@")[0]+"@";return W` 9539 ${t} requested on 9540 ${ih(this.gate.requested_on)} 9541 ${rh(this.gate.requested_on)} 9542 `}return Y}renderReviewStatusApproved(){return W` 9543 <div class="status approved"> 9544 <sl-icon library="material" name="check_circle_filled_20px"></sl-icon> 9545 Approved 9546 </div> 9547 `}renderReviewStatusNa(){return W` 9548 <div class="status approved"> 9549 <sl-icon library="material" name="check_circle_filled_20px"></sl-icon> 9550 N/a 9551 </div> 9552 `}renderReviewStatusNaSelf(){return W` 9553 <div class="status approved"> 9554 <sl-icon library="material" name="check_circle_filled_20px"></sl-icon> 9555 N/a (self-certified) 9556 </div> 9557 `}renderReviewStatusNaVerified(){return W` 9558 <div class="status approved"> 9559 <sl-icon library="material" name="check_circle_filled_20px"></sl-icon> 9560 N/a (self-certified then verified) 9561 </div> 9562 `}renderReviewStatusDenied(){return W` 9563 <div class="status denied"> 9564 <sl-icon library="material" name="block_20px"></sl-icon> 9565 Denied 9566 </div> 9567 `}renderReviewStatus(){return 0==this.gate.state?this.renderReviewStatusPreparing():this.gate.state==Zd.NEEDS_WORK[0]?this.renderReviewStatusNeedsWork():this.gate.state==Zd.NA[0]?this.renderReviewStatusNa():this.gate.state==ec?this.renderReviewStatusNaSelf():this.gate.state==tc?this.renderReviewStatusNaVerified():this.gate.state==Zd.APPROVED[0]?this.renderReviewStatusApproved():this.gate.state==Zd.DENIED[0]?this.renderReviewStatusDenied():Y}renderSLOStatusSkeleton(){return W` 9568 <details> 9569 <summary>SLO initial response:</summary> 9570 Loading... 9571 </details> 9572 <details> 9573 <summary>SLO resolution:</summary> 9574 Loading... 9575 </details> 9576 `}dayPhrase(e){return String(e)+(1==e?" day":" days")}renderSLOSummary(e,t,i){if("number"==typeof i)return W`took ${this.dayPhrase(i)}`;if("number"==typeof t){let e=W`due today`,i="";return t>0?e=W`${this.dayPhrase(t)} remaining`:t<0&&(i="overdue",e=W`${this.dayPhrase(-t)} overdue`),W` 9577 <span class="${i}"> 9578 <sl-icon library="material" name="clock_loader_60_20px"></sl-icon> 9579 ${e} 9580 </span> 9581 `}return"number"==typeof e?W`${this.dayPhrase(e)} allowed`:Y}renderSLOStatus(){const e=this.gate?.slo_initial_response,t=this.gate?.slo_initial_response_remaining,i=this.gate?.slo_initial_response_took,r=this.gate?.slo_resolve,s=this.gate?.slo_resolve_remaining,o=this.gate?.slo_resolve_took,a=this.gate?.needs_work_started_on,n=W` 9582 <details> 9583 <summary> 9584 SLO initial response: 9585 ${this.renderSLOSummary(e,t,i)} 9586 </summary> 9587 Reviewers are encouraged to provide an initial review status update or a 9588 comment within this number of weekdays. 9589 </details> 9590 `;let l=W` 9591 <details> 9592 <summary> 9593 SLO resolution: 9594 ${this.renderSLOSummary(r,s,o)} 9595 </summary> 9596 Reviewers are encouraged to resolve the review within this number of 9597 weekdays. If a reviewer responds with "Needs work", this clock pauses 9598 until a feature owner clicks "Re-request review". 9599 </details> 9600 `,d=Y;return"string"==typeof a&&(l=Y,d=W` 9601 <details> 9602 <summary> 9603 SLO resolution: Needs work since ${a.split(" ")[0]} 9604 </summary> 9605 A reviewer has asked the feature owner to do needed work. Check the 9606 comments for a description of the needed work. The SLO clock is paused 9607 until a feature owner clicks "Re-request review". 9608 </details> 9609 `),W`${n} ${l} ${d}`}renderGateRationale(){const e=ag[this.gate?.gate_type];return e?W` 9610 <details> 9611 <summary>Why this gate?</summary> 9612 ${e} 9613 </details> 9614 `:Y}renderWarnings(){return this.gate&&["Privacy","WP Security"].includes(this.gate.team_name)?W` 9615 <div class="process-notice"> 9616 Googlers: Please follow the instructions at 9617 <a 9618 href="https://goto.corp.google.com/wp-launch-guidelines" 9619 target="_blank" 9620 rel="noopener" 9621 >go/wp-launch-guidelines</a 9622 > 9623 (internal document) to determine whether you also require an internal 9624 review. 9625 </div> 9626 `:Y}renderVotesSkeleton(){return W` 9627 <table> 9628 <tr> 9629 <th>Reviewer</th> 9630 <th>Review status</th> 9631 </tr> 9632 <tr> 9633 <td><sl-skeleton effect="sheen"></sl-skeleton></td> 9634 <td><sl-skeleton effect="sheen"></sl-skeleton></td> 9635 </tr> 9636 </table> 9637 `}findStateName(e){if(2==e)return"Review requested";if(e==ec)return"N/a (self-certified)";if(e==tc)return"N/a (verified)";for(const t of Object.values(Zd))if(t[0]==e)return t[1];return`State ${e}`}renderVoteReadOnly(e){return this.findStateName(e.state)}renderVoteMenu(e){return W` 9638 <sl-select 9639 name="${this.gate.id}" 9640 value="${e}" 9641 ${$s(this.voteSelectRef)}
9642 @sl-change=${this.handleSelectChanged} 9643 hoist 9644 size="small" 9645 > 9646 ${this.votes.some(e=>e.state===ec||e.state===tc)?W` <sl-option value="${tc}" 9647 >N/a verified</sl-option 9648 >`:Y} 9649 ${Object.values(Zd).map(e=>W` <sl-option value="${e[0]}">${e[1]}</sl-option>`)} 9650 </sl-select> 9651 `}renderSaveButton(){return W` 9652 <sl-button 9653 size="small" 9654 variant="primary" 9655 @click=${this.handleSave} 9656 ?disabled=${this.submittingComment} 9657 >Save</sl-button 9658 > 9659 `}renderVoteRow(e,t){const i=e.set_by.split("@")[0]+"@";let r=Y,s=this.renderVoteReadOnly(e);return t&&e.set_by==this.user?.email&&(s=this.renderVoteMenu(e.state),this.needsSave?r=this.renderSaveButton():this.showSaved&&(r=W`<b>Saved</b>`)),W` 9660 <tr> 9661 <td title=${e.set_by}>${i}</td> 9662 <td>${s}</td> 9663 <td>${r}</td> 9664 </tr> 9665 `}renderAddVoteRow(){const e=this.gate.assignee_emails.includes(this.user.email),t=this.user.email.split("@")[0]+"@",i=e?W`<td title=${this.user.email}>${t}</td>`:W`<td class="your-vote">Awaiting review</td>`,r=this.renderVoteMenu(Zd.NO_RESPONSE[0]),s=this.needsSave?this.renderSaveButton():Y;return W` 9666 <tr> 9667 ${i} 9668 <td>${r}</td> 9669 <td>${s}</td> 9670 </tr> 9671 `}renderPendingVote(e){const t=e.split("@")[0]+"@";return W` 9672 <tr> 9673 <td title=${e}>${t}</td> 9674 <td>No response yet</td> 9675 <td></td> 9676 </tr> 9677 `}saveAssignedReviewer(){const e=this.assigneeSelectRef.value?.value,t=""===e?[]:[e];window.csClient.updateGate(this.feature.id,this.gate.id,t).then(()=>this._fireEvent("refetch-needed",{}))}renderAssignReviewerControls(){if(!this.userCanRequestReview()&&!this.userCanVote())return Y;if(this.gate.state===Zd.APPROVED[0])return Y;const e=this.gate.assignee_emails?.length>0?this.gate.assignee_emails[0]:"";return W` 9678 <details> 9679 <summary>Assign a reviewer</summary> 9680 <sl-select 9681 hoist 9682 size="small" 9683 ${$s(this.assigneeSelectRef)} 9684 value=${e} 9685 > 9686 <sl-option value="">None</sl-option> 9687 ${this.gate.possible_assignee_emails.map(e=>W` <sl-option value="${e}">${e}</sl-option>`)} 9688 </sl-select> 9689 <sl-button 9690 size="small" 9691 variant="primary" 9692 @click=${()=>this.saveAssignedReviewer()} 9693 >Assign</sl-button 9694 > 9695 </details> 9696 `}isReviewRequest(e){return 2===e.state||9===e.state}renderVotes(){const e=this.userCanVote(),t=this.votes.filter(e=>!this.isReviewRequest(e)),i=t.map(e=>e.set_by),r=this.gate.assignee_emails.filter(e=>!i.includes(e)&&e!=this.user?.email),s=t.some(e=>e.set_by==this.user?.email),o=e&&!s?this.renderAddVoteRow():Y,a=this.renderAssignReviewerControls();return e||0!==t.length||0!==r.length?W` 9697 <table> 9698 <tr> 9699 <th>Reviewer</th> 9700 <th>Review status</th> 9701 </tr> 9702 ${t.map(t=>this.renderVoteRow(t,e))} 9703 ${r.map(e=>this.renderPendingVote(e))} ${o} 9704 </table> 9705 ${a} 9706 `:W` 9707 <p>No review activity yet.</p> 9708 ${a} 9709 `}renderCommentsSkeleton(){return W` 9710 <h2>Comments</h2> 9711 <sl-skeleton effect="sheen"></sl-skeleton> 9712 `}gateHasIntentThread(){return"API Owners"===this.gate.team_name}canPostTo(e){return e&&(e.startsWith("https://groups.google.com/a/chromium.org/d/msgid/blink-dev/")||e.startsWith("https://groups.google.com/d/msgid/jrobbins-test"))}renderControls(){if(!(this.user?.can_comment||this.userCanRequestReview()))return Y;const e=W` 9713 <sl-button 9714 variant="primary" 9715 @click=${this.handlePost} 9716 ?disabled=${!this.needsPost||this.submittingVote} 9717 size="small" 9718 >Post</sl-button 9719 > 9720 `,t=this.stage.intent_thread_url?W` 9721 Also post to 9722 <a href=${this.stage.intent_thread_url} target="_blank" 9723 >intent thread</a 9724 > 9725 `:"Also post to intent thread",i=this.gateHasIntentThread()?W` 9726 <sl-checkbox 9727 ${$s(this.postToThreadRef)} 9728 ?disabled=${!this.canPostTo(this.stage.intent_thread_url)} 9729 size="small" 9730 >${t}</sl-checkbox 9731 > 9732 `:Y,r=this.gate.escalation_email?W`If needed, you can 9733 <a href="mailto:${this.gate.escalation_email}" target="_blank" 9734 >email the team directly</a 9735 >.`:Y;return W` 9736 <sl-textarea 9737 id="comment_area" 9738 rows="2" 9739 cols="40" 9740 resize="auto" 9741 ${$s(this.commentAreaRef)}
9742 @sl-change=${this.checkNeedsPost} 9743 @keypress=${this.checkNeedsPost} 9744 placeholder="Add a comment" 9745 ></sl-textarea> 9746 <div id="controls">${e} ${i}</div> 9747 <div class="instructions"> 9748 Comments will be visible publicly. Only reviewers will be notified when 9749 a comment is posted. ${r} 9750 </div> 9751 `}renderComments(){return W` 9752 <h2>Comments</h2> 9753 ${this.renderControls()} 9754 <chromedash-activity-log 9755 .user=${this.user} 9756 .featureId=${this.feature.id} 9757 .narrow=${!0} 9758 .reverse=${!0} 9759 .comments=${this.comments} 9760 > 9761 </chromedash-activity-log> 9762 `}render(){return W` 9763 <sl-icon-button 9764 title="Close" 9765 name="x" 9766 id="close-button" 9767 @click=${()=>this.handleCancel()} 9768 ></sl-icon-button> 9769 9770 ${this.loading?this.renderHeadingsSkeleton():this.renderHeadings()} 9771 9772 <div id="review-status-area"> 9773 ${this.loading?this.renderReviewStatusSkeleton():this.renderReviewStatus()} 9774 ${this.renderReviewRequest()} 9775 </div> 9776 <div id="slo-area"> 9777 ${this.loading?this.renderSLOStatusSkeleton():this.renderSLOStatus()} 9778 ${this.renderGateRationale()} 9779 </div> 9780 9781 ${this.renderWarnings()} 9782 9783 <div id="votes-area"> 9784 ${this.loading?this.renderVotesSkeleton():this.renderVotes()} 9785 </div> 9786 9787 <chromedash-survey-questions 9788 .loading=${this.loading} 9789 .user=${this.user} 9790 .feature=${this.feature} 9791 .gate=${this.gate} 9792 ></chromedash-survey-questions> 9793 ${this.loading?this.renderCommentsSkeleton():this.renderComments()} 9794 `}};Cg([Ve({type:Object})],Eg.prototype,"user",void 0),Cg([He()],Eg.prototype,"feature",void 0),Cg([He()],Eg.prototype,"featureGates",void 0),Cg([He()],Eg.prototype,"stage",void 0),Cg([He()],Eg.prototype,"gate",void 0),Cg([He()],Eg.prototype,"progress",void 0),Cg([He()],Eg.prototype,"process",void 0),Cg([He()],Eg.prototype,"votes",void 0),Cg([He()],Eg.prototype,"comments",void 0),Cg([He()],Eg.prototype,"needsSave",void 0),Cg([He()],Eg.prototype,"showSaved",void 0),Cg([He()],Eg.prototype,"submittingComment",void 0),Cg([He()],Eg.prototype,"submittingVote",void 0),Cg([He()],Eg.prototype,"needsPost",void 0),Cg([He()],Eg.prototype,"loading",void 0),Eg=Cg([Ue("chromedash-gate-column")],Eg); 9795/** 9796 * @license 9797 * Copyright 2017 Google LLC 9798 * SPDX-License-Identifier: BSD-3-Clause 9799 */ 9800const Ig=(e,t,i)=>{const r=new Map;for(let s=t;s<=i;s++)r.set(e[s],s);return r},Tg=Ft(class extends Nt{constructor(e){if(super(e),e.type!==Ot)throw Error("repeat() can only be used in text expressions")}dt(e,t,i){let r;void 0===i?i=t:void 0!==t&&(r=t);const s=[],o=[];let a=0;for(const t of e)s[a]=r?r(t,a):a,o[a]=i(t,a),a++;return{values:o,keys:s}}render(e,t,i){return this.dt(e,t,i).values}update(e,[t,i,r]){const s=(e=>e._$AH)(e),{values:o,keys:a}=this.dt(t,i,r);if(!Array.isArray(s))return this.ut=a,o;const n=this.ut??=[],l=[];let d,c,h=0,u=s.length-1,p=0,f=o.length-1;for(;h<=u&&p<=f;)if(null===s[h])h++;else if(null===s[u])u--;else if(n[h]===a[p])l[p]=$t(s[h],o[p]),h++,p++;else if(n[u]===a[f])l[f]=$t(s[u],o[f]),u--,f--;else if(n[h]===a[f])l[f]=$t(s[h],o[f]),xt(e,l[f+1],s[h]),h++,f--;else if(n[u]===a[p])l[p]=$t(s[u],o[p]),xt(e,s[h],s[u]),u--,p++;else if(void 0===d&&(d=Ig(a,p,f),c=Ig(n,h,u)),d.has(n[h]))if(d.has(n[u])){const t=c.get(a[p]),i=void 0!==t?s[t]:null;if(null===i){const t=xt(e,s[h]);$t(t,o[p]),l[p]=t}else l[p]=$t(i,o[p]),xt(e,s[h],i),s[t]=null;p++}else Et(s[u]),u--;else Et(s[h]),h++;for(;p<=f;){const t=xt(e,l[f+1]);$t(t,o[p]),l[p++]=t}for(;h<=u;){const e=s[h++];null!==e&&Et(e)}return this.ut=a,Ct(e,l),G}});var Ag=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Rg=class extends ce{constructor(){super(...arguments),this.featureId=0,this.appTitle="",this.nextStageToCreateId=0,this.loading=!0,this.submitting=!1,this.previousStageTypeRendered=0,this.sameTypeRendered=0,this.fieldValues=[],this.shippingInfo={closestShippingDate:"",hasShipped:!1,isUpcoming:!1},this.currentBetaMilestone=0}static get styles(){return[...lo,...Mu,c` 9801 .enterprise-help-text > *, 9802 .enterprise-help-text li { 9803 margin: revert; 9804 padding: revert; 9805 } 9806 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}fetchData(){this.loading=!0,Promise.all([window.csClient.getFeature(this.featureId),window.csClient.getChannels()]).then(async([e,t])=>{this.feature=e,this.currentBetaMilestone=Number(t.beta.mstone),this.feature.name&&(document.title=`${this.feature.name} - ${this.appTitle}`),this.shippingInfo=await _h(t,e.stages),this.loading=!1}
9806).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}disconnectedCallback(){super.disconnectedCallback(),document.title=this.appTitle}async registerHandlers(e){if(!e)return;await e.updateComplete;const t=this.renderRoot.querySelector("input[name=token]");t.form?.addEventListener("submit",e=>{this.handleFormSubmit(e,t)}),Zc(this)}handleFormSubmit(e,t){e.preventDefault(),$h(this.feature,this.fieldValues,this.currentBetaMilestone),this.submitting=!0;const i=uh(this.fieldValues,this.featureId);window.csClient.ensureTokenIsValid().then(()=>(t.value=window.csClient.token,window.csClient.updateFeature(i))).then(()=>{window.location.href=this.getNextPage()}).catch(()=>{this.submitting=!1,Vc("Some errors occurred. Please refresh the page or try again later.")})}handleFormFieldUpdate(e){const t=e.detail.value,i=e.detail.index;if(i>=this.fieldValues.length)throw new Error("Out of bounds index when updating field values.");this.fieldValues[i].touched=!0,this.fieldValues[i].value=t}getNextPage(){return"wpt_eval"===new URLSearchParams(window.location.search).get("intent")?`/feature/${this.featureId}/ai-coverage-analysis`:`/feature/${this.featureId}`}handleCancelClick(){window.location.href=this.getNextPage()}renderSkeletons(){return W` 9807 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 9808 <section class="flat_form"> 9809 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 9810 <p> 9811 <sl-skeleton effect="sheen"></sl-skeleton> 9812 <sl-skeleton effect="sheen"></sl-skeleton> 9813 <sl-skeleton effect="sheen"></sl-skeleton> 9814 <sl-skeleton effect="sheen"></sl-skeleton> 9815 </p> 9816 </section> 9817 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 9818 <section class="flat_form"> 9819 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 9820 <p> 9821 <sl-skeleton effect="sheen"></sl-skeleton> 9822 <sl-skeleton effect="sheen"></sl-skeleton> 9823 <sl-skeleton effect="sheen"></sl-skeleton> 9824 <sl-skeleton effect="sheen"></sl-skeleton> 9825 </p> 9826 </section> 9827 `}renderSubheader(){return W` 9828 <div id="subheader"> 9829 <h2 id="breadcrumbs"> 9830 <a href=${this.getNextPage()}> 9831 <sl-icon name="arrow-left"></sl-icon> 9832 Edit feature: ${this.loading?"loading...":this.feature.name} 9833 </a> 9834 </h2> 9835 </div> 9836 `}getStageForm(e){return Fc[e]||null}getHelpTextForStage(e){return e===bd?W` 9837 <section class="enterprise-help-text"> 9838 <h3>Rollout steps</h3> 9839 <p> 9840 The enterprise release notes focus on changes to the stable 9841 channel. Please add a stage for each milestone where something is 9842 changing on the stable channel. For finch rollouts, use the 9843 milestone where the rollout starts. 9844 </p> 9845 <p> 9846 For example, you may only have a single stage where you roll out 9847 to 100% of users on milestone N. 9848 </p> 9849 <p>A more complex example might look like this:</p> 9850 <ul> 9851 <li> 9852 On milestone N-1, you introduce a flag for early testing of an 9853 upcoming change, or start a deprecation origin trial 9854 </li> 9855 <li> 9856 On milestone N, you start a finch rollout of a feature at 1% and 9857 introduce an enterprise policy for it 9858 </li> 9859 <li>On milestone N+3, you remove the enterprise policy</li> 9860 </ul> 9861 </section> 9862 `:Y}renderStageSection(e,t,i,r,s){if(!r)return Y;let o="";this.previousStageTypeRendered&&this.previousStageTypeRendered===i.stage_type?(this.sameTypeRendered+=1,o=` ${this.sameTypeRendered}`):(this.previousStageTypeRendered=i.stage_type,this.sameTypeRendered=1);let a=`${t}${o}`;i.display_name&&(a=`${t}: ${i.display_name} `);const n=r.map(t=>{const r=am[t].name||t;if("display_name"===r&&!Wc(this.feature.stages,i.stage_type))return Y;let o=e[t],a=null;if(Dd.has(r))o=Yc(i,r),a=i.id;else if(s.has(r))return Y;const n=this.fieldValues.length;return this.fieldValues.push({name:r,touched:!1,value:o,stageId:a}),s.add(r),W` 9863 <chromedash-form-field 9864 name=${t} 9865 index=${n} 9866 stageId=${a??0} 9867 value=${o} 9868 disabledReason="${nh(t,i)}" 9869 .fieldValues=${this.fieldValues} 9870 .feature=${e} 9871 ?forEnterprise=${e.is_enterprise_feature} 9872 @form-field-update="${this.handleFormFieldUpdate}" 9873 class="${"enterprise_product_category"===t?"choices":""}" 9874 > 9875 </chromedash-form-field> 9876 `}),l=`${xd[i.stage_type]||"metadata"}${this.sameTypeRendered}`.toLowerCase(),d=e.is_enterprise_feature&&i.stage_type===bd;return{id:i.id,item:W` 9877 ${th(!d,W`<h3 id="${l}">${a}</h3>`)} 9878 <section class="flat_form" stage="${i.stage_type}"> 9879 ${th(i.stage_type===bd,W` <sl-button 9880 stage="${i.stage_type}" 9881 size="small" 9882 @click="${()=>this.deleteStage(i)}" 9883 > 9884 Delete 9885 </sl-button>`)} 9886 ${n} 9887 </section> 9888 `}}getForms(e,t){let i=Jc(e.is_enterprise_feature?Sc:$c);const r=new Set,s=[this.renderStageSection(e,$c.name,{id:-1},i,r)];let o=null;for(const a of t){const t=this.getStageForm(a.stage_type);if(!t)continue;e.is_enterprise_feature&&a.stage_type!==o&&(s.push({id:-2,item:this.getHelpTextForStage(a.stage_type)}),o=a.stage_type),i=Jc(t),s.push(this.renderStageSection(e,t.name,a,i,r));
9888(a.extensions||[]).forEach(t=>{i=Jc(Ac);let o=Ac.name;a.display_name&&(o=` ${Ac.name}: ${a.display_name} `),s.push(this.renderStageSection(e,o,t,i,r))})}return s}renderAddStageButton(){return th(this.feature.is_enterprise_feature,W` <sl-button size="small" @click="${()=>{lf(this.feature.id,this.feature.feature_type_int,this.createNewStage.bind(this))}}"> 9889 Add Step 9890 </sl-button>`)}createNewStage(e){window.csClient.createStage(this.featureId,{stage_type:{form_field_name:"stage_type",value:e.stage_type}}).then(()=>window.csClient.getFeature(this.featureId)).then(e=>{this.feature=e}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}deleteStage(e){confirm("Delete stage?")&&window.csClient.deleteStage(this.featureId,e.id).then(()=>window.csClient.getFeature(this.featureId)).then(e=>{this.feature=e}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}renderForm(){const e=wc(this.feature);this.fieldValues.feature=this.feature;const t=this.submitting?"Submitting...":"Submit",i=this.getForms(e,this.feature.stages);return W` 9891 <form name="feature_form"> 9892 <input type="hidden" name="token" /> 9893 <chromedash-form-table ${$s(this.registerHandlers)}> 9894 ${Tg(i,e=>e.id,(e,t)=>i[t].item)} 9895 </chromedash-form-table> 9896 ${this.renderAddStageButton()} 9897 9898 <section class="final_buttons"> 9899 <input 9900 class="button" 9901 type="submit" 9902 value=${t} 9903 ?disabled=${this.submitting} 9904 /> 9905 <button 9906 id="cancel-button" 9907 type="reset" 9908 @click=${this.handleCancelClick} 9909 > 9910 Cancel 9911 </button> 9912 </section> 9913 </form> 9914 `}render(){return W` 9915 ${this.renderSubheader()} 9916 ${this.loading?Y:wh(this.feature,this.shippingInfo,Date.now(),fh(this.user,this.feature.id))} 9917 ${this.loading?this.renderSkeletons():this.renderForm()} 9918 `}};Ag([Ve({attribute:!1})],Rg.prototype,"featureId",void 0),Ag([Ve({attribute:!1})],Rg.prototype,"user",void 0),Ag([Ve({type:String})],Rg.prototype,"appTitle",void 0),Ag([Ve({type:Number})],Rg.prototype,"nextStageToCreateId",void 0),Ag([He()],Rg.prototype,"feature",void 0),Ag([He()],Rg.prototype,"loading",void 0),Ag([He()],Rg.prototype,"submitting",void 0),Ag([He()],Rg.prototype,"previousStageTypeRendered",void 0),Ag([He()],Rg.prototype,"sameTypeRendered",void 0),Ag([He()],Rg.prototype,"fieldValues",void 0),Ag([He()],Rg.prototype,"shippingInfo",void 0),Ag([He()],Rg.prototype,"currentBetaMilestone",void 0),Rg=Ag([Ue("chromedash-guide-editall-page")],Rg);var Pg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Dg=class extends ce{constructor(){super(...arguments),this.userEmail="",this.isEnterpriseFeature=!1,this.fieldValues=[],this.submitting=!1}static get styles(){return[...lo,...Mu,c` 9919 table td label input[type='radio']:focus { 9920 box-shadow: 0 0 0 var(--sl-focus-ring-width) 9921 var(--sl-input-focus-ring-color); 9922 } 9923 .process-notice { 9924 margin: var(--content-padding-half) 0; 9925 padding: var(--content-padding-half); 9926 background: var(--light-accent-color); 9927 border-radius: 8px; 9928 } 9929 .process-notice p + p { 9930 margin-top: var(--content-padding-half); 9931 } 9932 `]}async registerHandlers(e){if(!e)return;await e.updateComplete;const t=this.renderRoot.querySelector("input[name=token]");t.form?.addEventListener("submit",e=>{this.handleFormSubmit(e,t)}),Zc(this)}handleFormSubmit(e,t){e.preventDefault();const i=uh(this.fieldValues,this.featureId).feature_changes;if(this.isEnterpriseFeature)i.feature_type=Yl.FEATURE_TYPE_ENTERPRISE_ID[0];else{const e=this.shadowRoot?.querySelector('input[name="feature_type"]:checked');i.feature_type=e?e.value:Yl.FEATURE_TYPE_INCUBATE_ID[0]}
9932this.submitting=!0,window.csClient.createFeature(i).then(e=>{this.navigate(this.isEnterpriseFeature?`/guide/editall/${e.feature_id}#id_rollout_milestone`:`/feature/${e.feature_id}`)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}navigate(e){var t;t=e,window.location.href=t}maybeMakeWebFeatureRequired(){const e=this.shadowRoot?.querySelector('chromedash-form-field[name="web_feature"]');if(!e)return;let t=Yl.FEATURE_TYPE_INCUBATE_ID[0];for(const e of this.fieldValues)if("feature_type"==e.name&&void 0!==e.value){t=e.value;break}e.forceRequired=t==Yl.FEATURE_TYPE_INCUBATE_ID[0]||t==Yl.FEATURE_TYPE_EXISTING_ID[0]}maybeMakeEnterpriseFeatureCategoriesRequired(){const e=this.shadowRoot?.querySelector('chromedash-form-field[name="enterprise_feature_categories"]');if(!e)return;let t=Ul.IMPACT_NONE[0];for(const e of this.fieldValues)if("enterprise_impact"===e.name&&void 0!==e.value){t=e.value;break}e.forceRequired=t>Ul.IMPACT_NONE[0]||this.isEnterpriseFeature}handleFormFieldUpdate(e){const t=e.detail.value,i=e.detail.index;if(i>=this.fieldValues.length)throw new Error("Out of bounds index when updating field values.");this.fieldValues[i].touched=!0,this.fieldValues[i].value=t,this.fieldValues[i].isMarkdown=e.detail.isMarkdown,this.maybeMakeWebFeatureRequired(),this.maybeMakeEnterpriseFeatureCategoriesRequired()}renderSubHeader(){return W` 9933 <div id="subheader" style="display:block"> 9934 <span style="float:right; margin-right: 2em"> 9935 <a 9936 href="https://github.com/GoogleChrome/chromium-dashboard/issues/new?labels=Feedback&template=process-and-guide-ux-feedback.md" 9937 target="_blank" 9938 rel="noopener" 9939 >Process and UI feedback</a 9940 ></span 9941 > 9942 <h2 data-testid="add-a-feature">Add a feature</h2> 9943 </div> 9944 `}renderWarnings(){return this.isEnterpriseFeature?W` 9945 <div class="process-notice"> 9946 <p> 9947 Use this form if your feature should be mentioned in the Enterprise 9948 Release Notes. 9949 </p> 9950 </div> 9951 `:W` 9952 <div class="process-notice"> 9953 <p> 9954 Please see the 9955 <a 9956 href="https://www.chromium.org/blink/launching-features" 9957 target="_blank" 9958 rel="noopener" 9959 >Launching features</a 9960 > 9961 page for process instructions. 9962 </p> 9963 9964 <p> 9965 Googlers: Please follow the instructions at 9966 <a 9967 href="https://goto.corp.google.com/wp-launch-guidelines" 9968 target="_blank" 9969 rel="noopener" 9970 >go/wp-launch-guidelines</a 9971 > 9972 (internal document) to determine whether you also require an 9973 internal review. 9974 </p> 9975 </div> 9976 `}renderForm(){const e={owner:this.userEmail,shipping_year:(new Date).getFullYear()};this.fieldValues.feature=this.feature;const t=this.isEnterpriseFeature?xc:kc,i=(t,i)=>{const r=am[t],s=r.name||t,o=this.isEnterpriseFeature?r.enterprise_initial??r.initial:r.initial,a=e[t]??o,n=this.fieldValues.length;return this.fieldValues.push({name:s,touched:!0,value:a}),W` 9977 <chromedash-form-field 9978 name=${t} 9979 index=${n} 9980 value=${a} 9981 disabledReason="${nh(t)}" 9982 .fieldValues=${this.fieldValues} 9983 ?forEnterprise=${this.isEnterpriseFeature} 9984 @form-field-update="${this.handleFormFieldUpdate}" 9985 class="${i||""}" 9986 ></chromedash-form-field> 9987 `},r=this.submitting?"Submitting...":this.isEnterpriseFeature?"Continue":"Submit";return W` 9988 <section id="stage_form"> 9989 <form> 9990 <input type="hidden" name="token" /> 9991 <chromedash-form-table ${$s(this.registerHandlers)}> 9992 ${this.renderWarnings()} 9993 ${this.isEnterpriseFeature?Y:i("feature_type_radio_group","choices")} 9994 ${t.map(e=>i(e,"enterprise_product_category"===e?"choices":null))} 9995 </chromedash-form-table> 9996 <input 9997 type="submit" 9998 class="primary" 9999 value=${r} 10000 ?disabled=${this.submitting} 10001 /> 10002 </form> 10003 </section> 10004 `}render(){return W` ${this.renderSubHeader()} ${this.renderForm()} `}};Pg([Ve({attribute:!1})],Dg.prototype,"userEmail",void 0),Pg([Ve({type:Boolean})],Dg.prototype,"isEnterpriseFeature",void 0),Pg([Ve({type:Number})],Dg.prototype,"featureId",void 0),Pg([Ve({type:Object})],Dg.prototype,"feature",void 0),Pg([He()],Dg.prototype,"fieldValues",void 0),Pg([Ve({type:Boolean})],Dg.prototype,"submitting",void 0),Dg=Pg([Ue("chromedash-guide-new-page")],Dg);var Og=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let zg=class extends ce{constructor(){super(...arguments),this.stageId=0,this.featureId=0,this.intentStage=0,this.appTitle="",this.stageName="",this.feature={},this.isActiveStage=!1,this.loading=!0,this.submitting=!1,this.fieldValues=[],this.currentBetaMilestone=0}static get styles(){return[...lo,...Mu,c``]}connectedCallback(){super.connectedCallback(),this.fetchData()}handleFormFieldUpdate(e){const t=e.detail.value,i=e.detail.index;if(i>=this.fieldValues.length)throw new Error("Out of bounds index when updating field values.");this.fieldValues[i].touched=!0,this.fieldValues[i].value=t,this.fieldValues[i].isMarkdown=e.detail.isMarkdown}fetchData(){this.loading=!0;const e=oh(window.location.search);let t=Promise.resolve();"updateExtension"in e&&(t=window.csClient.getGates(this.featureId)),Promise.all([window.csClient.getFeature(this.featureId),window.csClient.getStage(this.featureId,this.stageId),t,xh()]).then(([e,t,i,r])=>{this.feature=e,this.stage=t,this.currentBetaMilestone=r,i&&(this.gateId=i.gates.find(e=>e.stage_id===this.stageId).id),this.feature.name&&(document.title=`${this.feature.name} - ${this.appTitle}`),this.feature.active_stage_id===this.stage.id&&(this.isActiveStage=!0),this.featureFormFields=Fc[t.stage_type]||{name:"",sections:[]},this.stageName=this.featureFormFields.name,this.loading=!1}
10004).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}disconnectedCallback(){super.disconnectedCallback(),document.title=this.appTitle}async registerHandlers(e){if(!e)return;await e.updateComplete;const t=this.renderRoot.querySelector("input[name=token]");t.form?.addEventListener("submit",e=>{this.handleFormSubmit(e,t)}),this.miscSetup(),Zc(this)}handleFormSubmit(e,t){e.preventDefault(),$h(this.feature,this.fieldValues,this.currentBetaMilestone);const i=uh(this.fieldValues,this.featureId,this.stageId);this.submitting=!0,window.csClient.ensureTokenIsValid().then(()=>(t.value=window.csClient.token,window.csClient.updateFeature(i))).then(()=>{this.gateId?window.location.href=`/feature/${this.featureId}?gate=${this.gateId}&initiateExtension`:window.location.href=`/feature/${this.featureId}`}).catch(()=>{this.submitting=!1,Vc("Some errors occurred. Please refresh the page or try again later.")})}miscSetup(){const e=this.renderRoot.querySelector("#id_experiment_timeline");e&&e.value&&(e.disabled=!1)}handleCancelClick(){window.location.href=`/feature/${this.featureId}`}getFormFields(){return this.featureFormFields.sections.reduce((e,t)=>[...e,...t.fields],[]).join()}renderSkeletons(){return W` 10005 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10006 <section id="metadata"> 10007 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10008 <p> 10009 <sl-skeleton effect="sheen"></sl-skeleton> 10010 <sl-skeleton effect="sheen"></sl-skeleton> 10011 <sl-skeleton effect="sheen"></sl-skeleton> 10012 <sl-skeleton effect="sheen"></sl-skeleton> 10013 <sl-skeleton effect="sheen"></sl-skeleton> 10014 <sl-skeleton effect="sheen"></sl-skeleton> 10015 <sl-skeleton effect="sheen"></sl-skeleton> 10016 <sl-skeleton effect="sheen"></sl-skeleton> 10017 </p> 10018 </section> 10019 `}getNextPage(){return`/feature/${this.featureId}`}renderSubheader(){return W` 10020 <div id="subheader"> 10021 <h2 id="breadcrumbs"> 10022 <a href=${this.getNextPage()}> 10023 <sl-icon name="arrow-left"></sl-icon> 10024 Edit feature: ${this.feature.name} 10025 </a> 10026 </h2> 10027 </div> 10028 `}renderFields(e,t,i){return i||(i=this.stage),t.fields.map(t=>{if("display_name"===t&&!Wc(this.feature.stages,i.stage_type))return Y;const r=am[t].name||t;let s,o=e[r];Dd.has(r)&&(o=Yc(i,r),s=i.id);const a=this.fieldValues.length;return this.fieldValues.push({name:r,touched:!1,value:o,stageId:s}),W` 10029 <chromedash-form-field 10030 name=${t} 10031 index=${a} 10032 value=${o} 10033 disabledReason="${nh(t,i)}" 10034 .fieldValues=${this.fieldValues} 10035 .feature=${e} 10036 stageId=${i.id} 10037 ?forEnterprise=${e.is_enterprise_feature} 10038 @form-field-update="${this.handleFormFieldUpdate}" 10039 > 10040 </chromedash-form-field> 10041 `})}renderSections(e,t){const i=[];if(t.forEach(t=>{i.push(W` 10042 <h3>${t.name}</h3> 10043 <section class="stage_form"> 10044 ${this.renderFields(e,t)} 10045 </section> 10046 `)}),this.stage.extensions){let t=1;for(const r of this.stage.extensions){for(const s of Ac.sections)i.push(W` 10047 <h3>${s.name} ${t}</h3> 10048 <section class="stage_form"> 10049 ${this.renderFields(e,s,r)} 10050 </section> 10051 `);t++}}return i}renderForm(){const e=wc(this.feature);this.fieldValues.feature=this.feature;const t=this.submitting?"Submitting...":"Submit";return W` 10052 <form name="feature_form"> 10053 <input type="hidden" name="token" /> 10054 <chromedash-form-table ${$s(this.registerHandlers)}> 10055 ${this.renderSections(e,this.featureFormFields.sections)} 10056 </chromedash-form-table> 10057 <div class="final_buttons"> 10058 <input 10059 id="submit-button" 10060 class="button" 10061 type="submit" 10062 value=${t} 10063 ?disabled=${this.submitting} 10064 /> 10065 <button 10066 id="cancel-button" 10067 type="reset" 10068 @click=${this.handleCancelClick} 10069 > 10070 Cancel 10071 </button> 10072 </div> 10073 </form> 10074 `}render(){return W` 10075 ${this.renderSubheader()} 10076 ${this.loading?this.renderSkeletons():this.renderForm()} 10077 `}};Og([Ve({attribute:!1})],zg.prototype,"stageId",void 0),Og([Ve({attribute:!1})],zg.prototype,"featureId",void 0),Og([Ve({attribute:!1})],zg.prototype,"intentStage",void 0),Og([Ve({type:String})],zg.prototype,"appTitle",void 0),Og([He()],zg.prototype,"stageName",void 0),Og([He()],zg.prototype,"feature",void 0),Og([He()],zg.prototype,"stage",void 0),Og([He()],zg.prototype,"isActiveStage",void 0),Og([He()],zg.prototype,"featureFormFields",void 0),Og([He()],zg.prototype,"loading",void 0),Og([He()],zg.prototype,"submitting",void 0),Og([He()],zg.prototype,"fieldValues",void 0),Og([He()],zg.prototype,"gateId",void 0),Og([He()],zg.prototype,"currentBetaMilestone",void 0),zg=Og([Ue("chromedash-guide-stage-page")],zg);var Lg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Fg=class extends ce{constructor(){super(...arguments),this.featureId=0,this.appTitle="",this.loading=!0,this.fieldValues=[],this.currentBetaMilestone=0}static get styles(){return[...lo,...Mu,c``]}connectedCallback(){super.connectedCallback(),this.fetchData()}fetchData(){this.loading=!0,Promise.all([window.csClient.getFeature(this.featureId),xh()]).then(([e,t])=>{this.feature=e,this.currentBetaMilestone=t,this.feature.name&&(document.title=`${this.feature.name} - ${this.appTitle}`),this.loading=!1}
10077).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}disconnectedCallback(){super.disconnectedCallback(),document.title=this.appTitle}async registerHandlers(e){if(!e)return;await e.updateComplete;const t=this.renderRoot.querySelector("input[name=token]");t.form?.addEventListener("submit",e=>{this.handleFormSubmit(e,t)}),Zc(this)}async handleFormSubmit(e,t){e.preventDefault(),$h(this.feature,this.fieldValues,this.currentBetaMilestone),this.submitForm(t)}submitForm(e){const t=uh(this.fieldValues,this.featureId);window.csClient.ensureTokenIsValid().then(()=>(e.value=window.csClient.token,window.csClient.updateFeature(t))).then(()=>{window.location.href=`/feature/${this.featureId}`}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}handleFormFieldUpdate(e){const t=e.detail.value,i=e.detail.index;if(i>=this.fieldValues.length)throw new Error("Out of bounds index when updating field values.");this.fieldValues[i].touched=!0,this.fieldValues[i].value=t,this.fieldValues[i].isMarkdown=e.detail.isMarkdown}handleCancelClick(){window.location.href=`/feature/${this.featureId}`}getFormFields(){return(this.feature.is_enterprise_feature?Sc.sections:$c.sections).reduce((e,t)=>[...e,...t.fields],[]).join()}renderSkeletons(){return W` 10078 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10079 <section id="metadata"> 10080 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10081 <p> 10082 <sl-skeleton effect="sheen"></sl-skeleton> 10083 <sl-skeleton effect="sheen"></sl-skeleton> 10084 <sl-skeleton effect="sheen"></sl-skeleton> 10085 <sl-skeleton effect="sheen"></sl-skeleton> 10086 <sl-skeleton effect="sheen"></sl-skeleton> 10087 <sl-skeleton effect="sheen"></sl-skeleton> 10088 <sl-skeleton effect="sheen"></sl-skeleton> 10089 <sl-skeleton effect="sheen"></sl-skeleton> 10090 </p> 10091 </section> 10092 `}getNextPage(){return`/feature/${this.featureId}`}renderSubheader(){const e=this.loading?Y:W` 10093 <a href=${this.getNextPage()}> 10094 <sl-icon name="arrow-left"></sl-icon> 10095 Edit feature: ${this.feature.name} 10096 </a> 10097 `;return W` 10098 <div id="subheader"> 10099 <h2 id="breadcrumbs">${e}</h2> 10100 </div> 10101 `}renderFields(e,t){return t.fields.map(t=>{const i=am[t].name||t,r=e[i],s=this.fieldValues.length;return this.fieldValues.push({name:i,touched:!1,value:r}),W` 10102 <chromedash-form-field 10103 name=${t} 10104 index=${s} 10105 value=${r} 10106 disabledReason="${nh(t)}" 10107 .fieldValues=${this.fieldValues} 10108 .feature=${e} 10109 ?forEnterprise=${e.is_enterprise_feature} 10110 @form-field-update="${this.handleFormFieldUpdate}" 10111 class="${"enterprise_product_category"===t?"choices":""}" 10112 > 10113 </chromedash-form-field> 10114 `})}renderSections(e,t){return t.map(t=>W` 10115 <h3>${t.name}</h3> 10116 <section class="stage_form"> 10117 ${this.renderFields(e,t)} 10118 </section> 10119 `)}renderForm(){const e=wc(this.feature);this.fieldValues.feature=this.feature;let t=$c.sections;return e.is_enterprise_feature&&(t=Sc.sections),W` 10120 <form name="feature_form"> 10121 <input type="hidden" name="token" /> 10122 <chromedash-form-table ${$s(this.registerHandlers)}> 10123 ${this.renderSections(e,t)} 10124 </chromedash-form-table> 10125 10126 <div class="final_buttons"> 10127 <input class="button" type="submit" value="Submit" /> 10128 <button 10129 id="cancel-button" 10130 type="reset" 10131 @click=${this.handleCancelClick} 10132 > 10133 Cancel 10134 </button> 10135 </div> 10136 </form> 10137 `}render(){return W` 10138 ${this.renderSubheader()} 10139 ${this.loading?this.renderSkeletons():this.renderForm()} 10140 `}};Lg([Ve({type:Number})],Fg.prototype,"featureId",void 0),Lg([Ve({type:String})],Fg.prototype,"appTitle",void 0),Lg([He()],Fg.prototype,"feature",void 0),Lg([He()],Fg.prototype,"loading",void 0),Lg([He()],Fg.prototype,"fieldValues",void 0),Lg([He()],Fg.prototype,"currentBetaMilestone",void 0),Fg=Lg([Ue("chromedash-guide-metadata-page")],Fg);var Ng=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Mg extends ce{constructor(){super(...arguments),this.featureId=0,this.appTitle="",this.feature={},this.fieldValues=[],this.loading=!0,this.previousStageTypeRendered=0,this.sameTypeRendered=0,this.submitting=!1}static get styles(){return[...lo,...Mu,c` 10141 .verify-banner { 10142 margin-bottom: 12px; 10143 } 10144 #alertUnderline { 10145 text-decoration: underline; 10146 display: inline; 10147 } 10148 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}fetchData(){this.loading=!0,window.csClient.getFeature(this.featureId).then(e=>{this.feature=e,this.feature.name&&(document.title=`${this.feature.name} - ${this.appTitle}`),this.loading=!1}
10148).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}disconnectedCallback(){super.disconnectedCallback(),document.title=this.appTitle}async registerFormSubmitHandler(e){if(!e)return;await e.updateComplete;const t=this.renderRoot.querySelector("input[name=token]");t.form?.addEventListener("submit",e=>{this.handleFormSubmit(e,t)})}navigateToFeaturePage(){window.location.href=`/feature/${this.featureId}`}handleFormSubmit(e,t){e.preventDefault();const i=uh(this.fieldValues,this.featureId);window.csClient.ensureTokenIsValid().then(()=>(t.value=window.csClient.token,this.submitting=!0,window.csClient.updateFeature(i))).then(()=>{this.navigateToFeaturePage()}).catch(()=>{this.submitting=!1,Vc("Some errors occurred. Please refresh the page or try again later.")})}handleFormFieldUpdate(e){const t=e.detail.value,i=e.detail.index;if(i>=this.fieldValues.length)throw new Error("Out of bounds index when updating field values.");this.fieldValues[i].touched=!0,this.fieldValues[i].value=t}renderSkeletons(){return W` 10149 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10150 <section id="metadata"> 10151 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10152 <p> 10153 <sl-skeleton effect="sheen"></sl-skeleton> 10154 <sl-skeleton effect="sheen"></sl-skeleton> 10155 <sl-skeleton effect="sheen"></sl-skeleton> 10156 <sl-skeleton effect="sheen"></sl-skeleton> 10157 <sl-skeleton effect="sheen"></sl-skeleton> 10158 <sl-skeleton effect="sheen"></sl-skeleton> 10159 <sl-skeleton effect="sheen"></sl-skeleton> 10160 <sl-skeleton effect="sheen"></sl-skeleton> 10161 </p> 10162 </section> 10163 `}renderSubheader(){return W` 10164 <div id="subheader"> 10165 <h2 id="breadcrumbs"> 10166 <a href="/feature/${this.featureId}"> 10167 <sl-icon name="arrow-left"></sl-icon> 10168 Verify feature data for ${this.feature.name} 10169 </a> 10170 </h2> 10171 </div> 10172 `}getStageForm(e){return Mc[e]||null}renderStageSection(e,t,i,r){if(!r)return Y;let s="";this.previousStageTypeRendered&&this.previousStageTypeRendered===i.stage_type?(this.sameTypeRendered+=1,s=` ${this.sameTypeRendered}`):(this.previousStageTypeRendered=i.stage_type,this.sameTypeRendered=1);let o=`${t}${s}`;i.display_name&&(o=`${t}: ${i.display_name}`);const a=r.map(t=>{let r=e[t];const s=am[t].name||t;if(Dd.has(t))r=Yc(i,s);else if(this.sameTypeRendered>1)return Y;const o=this.fieldValues.length;let a=!1;return"accurate_as_of"===s&&(a=!0),this.fieldValues.push({name:s,touched:a,value:r,stageId:i.id}),W` 10173 <chromedash-form-field 10174 name=${t} 10175 index=${o} 10176 value=${r} 10177 disabledReason="${nh(t,i)}" 10178 .fieldValues=${this.fieldValues} 10179 .feature=${e} 10180 ?forEnterprise=${e.is_enterprise_feature} 10181 @form-field-update="${this.handleFormFieldUpdate}" 10182 > 10183 </chromedash-form-field> 10184 `}),n=`${xd[i.stage_type]||"metadata"}${this.sameTypeRendered}`.toLowerCase();return W` 10185 <h3 id="${n}">${o}</h3> 10186 <section class="flat_form">${a}</section> 10187 `}getForms(e,t){let i=Jc(Oc);const r=[this.renderStageSection(e,Oc.name,{},i)];let s=[...i];for(const o of t){const t=this.getStageForm(o.stage_type);t&&(i=Jc(t),r.push(this.renderStageSection(e,t.name,o,i)),s=[...s,...i])}return i=Jc(Lc),r.push(this.renderStageSection(e,`${Lc.name}`,{},i)),s=[...s,...i],[s,r]}getAllStageIds(){return this.feature.stages.map(e=>e.id)}renderForm(){const e=wc(this.feature);this.fieldValues.feature=this.feature;const t=this.getAllStageIds(),[i,r]=this.getForms(e,this.feature.stages),s=this.feature.accurate_as_of?`Accuracy last verified ${this.feature.accurate_as_of.split(" ")[0]}.`:"Accuracy last verified at time of creation.",o=this.submitting?"Submitting...":"Submit";return W` 10188 <form name="feature_form" method="post"> 10189 <input type="hidden" name="stages" .value="${t}" /> 10190 <input type="hidden" name="token" /> 10191 <input 10192 type="hidden" 10193 name="form_fields" 10194 value=${i.join(",")} 10195 /> 10196 <h3>${s}</h3> 10197 <sl-alert variant="warning" open class="verify-banner"> 10198 <sl-icon slot="icon" name="info-circle"></sl-icon> 10199 <strong 10200 >Please review your information below and click 'Submit' to confirm 10201 it is accurate, 10202 <p id="alertUnderline">even if no changes are made</p> 10203 !</strong 10204 > 10205 </sl-alert> 10206 <chromedash-form-table ${$s(this.registerFormSubmitHandler)}> 10207 ${r} 10208 </chromedash-form-table> 10209 10210 <section class="final_buttons"> 10211 <input 10212 class="button" 10213 type="submit" 10214 value="${o}" 10215 ?disabled=${this.submitting} 10216 /> 10217 <button 10218 id="cancel-button" 10219 type="reset" 10220 @click=${this.navigateToFeaturePage} 10221 > 10222 Cancel 10223 </button> 10224 </section> 10225 </form> 10226 `}render(){return W` 10227 ${this.renderSubheader()} 10228 ${this.loading?this.renderSkeletons():this.renderForm()} 10229 `}}Ng([Ve({attribute:!1})],Mg.prototype,"featureId",void 0),Ng([Ve({type:String})],Mg.prototype,"appTitle",void 0),Ng([He()],Mg.prototype,"feature",void 0),Ng([He()],Mg.prototype,"fieldValues",void 0),Ng([He()],Mg.prototype,"loading",void 0),Ng([He()],Mg.prototype,"previousStageTypeRendered",void 0),Ng([He()],Mg.prototype,"sameTypeRendered",void 0),Ng([He()],Mg.prototype,"submitting",void 0),customElements.define("chromedash-guide-verify-accuracy-page",Mg);var qg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Ug=class extends ce{constructor(){super(...arguments),this.appTitle="",this.googleSignInClientId="",this.devMode="",this.currentPage="",this.user={},this.loading=!1}static get styles(){return[...lo,c` 10230 :host { 10231 --nav-link-color: var(--sl-color-neutral-700); 10232 --nav-link-font-size: 16px; 10233 --nav-link-hover-background: var(--sl-color-neutral-100); 10234 --nav-link-border: 2px solid transparent; 10235 --nav-link-active-color: var(--cl-color-primary-900); 10236 --nav-link-active-border: 2px solid var(--nav-link-active-color); 10237 } 10238 10239 header { 10240 display: flex; 10241 align-items: center; 10242 user-select: none; 10243 background: var(--card-background); 10244 border-bottom: var(--card-border);
10245 box-shadow: var(--card-box-shadow); 10246 } 10247 header a { 10248 text-decoration: none !important; 10249 } 10250 header nav { 10251 display: flex; 10252 flex: 1; 10253 align-items: center; 10254 margin: 0 var(--content-padding); 10255 -webkit-font-smoothing: initial; 10256 } 10257 10258 sl-button[slot='trigger']::part(base) { 10259 color: var(--unimportant-text-color); 10260 } 10261 header aside a { 10262 color: var(--logo-color); 10263 } 10264 header aside h1 { 10265 line-height: 1; 10266 } 10267 header aside img { 10268 height: 24px; 10269 width: 24px; 10270 } 10271 10272 .flex-container { 10273 display: flex; 10274 justify-content: flex-end; 10275 flex-wrap: wrap; 10276 align-items: center; 10277 width: 100%; 10278 } 10279 10280 .nav-dropdown-trigger { 10281 display: flex; 10282 align-items: flex-end; 10283 } 10284 .nav-dropdown-trigger sl-icon { 10285 padding-left: var(--content-padding-half); 10286 } 10287 10288 .menu { 10289 margin-left: 15px; 10290 margin-right: 7px; 10291 align-items: center; 10292 } 10293 .menu:hover { 10294 color: black; 10295 background: var(--nav-link-hover-background); 10296 } 10297 .menu [active] { 10298 color: var(--nav-link-active-color); 10299 border-bottom: var(--nav-link-active-border); 10300 } 10301 10302 @media only screen and (max-width: 700px) { 10303 header { 10304 --logoSize: 24px; 10305 10306 margin: 0; 10307 display: flex; 10308 } 10309 header aside { 10310 display: flex; 10311 padding: var(--content-padding-half); 10312 border-radius: 0; 10313 background: inherit; 10314 } 10315 } 10316 `]}connectedCallback(){if(super.connectedCallback(),!(Bc()||this.user&&this.user.email)){if(!this.user)return window.isPlaywright||this.initializeGoogleSignIn(),void("True"==this.devMode&&this.initializeTestingSignIn());this.loading=!0,window.csClient.getPermissions().then(e=>{this.user=e,this.user||(window.isPlaywright||this.initializeGoogleSignIn(),"True"==this.devMode&&this.initializeTestingSignIn())}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")}).finally(()=>{this.loading=!1})}}initializeGoogleSignIn(){google.accounts.id.initialize({client_id:this.googleSignInClientId,callback:this.handleCredentialResponse,use_fedcm_for_prompt:!0}),google.accounts.id.prompt();const e=document.createElement("div");google.accounts.id.renderButton(e,{type:"standard"});const t=document.querySelector("chromedash-app");t?t.insertAdjacentElement("afterbegin",e):this.insertAdjacentElement("afterbegin",e)}initializeTestingSignIn(){const e=document.createElement("button");e.innerText="Sign in as [email protected]",e.setAttribute("type","button"),e.setAttribute("data-testid","dev-mode-sign-in-button"),e.setAttribute("style","margin-right: 300px; z-index:1000; background: lightblue; border: 1px solid blue;"),e.addEventListener("click",()=>{fetch("/dev/mock_login",{method:"POST"}).then(e=>{if(!e.ok)throw new Error(`Sign in failed! Response: ${e}`)}).then(()=>{eh()}).catch(e=>{console.error("Sign in failed.",e)})});const t=document.querySelector("chromedash-app");t?t.insertAdjacentElement("afterbegin",e):this.insertAdjacentElement("afterbegin",e)}handleCredentialResponse(e){window.csClient.signIn(e).then(()=>{setTimeout(()=>{eh()},1e3)}).catch(()=>{console.error("Sign in failed, so signing out to allow retry"),this.signOut()})}gotoSettings(){window.location.href="/settings"}signOut(){window.csClient.signOut().then(()=>{window.location.reload()})}isCurrentPage(e){return this.currentPage.startsWith(e)}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}handleDrawer(){this._fireEvent("drawer-clicked",{})}renderAccountMenu(){const e=this.isCurrentPage("/guide/new")||this.isCurrentPage("/guide/enterprise/new");return W` 10317 ${this.user?W` 10318 ${this.user.can_create_feature&&!e?W` 10319 <sl-button 10320 data-testid="create-feature-button" 10321 href="/guide/new" 10322 variant="primary" 10323 size="small" 10324 > 10325 Create feature 10326 </sl-button> 10327 `:Y} 10328 <sl-dropdown> 10329 <sl-button 10330 slot="trigger" 10331 variant="text" 10332 size="medium" 10333 data-testid="account-indicator" 10334 caret 10335 > 10336 ${this.user.email} 10337 </sl-button> 10338 <sl-menu>
10339 <sl-menu-item @click=${this.gotoSettings}> 10340 Settings 10341 </sl-menu-item> 10342 <sl-menu-item 10343 id="sign-out-link" 10344 data-testid="sign-out-link" 10345 @click=${this.signOut} 10346 >Sign out</sl-menu-item 10347 > 10348 </sl-menu> 10349 </sl-dropdown> 10350 `:W` <slot></slot> `} 10351 `}render(){let e=W``;return Bc()||this.loading||(e=W` <div class="flex-container"> 10352 ${this.renderAccountMenu()} 10353 </div>`),W` 10354 <header data-testid="header"> 10355 <sl-icon-button 10356 data-testid="menu" 10357 variant="text" 10358 library="material" 10359 class="menu" 10360 style="font-size: 2.4rem;" 10361 name="menu_20px" 10362 @click="${this.handleDrawer}" 10363 > 10364 </sl-icon-button> 10365 <aside> 10366 <a href="/roadmap" target="_top"> 10367 <h1> 10368 <img 10369 src="/static/img/chrome_logo.svg" 10370 alt="" 10371 role="presentation" 10372 /> 10373 ${this.appTitle} 10374 </h1> 10375 </a> 10376 </aside> 10377 <nav>${e}</nav> 10378 </header> 10379 `}};qg([Ve({type:String})],Ug.prototype,"appTitle",void 0),qg([Ve({type:String})],Ug.prototype,"googleSignInClientId",void 0),qg([Ve({type:String})],Ug.prototype,"devMode",void 0),qg([Ve({type:String})],Ug.prototype,"currentPage",void 0),qg([Ve({type:Object})],Ug.prototype,"user",void 0),qg([He()],Ug.prototype,"loading",void 0),Ug=qg([Ue("chromedash-header")],Ug);var Bg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let jg=class extends ce{constructor(){super(...arguments),this.appTitle="",this.subject="",this.intentBody=""}static get styles(){return[...lo,c` 10380 #copy-email-body { 10381 cursor: pointer; 10382 color: var(--link-color); 10383 } 10384 .email-content-border { 10385 border: 1px solid #ddd; 10386 box-shadow: rgba(0, 0, 0, 0.067) 1px 1px 4px; 10387 margin: 8px 0 24px 0; 10388 } 10389 .email-content-div { 10390 background: white; 10391 padding: 12px; 10392 } 10393 p { 10394 color: #444; 10395 } 10396 h3 { 10397 margin-bottom: 10px; 10398 &:before { 10399 counter-increment: h3; 10400 content: counter(h3) '.'; 10401 margin-right: 5px; 10402 } 10403 } 10404 #content section > div { 10405 background: white; 10406 border: 1px solid #ddd; 10407 box-shadow: rgba(0, 0, 0, 0.067) 1px 1px 4px; 10408 padding: 12px; 10409 margin: 8px 0 16px 0; 10410 } 10411 #content section > p { 10412 color: #444; 10413 } 10414 10415 .email .help { 10416 font-style: italic; 10417 color: #aaa; 10418 } 10419 .email h4 { 10420 font-weight: 600; 10421 } 10422 .alertbox { 10423 margin: 2em; 10424 padding: 1em; 10425 background: var(--warning-background); 10426 color: var(--warning-color); 10427 } 10428 .subject { 10429 font-size: 16px; 10430 } 10431 table { 10432 tr[hidden] { 10433 th, 10434 td { 10435 padding: 0; 10436 } 10437 } 10438 10439 th { 10440 padding: 12px 10px 5px 0; 10441 vertical-align: top; 10442 } 10443 10444 td { 10445 padding: 6px 10px; 10446 vertical-align: top; 10447 } 10448 10449 td:first-of-type { 10450 width: 60%; 10451 } 10452 10453 .helptext { 10454 display: block; 10455 font-size: small; 10456 max-width: 40em; 10457 margin-top: 2px; 10458 } 10459 10460 input[type='text'], 10461 input[type='url'], 10462 input[type='email'], 10463 textarea { 10464 width: 100%; 10465 font: var(--form-element-font); 10466 } 10467 10468 select { 10469 max-width: 350px; 10470 } 10471 10472 :required { 10473 border: 1px solid $chromium-color-dark; 10474 } 10475 10476 .interacted:valid { 10477 border: 1px solid green; 10478 } 10479 10480 .interacted:invalid {
10481 border: 1px solid $invalid-color; 10482 } 10483 10484 input:not([type='submit']):not([type='search']) { 10485 outline: 1px dotted var(--error-border-color); 10486 background-color: #ffedf5; 10487 } 10488 } 10489 `]}renderEmailBody(){return this.intentBody?Qs(this.intentBody):Y}copyIntentBodyHandler(){const e=this.renderRoot.querySelector("#copy-email-body"),t=this.renderRoot.querySelector(".email");if(e&&t){window.getSelection()?.removeAllRanges();const e=document.createRange();e.selectNode(t),window.getSelection()?.addRange(e),document.execCommand("copy"),Vc("Email body copied")}}render(){return W` 10490 <p>Email to</p> 10491 <div class="email-content-border"> 10492 <div class="subject email-content-div">[email protected]</div> 10493 </div> 10494 10495 <p>Subject</p> 10496 <div class="email-content-border"> 10497 <div class="subject email-content-div" id="email-subject-content"> 10498 ${this.subject} 10499 </div> 10500 </div> 10501 <p> 10502 Body 10503 <span 10504 class="tooltip copy-text" 10505 style="float:right" 10506 title="Copy text to clipboard" 10507 > 10508 <sl-icon 10509 name="copy" 10510 id="copy-email-body" 10511 @click="${()=>this.copyIntentBodyHandler()}" 10512 ></sl-icon> 10513 </span> 10514 </p> 10515 10516 <div class="email-content-border"> 10517 <div class="email email-content-div" id="email-body-content"> 10518 ${this.renderEmailBody()} 10519 </div> 10520 </div> 10521 `}};Bg([Ve({type:String})],jg.prototype,"appTitle",void 0),Bg([Ve({type:String})],jg.prototype,"subject",void 0),Bg([Ve({type:String})],jg.prototype,"intentBody",void 0),jg=Bg([Ue("chromedash-intent-content")],jg);var Vg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Hg;let Wg=class extends ce{constructor(){super(...arguments),this.featureId=0,this.stageId=0,this.gateId=0,this.ownerEmails=[]}static get styles(){return[...lo,...Mu,c` 10522 #prereqs-list li { 10523 margin-left: 8px; 10524 margin-bottom: 8px; 10525 } 10526 #prereqs-header { 10527 margin-bottom: 8px; 10528 } 10529 #update-button { 10530 margin-right: 8px; 10531 } 10532 .float-right { 10533 float: right; 10534 } 10535 sl-input::part(base) { 10536 margin-top: 8px; 10537 } 10538 sl-input[data-user-invalid]::part(base) { 10539 border-color: red; 10540 } 10541 `]}show(){this.shadowRoot.querySelector("sl-dialog").show()}updateAttributes(e){if(!e)return;const t=am.intent_cc_emails.attrs||{};Object.keys(t).map(i=>{e.setAttribute(i,t[i])})}renderIntentCCEmailOption(){const e=am.intent_cc_emails,t=this.ownerEmails.join(",");return W`${e.help_text}<br /> 10542 <sl-input 10543 ${$s(this.updateAttributes)} 10544 id="id_${e.name}" 10545 size="small" 10546 autocomplete="off" 10547 .value=${t} 10548 ?required=${e.required} 10549 > 10550 </sl-input>`}submitIntent(){const e=this.shadowRoot.querySelector("sl-input");if(!e||e.hasAttribute("data-user-invalid"))return;const t=this.shadowRoot.querySelector("#submit-intent-button");t&&t.setAttribute("disabled",""),window.csClient.postIntentToBlinkDev(this.featureId,this.stageId,{gate_id:this.gateId,intent_cc_emails:e?.value?.split(",")}).then(()=>{Vc("Intent submitted! Check for your thread on blink-dev shortly."),setTimeout(()=>{window.location.href=`/feature/${this.featureId}`},3e3)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later."),t&&t.removeAttribute("disabled")})}renderDialog(){return W`<sl-dialog label="Post intent to blink-dev"> 10551 <p> 10552 This intent will be sent directly to 10553 <a 10554 href="https://groups.google.com/a/chromium.org/g/blink-dev" 10555 target="_blank" 10556 rel="noopener noreferrer" 10557 >blink-dev</a 10558 >. 10559 </p> 10560 <br /><br /> 10561 ${this.renderIntentCCEmailOption()} 10562 <br /><br /> 10563 <sl-button 10564 class="float-right" 10565 id="submit-intent-button" 10566 variant="primary" 10567 size="small" 10568 @click=${()=>this.submitIntent()} 10569 >Submit intent</sl-button 10570 > 10571 </sl-dialog>`}render(){return this.renderDialog()}};Vg([Ve({type:Number})],Wg.prototype,"featureId",void 0),Vg([Ve({type:Number})],Wg.prototype,"stageId",void 0),Vg([Ve({type:Number})],Wg.prototype,"gateId",void 0),Vg([Ve({attribute:!1})],Wg.prototype,"ownerEmails",void 0),Wg=Vg([Ue("chromedash-post-intent-dialog")],Wg);var Gg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Yg=class extends ce{constructor(){super(...arguments),this.appTitle="",this.featureId=0,this.stageId=0,this.gateId=0,this.loading=!1,this.subject="",this.intentBody="",this.displayFeatureUnlistedWarning=!1}static get styles(){return[...lo,c` 10572 #content { 10573 flex-direction: column; 10574 counter-reset: h3; 10575 height: auto; 10576 } 10577 #content section { 10578 max-width: 800px; 10579 flex: 1 0 auto; 10580 margin-bottom: 15px; 10581 } 10582 h3 { 10583 margin-bottom: 10px; 10584 } 10585 #content h3:before { 10586 counter-increment: h3; 10587 content: counter(h3) '.'; 10588 margin-right: 5px; 10589 } 10590 #post-intent-button { 10591 float: right; 10592 } 10593 .inline { 10594 display: inline; 10595 } 10596 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}fetchData(){Promise.all([window.csClient.getFeature(this.featureId),window.csClient.getGates(this.featureId)]).then(([e,t])=>
10596{if(this.feature=e,document.title=`${this.feature.name} - ${this.appTitle}`,this.gateId){if(this.gate=t.gates.find(e=>e.id===this.gateId),!this.gate)throw new Error("Invalid gate ID");for(const e of this.feature.stages){if(this.stage)break;if(e.id===this.gate.stage_id&&(this.stage=e),!this.stage){const t=e.extensions.find(e=>e.id===this.gate.stage_id);t&&(this.stage=t)}}}else{if(!this.stageId)throw new Error("Invalid gate ID");{const e=this.feature.stages.find(e=>e.id===this.stageId);if(!e)throw new Error(`No matching stage found for ID ${this.stageId}`);this.stage=e}}return this.feature.unlisted&&(this.displayFeatureUnlistedWarning=!0),window.csClient.getIntentBody(this.featureId,this.stage.id,this.gateId)}).then(e=>{this.subject=e.subject,this.intentBody=e.email_body,this.loading=!1}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}renderThreeLGTMSection(){return wd.has(this.stage?.stage_type)?W` <section> 10597 <h3>Obtain LGTMs from 3 API Owners</h3> 10598 <span class="help"> 10599 You will need three LGTMs from API owners. According to the 10600 <a href="http://www.chromium.org/blink#launch-process" 10601 >Blink Launch process</a 10602 > 10603 after that, you're free to ship your feature. 10604 </span> 10605 </section>`:Y}renderFeatureUnlistedAlert(){return this.displayFeatureUnlistedWarning?W`<div class="alertbox"> 10606 Important: This feature is currently unlisted. Please only share feature 10607 details with people who are collaborating with you on the feature. 10608 </div>`:Y}renderSkeletonSection(){return W` 10609 <section> 10610 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10611 <p> 10612 <sl-skeleton effect="sheen"></sl-skeleton> 10613 <sl-skeleton effect="sheen"></sl-skeleton> 10614 </p> 10615 </section> 10616 `}renderSkeletons(){return W` 10617 <div id="feature" style="margin-top: 65px;"> 10618 ${this.renderSkeletonSection()} ${this.renderSkeletonSection()} 10619 ${this.renderSkeletonSection()} ${this.renderSkeletonSection()} 10620 </div> 10621 `}render(){return this.loading?this.renderSkeletons():W` 10622 <div id="content"> 10623 <div id="subheader"> 10624 <div> 10625 <h2>Next steps for the Blink launch process</h2> 10626 </div> 10627 </div> 10628 ${this.renderFeatureUnlistedAlert()} 10629 <section> 10630 <h3>Reach out to a spec mentor</h3> 10631 <p style="margin-left: 1em"> 10632 Consider showing your draft intent email to your spec mentor or 10633 sending it to [email protected]. They can help make sure 10634 that your intent email is ready for review. 10635 </p> 10636 </section> 10637 <section> 10638 <h3 class="inline">Send this text for your "Intent to ..." email</h3> 10639 <input 10640 ref() 10641 id="post-intent-button" 10642 class="button inline" 10643 type="submit" 10644 value="Post directly to blink-dev" 10645 @click="${()=>async function(e,t,i,r=0){Hg||(Hg=document.createElement("chromedash-post-intent-dialog"),document.body.appendChild(Hg),Hg.featureId=e,Hg.stageId=t,Hg.gateId=r,Hg.ownerEmails=i,await Hg.updateComplete),Hg.show()}(this.feature.id,this.stage.id,this.feature.owner_emails,this.gate?.id)}" 10646 /> 10647 <chromedash-intent-content 10648 appTitle="${this.appTitle}" 10649 .feature=${this.feature} 10650 .stage=${this.stage} 10651 subject="${this.subject}" 10652 intentBody="${this.intentBody}" 10653 > 10654 </chromedash-intent-content> 10655 </section> 10656 ${this.renderThreeLGTMSection()} 10657 </div> 10658 `}};Gg([Ve({type:String})],Yg.prototype,"appTitle",void 0),Gg([Ve({type:Number})],Yg.prototype,"featureId",void 0),Gg([Ve({type:Number})],Yg.prototype,"stageId",void 0),Gg([Ve({type:Number})],Yg.prototype,"gateId",void 0),Gg([He()],Yg.prototype,"feature",void 0),Gg([He()],Yg.prototype,"stage",void 0),Gg([He()],Yg.prototype,"gate",void 0),Gg([He()],Yg.prototype,"loading",void 0),Gg([He()],Yg.prototype,"subject",void 0),Gg([He()],Yg.prototype,"intentBody",void 0),Gg([He()],Yg.prototype,"displayFeatureUnlistedWarning",void 0),Yg=Gg([Ue("chromedash-intent-preview-page")],Yg);var Kg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Qg=class extends ce{render(){return W` <div>Please login to see the content of this page.</div> `}};Qg=Kg([Ue("chromedash-login-required-page")],Qg);var Xg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Jg=class extends ce{constructor(){super(...arguments),this.stageId=0,this.featureId=0,this.appTitle="",this.userEmail="",this.loading=!0,this.submitting=!1,this.fieldValues=[],this.showApprovalsFields=!1,this.isDeprecationTrial=!1,this.webfeatureUseCounterType=0}static get styles(){return[...lo,...Mu,c` 10659 #overlay { 10660 position: fixed; 10661 width: 100%; 10662 height: 100%; 10663 top: 0; 10664 left: 0; 10665 right: 0; 10666 bottom: 0; 10667 background-color: rgba(0, 0, 0, 0.3); 10668 z-index: 2; 10669 cursor: pointer; 10670 } 10671 .submission-spinner { 10672 position: fixed; 10673 top: 50%; 10674 left: 50%; 10675 transform: translate(-50%, -50%); 10676 height: 300px; 10677 } 10678 10679 .warning { 10680 border: 2px solid #555555; 10681 border-radius: 10px; 10682 padding: 4px; 10683 margin-bottom: 32px; 10684 } 10685 .warning h3 { 10686 text-align: center; 10687 color: #555555; 10688 font-weight: 300; 10689 } 10690 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}handleFormFieldUpdate(e){const t=e.detail.value,i=e.detail.index;if(i>=this.fieldValues.length)throw new Error("Out of bounds index when updating field values.");this.fieldValues[i].touched=!0,this.fieldValues[i].value=t,"ot_require_approvals"===this.fieldValues[i].name?(this.showApprovalsFields=!this.showApprovalsFields,this.requestUpdate()):"ot_is_deprecation_trial"===this.fieldValues[i].name&&(this.isDeprecationTrial=t,this.requestUpdate())}
10690handleUseCounterTypeUpdate(e){this.webfeatureUseCounterType=parseInt(e.detail.value)}fetchData(){this.loading=!0,Promise.all([window.csClient.getFeature(this.featureId),window.csClient.getStage(this.featureId,this.stageId),window.csClient.getGates(this.featureId)]).then(([e,t,i])=>{this.feature=e,this.stage=t,this.stage.ot_setup_status&&this.stage.ot_setup_status!==dc&&(window.location.href=`/feature/${this.featureId}`);const r=i.gates.filter(e=>e.stage_id===this.stage.id);r.forEach(e=>{sc.includes(e.state)||(window.location.href=`/feature/${this.featureId}`)}),this.feature.name&&(document.title=`${this.feature.name} - ${this.appTitle}`),this.setFieldValues(),this.loading=!1})}addOptionalApprovalsFields(){const e=this.fieldValues.findIndex(e=>"ot_require_approvals"===e.name)+1;this.fieldValues.splice(e,0,{name:"ot_approval_buganizer_component",touched:!0,value:"",stageId:this.stage.id,isApprovalsField:!0},{name:"ot_approval_buganizer_custom_field_id",touched:!0,value:"",stageId:this.stage.id,isApprovalsField:!0},{name:"ot_approval_group_email",touched:!0,value:"",stageId:this.stage.id,isApprovalsField:!0},{name:"ot_approval_criteria_url",touched:!0,value:"",stageId:this.stage.id,isApprovalsField:!0})}addAdditionalFields(){this.fieldValues.push({name:"ot_action_requested",touched:!0,value:!0,stageId:this.stage.id,alwaysHidden:!0}),"Chrome Platform Status"!==this.appTitle&&this.fieldValues.push({name:"ot_creation__bypass_file_checks",touched:!0,value:!1,stageId:this.stage.id,alwaysHidden:!1})}setFieldValues(){const e=Pc[0];this.fieldValues=e.fields.map(e=>{const t=am[e].name||e;let i=Yc(this.stage,t);return"ot_owner_email"!==t||i?"ot_require_approvals"===t&&(this.showApprovalsFields=!!i):i=[this.userEmail],{name:t,touched:!0,value:i,stageId:this.stage.id}}),this.addOptionalApprovalsFields(),this.addAdditionalFields()}disconnectedCallback(){super.disconnectedCallback(),document.title=this.appTitle}async registerHandlers(e){if(!e)return;await e.updateComplete;const t=this.renderRoot.querySelector("input[id=submit-button]");t?.form?.addEventListener("submit",e=>{this.handleFormSubmit(e)}),Zc(this)}checkWebfeatureUseCounter(e,t){t.ot_webfeature_use_counter?e.checkMessage=W` <span class="check-error"> 10691 <b>Error</b>: ${t.ot_webfeature_use_counter} 10692 </span>`:e.checkMessage=Y}checkChromiumTrialName(e,t){t.ot_chromium_trial_name?e.checkMessage=W` <span class="check-error"> 10693 <b>Error</b>: ${t.ot_chromium_trial_name} 10694 </span>`:e.checkMessage=Y}checkThirdPartySupport(e,t){t.ot_has_third_party_support?e.checkMessage=W` <br /> 10695 <span class="check-error"> 10696 <b>Error</b>: ${t.ot_has_third_party_support} 10697 </span>`:e.checkMessage=Y}checkCriticalTrial(e,t){t.ot_is_critical_trial?e.checkMessage=W` <br /> 10698 <span class="check-error"> 10699 <b>Error</b>: ${t.ot_is_critical_trial} 10700 </span>`:e.checkMessage=Y}handleChromiumChecks(e){for(const t of this.fieldValues)"ot_webfeature_use_counter"===t.name?this.checkWebfeatureUseCounter(t,e):"ot_chromium_trial_name"===t.name?this.checkChromiumTrialName(t,e):"ot_has_third_party_support"===t.name?this.checkThirdPartySupport(t,e):"ot_is_critical_trial"===t.name&&this.checkCriticalTrial(t,e)}async handleFormSubmit(e){e.preventDefault(),this.showApprovalsFields||this.fieldValues.forEach(e=>{e.isApprovalsField&&(e.touched=!1)});const t=this.fieldValues.find(e=>"ot_webfeature_use_counter"===e.name);this.isDeprecationTrial&&(t.touched=!1);const i=uh(this.fieldValues,this.featureId).stages[0];if("ot_webfeature_use_counter"in i){let e="";1===this.webfeatureUseCounterType?e="WebDXFeature::":2===this.webfeatureUseCounterType&&(e="CSSSampleId::"),i.ot_webfeature_use_counter.value=`${e}${i.ot_webfeature_use_counter.value}`}this.submitting=!0,window.csClient.createOriginTrial(this.featureId,this.stageId,i).then(e=>{e.errors?(this.handleChromiumChecks(e.errors),Vc("Some issues were found with the given inputs. Check input errors and try again."),this.submitting=!1,this.requestUpdate()):(Vc("Creation request submitted!"),setTimeout(()=>{window.location.href=`/feature/${this.featureId}`},1e3))})}handleCancelClick(){window.location.href=`/feature/${this.featureId}`}renderSkeletons(){return W` 10701 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10702 <section id="metadata"> 10703 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10704 <p> 10705 <sl-skeleton effect="sheen"></sl-skeleton> 10706 <sl-skeleton effect="sheen"></sl-skeleton> 10707 <sl-skeleton effect="sheen"></sl-skeleton> 10708 <sl-skeleton effect="sheen"></sl-skeleton> 10709 <sl-skeleton effect="sheen"></sl-skeleton> 10710 <sl-skeleton effect="sheen"></sl-skeleton> 10711 <sl-skeleton effect="sheen"></sl-skeleton> 10712 <sl-skeleton effect="sheen"></sl-skeleton> 10713 </p> 10714 </section> 10715 `}getNextPage(){return`/feature/${this.featureId}`}renderSubheader(){const e=this.loading?Y:W` 10716 <a href=${this.getNextPage()}> 10717 <sl-icon name="arrow-left"></sl-icon> 10718 Request origin trial creation: ${this.feature.name} 10719 </a> 10720 `;return W` 10721 <div id="subheader"> 10722 <h2 id="breadcrumbs">${e}</h2> 10723 </div> 10724 `}renderFields(){const e=this.fieldValues.map((e,t)=>{if(e.alwaysHidden||e.isApprovalsField&&!this.showApprovalsFields||"ot_webfeature_use_counter"===e.name&&this.isDeprecationTrial)return Y;const i=e.isApprovalsField||"ot_webfeature_use_counter"===e.name;let r=Y;return"ot_webfeature_use_counter"==e.name&&(r=W` 10725 <chromedash-form-field 10726 name="ot_webfeature_use_counter__type" 10727 index=${t} 10728 .value=${this.webfeatureUseCounterType} 10729 .fieldValues=${this.fieldValues} 10730 ?shouldFadeIn=${i}
10731 @form-field-update="${this.handleUseCounterTypeUpdate}" 10732 class="choices" 10733 > 10734 </chromedash-form-field> 10735 `),W` 10736 ${r} 10737 <chromedash-form-field 10738 name=${e.name} 10739 index=${t} 10740 value=${e.value} 10741 disabledReason="${nh(e.name,this.stage)}" 10742 .checkMessage=${e.checkMessage} 10743 .fieldValues=${this.fieldValues} 10744 ?shouldFadeIn=${i} 10745 @form-field-update="${this.handleFormFieldUpdate}" 10746 > 10747 </chromedash-form-field> 10748 `});return e}renderForm(){this.fieldValues.feature=this.feature;const e=this.submitting?"Submitting...":"Submit";return W` 10749 <form name="feature_form"> 10750 ${this.submitting?W`<div id="overlay"> 10751 <div class="loading"> 10752 <div id="spinner"> 10753 <img 10754 class="submission-spinner" 10755 src="/static/img/ring.svg" 10756 /> 10757 </div> 10758 </div> 10759 </div>`:Y} 10760 <chromedash-form-table ${$s(this.registerHandlers)}> 10761 <section class="stage_form"> 10762 <div class="warning warning-div"> 10763 <h3> 10764 Please make sure this data is correct before submission! If you 10765 are not sure about any information on this form, contact 10766 <strong>[email protected]</strong> 10767 </h3> 10768 </div> 10769 ${this.renderFields()} 10770 </section> 10771 </chromedash-form-table> 10772 <div class="final_buttons"> 10773 <input 10774 id="submit-button" 10775 class="button" 10776 type="submit" 10777 value=${e} 10778 ?disabled=${this.submitting} 10779 /> 10780 <button 10781 id="cancel-button" 10782 type="reset" 10783 @click=${this.handleCancelClick} 10784 > 10785 Cancel 10786 </button> 10787 </div> 10788 </form> 10789 `}render(){return W` 10790 ${this.renderSubheader()} 10791 ${this.loading?this.renderSkeletons():this.renderForm()} 10792 `}};Xg([Ve({type:Number})],Jg.prototype,"stageId",void 0),Xg([Ve({type:Number})],Jg.prototype,"featureId",void 0),Xg([Ve({attribute:!1})],Jg.prototype,"feature",void 0),Xg([Ve({type:String})],Jg.prototype,"appTitle",void 0),Xg([Ve({type:String})],Jg.prototype,"userEmail",void 0),Xg([He()],Jg.prototype,"loading",void 0),Xg([He()],Jg.prototype,"submitting",void 0),Xg([He()],Jg.prototype,"fieldValues",void 0),Xg([He()],Jg.prototype,"showApprovalsFields",void 0),Xg([He()],Jg.prototype,"isDeprecationTrial",void 0),Xg([He()],Jg.prototype,"webfeatureUseCounterType",void 0),Xg([He()],Jg.prototype,"stage",void 0),Jg=Xg([Ue("chromedash-ot-creation-page")],Jg);var Zg=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class eb extends ce{constructor(){super(...arguments),this.stageId=0,this.featureId=0,this.appTitle="",this.loading=!0,this.fieldValues=[],this.currentMilestone=123,this.endMilestoneDateValues={}}static get styles(){return[...lo,...Mu,c``]}static get properties(){return{stageId:{type:Number},featureId:{type:Number},userEmail:{type:String},feature:{type:Object},loading:{type:Boolean},appTitle:{type:String},fieldValues:{type:Array},currentMilestone:{type:Number},endMilestoneDateValues:{type:Object}}}connectedCallback(){super.connectedCallback(),this.fetchData()}handleFormFieldUpdate(e){const t=e.detail.value,i=e.detail.index;if(i>=this.fieldValues.length)throw new Error("Out of bounds index when updating field values.");this.fieldValues[i].touched=!0,this.fieldValues[i].value=t,"ot_extension__milestone_desktop_last"==this.fieldValues[i].name&&this.getChromeScheduleDate(e.detail.value)}openMilestoneExplanationDialog(){!async function(e){hf||(hf=document.createElement("chromedash-ot-prereqs-dialog"),hf.dialogType=e,document.body.appendChild(hf),await hf.updateComplete),hf.show()}(gf)}updateMilestoneDate(e){const t=this.renderRoot.querySelector("#milestone-date"),i=this.renderRoot.querySelector("#milestone-date-text"),r=new Date(this.endMilestoneDateValues[e]);t&&i&&(t.style.display="block",i.innerHTML=`For milestone ${e}, this trial will end on ${r.toLocaleDateString()}.`)}async getChromeScheduleDate(e){const t=this.renderRoot.querySelector("#milestone-date");if(t&&(t.style.display="none",function(e,t){if(isNaN(e))return!1;for(let t=0;t<e.length;t++)if(e[t]<"0"||e[t]>"9")return!1;const i=parseInt(e);return!(i>=1e3)&&parseInt(t)<=i}(e,this.currentMilestone))){if(!(e in this.endMilestoneDateValues)){const t=parseInt(e)+2,i=await fetch(`https://chromiumdash.appspot.com/fetch_milestone_schedule?mstone=${t}`),r=await i.json();this.endMilestoneDateValues[e]=r.mstones[0].stable_date}this.updateMilestoneDate(e)}}fetchData(){this.loading=!0,Promise.all([window.csClient.getFeature(this.featureId),window.csClient.getStage(this.featureId,this.stageId)]).then(([e,t])=>{this.feature=e,this.stage=t,this.feature.name&&(document.title=`${this.feature.name} - ${this.appTitle}`),this.loading=!1}
10792).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")}),fetch("https://chromiumdash.appspot.com/fetch_milestone_schedule").then(e=>e.json()).then(e=>{this.currentMilestone=parseInt(e.mstones[0].mstone)})}disconnectedCallback(){super.disconnectedCallback(),document.title=this.appTitle}async registerHandlers(e){if(!e)return;await e.updateComplete;const t=this.renderRoot.querySelector("input[id=submit-button]");t?.form?.addEventListener("submit",e=>{this.handleFormSubmit(e)}),Zc(this)}handleFormSubmit(e){e.preventDefault();const t=uh(this.fieldValues,this.featureId).stages[0];let i=null;window.csClient.createStage(this.featureId,t).then(e=>(i=e.stage_id,window.csClient.getGates(this.featureId))).then(e=>{const t=e.gates.find(e=>e.stage_id===i);Vc("Extension request started!"),i&&t?setTimeout(()=>{window.location.href=`/feature/${this.featureId}?gate=${t.id}`},1e3):setTimeout(()=>{window.location.href=`/feature/${this.featureId}`},1e3)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}handleCancelClick(e){e.preventDefault(),window.location.href=`/feature/${this.featureId}`}renderSkeletons(){return W` 10793 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10794 <section id="metadata"> 10795 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 10796 <p> 10797 <sl-skeleton effect="sheen"></sl-skeleton> 10798 <sl-skeleton effect="sheen"></sl-skeleton> 10799 <sl-skeleton effect="sheen"></sl-skeleton> 10800 <sl-skeleton effect="sheen"></sl-skeleton> 10801 <sl-skeleton effect="sheen"></sl-skeleton> 10802 <sl-skeleton effect="sheen"></sl-skeleton> 10803 <sl-skeleton effect="sheen"></sl-skeleton> 10804 <sl-skeleton effect="sheen"></sl-skeleton> 10805 </p> 10806 </section> 10807 `}getNextPage(){return`/feature/${this.featureId}`}renderSubheader(){const e=this.loading?Y:W` 10808 <a href=${this.getNextPage()}> 10809 <sl-icon name="arrow-left"></sl-icon> 10810 Request origin trial extension: ${this.feature.name} 10811 </a> 10812 `;return W` 10813 <div id="subheader"> 10814 <h2 id="breadcrumbs">${e}</h2> 10815 </div> 10816 `}addDefaultRequestFields(){this.fieldValues.push({name:"ot_owner_email",touched:!0,value:this.userEmail,stageId:this.stage.id}),this.fieldValues.push({name:"ot_action_requested",touched:!0,value:!0,stageId:this.stage.id});const e=kd[this.stage.stage_type];this.fieldValues.push({name:"stage_type",touched:!0,value:e,stageId:this.stage.id}),this.fieldValues.push({name:"ot_stage_id",touched:!0,value:this.stage.id,stageId:this.stage.id})}renderFields(e){const t=e.fields.map(e=>{const t=am[e].name||e,i=this.fieldValues.length;this.fieldValues.push({name:t,touched:!0,value:null,stageId:this.stage.id});let r=W``;return"ot_extension__milestone_desktop_last"===t&&(r=W` <div 10817 id="milestone-date" 10818 style="display:none;" 10819 > 10820 <span id="milestone-date-text" class="helptext fade-in"></span> 10821 <a class="helptext" @click=${this.openMilestoneExplanationDialog}> 10822 Learn how this date is chosen 10823 </a> 10824 </div>`),W` 10825 <chromedash-form-field 10826 name=${t} 10827 index=${i} 10828 disabledReason="${nh(e,this.stage)}" 10829 .fieldValues=${this.fieldValues} 10830 @form-field-update="${this.handleFormFieldUpdate}" 10831 > 10832 </chromedash-form-field> 10833 ${r} 10834 `});return this.addDefaultRequestFields(),t}renderForm(){this.fieldValues.feature=this.feature;const e=Dc[0];return W` 10835 <form name="feature_form"> 10836 <chromedash-form-table ${$s(this.registerHandlers)}> 10837 <section class="stage_form">${this.renderFields(e)}</section> 10838 </chromedash-form-table> 10839 <div class="final_buttons"> 10840 <input 10841 id="submit-button" 10842 class="button" 10843 type="submit" 10844 value="Submit" 10845 /> 10846 <button 10847 id="cancel-button" 10848 type="reset" 10849 @click=${this.handleCancelClick} 10850 > 10851 Cancel 10852 </button> 10853 </div> 10854 </form> 10855 `}render(){return W` 10856 ${this.renderSubheader()} 10857 ${this.loading?this.renderSkeletons():this.renderForm()} 10858 `}}Zg([Ve({type:Number})],eb.prototype,"stageId",void 0),Zg([Ve({type:Number})],eb.prototype,"featureId",void 0),Zg([Ve({type:String})],eb.prototype,"userEmail",void 0),Zg([Ve({type:String})],eb.prototype,"appTitle",void 0),Zg([He()],eb.prototype,"feature",void 0),Zg([He()],eb.prototype,"loading",void 0),Zg([He()],eb.prototype,"fieldValues",void 0),Zg([He()],eb.prototype,"currentMilestone",void 0),Zg([He()],eb.prototype,"endMilestoneDateValues",void 0),Zg([He()],eb.prototype,"stage",void 0),customElements.define("chromedash-ot-extension-page",eb);var tb=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let ib=class extends ce{constructor(){super(...arguments),this.notify_as_starrer=!1,this.submitting=!1}static get styles(){return[...lo,...Mu,c` 10859 th, 10860 td { 10861 padding: 4px; 10862 } 10863 10864 input[type='submit'] { 10865 margin: 20px; 10866 } 10867 10868 input[disabled] { 10869 opacity: 0.5; 10870 pointer-events: none; 10871 } 10872 10873 #spinner { 10874 display: flex; 10875 align-items: center; 10876 justify-content: center; 10877 position: fixed; 10878 height: 60%; 10879 width: 100%; 10880 } 10881 10882 table .helptext { 10883 display: block; 10884 font-style: italic; 10885 font-size: smaller; 10886 max-width: 40em; 10887 margin-top: 2px; 10888 } 10889 `]}connectedCallback(){super.connectedCallback(),window.csClient.getSettings().then(e=>{this.notify_as_starrer=e.notify_as_starrer}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}handleSubmit(e){e.preventDefault(),this.submitting=!0,window.csClient.setSettings(this.notify_as_starrer).then(()=>{Vc("Settings saved."),ph("")}).catch(()=>{Vc("Unable to save the settings. Please try again."),ph("Unable to save the settings. Please try again.")}).finally(()=>{this.submitting=!1})}handleChange(){this.notify_as_starrer=!this.notify_as_starrer}render(){const e=this.submitting?"Submitting...":"Submit";return W` 10890 <div id="subheader"> 10891 <h2>User preferences</h2> 10892 </div> 10893 <section> 10894 <form name="user_pref_form" @submit=${this.handleSubmit}> 10895 <table cellspacing="6"> 10896 <tbody> 10897 <tr> 10898 <th> 10899 <label for="id_notify_as_starrer">Notify as starrer:</label> 10900 </th> 10901 <td> 10902 <sl-checkbox 10903 id="id_notify_as_starrer" 10904 name="notify_as_starrer" 10905 ?checked=${this.notify_as_starrer}
10906 @input=${this.handleChange} 10907 > 10908 </sl-checkbox> 10909 <span class="helptext"> 10910 Send you notification emails for features that you 10911 starred?</span 10912 > 10913 </td> 10914 </tr> 10915 </tbody> 10916 </table> 10917 <input 10918 type="submit" 10919 value=${e} 10920 ?disabled=${this.submitting} 10921 /> 10922 </form> 10923 </section> 10924 ${this.submitting?W` <div class="loading"> 10925 <div id="spinner"><img src="/static/img/ring.svg" /></div> 10926 </div>`:Y} 10927 `}};tb([He()],ib.prototype,"notify_as_starrer",void 0),tb([He()],ib.prototype,"submitting",void 0),ib=tb([Ue("chromedash-settings-page")],ib);var rb=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let sb=class extends ce{constructor(){super(...arguments),this.value=0,this.max=100,this.href="#"}static get styles(){return[...lo,c` 10928 :host { 10929 display: grid; 10930 grid-template-columns: 65px 1fr; 10931 grid-column-gap: 15px; 10932 height: 1.6em; 10933 font-size: 14px; 10934 } 10935 10936 #percentage-number { 10937 place-self: center; 10938 } 10939 10940 #track { 10941 background: var(--barchart-background); 10942 border-radius: var(--border-radius); 10943 overflow: hidden; 10944 height: 100%; 10945 } 10946 10947 #indicator { 10948 background: var(--barchart-foreground); 10949 height: 100%; 10950 white-space: nowrap; 10951 padding: 3px 0; 10952 } 10953 `]}render(){return W` 10954 <p id="percentage-number"> 10955 ${this.value<1e-4?"<0.0001%":this.value.toFixed(4)+"%"} 10956 </p> 10957 <a href="${this.href}"> 10958 <div id="track"> 10959 <div 10960 id="indicator" 10961 style="width: ${this.value/this.max*100}%" 10962 ></div> 10963 </div> 10964 </a> 10965 `}};rb([Ve({type:Number})],sb.prototype,"value",void 0),rb([Ve({type:Number})],sb.prototype,"max",void 0),rb([Ve({type:String})],sb.prototype,"href",void 0),sb=rb([Ue("chromedash-x-meter")],sb);var ob=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let ab=class extends ce{constructor(){super(...arguments),this.type="",this.view="",this.viewList=[],this.tempList=[],this.maxPercentage=100,this.sortType="percentage",this.sortReverse=!1,this.shouldHideObsolete=!0,this.obsoleteCount=0}static get styles(){return[...lo,c` 10966 :host { 10967 display: block; 10968 flex: 1; 10969 padding: 1px; 10970 } 10971 10972 .title-text { 10973 flex: 1; 10974 font-weight: 500; 10975 } 10976 10977 li { 10978 padding: 5px 0; 10979 display: flex; 10980 align-items: center; 10981 } 10982 10983 #subheader { 10984 font-size: 15px; 10985 display: flex; 10986 justify-content: space-between; 10987 align-items: center; 10988 } 10989 10990 #dropdown-selection:hover { 10991 background: var(--sl-color-neutral-100); 10992 } 10993 10994 sl-button::part(base) { 10995 color: #000; 10996 } 10997 10998 li > :first-child { 10999 flex: 1; 11000 word-break: break-all; 11001 } 11002 11003 li > :nth-child(2) { 11004 flex: 2; 11005 } 11006 11007 .stack-rank-header { 11008 margin-bottom: 5px; 11009 text-align: center; 11010 } 11011 11012 .stack-rank-item { 11013 border-top: var(--table-divider); 11014 } 11015 11016 .stack-rank-item-hidden { 11017 display: none; 11018 } 11019 11020 .stack-rank-item-name { 11021 display: grid; 11022 grid-template-columns: var(--icon-size) 1fr; 11023 grid-column-gap: 15px; 11024 position: relative; 11025 left: -20px; 11026 } 11027 .stack-rank-item-name .hash-link { 11028 place-self: center; 11029 visibility: hidden; 11030 } 11031 .stack-rank-item-name:hover .hash-link { 11032 visibility: visible; 11033 } 11034 11035 .stack-rank-item-result { 11036 display: flex; 11037 align-items: center; 11038 gap: 15px; 11039 margin-right: 15px; 11040 } 11041 11042 chromedash-x-meter { 11043 flex: 1; 11044 } 11045 11046 a.icon-wrapper { 11047 display: flex; 11048 gap: 3px; 11049 align-items: center; 11050 } 11051 a.icon-wrapper:hover { 11052 text-decoration: none; 11053 } 11054 11055 .spacer { 11056 visibility: hidden; 11057 } 11058 11059 sl-skeleton { 11060 margin: 0; 11061 padding: 5px 20px; 11062 } 11063 11064 /* On small displays, only show timeline icons (no text). */ 11065 @media only screen and (max-width: 600px) { 11066 .icon-text { 11067 display: none; 11068 } 11069 11070 .stack-rank-item-name { 11071 grid-column-gap: 5px; 11072 } 11073 11074 .stack-rank-item-result { 11075 margin-right: 5px; 11076 } 11077 } 11078 `]}willUpdate(e){e.has("viewList")&&this.viewList.length&&(this.maxPercentage=this.viewList.reduce((e,t)=>
11078Math.max(e,t.percentage),0),setTimeout(()=>{this.scrollToPosition()},300),this.obsoleteCount=this.viewList.filter(e=>e.obsolete).length)}scrollToPosition(e){let t;if(e?t=e.currentTarget.getAttribute("href"):location.hash&&(t=decodeURIComponent(location.hash)),t){const e=this.renderRoot.querySelector(".stack-rank-list "+t);e?.scrollIntoView({behavior:"smooth"})}}sort(e){e.preventDefault();const t=e.target.dataset.order.split("-");this.sortType=t[0],this.sortReverse=Boolean(t[1]);const i=[...this.viewList];this.viewList=nb(this.sortType,this.sortReverse,i)}handleChangeHideObsolete(e){this.shouldHideObsolete=e.target.checked}renderSubHeader(){return W` 11079 <div id="subheader"> 11080 <p class="title-text"> 11081 Showing 11082 <span 11083 >${this.viewList.length-(this.shouldHideObsolete?this.obsoleteCount:0)}</span 11084 > 11085 properties 11086 </p> 11087 <sl-checkbox 11088 ?checked=${this.shouldHideObsolete} 11089 @input=${this.handleChangeHideObsolete} 11090 > 11091 Hide obsolete 11092 </sl-checkbox> 11093 <div id="dropdown-selection"> 11094 <sl-dropdown> 11095 <sl-button 11096 slot="trigger" 11097 variant="text" 11098 ?disabled=${!this.viewList.length} 11099 > 11100 <sl-icon name="filter-left"></sl-icon> 11101 SORT BY 11102 </sl-button> 11103 <sl-menu @click="${this.sort}"> 11104 <sl-menu-item 11105 type="checkbox" 11106 ?checked=${"percentage"==this.sortType&&!this.sortReverse} 11107 data-order="percentage" 11108 > 11109 Most used 11110 </sl-menu-item> 11111 <sl-menu-item 11112 type="checkbox" 11113 ?checked=${"percentage"==this.sortType&&this.sortReverse} 11114 data-order="percentage-reverse" 11115 > 11116 Least used 11117 </sl-menu-item> 11118 <sl-menu-item 11119 type="checkbox" 11120 ?checked=${"property_name"==this.sortType&&this.sortReverse} 11121 data-order="property_name-reverse" 11122 > 11123 Name (A-Z) 11124 </sl-menu-item> 11125 <sl-menu-item 11126 type="checkbox" 11127 ?checked=${"property_name"==this.sortType&&!this.sortReverse} 11128 data-order="property_name" 11129 > 11130 Name (Z-A) 11131 </sl-menu-item> 11132 </sl-menu> 11133 </sl-dropdown> 11134 </div> 11135 </div> 11136 `}renderStackRank(e){return W` 11137 ${e.map(e=>W` 11138 <li 11139 class="stack-rank-item ${this.shouldHideObsolete&&e.obsolete?"stack-rank-item-hidden":""}" 11140 id="${e.property_name}" 11141 > 11142 <div 11143 title="${e.property_name}. Click to deep link to this property." 11144 > 11145 <a 11146 class="stack-rank-item-name" 11147 href="#${e.property_name}" 11148 @click=${this.scrollToPosition} 11149 > 11150 <sl-icon 11151 class="hash-link" 11152 library="material" 11153 name="link" 11154 ></sl-icon> 11155 <p>${e.property_name}</p> 11156 </a> 11157 </div> 11158 <div class="stack-rank-item-result"> 11159 <chromedash-x-meter 11160 value="${e.percentage}" 11161 max="${this.maxPercentage}" 11162 href="/metrics/${this.type}/timeline/${this.view}/${e.bucket_id}" 11163 title="Click to see a timeline view of this property" 11164 > 11165 </chromedash-x-meter> 11166 <a 11167 class="icon-wrapper" 11168 href="/metrics/${this.type}/timeline/${this.view}/${e.bucket_id}" 11169 title="Click to see a timeline view of this property" 11170 > 11171 <sl-icon name="graph-up"></sl-icon> 11172 <p class="icon-text">Timeline</p> 11173 </a> 11174 </div> 11175 </li> 11176 `)} 11177 `}renderSkeletons(){return W`${Array.from(Array(20)).map(()=>W` 11178 <li class="stack-rank-item"> 11179 <sl-skeleton effect="sheen"></sl-skeleton> 11180 <sl-skeleton effect="sheen"></sl-skeleton> 11181 </li> 11182 `)}`}renderTemporaryRank(){return W` 11183 ${this.tempList.length?this.renderStackRank(this.tempList):Y} 11184 ${this.renderSkeletons()} 11185 `}renderStackRankList(){return W` 11186 <ol class="stack-rank-list"> 11187 <li class="stack-rank-header"> 11188 <p class="title-text">Property name</p> 11189 <div class="stack-rank-item-result"> 11190 <p class="title-text">Percentage</p> 11191 <a class="icon-wrapper spacer"> 11192 <sl-icon name="graph-up"></sl-icon> 11193 <p class="icon-text">Timeline</p> 11194 </a> 11195 </div> 11196 </li> 11197 ${this.viewList.length?this.renderStackRank(this.viewList):this.renderTemporaryRank()} 11198 </ol> 11199 `}render(){return W` ${this.renderSubHeader()} ${this.renderStackRankList()} `}};ob([Ve({type:String,attribute:!1})],ab.prototype,"type",void 0),ob([Ve({type:String,attribute:!1})],ab.prototype,"view",void 0),ob([Ve({type:Array,attribute:!1})],ab.prototype,"viewList",void 0),ob([Ve({type:Array,attribute:!1})],ab.prototype,"tempList",void 0),ob([He()],ab.prototype,"maxPercentage",void 0),ob([He()],ab.prototype,"sortType",void 0),ob([He()],ab.prototype,"sortReverse",void 0),ob([He()],ab.prototype,"shouldHideObsolete",void 0),ob([He()],ab.prototype,"obsoleteCount",void 0),ab=ob([Ue("chromedash-stack-rank")],ab);const nb=(e,t,i)=>{const r="percentage"===e;return i.sort((i,s)=>{const o=r?Number(i[e]):i[e],a=r?Number(s[e]):s[e];return o>a?t?1:-1:o<a?t?-1:1:0}),i};var lb=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class db extends ce{constructor(){super(...arguments),this.viewList=[],this.tempList=[]}static get styles(){return[...lo,c` 11200 h3 { 11201 margin: var(--content-padding) 0; 11202 font-weight: 500; 11203 color: #000; 11204 } 11205 11206 .description { 11207 margin-bottom: 1em; 11208 } 11209 .description #highlighted-text { 11210 font-weight: 500; 11211 } 11212 11213 #datalist-input { 11214 width: 30em; 11215 max-width: 100%; 11216 border-radius: 10px; 11217 height: 25px; 11218 margin-bottom: var(--content-padding); 11219 padding-left: 10px; 11220 font-size: 15px; 11221 } 11222 `]}connectedCallback(){super.connectedCallback(),this.loadAll()}loadAll(){let e=`/data/${this.type}${this.view}`;fetch(e,{credentials:"omit"}).then(e=>e.json()).then(e=>{for(let t,i=0;t=e[i];++i)t.percentage=(100*t.day_percentage).toFixed(6),t.obsolete=t.property_name&&(t.property_name.startsWith("OBSOLETE_")||t.property_name.endsWith("(obsolete)"));const t=e.filter(e=>!["ERROR","PageVisits","PageDestruction"].includes(e.property_name));this.tempList=t.slice(0,30),setTimeout(()=>{this.viewList=t},300)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}handleSearchBarChange(e){const t=e.currentTarget.value,i=this.viewList.find(e=>e.property_name===t);window.location.href=`/metrics/${this.type}/timeline/${this.view}/${i.bucket_id}`}renderSubheader(){const e=gh[this.type+this.view];return W`<h2>${e} > stack rank</h2>`}renderSearchBar(){return W` 11223 <input 11224 id="datalist-input" 11225 type="search" 11226 list="features" 11227 autocomplete="off" 11228 placeholder=${this.viewList.length?"Select or search a property for detailed stats":"loading..."} 11229 @change="${this.handleSearchBarChange}" 11230 /> 11231 <datalist id="features"> 11232 ${this.viewList.map(e=>W` 11233 <option 11234 value="${e.property_name}" 11235 dataset-debug-bucket-id="${e.bucket_id}" 11236 ></option> 11237 `)} 11238 </datalist> 11239 `}renderDataPanel(){const e=vh[this.type+this.view];return W` 11240 <h3>Recent usage data</h3> 11241 <p class="description"> 11242 ${e} The percentage numbers indicate the
11243 <span id="highlighted-text" 11244 >percentage of Chrome page loads (across all channels and platforms) 11245 that use the ${"css"==this.type?"property":"feature"} at least 11246 once</span 11247 >. Data is collected via Chrome's anonymous usage statistics. 11248 </p> 11249 <chromedash-stack-rank 11250 .type=${this.type} 11251 .view=${this.view} 11252 .tempList=${this.tempList} 11253 .viewList=${this.viewList} 11254 > 11255 </chromedash-stack-rank> 11256 `}render(){return W` 11257 <div id="subheader">${this.renderSubheader()}</div> 11258 ${this.renderSearchBar()} ${this.renderDataPanel()} 11259 `}}lb([Ve({attribute:!1})],db.prototype,"type",void 0),lb([Ve({attribute:!1})],db.prototype,"view",void 0),lb([Ve({attribute:!1})],db.prototype,"viewList",void 0),lb([Ve({attribute:!1})],db.prototype,"tempList",void 0),customElements.define("chromedash-stack-rank-page",db);var cb=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let hb=class extends ce{constructor(){super(...arguments),this.staleFeatures=[],this.loading=!0,this._sortColumn="name",this._sortDirection="asc"}static get styles(){return[...lo,...Mu,c` 11260 :host { 11261 display: block; 11262 padding: 1em 2em; 11263 max-width: 1400px; 11264 margin: auto; 11265 } 11266 11267 #subheader { 11268 padding: 0.5em 0; 11269 margin-bottom: 1.5em; 11270 border-bottom: 1px solid #e0e0e0; 11271 } 11272 11273 #breadcrumbs { 11274 color: #333; 11275 font-size: 1.75em; 11276 font-weight: 600; 11277 margin: 0; 11278 } 11279 11280 table { 11281 width: 100%; 11282 border-collapse: collapse; 11283 } 11284 11285 th, 11286 td { 11287 padding: 14px 18px; 11288 text-align: left; 11289 border-bottom: 1px solid #ddd; 11290 } 11291 11292 thead tr { 11293 background-color: #f9f9f9; 11294 } 11295 11296 th { 11297 font-weight: 600; 11298 color: #555; 11299 text-transform: uppercase; 11300 font-size: 0.85em; 11301 letter-spacing: 0.05em; 11302 } 11303 11304 th.sortable { 11305 cursor: pointer; 11306 user-select: none; 11307 position: relative; 11308 padding-right: 36px; 11309 } 11310 11311 th.sortable:hover { 11312 background-color: #f0f0f0; 11313 } 11314 11315 .sort-indicator { 11316 position: absolute; 11317 top: 50%; 11318 right: 18px; 11319 transform: translateY(-50%); 11320 opacity: 0.6; 11321 transition: opacity 0.2s ease-in-out; 11322 } 11323 11324 tbody tr:nth-child(even) { 11325 background-color: #fdfdfd; 11326 } 11327 11328 tbody tr:hover { 11329 background-color: #f1f1f1; 11330 transition: background-color 0.2s ease-in-out; 11331 } 11332 11333 td a { 11334 color: var(--link-color); 11335 text-decoration: none; 11336 font-weight: 500; 11337 } 11338 11339 td a:hover { 11340 text-decoration: underline; 11341 } 11342 11343 .no-features { 11344 padding: 2em; 11345 text-align: center; 11346 font-style: italic; 11347 color: #777; 11348 background-color: #fafafa; 11349 border: 1px solid #ddd; 11350 border-radius: 8px; 11351 } 11352 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}async fetchData(){this.loading=!0;try{const e=await window.csClient.getStaleFeatures();this.staleFeatures=e.stale_features}catch(e){console.error(e),Vc("Some errors occurred. Please refresh the page or try again later.")}finally{this.loading=!1}}_handleSort(e){this._sortColumn===e?this._sortDirection="asc"===this._sortDirection?"desc":"asc":(this._sortColumn=e,this._sortDirection="asc")}_renderSortIndicator(e){return this._sortColumn!==e?"":"asc"===this._sortDirection?"â²":"â¼"}renderSkeletons(){return W` 11353 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 11354 <section id="metadata"> 11355 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 11356 <p> 11357 <sl-skeleton effect="sheen"></sl-skeleton> 11358 <sl-skeleton effect="sheen"></sl-skeleton> 11359 <sl-skeleton effect="sheen"></sl-skeleton> 11360 <sl-skeleton effect="sheen"></sl-skeleton> 11361 <sl-skeleton effect="sheen"></sl-skeleton> 11362 <sl-skeleton effect="sheen"></sl-skeleton> 11363 <sl-skeleton effect="sheen"></sl-skeleton> 11364 <sl-skeleton effect="sheen"></sl-skeleton> 11365 </p> 11366 </section> 11367 `}renderSubheader(){return W` 11368 <div id="subheader"> 11369 <h2 id="breadcrumbs">Stale features</h2> 11370 </div> 11371 `}renderStaleFeatures(){if(0===this.staleFeatures.length)return W` 11372 <div class="no-features"> 11373 <p>No stale features found. Great job!</p> 11374 </div> 11375 `;const e=[...this.staleFeatures].sort((e,t)=>
11375{const i=e[this._sortColumn],r=t[this._sortColumn];let s=0;return"string"==typeof i&&"string"==typeof r?s=i.localeCompare(r):"number"==typeof i&&"number"==typeof r?s=i-r:"accurate_as_of"===this._sortColumn&&(s=new Date(i).getTime()-new Date(r).getTime()),"asc"===this._sortDirection?s:-s});return W` 11376 <div class="stale-features-table-container"> 11377 <table> 11378 <thead> 11379 <tr> 11380 <th class="sortable" @click=${()=>this._handleSort("name")}> 11381 Name 11382 <span class="sort-indicator" 11383 >${this._renderSortIndicator("name")}</span 11384 > 11385 </th> 11386 <th>Owner Emails</th> 11387 <th 11388 class="sortable" 11389 @click=${()=>this._handleSort("milestone_field")} 11390 > 11391 Milestone Field 11392 <span class="sort-indicator" 11393 >${this._renderSortIndicator("milestone_field")}</span 11394 > 11395 </th> 11396 <th 11397 class="sortable" 11398 @click=${()=>this._handleSort("milestone")} 11399 > 11400 Milestone 11401 <span class="sort-indicator" 11402 >${this._renderSortIndicator("milestone")}</span 11403 > 11404 </th> 11405 <th 11406 class="sortable" 11407 @click=${()=>this._handleSort("outstanding_notifications")} 11408 > 11409 Notifications 11410 <span class="sort-indicator" 11411 >${this._renderSortIndicator("outstanding_notifications")}</span 11412 > 11413 </th> 11414 <th 11415 class="sortable" 11416 @click=${()=>this._handleSort("accurate_as_of")} 11417 > 11418 Last Updated 11419 <span class="sort-indicator" 11420 >${this._renderSortIndicator("accurate_as_of")}</span 11421 > 11422 </th> 11423 </tr> 11424 </thead> 11425 <tbody> 11426 ${e.map(e=>W` 11427 <tr> 11428 <td><a href="/feature/${e.id}">${e.name}</a></td> 11429 <td>${e.owner_emails.join(", ")}</td> 11430 <td>${e.milestone_field}</td> 11431 <td>${e.milestone}</td> 11432 <td>${e.outstanding_notifications}</td> 11433 <td> 11434 ${new Date(e.accurate_as_of).toLocaleDateString()} 11435 </td> 11436 </tr> 11437 `)} 11438 </tbody> 11439 </table> 11440 </div> 11441 `}render(){return W` 11442 ${this.renderSubheader()} 11443 ${this.loading?this.renderSkeletons():this.renderStaleFeatures()} 11444 `}};cb([He()],hb.prototype,"staleFeatures",void 0),cb([He()],hb.prototype,"loading",void 0),cb([He()],hb.prototype,"_sortColumn",void 0),cb([He()],hb.prototype,"_sortDirection",void 0),hb=cb([Ue("chromedash-stale-features-page")],hb);var ub=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class pb extends ce{constructor(){super(...arguments),this.type="",this.view="",this.props=[],this.selectedBucketId="1",this.showAllHistoricalData=!1}static get styles(){return[...lo,c` 11445 :host { 11446 display: block; 11447 flex: 1; 11448 width: var(--max-content-width); 11449 } 11450 11451 :host label { 11452 margin-left: 8px; 11453 cursor: pointer; 11454 } 11455 11456 #chart { 11457 margin-top: 15px; 11458 width: 100%; 11459 height: 450px; 11460 background: var(--table-alternate-background); 11461 border-radius: var(--border-radius); 11462 } 11463 11464 #http-archive-data { 11465 border: 0; 11466 width: 100%; 11467 height: 870px; 11468 } 11469 11470 .header_title { 11471 margin: 32px 0 15px 0; 11472 font-weight: 500; 11473 color: #000; 11474 } 11475 11476 .description { 11477 margin: 15px 0; 11478 } 11479 11480 .callout { 11481 padding: var(--content-padding); 11482 margin-top: var(--content-padding); 11483 background-color: var(--sl-color-warning-100); 11484 border-color: rgba(27, 31, 35, 0.15); 11485 line-height: 1.4; 11486 } 11487 11488 #bigquery:empty { 11489 display: none; 11490 } 11491 11492 #bigquery {
11493 font-family: 'Courier New', Courier, monospace; 11494 font-weight: 600; 11495 padding: 15px; 11496 margin-bottom: 100px; 11497 background: var(--table-alternate-background); 11498 display: inline-block; 11499 } 11500 11501 #datalist-input { 11502 width: 20em; 11503 border-radius: 10px; 11504 height: 25px; 11505 padding-left: 10px; 11506 font-size: 15px; 11507 } 11508 11509 sl-progress-bar { 11510 --height: 4px; 11511 --track-color: var(--barchart-foreground); 11512 --indicator-color: var(--barchart-background); 11513 } 11514 `]}updated(){window.google.charts.setOnLoadCallback(this._updateTimeline.bind(this))}updateSelectedBucketId(e){const t=e.currentTarget.value,i=this.props.find(e=>e[1]===t);i?this.selectedBucketId=i[0].toString():t&&Vc("No matching features. Please try again!")}toggleShowAllHistoricalData(){this.showAllHistoricalData=!this.showAllHistoricalData}firstUpdated(){window.google.charts.load("current",{packages:["corechart"]})}drawVisualization(e,t,i){const r=new google.visualization.DataTable;r.addColumn("date","Date"),r.addColumn("number","Percentage"),r.addColumn({type:"string",role:"annotation"}),r.addColumn({type:"string",role:"annotationText"});const s=[];for(let t,i=0;t=e[i];++i){const e=t.date.split("-"),i=new Date;i.setFullYear(parseInt(e[0]),parseInt(e[1])-1,parseInt(e[2]));const r=[i,parseFloat((100*t.day_percentage).toFixed(6))];"2017-10-27"===t.date?r.push("A","Modernized metrics"):r.push(null,null),s.push(r)}r.addRows(s);const o=window.google.visualization.data.group(r,[{column:0,modifier:function(e){const t=e.getMonth(),i=e.getFullYear();return new Date(i,t)},type:"date"}],[{column:1,aggregation:window.google.visualization.data.avg,type:"number",label:"Monthly Average"}],[{column:2,type:"string"}]);new window.google.visualization.NumberFormat({fractionDigits:6}).format(o,1);let a=o;if(!i){const e=(new Date).getFullYear()-2;a=new window.google.visualization.DataView(o),a.setRows(a.getFilteredRows([{column:0,minValue:new Date(e,0,1)}]))}const n=this.shadowRoot.querySelector("#chart");new window.google.visualization.LineChart(n).draw(a,{backgroundColor:"white",legend:{position:"none"},curveType:"function",vAxis:{title:"% page loads",minValue:0},hAxis:{title:"Date",format:"MMM d, YYYY"},width:"100%",height:"100%",pointSize:4,series:{0:{color:"#4580c0"}},trendlines:{0:{type:"linear",opacity:.5,color:"#bdd6ed",pointsVisible:!1}}})}_updateTimeline(){if("1"===this.selectedBucketId||!this.props.length)return;let e="/data/timeline/"+this.type+this.view+"?bucket_id="+this.selectedBucketId;this._renderHTTPArchiveData();const t=this.shadowRoot.querySelector("#chart");t.innerHTML.includes("sl-progress-bar")||t.insertAdjacentHTML("afterbegin","<sl-progress-bar indeterminate></sl-progress-bar>");fetch(e,{credentials:"omit"}).then(e=>e.json()).then(e=>{this.drawVisualization(e,this.selectedBucketId,this.showAllHistoricalData)});const i="/metrics/"+this.type+"/timeline/"+this.view+"/"+this.selectedBucketId;history.pushState&&location.pathname!=i&&history.pushState({id:this.selectedBucketId},"",i)}_renderHTTPArchiveData(){const e=this.props.find(e=>e[0]===parseInt(this.selectedBucketId));if(e){let t=e[1];this.shadowRoot.querySelector("#datalist-input").value=t,"css"==this.type&&(t="CSSProperty"+t.split("-").map(fb).join(""));const i=`https://datastudio.google.com/embed/reporting/${"1M8kXOqPkwYNKjJhtag_nvDNJCpvmw_ri"}/page/tc5b?params=%7B"df3":"include%25EE%2580%25800%25EE%2580%2580IN%25EE%2580%2580${t}"%7D`;this.shadowRoot.querySelector("#http-archive-data").src=i;this.shadowRoot.querySelector("#bigquery").textContent=`#standardSQL\nSELECT date, client, pct_urls, sample_urls\nFROM \`httparchive.blink_features.usage\`\nWHERE feature = '${t}'\nAND date = (SELECT MAX(date) FROM \`httparchive.blink_features.usage\`)\nORDER BY date DESC, client`}}render(){const e=W` 11515 <p class="callout"> 11516 <b>Note</b>: on 2017-10-26 the underlying metrics were switched over to 11517 a newer collection system which is 11518 <a 11519 href="https://groups.google.com/a/chromium.org/forum/#!msg/blink-api-owners-discuss/IpIkbz0qtrM/HUCfSMv2AQAJ" 11520 target="_blank" 11521 >more accurate</a 11522 >. This is also the reason for the abrupt spike around 2017-10-26. 11523 </p> 11524 `;return W` 11525 <input 11526 id="datalist-input" 11527 type="search" 11528 list="features" 11529 autocomplete="off" 11530 placeholder="Select or search a property" 11531 @change="${this.updateSelectedBucketId}" 11532 /> 11533 <datalist id="features"> 11534 ${this.props.map(e=>W` 11535 <option 11536 value="${e[1]}" 11537 dataset-debug-bucket-id="${e[0]}" 11538 ></option> 11539 `)} 11540 </datalist> 11541 <label> 11542 Show all historical data: 11543 <input 11544 type="checkbox" 11545 ?checked="${this.showAllHistoricalData}" 11546 @change="${this.toggleShowAllHistoricalData}" 11547 /> 11548 </label> 11549 <h3 id="usage" class="header_title"> 11550 Percentage of page loads over time 11551 </h3> 11552 <p class="description"> 11553 The chart below shows the percentage of page loads (in Chrome) that use 11554 this feature at least once. Data is across all channels and platforms. 11555 Newly added use counters that are not on Chrome stable yet only have 11556 data from the Chrome channels they're on. 11557 </p> 11558 <div id="chart"></div> 11559 ${this.showAllHistoricalData?e:Y} 11560 <h3 id="httparchive" class="header_title"> 11561 Adoption of the feature on top sites 11562 </h3> 11563 <p class="description"> 11564 The chart below shows the adoption of the feature by the top URLs on the 11565 internet. Data from 11566 <a href="https://httparchive.org/" target="_blank">HTTP Archive</a>. 11567 </p> 11568 <iframe id="http-archive-data"></iframe> 11569 <p class="callout"> 11570 <b>Note</b>: The jump around July and December 2018 are because the 11571 corpus of URLs crawled by HTTP Archive increased. These jumps have no 11572 correlation with the jump in the top graph. See the 11573 <a 11574 href="https://discuss.httparchive.org/t/changes-to-the-http-archive-corpus/1539" 11575 target="_blank" 11576 >announcement</a 11577 > 11578 for more details. 11579 </p> 11580 <p class="description"> 11581 Copy and run this command in 11582 <a href="https://bigquery.cloud.google.com" target="_blank">BigQuery</a> 11583 to produce similar results: 11584 </p> 11585 <pre id="bigquery"></pre> 11586 `}}function fb(e){const t=e.split("");return t[0]=t[0].toUpperCase(),t.join("")}ub([Ve({type:String})],pb.prototype,"type",void 0),ub([Ve({type:String})],pb.prototype,"view",void 0),ub([Ve({attribute:!1})],pb.prototype,"props",void 0),ub([Ve({attribute:!1})],pb.prototype,"selectedBucketId",void 0),ub([Ve({attribute:!1})],pb.prototype,"showAllHistoricalData",void 0),customElements.define("chromedash-timeline",pb);var mb=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class gb extends ce{constructor(){super(...arguments),this.type="",this.view="",this.props=[],this.selectedBucketId="1"}static get styles(){return[...lo,c``]}connectedCallback(){super.connectedCallback();let e=`/data/blink/${this.type}props`;fetch(e,{credentials:"omit"}).then(e=>e.json()).then(e=>{this.props=e}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}renderSubheader(){const e=gh[this.type+this.view];return W` 11587 <div id="subheader"> 11588 <h2 id="breadcrumbs"> 11589 <a href="/metrics/${this.type}/${this.view}"> 11590 <sl-icon name="arrow-left"></sl-icon>
11590 </a 11591 >${e} > timeline 11592 </h2> 11593 </div> 11594 `}renderDataPanel(){return W` 11595 <chromedash-timeline 11596 .type=${this.type} 11597 .view=${this.view} 11598 .props=${this.props} 11599 .selectedBucketId=${this.selectedBucketId} 11600 > 11601 </chromedash-timeline> 11602 `}render(){return W` ${this.renderSubheader()} ${this.renderDataPanel()} `}}mb([Ve({type:String})],gb.prototype,"type",void 0),mb([Ve({type:String})],gb.prototype,"view",void 0),mb([Ve({attribute:!1})],gb.prototype,"props",void 0),mb([Ve({attribute:!1})],gb.prototype,"selectedBucketId",void 0),customElements.define("chromedash-timeline-page",gb);var bb=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let vb=class extends ce{constructor(){super(...arguments),this.msg="",this.open=!1,this.actionLabel="",this.currentTimeout=null,this.waitingForTransition=!1}static get styles(){return[...lo,c` 11603 :host { 11604 display: flex; 11605 justify-content: space-between; 11606 position: fixed; 11607 background: var(--toast-background); 11608 color: var(--toast-color); 11609 min-height: 48px; 11610 min-width: 288px; 11611 padding: var(--content-padding); 11612 box-sizing: border-box;
11613 box-shadow: var(--card-box-shadow); 11614 border-radius: var(--border-radius); 11615 margin: var(--content-padding); 11616 cursor: default; 11617 transition: 11618 transform 0.3s, 11619 opacity 0.3s; 11620 opacity: 0; 11621 will-change: opacity, transform; 11622 -webkit-transform: translateY(100px); 11623 transform: translateY(100px); 11624 z-index: 3; 11625 bottom: 0; 11626 } 11627 11628 :host([open]) { 11629 opacity: 1; 11630 transform: translateY(-32px); 11631 } 11632 11633 #action { 11634 text-transform: uppercase; 11635 text-decoration: none; 11636 color: var(--toast-action-color); 11637 font-weight: bold; 11638 } 11639 11640 #msg { 11641 margin-right: var(--content-padding); 11642 } 11643 `]}showMessage(e,t,i,r){if(!this.waitingForTransition){if(this.msg=e,this.actionLabel=t,i){const e=this.shadowRoot.querySelector("#action");e&&e.addEventListener("click",e=>{e.preventDefault(),i()},{once:!0})}this.open?(this.open=!1,this.waitingForTransition=!0,null!==this.currentTimeout&&clearTimeout(this.currentTimeout),this.addEventListener("transitionend",()=>{this.show(r),this.waitingForTransition=!1},{once:!0})):this.show(r)}}show(e){const t=e||7e3;t>0&&(this.currentTimeout=window.setTimeout(()=>{this.open=!1},t)),this.open=!0}render(){return W` 11644 <span id="msg">${this.msg}</span> 11645 <a href="#" id="action">${this.actionLabel}</a> 11646 `}};bb([Ve({type:String})],vb.prototype,"msg",void 0),bb([Ve({type:Boolean,reflect:!0})],vb.prototype,"open",void 0),bb([Ve({attribute:!1})],vb.prototype,"actionLabel",void 0),bb([He()],vb.prototype,"currentTimeout",void 0),bb([Ve({type:Boolean})],vb.prototype,"waitingForTransition",void 0),vb=bb([Ue("chromedash-toast")],vb);var yb=c` 11647 :host { 11648 display: block; 11649 outline: 0; 11650 z-index: 0; 11651 } 11652 11653 :host(:focus) { 11654 outline: none; 11655 } 11656 11657 slot:not([name])::slotted(sl-icon) { 11658 margin-inline-end: var(--sl-spacing-x-small); 11659 } 11660 11661 .tree-item { 11662 position: relative; 11663 display: flex; 11664 align-items: stretch; 11665 flex-direction: column; 11666 color: var(--sl-color-neutral-700); 11667 cursor: pointer; 11668 user-select: none; 11669 -webkit-user-select: none; 11670 } 11671 11672 .tree-item__checkbox { 11673 pointer-events: none; 11674 } 11675 11676 .tree-item__expand-button, 11677 .tree-item__checkbox, 11678 .tree-item__label { 11679 font-family: var(--sl-font-sans); 11680 font-size: var(--sl-font-size-medium); 11681 font-weight: var(--sl-font-weight-normal); 11682 line-height: var(--sl-line-height-dense); 11683 letter-spacing: var(--sl-letter-spacing-normal); 11684 } 11685 11686 .tree-item__checkbox::part(base) { 11687 display: flex; 11688 align-items: center; 11689 } 11690 11691 .tree-item__indentation { 11692 display: block; 11693 width: 1em; 11694 flex-shrink: 0; 11695 } 11696 11697 .tree-item__expand-button { 11698 display: flex; 11699 align-items: center; 11700 justify-content: center; 11701 box-sizing: content-box; 11702 color: var(--sl-color-neutral-500); 11703 padding: var(--sl-spacing-x-small); 11704 width: 1rem; 11705 height: 1rem; 11706 flex-shrink: 0; 11707 cursor: pointer; 11708 } 11709 11710 .tree-item__expand-button { 11711 transition: var(--sl-transition-medium) rotate ease; 11712 } 11713 11714 .tree-item--expanded .tree-item__expand-button { 11715 rotate: 90deg; 11716 } 11717 11718 .tree-item--expanded.tree-item--rtl .tree-item__expand-button { 11719 rotate: -90deg; 11720 } 11721 11722 .tree-item--expanded slot[name='expand-icon'], 11723 .tree-item:not(.tree-item--expanded) slot[name='collapse-icon'] { 11724 display: none; 11725 } 11726 11727 .tree-item:not(.tree-item--has-expand-button) .tree-item__expand-icon-slot { 11728 display: none; 11729 } 11730 11731 .tree-item__expand-button--visible { 11732 cursor: pointer; 11733 } 11734 11735 .tree-item__item { 11736 display: flex; 11737 align-items: center; 11738 border-inline-start: solid 3px transparent; 11739 } 11740 11741 .tree-item--disabled .tree-item__item { 11742 opacity: 0.5; 11743 outline: none; 11744 cursor: not-allowed; 11745 } 11746 11747 :host(:focus-visible) .tree-item__item { 11748 outline: var(--sl-focus-ring); 11749 outline-offset: var(--sl-focus-ring-offset); 11750 z-index: 2; 11751 } 11752 11753 :host(:not([aria-disabled='true'])) .tree-item--selected .tree-item__item { 11754 background-color: var(--sl-color-neutral-100); 11755 border-inline-start-color: var(--sl-color-primary-600); 11756 } 11757 11758 :host(:not([aria-disabled='true'])) .tree-item__expand-button { 11759 color: var(--sl-color-neutral-600); 11760 } 11761 11762 .tree-item__label { 11763 display: flex; 11764 align-items: center; 11765 transition: var(--sl-transition-fast) color; 11766 } 11767 11768 .tree-item__children { 11769 display: block; 11770 font-size: calc(1em + var(--indent-size, var(--sl-spacing-medium))); 11771 } 11772 11773 /* Indentation lines */ 11774 .tree-item__children { 11775 position: relative; 11776 } 11777 11778 .tree-item__children::before { 11779 content: ''; 11780 position: absolute; 11781 top: var(--indent-guide-offset); 11782 bottom: var(--indent-guide-offset);
11783 left: calc(1em - (var(--indent-guide-width) / 2) - 1px); 11784 border-inline-end: var(--indent-guide-width) var(--indent-guide-style) var(--indent-guide-color); 11785 z-index: 1; 11786 } 11787 11788 .tree-item--rtl .tree-item__children::before { 11789 left: auto; 11790 right: 1em; 11791 } 11792 11793 @media (forced-colors: active) { 11794 :host(:not([aria-disabled='true'])) .tree-item--selected .tree-item__item { 11795 outline: dashed 1px SelectedItem; 11796 } 11797 } 11798` 11799/** 11800 * @license 11801 * Copyright 2021 Google LLC 11802 * SPDX-License-Identifier: BSD-3-Clause 11803 */;function _b(e,t,i){return e?t(e):i?.(e)}var wb=class e extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.indeterminate=!1,this.isLeaf=!1,this.loading=!1,this.selectable=!1,this.expanded=!1,this.selected=!1,this.disabled=!1,this.lazy=!1}static isTreeItem(e){return e instanceof Element&&"treeitem"===e.getAttribute("role")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","treeitem"),this.setAttribute("tabindex","-1"),this.isNestedItem()&&(this.slot="children")}firstUpdated(){this.childrenContainer.hidden=!this.expanded,this.childrenContainer.style.height=this.expanded?"auto":"0",this.isLeaf=!this.lazy&&0===this.getChildrenItems().length,this.handleExpandedChange()}async animateCollapse(){this.emit("sl-collapse"),await xi(this.childrenContainer);const{keyframes:e,options:t}=vi(this,"tree-item.collapse",{dir:this.localize.dir()});await _i(this.childrenContainer,$i(e,this.childrenContainer.scrollHeight),t),this.childrenContainer.hidden=!0,this.emit("sl-after-collapse")}isNestedItem(){const t=this.parentElement;return!!t&&e.isTreeItem(t)}handleChildrenSlotChange(){this.loading=!1,this.isLeaf=!this.lazy&&0===this.getChildrenItems().length}willUpdate(e){e.has("selected")&&!e.has("indeterminate")&&(this.indeterminate=!1)}async animateExpand(){this.emit("sl-expand"),await xi(this.childrenContainer),this.childrenContainer.hidden=!1;const{keyframes:e,options:t}=vi(this,"tree-item.expand",{dir:this.localize.dir()});await _i(this.childrenContainer,$i(e,this.childrenContainer.scrollHeight),t),this.childrenContainer.style.height="auto",this.emit("sl-after-expand")}handleLoadingChange(){this.setAttribute("aria-busy",this.loading?"true":"false"),this.loading||this.animateExpand()}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleExpandedChange(){this.isLeaf?this.removeAttribute("aria-expanded"):this.setAttribute("aria-expanded",this.expanded?"true":"false")}handleExpandAnimation(){this.expanded?this.lazy?(this.loading=!0,this.emit("sl-lazy-load")):this.animateExpand():this.animateCollapse()}handleLazyChange(){this.emit("sl-lazy-change")}getChildrenItems({includeDisabled:t=!0}={}){return this.childrenSlot?[...this.childrenSlot.assignedElements({flatten:!0})].filter(i=>e.isTreeItem(i)&&(t||!i.disabled)):[]}render(){const e="rtl"===this.localize.dir(),t=!this.loading&&(!this.isLeaf||this.lazy);return W` 11804 <div 11805 part="base" 11806 class="${Mt({"tree-item":!0,"tree-item--expanded":this.expanded,"tree-item--selected":this.selected,"tree-item--disabled":this.disabled,"tree-item--leaf":this.isLeaf,"tree-item--has-expand-button":t,"tree-item--rtl":"rtl"===this.localize.dir()})}" 11807 > 11808 <div 11809 class="tree-item__item" 11810 part=" 11811 item 11812 ${this.disabled?"item--disabled":""} 11813 ${this.expanded?"item--expanded":""} 11814 ${this.indeterminate?"item--indeterminate":""} 11815 ${this.selected?"item--selected":""} 11816 " 11817 > 11818 <div class="tree-item__indentation" part="indentation"></div> 11819 11820 <div 11821 part="expand-button" 11822 class=${Mt({"tree-item__expand-button":!0,"tree-item__expand-button--visible":t})} 11823 aria-hidden="true" 11824 > 11825 ${_b(this.loading,()=>W` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `)} 11826 <slot class="tree-item__expand-icon-slot" name="expand-icon"> 11827 <sl-icon library="system" name=${e?"chevron-left":"chevron-right"}></sl-icon> 11828 </slot> 11829 <slot class="tree-item__expand-icon-slot" name="collapse-icon"> 11830 <sl-icon library="system" name=${e?"chevron-left":"chevron-right"}></sl-icon> 11831 </slot> 11832 </div> 11833 11834 ${_b(this.selectable,()=>W` 11835 <sl-checkbox 11836 part="checkbox" 11837 exportparts=" 11838 base:checkbox__base, 11839 control:checkbox__control, 11840 control--checked:checkbox__control--checked, 11841 control--indeterminate:checkbox__control--indeterminate, 11842 checked-icon:checkbox__checked-icon, 11843 indeterminate-icon:checkbox__indeterminate-icon, 11844 label:checkbox__label 11845 " 11846 class="tree-item__checkbox" 11847 ?disabled="${this.disabled}" 11848 ?checked="${Qt(this.selected)}" 11849 ?indeterminate="${this.indeterminate}" 11850 tabindex="-1" 11851 ></sl-checkbox> 11852 `)} 11853 11854 <slot class="tree-item__label" part="label"></slot> 11855 </div> 11856 11857 <div class="tree-item__children" part="children" role="group"> 11858 <slot name="children" @slotchange="${this.handleChildrenSlotChange}"></slot> 11859 </div> 11860 </div> 11861 `}};wb.styles=[Se,yb],wb.dependencies={"sl-checkbox":Xt,"sl-icon":Pt,"sl-spinner":Je},Ne([He()],wb.prototype,"indeterminate",2),Ne([He()],wb.prototype,"isLeaf",2),Ne([He()],wb.prototype,"loading",2),Ne([He()],wb.prototype,"selectable",2),Ne([
11861Ve({type:Boolean,reflect:!0})],wb.prototype,"expanded",2),Ne([Ve({type:Boolean,reflect:!0})],wb.prototype,"selected",2),Ne([Ve({type:Boolean,reflect:!0})],wb.prototype,"disabled",2),Ne([Ve({type:Boolean,reflect:!0})],wb.prototype,"lazy",2),Ne([Ye("slot:not([name])")],wb.prototype,"defaultSlot",2),Ne([Ye("slot[name=children]")],wb.prototype,"childrenSlot",2),Ne([Ye(".tree-item__item")],wb.prototype,"itemElement",2),Ne([Ye(".tree-item__children")],wb.prototype,"childrenContainer",2),Ne([Ye(".tree-item__expand-button slot")],wb.prototype,"expandButtonSlot",2),Ne([yt("loading",{waitUntilFirstUpdate:!0})],wb.prototype,"handleLoadingChange",1),Ne([yt("disabled")],wb.prototype,"handleDisabledChange",1),Ne([yt("selected")],wb.prototype,"handleSelectedChange",1),Ne([yt("expanded",{waitUntilFirstUpdate:!0})],wb.prototype,"handleExpandedChange",1),Ne([yt("expanded",{waitUntilFirstUpdate:!0})],wb.prototype,"handleExpandAnimation",1),Ne([yt("lazy",{waitUntilFirstUpdate:!0})],wb.prototype,"handleLazyChange",1);var kb=wb;bi("tree-item.expand",{keyframes:[{height:"0",opacity:"0",overflow:"hidden"},{height:"auto",opacity:"1",overflow:"hidden"}],options:{duration:250,easing:"cubic-bezier(0.4, 0.0, 0.2, 1)"}}),bi("tree-item.collapse",{keyframes:[{height:"auto",opacity:"1",overflow:"hidden"},{height:"0",opacity:"0",overflow:"hidden"}],options:{duration:200,easing:"cubic-bezier(0.4, 0.0, 0.2, 1)"}}),kb.define("sl-tree-item");var xb=c` 11862 :host { 11863 /* 11864 * These are actually used by tree item, but we define them here so they can more easily be set and all tree items 11865 * stay consistent. 11866 */ 11867 --indent-guide-color: var(--sl-color-neutral-200); 11868 --indent-guide-offset: 0; 11869 --indent-guide-style: solid; 11870 --indent-guide-width: 0; 11871 --indent-size: var(--sl-spacing-large); 11872 11873 display: block; 11874 11875 /* 11876 * Tree item indentation uses the "em" unit to increment its width on each level, so setting the font size to zero 11877 * here removes the indentation for all the nodes on the first level. 11878 */ 11879 font-size: 0; 11880 } 11881`;function $b(e,t,i){const r=e=>Object.is(e,-0)?0:e;return r(e<t?t:e>i?i:e)}function Sb(e,t=!1){function i(e){const t=e.getChildrenItems({includeDisabled:!1});if(t.length){const i=t.every(e=>e.selected),r=t.every(e=>!e.selected&&!e.indeterminate);e.selected=i,e.indeterminate=!i&&!r}}!function e(r){for(const i of r.getChildrenItems())i.selected=t?r.selected||i.selected:!i.disabled&&r.selected,e(i);t&&i(r)}(e),function e(t){const r=t.parentElement;kb.isTreeItem(r)&&(i(r),e(r))}(e)}var Cb=class extends Xe{constructor(){super(),this.selection="single",this.clickTarget=null,this.localize=new $e(this),this.initTreeItem=e=>{e.selectable="multiple"===this.selection,["expand","collapse"].filter(e=>!!this.querySelector(`[slot="${e}-icon"]`)).forEach(t=>{const i=e.querySelector(`[slot="${t}-icon"]`),r=this.getExpandButtonIcon(t);r&&(null===i?e.append(r):i.hasAttribute("data-default")&&i.replaceWith(r))})},this.handleTreeChanged=e=>{for(const t of e){const e=[...t.addedNodes].filter(kb.isTreeItem),i=[...t.removedNodes].filter(kb.isTreeItem);e.forEach(this.initTreeItem),this.lastFocusedItem&&i.includes(this.lastFocusedItem)&&(this.lastFocusedItem=null)}},this.handleFocusOut=e=>{const t=e.relatedTarget;t&&this.contains(t)||(this.tabIndex=0)},this.handleFocusIn=e=>{const t=e.target;e.target===this&&this.focusItem(this.lastFocusedItem||this.getAllTreeItems()[0]),kb.isTreeItem(t)&&!t.disabled&&(this.lastFocusedItem&&(this.lastFocusedItem.tabIndex=-1),this.lastFocusedItem=t,this.tabIndex=-1,t.tabIndex=0)},this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),this.addEventListener("sl-lazy-change",this.handleSlotChange)}async connectedCallback(){super.connectedCallback(),this.setAttribute("role","tree"),this.setAttribute("tabindex","0"),await this.updateComplete,this.mutationObserver=new MutationObserver(this.handleTreeChanged),this.mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this.mutationObserver)||e.disconnect()}getExpandButtonIcon(e){const t=("expand"===e?this.expandedIconSlot:this.collapsedIconSlot).assignedElements({flatten:!0})[0];if(t){const i=t.cloneNode(!0);
11881return[i,...i.querySelectorAll("[id]")].forEach(e=>e.removeAttribute("id")),i.setAttribute("data-default",""),i.slot=`${e}-icon`,i}return null}selectItem(e){const t=[...this.selectedItems];if("multiple"===this.selection)e.selected=!e.selected,e.lazy&&(e.expanded=!0),Sb(e);else if("single"===this.selection||e.isLeaf){const t=this.getAllTreeItems();for(const i of t)i.selected=i===e}else"leaf"===this.selection&&(e.expanded=!e.expanded);const i=this.selectedItems;(t.length!==i.length||i.some(e=>!t.includes(e)))&&Promise.all(i.map(e=>e.updateComplete)).then(()=>{this.emit("sl-selection-change",{detail:{selection:i}})})}getAllTreeItems(){return[...this.querySelectorAll("sl-tree-item")]}focusItem(e){null==e||e.focus()}handleKeyDown(e){if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Home","End","Enter"," "].includes(e.key))return;if(e.composedPath().some(e=>{var t;return["input","textarea"].includes(null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase())}))return;const t=this.getFocusableItems(),i="ltr"===this.localize.dir(),r="rtl"===this.localize.dir();if(t.length>0){e.preventDefault();const s=t.findIndex(e=>e.matches(":focus")),o=t[s],a=e=>{const i=t[$b(e,0,t.length-1)];this.focusItem(i)},n=e=>{o.expanded=e};"ArrowDown"===e.key?a(s+1):"ArrowUp"===e.key?a(s-1):i&&"ArrowRight"===e.key||r&&"ArrowLeft"===e.key?!o||o.disabled||o.expanded||o.isLeaf&&!o.lazy?a(s+1):n(!0):i&&"ArrowLeft"===e.key||r&&"ArrowRight"===e.key?!o||o.disabled||o.isLeaf||!o.expanded?a(s-1):n(!1):"Home"===e.key?a(0):"End"===e.key?a(t.length-1):"Enter"!==e.key&&" "!==e.key||o.disabled||this.selectItem(o)}}handleClick(e){const t=e.target,i=t.closest("sl-tree-item"),r=e.composedPath().some(e=>{var t;return null==(t=null==e?void 0:e.classList)?void 0:t.contains("tree-item__expand-button")});i&&!i.disabled&&t===this.clickTarget&&(r?i.expanded=!i.expanded:this.selectItem(i))}handleMouseDown(e){this.clickTarget=e.target}
11881handleSlotChange(){this.getAllTreeItems().forEach(this.initTreeItem)}async handleSelectionChange(){const e="multiple"===this.selection,t=this.getAllTreeItems();this.setAttribute("aria-multiselectable",e?"true":"false");for(const i of t)i.selectable=e;e&&(await this.updateComplete,[...this.querySelectorAll(":scope > sl-tree-item")].forEach(e=>Sb(e,!0)))}get selectedItems(){return this.getAllTreeItems().filter(e=>e.selected)}getFocusableItems(){const e=this.getAllTreeItems(),t=new Set;return e.filter(e=>{var i;if(e.disabled)return!1;const r=null==(i=e.parentElement)?void 0:i.closest("[role=treeitem]");return r&&(!r.expanded||r.loading||t.has(r))&&t.add(e),!t.has(e)})}render(){return W` 11882 <div 11883 part="base" 11884 class="tree" 11885 @click=${this.handleClick} 11886 @keydown=${this.handleKeyDown} 11887 @mousedown=${this.handleMouseDown} 11888 > 11889 <slot @slotchange=${this.handleSlotChange}></slot> 11890 <span hidden aria-hidden="true"><slot name="expand-icon"></slot></span> 11891 <span hidden aria-hidden="true"><slot name="collapse-icon"></slot></span> 11892 </div> 11893 `}};Cb.styles=[Se,xb],Ne([Ye("slot:not([name])")],Cb.prototype,"defaultSlot",2),Ne([Ye("slot[name=expand-icon]")],Cb.prototype,"expandedIconSlot",2),Ne([Ye("slot[name=collapse-icon]")],Cb.prototype,"collapsedIconSlot",2),Ne([Ve()],Cb.prototype,"selection",2),Ne([yt("selection")],Cb.prototype,"handleSelectionChange",1),Cb.define("sl-tree");var Eb=c` 11894 :host(:not(:focus-within)) { 11895 position: absolute !important; 11896 width: 1px !important; 11897 height: 1px !important; 11898 clip: rect(0 0 0 0) !important; 11899 clip-path: inset(50%) !important; 11900 border: none !important; 11901 overflow: hidden !important; 11902 white-space: nowrap !important; 11903 padding: 0 !important; 11904 } 11905`,Ib=class extends Xe{render(){return W` <slot></slot> `}};Ib.styles=[Se,Eb],Ib.define("sl-visually-hidden");var Tb=c` 11906 :host { 11907 --padding: 0; 11908 11909 display: none; 11910 } 11911 11912 :host([active]) { 11913 display: block; 11914 } 11915 11916 .tab-panel { 11917 display: block; 11918 padding: var(--padding); 11919 } 11920`,Ab=0,Rb=class extends Xe{constructor(){super(...arguments),this.attrId=++Ab,this.componentId=`sl-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return W` 11921 <slot 11922 part="base" 11923 class=${Mt({"tab-panel":!0,"tab-panel--active":this.active})} 11924 ></slot> 11925 `}};Rb.styles=[Se,Tb],Ne([Ve({reflect:!0})],Rb.prototype,"name",2),Ne([Ve({type:Boolean,reflect:!0})],Rb.prototype,"active",2),Ne([yt("active")],Rb.prototype,"handleActiveChange",1),Rb.define("sl-tab-panel");var Pb=c` 11926 :host { 11927 display: inline-block; 11928 } 11929 11930 .tab { 11931 display: inline-flex; 11932 align-items: center; 11933 font-family: var(--sl-font-sans); 11934 font-size: var(--sl-font-size-small); 11935 font-weight: var(--sl-font-weight-semibold); 11936 border-radius: var(--sl-border-radius-medium); 11937 color: var(--sl-color-neutral-600); 11938 padding: var(--sl-spacing-medium) var(--sl-spacing-large); 11939 white-space: nowrap; 11940 user-select: none; 11941 -webkit-user-select: none; 11942 cursor: pointer; 11943 transition: 11944 var(--transition-speed) box-shadow, 11945 var(--transition-speed) color; 11946 } 11947 11948 .tab:hover:not(.tab--disabled) { 11949 color: var(--sl-color-primary-600); 11950 } 11951 11952 :host(:focus) { 11953 outline: transparent; 11954 } 11955 11956 :host(:focus-visible) { 11957 color: var(--sl-color-primary-600); 11958 outline: var(--sl-focus-ring); 11959 outline-offset: calc(-1 * var(--sl-focus-ring-width) - var(--sl-focus-ring-offset)); 11960 } 11961 11962 .tab.tab--active:not(.tab--disabled) { 11963 color: var(--sl-color-primary-600); 11964 } 11965 11966 .tab.tab--closable { 11967 padding-inline-end: var(--sl-spacing-small); 11968 } 11969 11970 .tab.tab--disabled { 11971 opacity: 0.5; 11972 cursor: not-allowed; 11973 } 11974 11975 .tab__close-button { 11976 font-size: var(--sl-font-size-small); 11977 margin-inline-start: var(--sl-spacing-small); 11978 } 11979 11980 .tab__close-button::part(base) { 11981 padding: var(--sl-spacing-3x-small); 11982 } 11983 11984 @media (forced-colors: active) { 11985 .tab.tab--active:not(.tab--disabled) { 11986 outline: solid 1px transparent; 11987 outline-offset: -3px; 11988 } 11989 } 11990`,Db=0,Ob=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.attrId=++Db,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1,this.tabIndex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}
vendor: 3,213 bytes, lines 11990-12099
11990handleCloseClick(e){e.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&!this.active?this.tabIndex=-1:this.tabIndex=0}render(){return this.id=this.id.length>0?this.id:this.componentId,W` 11991 <div 11992 part="base" 11993 class=${Mt({tab:!0,"tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled})} 11994 > 11995 <slot></slot> 11996 ${this.closable?W` 11997 <sl-icon-button 11998 part="close-button" 11999 exportparts="base:close-button__base" 12000 name="x-lg" 12001 library="system" 12002 label=${this.localize.term("close")} 12003 class="tab__close-button" 12004 @click=${this.handleCloseClick} 12005 tabindex="-1" 12006 ></sl-icon-button> 12007 `:""} 12008 </div> 12009 `}};Ob.styles=[Se,Pb],Ob.dependencies={"sl-icon-button":pi},Ne([Ye(".tab")],Ob.prototype,"tab",2),Ne([Ve({reflect:!0})],Ob.prototype,"panel",2),Ne([Ve({type:Boolean,reflect:!0})],Ob.prototype,"active",2),Ne([Ve({type:Boolean,reflect:!0})],Ob.prototype,"closable",2),Ne([Ve({type:Boolean,reflect:!0})],Ob.prototype,"disabled",2),Ne([Ve({type:Number,reflect:!0})],Ob.prototype,"tabIndex",2),Ne([yt("active")],Ob.prototype,"handleActiveChange",1),Ne([yt("disabled")],Ob.prototype,"handleDisabledChange",1),Ob.define("sl-tab");var zb=c` 12010 :host { 12011 --indicator-color: var(--sl-color-primary-600); 12012 --track-color: var(--sl-color-neutral-200); 12013 --track-width: 2px; 12014 12015 display: block; 12016 } 12017 12018 .tab-group { 12019 display: flex; 12020 border-radius: 0; 12021 } 12022 12023 .tab-group__tabs { 12024 display: flex; 12025 position: relative; 12026 } 12027 12028 .tab-group__indicator { 12029 position: absolute; 12030 transition: 12031 var(--sl-transition-fast) translate ease, 12032 var(--sl-transition-fast) width ease; 12033 } 12034 12035 .tab-group--has-scroll-controls .tab-group__nav-container { 12036 position: relative; 12037 padding: 0 var(--sl-spacing-x-large); 12038 } 12039 12040 .tab-group--has-scroll-controls .tab-group__scroll-button--start--hidden, 12041 .tab-group--has-scroll-controls .tab-group__scroll-button--end--hidden { 12042 visibility: hidden; 12043 } 12044 12045 .tab-group__body { 12046 display: block; 12047 overflow: auto; 12048 } 12049 12050 .tab-group__scroll-button { 12051 display: flex; 12052 align-items: center; 12053 justify-content: center; 12054 position: absolute; 12055 top: 0; 12056 bottom: 0; 12057 width: var(--sl-spacing-x-large); 12058 } 12059 12060 .tab-group__scroll-button--start { 12061 left: 0; 12062 } 12063 12064 .tab-group__scroll-button--end { 12065 right: 0; 12066 } 12067 12068 .tab-group--rtl .tab-group__scroll-button--start { 12069 left: auto; 12070 right: 0; 12071 } 12072 12073 .tab-group--rtl .tab-group__scroll-button--end { 12074 left: 0; 12075 right: auto; 12076 } 12077 12078 /* 12079 * Top 12080 */ 12081 12082 .tab-group--top { 12083 flex-direction: column; 12084 } 12085 12086 .tab-group--top .tab-group__nav-container { 12087 order: 1; 12088 } 12089 12090 .tab-group--top .tab-group__nav { 12091 display: flex; 12092 overflow-x: auto; 12093 12094 /* Hide scrollbar in Firefox */ 12095 scrollbar-width: none; 12096 } 12097 12098 /* Hide scrollbar in Chrome/Safari */ 12099 .tab-group--top .tab-group__nav::-webkit-scrollbar {
12100 width: 0; 12101 height: 0; 12102 } 12103 12104 .tab-group--top .tab-group__tabs { 12105 flex: 1 1 auto; 12106 position: relative; 12107 flex-direction: row; 12108 border-bottom: solid var(--track-width) var(--track-color); 12109 } 12110 12111 .tab-group--top .tab-group__indicator { 12112 bottom: calc(-1 * var(--track-width)); 12113 border-bottom: solid var(--track-width) var(--indicator-color); 12114 } 12115 12116 .tab-group--top .tab-group__body { 12117 order: 2; 12118 } 12119 12120 .tab-group--top ::slotted(sl-tab-panel) { 12121 --padding: var(--sl-spacing-medium) 0; 12122 } 12123 12124 /* 12125 * Bottom 12126 */ 12127 12128 .tab-group--bottom { 12129 flex-direction: column; 12130 } 12131 12132 .tab-group--bottom .tab-group__nav-container { 12133 order: 2; 12134 } 12135 12136 .tab-group--bottom .tab-group__nav { 12137 display: flex; 12138 overflow-x: auto; 12139 12140 /* Hide scrollbar in Firefox */ 12141 scrollbar-width: none; 12142 } 12143 12144 /* Hide scrollbar in Chrome/Safari */ 12145 .tab-group--bottom .tab-group__nav::-webkit-scrollbar { 12146 width: 0; 12147 height: 0; 12148 } 12149 12150 .tab-group--bottom .tab-group__tabs { 12151 flex: 1 1 auto; 12152 position: relative; 12153 flex-direction: row; 12154 border-top: solid var(--track-width) var(--track-color); 12155 } 12156 12157 .tab-group--bottom .tab-group__indicator { 12158 top: calc(-1 * var(--track-width)); 12159 border-top: solid var(--track-width) var(--indicator-color); 12160 } 12161 12162 .tab-group--bottom .tab-group__body { 12163 order: 1; 12164 } 12165 12166 .tab-group--bottom ::slotted(sl-tab-panel) { 12167 --padding: var(--sl-spacing-medium) 0; 12168 } 12169 12170 /* 12171 * Start 12172 */ 12173 12174 .tab-group--start { 12175 flex-direction: row; 12176 } 12177 12178 .tab-group--start .tab-group__nav-container { 12179 order: 1; 12180 } 12181 12182 .tab-group--start .tab-group__tabs { 12183 flex: 0 0 auto; 12184 flex-direction: column; 12185 border-inline-end: solid var(--track-width) var(--track-color); 12186 } 12187 12188 .tab-group--start .tab-group__indicator { 12189 right: calc(-1 * var(--track-width)); 12190 border-right: solid var(--track-width) var(--indicator-color); 12191 } 12192 12193 .tab-group--start.tab-group--rtl .tab-group__indicator { 12194 right: auto; 12195 left: calc(-1 * var(--track-width)); 12196 } 12197 12198 .tab-group--start .tab-group__body { 12199 flex: 1 1 auto; 12200 order: 2; 12201 } 12202 12203 .tab-group--start ::slotted(sl-tab-panel) { 12204 --padding: 0 var(--sl-spacing-medium); 12205 } 12206 12207 /* 12208 * End 12209 */ 12210 12211 .tab-group--end { 12212 flex-direction: row; 12213 } 12214 12215 .tab-group--end .tab-group__nav-container { 12216 order: 2; 12217 } 12218 12219 .tab-group--end .tab-group__tabs { 12220 flex: 0 0 auto; 12221 flex-direction: column; 12222 border-left: solid var(--track-width) var(--track-color); 12223 } 12224 12225 .tab-group--end .tab-group__indicator { 12226 left: calc(-1 * var(--track-width)); 12227 border-inline-start: solid var(--track-width) var(--indicator-color); 12228 } 12229 12230 .tab-group--end.tab-group--rtl .tab-group__indicator { 12231 right: calc(-1 * var(--track-width)); 12232 left: auto; 12233 } 12234 12235 .tab-group--end .tab-group__body { 12236 flex: 1 1 auto; 12237 order: 1; 12238 } 12239 12240 .tab-group--end ::slotted(sl-tab-panel) { 12241 --padding: 0 var(--sl-spacing-medium); 12242 } 12243`,Lb=c` 12244 :host { 12245 display: contents; 12246 } 12247`,Fb=class extends Xe{constructor(){super(...arguments),this.observedElements=[],this.disabled=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(e=>{this.emit("sl-resize",{detail:{entries:e}})}),this.disabled||this.startObserver()}disconnectedCallback(){super.disconnectedCallback(),this.stopObserver()}handleSlotChange(){this.disabled||this.startObserver()}startObserver(){const e=this.shadowRoot.querySelector("slot");if(null!==e){const t=e.assignedElements({flatten:!0});this.observedElements.forEach(e=>this.resizeObserver.unobserve(e)),this.observedElements=[],t.forEach(e=>{this.resizeObserver.observe(e),this.observedElements.push(e)})}}stopObserver(){this.resizeObserver.disconnect()}handleDisabledChange(){this.disabled?this.stopObserver():this.startObserver()}render(){return W` <slot @slotchange=${this.handleSlotChange}></slot> `}};Fb.styles=[Se,Lb],Ne([Ve({type:Boolean,reflect:!0})],Fb.prototype,"disabled",2),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Fb.prototype,"handleDisabledChange",1);var Nb=class extends Xe{constructor(){super(...arguments),this.tabs=[],this.focusableTabs=[],this.panels=[],this.localize=new $e(this),this.hasScrollControls=!1,this.shouldHideScrollStartButton=!1,this.shouldHideScrollEndButton=!1,this.placement="top",this.activation="auto",this.noScrollControls=!1,this.fixedScrollControls=!1,this.scrollOffset=1}connectedCallback(){const e=Promise.all([customElements.whenDefined("sl-tab"),customElements.whenDefined("sl-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.repositionIndicator(),this.updateScrollControls()}),this.mutationObserver=new MutationObserver(e=>{const t=e.filter(({target:e})=>
12247{if(e===this)return!0;if(e.closest("sl-tab-group")!==this)return!1;const t=e.tagName.toLowerCase();return"sl-tab"===t||"sl-tab-panel"===t});if(0!==t.length)if(t.some(e=>!["aria-labelledby","aria-controls"].includes(e.attributeName))&&setTimeout(()=>this.setAriaLabels()),t.some(e=>"disabled"===e.attributeName))this.syncTabsAndPanels();else if(t.some(e=>"active"===e.attributeName)){const e=t.filter(e=>"active"===e.attributeName&&"sl-tab"===e.target.tagName.toLowerCase()).map(e=>e.target),i=e.find(e=>e.active);i&&this.setActiveTab(i)}}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["active","disabled","name","panel"],childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),e.then(()=>{const e=new IntersectionObserver((e,t)=>{var i;e[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab(null!=(i=this.getActiveTab())?i:this.tabs[0],{emitEvents:!1}),t.unobserve(e[0].target))});e.observe(this.tabGroup)})})}disconnectedCallback(){var e,t;super.disconnectedCallback(),null==(e=this.mutationObserver)||e.disconnect(),this.nav&&(null==(t=this.resizeObserver)||t.unobserve(this.nav))}getAllTabs(){return this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()}getAllPanels(){return[...this.body.assignedElements()].filter(e=>"sl-tab-panel"===e.tagName.toLowerCase())}getActiveTab(){return this.tabs.find(e=>e.active)}handleClick(e){const t=e.target.closest("sl-tab");(null==t?void 0:t.closest("sl-tab-group"))===this&&null!==t&&this.setActiveTab(t,{scrollBehavior:"smooth"})}handleKeyDown(e){const t=e.target.closest("sl-tab");if((null==t?void 0:t.closest("sl-tab-group"))===this&&(["Enter"," "].includes(e.key)&&null!==t&&(this.setActiveTab(t,{scrollBehavior:"smooth"}),e.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))){const t=this.tabs.find(e=>e.matches(":focus")),i="rtl"===this.localize.dir();let r=null;if("sl-tab"===(null==t?void 0:t.tagName.toLowerCase())){if("Home"===e.key)r=this.focusableTabs[0];else if("End"===e.key)r=this.focusableTabs[this.focusableTabs.length-1];else if(["top","bottom"].includes(this.placement)&&e.key===(i?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===e.key){const e=this.tabs.findIndex(e=>e===t);r=this.findNextFocusableTab(e,"backward")}else if(["top","bottom"].includes(this.placement)&&e.key===(i?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===e.key){const e=this.tabs.findIndex(e=>e===t);r=this.findNextFocusableTab(e,"forward")}if(!r)return;r.tabIndex=0,r.focus({preventScroll:!0}),"auto"===this.activation?this.setActiveTab(r,{scrollBehavior:"smooth"}
12247):this.tabs.forEach(e=>{e.tabIndex=e===r?0:-1}),["top","bottom"].includes(this.placement)&&di(r,this.nav,"horizontal"),e.preventDefault()}}}handleScrollToStart(){this.nav.scroll({left:"rtl"===this.localize.dir()?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:"rtl"===this.localize.dir()?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(e,t){if(t=Le({emitEvents:!0,scrollBehavior:"auto"},t),e!==this.activeTab&&!e.disabled){const i=this.activeTab;this.activeTab=e,this.tabs.forEach(e=>{e.active=e===this.activeTab,e.tabIndex=e===this.activeTab?0:-1}),this.panels.forEach(e=>{var t;return e.active=e.name===(null==(t=this.activeTab)?void 0:t.panel)}),this.syncIndicator(),["top","bottom"].includes(this.placement)&&di(this.activeTab,this.nav,"horizontal",t.scrollBehavior),t.emitEvents&&(i&&this.emit("sl-tab-hide",{detail:{name:i.panel}}),this.emit("sl-tab-show",{detail:{name:this.activeTab.panel}}))}}
12247setAriaLabels(){this.tabs.forEach(e=>{const t=this.panels.find(t=>t.name===e.panel);t&&(e.setAttribute("aria-controls",t.getAttribute("id")),t.setAttribute("aria-labelledby",e.getAttribute("id")))})}repositionIndicator(){const e=this.getActiveTab();if(!e)return;const t=e.clientWidth,i=e.clientHeight,r="rtl"===this.localize.dir(),s=this.getAllTabs(),o=s.slice(0,s.indexOf(e)).reduce((e,t)=>({left:e.left+t.clientWidth,top:e.top+t.clientHeight}),{left:0,top:0});switch(this.placement){case"top":case"bottom":this.indicator.style.width=`${t}px`,this.indicator.style.height="auto",this.indicator.style.translate=r?-1*o.left+"px":`${o.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${i}px`,this.indicator.style.translate=`0 ${o.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs(),this.focusableTabs=this.tabs.filter(e=>!e.disabled),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then(()=>this.updateScrollControls())}findNextFocusableTab(e,t){let i=null;const r="forward"===t?1:-1;let s=e+r;for(;e<this.tabs.length;){if(i=this.tabs[s]||null,null===i){i="forward"===t?this.focusableTabs[0]:this.focusableTabs[this.focusableTabs.length-1];break}if(!i.disabled)break;s+=r}return i}updateScrollButtons(){this.hasScrollControls&&!this.fixedScrollControls&&(this.shouldHideScrollStartButton=this.scrollFromStart()<=this.scrollOffset,this.shouldHideScrollEndButton=this.isScrolledToEnd())}isScrolledToEnd(){return this.scrollFromStart()+this.nav.clientWidth>=this.nav.scrollWidth-this.scrollOffset}scrollFromStart(){return"rtl"===this.localize.dir()?-this.nav.scrollLeft:this.nav.scrollLeft}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth+1,this.updateScrollButtons()}syncIndicator(){this.getActiveTab()?(this.indicator.style.display="block",this.repositionIndicator()):this.indicator.style.display="none"}show(e){const t=this.tabs.find(t=>t.panel===e);t&&this.setActiveTab(t,{scrollBehavior:"smooth"})}render(){const e="rtl"===this.localize.dir();return W` 12248 <div 12249 part="base" 12250 class=${Mt({"tab-group":!0,"tab-group--top":"top"===this.placement,"tab-group--bottom":"bottom"===this.placement,"tab-group--start":"start"===this.placement,"tab-group--end":"end"===this.placement,"tab-group--rtl":"rtl"===this.localize.dir(),"tab-group--has-scroll-controls":this.hasScrollControls})} 12251 @click=${this.handleClick} 12252 @keydown=${this.handleKeyDown} 12253 > 12254 <div class="tab-group__nav-container" part="nav"> 12255 ${this.hasScrollControls?W` 12256 <sl-icon-button 12257 part="scroll-button scroll-button--start" 12258 exportparts="base:scroll-button__base" 12259 class=${Mt({"tab-group__scroll-button":!0,"tab-group__scroll-button--start":!0,"tab-group__scroll-button--start--hidden":this.shouldHideScrollStartButton})} 12260 name=${e?"chevron-right":"chevron-left"} 12261 library="system" 12262 tabindex="-1" 12263 aria-hidden="true" 12264 label=${this.localize.term("scrollToStart")} 12265 @click=${this.handleScrollToStart} 12266 ></sl-icon-button> 12267 `:""} 12268 12269 <div class="tab-group__nav" @scrollend=${this.updateScrollButtons}> 12270 <div part="tabs" class="tab-group__tabs" role="tablist"> 12271 <div part="active-tab-indicator" class="tab-group__indicator"></div> 12272 <sl-resize-observer @sl-resize=${this.syncIndicator}> 12273 <slot name="nav" @slotchange=${this.syncTabsAndPanels}></slot> 12274 </sl-resize-observer> 12275 </div> 12276 </div> 12277 12278 ${this.hasScrollControls?W` 12279 <sl-icon-button 12280 part="scroll-button scroll-button--end" 12281 exportparts="base:scroll-button__base" 12282 class=${Mt({"tab-group__scroll-button":!0,"tab-group__scroll-button--end":!0,"tab-group__scroll-button--end--hidden":this.shouldHideScrollEndButton})} 12283 name=${e?"chevron-left":"chevron-right"} 12284 library="system" 12285 tabindex="-1" 12286 aria-hidden="true" 12287 label=${this.localize.term("scrollToEnd")} 12288 @click=${this.handleScrollToEnd} 12289 ></sl-icon-button> 12290 `:""} 12291 </div> 12292 12293 <slot part="body" class="tab-group__body" @slotchange=${this.syncTabsAndPanels}></slot> 12294 </div> 12295 `}};Nb.styles=[Se,zb],Nb.dependencies={"sl-icon-button":pi,"sl-resize-observer":Fb},Ne([Ye(".tab-group")],Nb.prototype,"tabGroup",2),Ne([Ye(".tab-group__body")],Nb.prototype,"body",2),Ne([Ye(".tab-group__nav")],Nb.prototype,"nav",2),Ne([Ye(".tab-group__indicator")],Nb.prototype,"indicator",2),Ne([He()],Nb.prototype,"hasScrollControls",2),Ne([He()],Nb.prototype,"shouldHideScrollStartButton",2),Ne([He()],Nb.prototype,"shouldHideScrollEndButton",2),Ne([
12295Ve()],Nb.prototype,"placement",2),Ne([Ve()],Nb.prototype,"activation",2),Ne([Ve({attribute:"no-scroll-controls",type:Boolean})],Nb.prototype,"noScrollControls",2),Ne([Ve({attribute:"fixed-scroll-controls",type:Boolean})],Nb.prototype,"fixedScrollControls",2),Ne([We({passive:!0})],Nb.prototype,"updateScrollButtons",1),Ne([yt("noScrollControls",{waitUntilFirstUpdate:!0})],Nb.prototype,"updateScrollControls",1),Ne([yt("placement",{waitUntilFirstUpdate:!0})],Nb.prototype,"syncIndicator",1),Nb.define("sl-tab-group");var Mb=c` 12296 :host { 12297 --divider-width: 4px; 12298 --divider-hit-area: 12px; 12299 --min: 0%; 12300 --max: 100%; 12301 12302 display: grid; 12303 } 12304 12305 .start, 12306 .end { 12307 overflow: hidden; 12308 } 12309 12310 .divider { 12311 flex: 0 0 var(--divider-width); 12312 display: flex; 12313 position: relative; 12314 align-items: center; 12315 justify-content: center; 12316 background-color: var(--sl-color-neutral-200); 12317 color: var(--sl-color-neutral-900); 12318 z-index: 1; 12319 } 12320 12321 .divider:focus { 12322 outline: none; 12323 } 12324 12325 :host(:not([disabled])) .divider:focus-visible { 12326 background-color: var(--sl-color-primary-600); 12327 color: var(--sl-color-neutral-0); 12328 } 12329 12330 :host([disabled]) .divider { 12331 cursor: not-allowed; 12332 } 12333 12334 /* Horizontal */ 12335 :host(:not([vertical], [disabled])) .divider { 12336 cursor: col-resize; 12337 } 12338 12339 :host(:not([vertical])) .divider::after { 12340 display: flex; 12341 content: ''; 12342 position: absolute; 12343 height: 100%; 12344 left: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2); 12345 width: var(--divider-hit-area); 12346 } 12347 12348 /* Vertical */ 12349 :host([vertical]) { 12350 flex-direction: column; 12351 } 12352 12353 :host([vertical]:not([disabled])) .divider { 12354 cursor: row-resize; 12355 } 12356 12357 :host([vertical]) .divider::after { 12358 content: ''; 12359 position: absolute; 12360 width: 100%; 12361 top: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2); 12362 height: var(--divider-hit-area); 12363 } 12364 12365 @media (forced-colors: active) { 12366 .divider { 12367 outline: solid 1px transparent; 12368 } 12369 } 12370`;function qb(e,t){function i(i){const r=e.getBoundingClientRect(),s=e.ownerDocument.defaultView,o=r.left+s.scrollX,a=r.top+s.scrollY,n=i.pageX-o,l=i.pageY-a;(null==t?void 0:t.onMove)&&t.onMove(n,l)}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",function e(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",e),(null==t?void 0:t.onStop)&&t.onStop()}),(null==t?void 0:t.initialEvent)instanceof PointerEvent&&i(t.initialEvent)}var Ub=()=>null,Bb=class extends Xe{constructor(){super(...arguments),this.isCollapsed=!1,this.localize=new $e(this),this.positionBeforeCollapsing=0,this.position=50,this.vertical=!1,this.disabled=!1,this.snapValue="",this.snapFunction=Ub,this.snapThreshold=12}toSnapFunction(e){const t=e.split(" ");return({pos:i,size:r,snapThreshold:s,isRtl:o,vertical:a})=>{let n=i,l=Number.POSITIVE_INFINITY;return t.forEach(t=>{let d;if(t.startsWith("repeat(")){const t=e.substring(7,e.length-1),s=t.endsWith("%"),n=Number.parseFloat(t),l=s?r*(n/100):n;d=Math.round((o&&!a?r-i:i)/l)*l}else d=t.endsWith("%")?r*(Number.parseFloat(t)/100):Number.parseFloat(t);o&&!a&&(d=r-d);const c=Math.abs(i-d);c<=s&&c<l&&(n=d,l=c)}),n}}set snap(e){this.snapValue=null!=e?e:"",this.snapFunction=e?"string"==typeof e?this.toSnapFunction(e):e:Ub}get snap(){return this.snapValue}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(e=>this.handleResize(e)),this.updateComplete.then(()=>this.resizeObserver.observe(this)),this.detectSize(),this.cachedPositionInPixels=this.percentageToPixels(this.position)}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this.resizeObserver)||e.unobserve(this)}detectSize(){const{width:e,height:t}=this.getBoundingClientRect();this.size=this.vertical?t:e}percentageToPixels(e){return this.size*(e/100)}pixelsToPercentage(e){return e/this.size*100}handleDrag(e){const t="rtl"===this.localize.dir();this.disabled||(e.cancelable&&e.preventDefault(),qb(this,{onMove:(e,i)=>{var r;let s=this.vertical?i:e;"end"===this.primary&&(s=this.size-s),s=null!=(r=this.snapFunction({pos:s,size:this.size,snapThreshold:this.snapThreshold,isRtl:t,vertical:this.vertical}))?r:s,this.position=$b(this.pixelsToPercentage(s),0,100)},initialEvent:e}))}handleKeyDown(e){if(!this.disabled&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","Enter"].includes(e.ke
12370y)){let t=this.position;const i=(e.shiftKey?10:1)*("end"===this.primary?-1:1);if(e.preventDefault(),("ArrowLeft"===e.key&&!this.vertical||"ArrowUp"===e.key&&this.vertical)&&(t-=i),("ArrowRight"===e.key&&!this.vertical||"ArrowDown"===e.key&&this.vertical)&&(t+=i),"Home"===e.key&&(t="end"===this.primary?100:0),"End"===e.key&&(t="end"===this.primary?0:100),"Enter"===e.key)if(this.isCollapsed)t=this.positionBeforeCollapsing,this.isCollapsed=!1;else{const e=this.position;t=0,requestAnimationFrame(()=>{this.isCollapsed=!0,this.positionBeforeCollapsing=e})}this.position=$b(t,0,100)}}handleResize(e){const{width:t,height:i}=e[0].contentRect;this.size=this.vertical?i:t,(isNaN(this.cachedPositionInPixels)||this.position===1/0)&&(this.cachedPositionInPixels=Number(this.getAttribute("position-in-pixels")),this.positionInPixels=Number(this.getAttribute("position-in-pixels")),this.position=this.pixelsToPercentage(this.positionInPixels)),this.primary&&(this.position=this.pixelsToPercentage(this.cachedPositionInPixels))}handlePositionChange(){this.cachedPositionInPixels=this.percentageToPixels(this.position),this.isCollapsed=!1,this.positionBeforeCollapsing=0,this.positionInPixels=this.percentageToPixels(this.position),this.emit("sl-reposition")}handlePositionInPixelsChange(){this.position=this.pixelsToPercentage(this.positionInPixels)}handleVerticalChange(){this.detectSize()}render(){const e=this.vertical?"gridTemplateRows":"gridTemplateColumns",t=this.vertical?"gridTemplateColumns":"gridTemplateRows",i="rtl"===this.localize.dir(),r=`\n clamp(\n 0%,\n clamp(\n var(--min),\n ${this.position}% - var(--divider-width) / 2,\n var(--max)\n ),\n calc(100% - var(--divider-width))\n )\n `,s="auto";return"end"===this.primary?i&&!this.vertical?this.style[e]=`${r}
12370 var(--divider-width) ${s}`:this.style[e]=`${s} var(--divider-width) ${r}`:i&&!this.vertical?this.style[e]=`${s} var(--divider-width) ${r}`:this.style[e]=`${r} var(--divider-width) ${s}`,this.style[t]="",W` 12371 <slot name="start" part="panel start" class="start"></slot> 12372 12373 <div 12374 part="divider" 12375 class="divider" 12376 tabindex=${Ht(this.disabled?void 0:"0")} 12377 role="separator" 12378 aria-valuenow=${this.position} 12379 aria-valuemin="0" 12380 aria-valuemax="100" 12381 aria-label=${this.localize.term("resize")} 12382 @keydown=${this.handleKeyDown} 12383 @mousedown=${this.handleDrag} 12384 @touchstart=${this.handleDrag} 12385 > 12386 <slot name="divider"></slot> 12387 </div> 12388 12389 <slot name="end" part="panel end" class="end"></slot> 12390 `}};Bb.styles=[Se,Mb],Ne([Ye(".divider")],Bb.prototype,"divider",2),Ne([Ve({type:Number,reflect:!0})],Bb.prototype,"position",2),Ne([Ve({attribute:"position-in-pixels",type:Number})],Bb.prototype,"positionInPixels",2),Ne([Ve({type:Boolean,reflect:!0})],Bb.prototype,"vertical",2),Ne([Ve({type:Boolean,reflect:!0})],Bb.prototype,"disabled",2),Ne([Ve()],Bb.prototype,"primary",2),Ne([Ve({reflect:!0})],Bb.prototype,"snap",1),Ne([Ve({type:Number,attribute:"snap-threshold"})],Bb.prototype,"snapThreshold",2),Ne([yt("position")],Bb.prototype,"handlePositionChange",1),Ne([yt("positionInPixels")],Bb.prototype,"handlePositionInPixelsChange",1),Ne([yt("vertical")],Bb.prototype,"handleVerticalChange",1),Bb.define("sl-split-panel");var jb=c` 12391 :host { 12392 display: inline-block; 12393 } 12394 12395 :host([size='small']) { 12396 --height: var(--sl-toggle-size-small); 12397 --thumb-size: calc(var(--sl-toggle-size-small) + 4px); 12398 --width: calc(var(--height) * 2); 12399 12400 font-size: var(--sl-input-font-size-small); 12401 } 12402 12403 :host([size='medium']) { 12404 --height: var(--sl-toggle-size-medium); 12405 --thumb-size: calc(var(--sl-toggle-size-medium) + 4px); 12406 --width: calc(var(--height) * 2); 12407 12408 font-size: var(--sl-input-font-size-medium); 12409 } 12410 12411 :host([size='large']) { 12412 --height: var(--sl-toggle-size-large); 12413 --thumb-size: calc(var(--sl-toggle-size-large) + 4px); 12414 --width: calc(var(--height) * 2); 12415 12416 font-size: var(--sl-input-font-size-large); 12417 } 12418 12419 .switch { 12420 position: relative; 12421 display: inline-flex; 12422 align-items: center; 12423 font-family: var(--sl-input-font-family); 12424 font-size: inherit; 12425 font-weight: var(--sl-input-font-weight); 12426 color: var(--sl-input-label-color); 12427 vertical-align: middle; 12428 cursor: pointer; 12429 } 12430 12431 .switch__control { 12432 flex: 0 0 auto; 12433 position: relative; 12434 display: inline-flex; 12435 align-items: center; 12436 justify-content: center; 12437 width: var(--width); 12438 height: var(--height); 12439 background-color: var(--sl-color-neutral-400); 12440 border: solid var(--sl-input-border-width) var(--sl-color-neutral-400); 12441 border-radius: var(--height); 12442 transition: 12443 var(--sl-transition-fast) border-color, 12444 var(--sl-transition-fast) background-color; 12445 } 12446 12447 .switch__control .switch__thumb { 12448 width: var(--thumb-size); 12449 height: var(--thumb-size); 12450 background-color: var(--sl-color-neutral-0); 12451 border-radius: 50%; 12452 border: solid var(--sl-input-border-width) var(--sl-color-neutral-400); 12453 translate: calc((var(--width) - var(--height)) / -2); 12454 transition: 12455 var(--sl-transition-fast) translate ease, 12456 var(--sl-transition-fast) background-color, 12457 var(--sl-transition-fast) border-color, 12458 var(--sl-transition-fast) box-shadow; 12459 } 12460 12461 .switch__input { 12462 position: absolute; 12463 opacity: 0; 12464 padding: 0; 12465 margin: 0; 12466 pointer-events: none; 12467 } 12468 12469 /* Hover */ 12470 .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover { 12471 background-color: var(--sl-color-neutral-400); 12472 border-color: var(--sl-color-neutral-400); 12473 } 12474 12475 .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover .switch__thumb { 12476 background-color: var(--sl-color-neutral-0); 12477 border-color: var(--sl-color-neutral-400); 12478 } 12479 12480 /* Focus */ 12481 .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control { 12482 background-color: var(--sl-color-neutral-400); 12483 border-color: var(--sl-color-neutral-400); 12484 } 12485 12486 .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb { 12487 background-color: var(--sl-color-neutral-0); 12488 border-color: var(--sl-color-primary-600); 12489 outline: var(--sl-focus-ring); 12490 outline-offset: var(--sl-focus-ring-offset); 12491 } 12492 12493 /* Checked */ 12494 .switch--checked .switch__control { 12495 background-color: var(--sl-color-primary-600); 12496 border-color: var(--sl-color-primary-600); 12497 } 12498 12499 .switch--checked .switch__control .switch__thumb { 12500 background-color: var(--sl-color-neutral-0); 12501 border-color: var(--sl-color-primary-600); 12502 translate: calc((var(--width) - var(--height)) / 2); 12503 } 12504 12505 /* Checked + hover */ 12506 .switch.switch--checked:not(.switch--disabled) .switch__control:hover { 12507 background-color: var(--sl-color-primary-600); 12508 border-color: var(--sl-color-primary-600); 12509 } 12510 12511 .switch.switch--checked:not(.switch--disabled) .switch__control:hover .
12511switch__thumb { 12512 background-color: var(--sl-color-neutral-0); 12513 border-color: var(--sl-color-primary-600); 12514 } 12515 12516 /* Checked + focus */ 12517 .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control { 12518 background-color: var(--sl-color-primary-600); 12519 border-color: var(--sl-color-primary-600); 12520 } 12521 12522 .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb { 12523 background-color: var(--sl-color-neutral-0); 12524 border-color: var(--sl-color-primary-600); 12525 outline: var(--sl-focus-ring); 12526 outline-offset: var(--sl-focus-ring-offset); 12527 } 12528 12529 /* Disabled */ 12530 .switch--disabled { 12531 opacity: 0.5; 12532 cursor: not-allowed; 12533 } 12534 12535 .switch__label { 12536 display: inline-block; 12537 line-height: var(--height); 12538 margin-inline-start: 0.5em; 12539 user-select: none; 12540 -webkit-user-select: none; 12541 } 12542 12543 :host([required]) .switch__label::after { 12544 content: var(--sl-input-required-content); 12545 color: var(--sl-input-required-content-color); 12546 margin-inline-start: var(--sl-input-required-content-offset); 12547 } 12548 12549 @media (forced-colors: active) { 12550 .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb, 12551 .switch--checked .switch__control .switch__thumb { 12552 background-color: ButtonText; 12553 } 12554 } 12555`,Vb=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasSlotController=new dt(this,"help-text"),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.helpText=""}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleClick(){this.checked=!this.checked,this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleKeyDown(e){"ArrowLeft"===e.key&&(e.preventDefault(),this.checked=!1,this.emit("sl-change"),this.emit("sl-input")),"ArrowRight"===e.key&&(e.preventDefault(),this.checked=!0,this.emit("sl-change"),this.emit("sl-input"))}handleCheckedChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(!0)}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("help-text"),t=!!this.helpText||!!e;return W` 12556 <div 12557 class=${Mt({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-help-text":t})} 12558 > 12559 <label 12560 part="base" 12561 class=${Mt({switch:!0,"switch--checked":this.checked,"switch--disabled":this.disabled,"switch--focused":this.hasFocus,"switch--small":"small"===this.size,"switch--medium":"medium"===this.size,"switch--large":"large"===this.size})} 12562 > 12563 <input 12564 class="switch__input" 12565 type="checkbox" 12566 title=${this.title} 12567 name=${this.name} 12568 value=${Ht(this.value)} 12569 .checked=${Qt(this.checked)} 12570 .disabled=${this.disabled} 12571 .required=${this.required} 12572 role="switch" 12573 aria-checked=${this.checked?"true":"false"} 12574 aria-describedby="help-text" 12575 @click=${this.handleClick} 12576 @input=${this.handleInput} 12577 @invalid=${this.handleInvalid} 12578 @blur=${this.handleBlur} 12579 @focus=${this.handleFocus} 12580 @keydown=${this.handleKeyDown} 12581 /> 12582
12583 <span part="control" class="switch__control"> 12584 <span part="thumb" class="switch__thumb"></span> 12585 </span> 12586 12587 <div part="label" class="switch__label"> 12588 <slot></slot> 12589 </div> 12590 </label> 12591 12592 <div 12593 aria-hidden=${t?"false":"true"} 12594 class="form-control__help-text" 12595 id="help-text" 12596 part="form-control-help-text" 12597 > 12598 <slot name="help-text">${this.helpText}</slot> 12599 </div> 12600 </div> 12601 `}};Vb.styles=[Se,Kt,jb],Ne([Ye('input[type="checkbox"]')],Vb.prototype,"input",2),Ne([He()],Vb.prototype,"hasFocus",2),Ne([Ve()],Vb.prototype,"title",2),Ne([Ve()],Vb.prototype,"name",2),Ne([Ve()],Vb.prototype,"value",2),Ne([Ve({reflect:!0})],Vb.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],Vb.prototype,"disabled",2),Ne([Ve({type:Boolean,reflect:!0})],Vb.prototype,"checked",2),Ne([Yt("checked")],Vb.prototype,"defaultChecked",2),Ne([Ve({reflect:!0})],Vb.prototype,"form",2),Ne([Ve({type:Boolean,reflect:!0})],Vb.prototype,"required",2),Ne([Ve({attribute:"help-text"})],Vb.prototype,"helpText",2),Ne([yt("checked",{waitUntilFirstUpdate:!0})],Vb.prototype,"handleCheckedChange",1),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Vb.prototype,"handleDisabledChange",1),Vb.define("sl-switch"),Fb.define("sl-resize-observer"),Je.define("sl-spinner");var Hb=c` 12602 :host { 12603 --thumb-size: 20px; 12604 --tooltip-offset: 10px; 12605 --track-color-active: var(--sl-color-neutral-200); 12606 --track-color-inactive: var(--sl-color-neutral-200); 12607 --track-active-offset: 0%; 12608 --track-height: 6px; 12609 12610 display: block; 12611 } 12612 12613 .range { 12614 position: relative; 12615 } 12616 12617 .range__control { 12618 --percent: 0%; 12619 -webkit-appearance: none; 12620 border-radius: 3px; 12621 width: 100%; 12622 height: var(--track-height); 12623 background: transparent; 12624 line-height: var(--sl-input-height-medium); 12625 vertical-align: middle; 12626 margin: 0; 12627 12628 background-image: linear-gradient( 12629 to right, 12630 var(--track-color-inactive) 0%, 12631 var(--track-color-inactive) min(var(--percent), var(--track-active-offset)), 12632 var(--track-color-active) min(var(--percent), var(--track-active-offset)), 12633 var(--track-color-active) max(var(--percent), var(--track-active-offset)), 12634 var(--track-color-inactive) max(var(--percent), var(--track-active-offset)), 12635 var(--track-color-inactive) 100% 12636 ); 12637 } 12638 12639 .range--rtl .range__control { 12640 background-image: linear-gradient( 12641 to left, 12642 var(--track-color-inactive) 0%, 12643 var(--track-color-inactive) min(var(--percent), var(--track-active-offset)), 12644 var(--track-color-active) min(var(--percent), var(--track-active-offset)), 12645 var(--track-color-active) max(var(--percent), var(--track-active-offset)), 12646 var(--track-color-inactive) max(var(--percent), var(--track-active-offset)), 12647 var(--track-color-inactive) 100% 12648 ); 12649 } 12650 12651 /* Webkit */ 12652 .range__control::-webkit-slider-runnable-track { 12653 width: 100%; 12654 height: var(--track-height); 12655 border-radius: 3px; 12656 border: none; 12657 } 12658 12659 .range__control::-webkit-slider-thumb { 12660 border: none; 12661 width: var(--thumb-size); 12662 height: var(--thumb-size); 12663 border-radius: 50%; 12664 background-color: var(--sl-color-primary-600); 12665 border: solid var(--sl-input-border-width) var(--sl-color-primary-600); 12666 -webkit-appearance: none; 12667 margin-top: calc(var(--thumb-size) / -2 + var(--track-height) / 2); 12668 cursor: pointer; 12669 } 12670 12671 .range__control:enabled::-webkit-slider-thumb:hover { 12672 background-color: var(--sl-color-primary-500); 12673 border-color: var(--sl-color-primary-500); 12674 } 12675 12676 .range__control:enabled:focus-visible::-webkit-slider-thumb { 12677 outline: var(--sl-focus-ring); 12678 outline-offset: var(--sl-focus-ring-offset); 12679 } 12680 12681 .range__control:enabled::-webkit-slider-thumb:active { 12682 background-color: var(--sl-color-primary-500); 12683 border-color: var(--sl-color-primary-500); 12684 cursor: grabbing; 12685 } 12686 12687 /* Firefox */ 12688 .range__control::-moz-focus-outer { 12689 border: 0; 12690 } 12691 12692 .range__control::-moz-range-progress { 12693 background-color: var(--track-color-active); 12694 border-radius: 3px; 12695 height: var(--track-height); 12696 } 12697 12698 .range__control::-moz-range-track { 12699 width: 100%; 12700 height: var(--track-height); 12701 background-color: var(--track-color-inactive); 12702 border-radius: 3px; 12703 border: none; 12704 } 12705 12706 .range__control::-moz-range-thumb { 12707 border: none; 12708 height: var(--thumb-size); 12709 width: var(--thumb-size); 12710 border-radius: 50%; 12711 background-color: var(--sl-color-primary-600); 12712 border-color: var(--sl-color-primary-600); 12713 transition: 12714 var(--sl-transition-fast) border-color, 12715 var(--sl-transition-fast) background-color, 12716 var(--sl-transition-fast) color, 12717 var(--sl-transition-fast) box-shadow; 12718 cursor: pointer; 12719 } 12720 12721 .range__control:enabled::-moz-range-thumb:hover { 12722 background-color: var(--sl-color-primary-500); 12723 border-color: var(--sl-color-primary-500); 12724 } 12725 12726 .range__control:enabled:focus-visible::-moz-range-thumb { 12727 outline: var(--sl-focus-ring); 12728 outline-offset: var(--sl-focus-ring-offset); 12729 } 12730 12731 .range__control:enabled::-moz-range-thumb:active { 12732 background-color: var(--sl-color-primary-500); 12733 border-color: var(--sl-color-primary-500); 12734 cursor: grabbing; 12735 } 12736 12737 /* States */ 12738 .range__control:focus-visible { 12739 outline: none; 12740 } 12741 12742 .range__control:disabled { 12743 opacity: 0.5; 12744 } 12745 12746 .range__control:disabled::-webkit-slider-thumb {
12747 cursor: not-allowed; 12748 } 12749 12750 .range__control:disabled::-moz-range-thumb { 12751 cursor: not-allowed; 12752 } 12753 12754 /* Tooltip output */ 12755 .range__tooltip { 12756 position: absolute; 12757 z-index: var(--sl-z-index-tooltip); 12758 left: 0; 12759 border-radius: var(--sl-tooltip-border-radius); 12760 background-color: var(--sl-tooltip-background-color); 12761 font-family: var(--sl-tooltip-font-family); 12762 font-size: var(--sl-tooltip-font-size); 12763 font-weight: var(--sl-tooltip-font-weight); 12764 line-height: var(--sl-tooltip-line-height); 12765 color: var(--sl-tooltip-color); 12766 opacity: 0; 12767 padding: var(--sl-tooltip-padding); 12768 transition: var(--sl-transition-fast) opacity; 12769 pointer-events: none; 12770 } 12771 12772 .range__tooltip:after { 12773 content: ''; 12774 position: absolute; 12775 width: 0; 12776 height: 0; 12777 left: 50%; 12778 translate: calc(-1 * var(--sl-tooltip-arrow-size)); 12779 } 12780 12781 .range--tooltip-visible .range__tooltip { 12782 opacity: 1; 12783 } 12784 12785 /* Tooltip on top */ 12786 .range--tooltip-top .range__tooltip { 12787 top: calc(-1 * var(--thumb-size) - var(--tooltip-offset)); 12788 } 12789 12790 .range--tooltip-top .range__tooltip:after { 12791 border-top: var(--sl-tooltip-arrow-size) solid var(--sl-tooltip-background-color); 12792 border-left: var(--sl-tooltip-arrow-size) solid transparent; 12793 border-right: var(--sl-tooltip-arrow-size) solid transparent; 12794 top: 100%; 12795 } 12796 12797 /* Tooltip on bottom */ 12798 .range--tooltip-bottom .range__tooltip { 12799 bottom: calc(-1 * var(--thumb-size) - var(--tooltip-offset)); 12800 } 12801 12802 .range--tooltip-bottom .range__tooltip:after { 12803 border-bottom: var(--sl-tooltip-arrow-size) solid var(--sl-tooltip-background-color); 12804 border-left: var(--sl-tooltip-arrow-size) solid transparent; 12805 border-right: var(--sl-tooltip-arrow-size) solid transparent; 12806 bottom: 100%; 12807 } 12808 12809 @media (forced-colors: active) { 12810 .range__control, 12811 .range__tooltip { 12812 border: solid 1px transparent; 12813 } 12814 12815 .range__control::-webkit-slider-thumb { 12816 border: solid 1px transparent; 12817 } 12818 12819 .range__control::-moz-range-thumb { 12820 border: solid 1px transparent; 12821 } 12822 12823 .range__tooltip:after { 12824 display: none; 12825 } 12826 } 12827`,Wb=class extends Xe{constructor(){super(...arguments),this.formControlController=new st(this),this.hasSlotController=new dt(this,"help-text","label"),this.localize=new $e(this),this.hasFocus=!1,this.hasTooltip=!1,this.title="",this.name="",this.value=0,this.label="",this.helpText="",this.disabled=!1,this.min=0,this.max=100,this.step=1,this.tooltip="top",this.tooltipFormatter=e=>e.toString(),this.form="",this.defaultValue=0}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.syncRange()),this.value<this.min&&(this.value=this.min),this.value>this.max&&(this.value=this.max),this.updateComplete.then(()=>{this.syncRange(),this.resizeObserver.observe(this.input)})}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this.resizeObserver)||e.unobserve(this.input)}handleChange(){this.emit("sl-change")}handleInput(){this.value=parseFloat(this.input.value),this.emit("sl-input"),this.syncRange()}handleBlur(){this.hasFocus=!1,this.hasTooltip=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.hasTooltip=!0,this.emit("sl-focus")}handleThumbDragStart(){this.hasTooltip=!0}handleThumbDragEnd(){this.hasTooltip=!1}syncProgress(e){this.input.style.setProperty("--percent",100*e+"%")}syncTooltip(e){if(null!==this.output){const t=this.input.offsetWidth,i=this.output.offsetWidth,r=getComputedStyle(this.input).getPropertyValue("--thumb-size"),s=t*e;if("rtl"===this.localize.dir()){const o=`${t-s}px + ${e} * ${r}`;this.output.style.translate=`calc((${o} - ${i/2}px - ${r} / 2))`}else{const t=`${s}px - ${e} * ${r}`;this.output.style.translate=`calc(${t} - ${i/2}px + ${r} / 2)`}}}handleValueChange(){this.formControlController.updateValidity(),this.input.value=this.value.toString(),this.value=parseFloat(this.input.value),this.syncRange()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}syncRange(){const e=Math.max(0,(this.value-this.min)/(this.max-this.min));this.syncProgress(e),"none"!==this.tooltip&&this.hasTooltip&&this.updateComplete.then(()=>this.syncTooltip(e))}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}focus(e){this.input.focus(e)}blur(){this.input.blur()}stepUp(){this.input.stepUp(),this.value!==Number(this.input.value)&&(this.value=Number(this.input.value))}stepDown(){this.input.stepDown(),this.value!==Number(this.input.value)&&(this.value=Number(this.input.value))}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),i=!!this.label||!!e,r=!!this.helpText||!!t;return W` 12828 <div 12829 part="form-control" 12830 class=${Mt({"form-control":!0,"form-control--medium":!0,"form-control--has-label":i,"form-control--has-help-text":r})} 12831 > 12832 <label 12833 part="form-control-label" 12834 class="form-control__label" 12835 for="input" 12836 aria-hidden=${i?"false":"true"} 12837 > 12838 <slot name="label">${this.label}</slot> 12839 </label> 12840 12841 <div part="form-control-input" class="form-control-input"> 12842 <div 12843 part="base" 12844 class=${Mt({range:!0,"range--disabled":this.disabled,"range--focused":this.hasFocus,"range--rtl":"rtl"===this.localize.dir(),"range--tooltip-visible":this.hasTooltip,"range--tooltip-top":"top"===this.tooltip,"range--tooltip-bottom":"bottom"===this.tooltip})} 12845 @mousedown=${this.handleThumbDragStart} 12846 @mouseup=${this.handleThumbDragEnd} 12847 @touchstart=${this.handleThumbDragStart} 12848 @touchend=${this.handleThumbDragEnd} 12849 > 12850 <input 12851 part="input" 12852 id="input" 12853 class="range__control" 12854 title=${this.title} 12855 type="range" 12856 name=${Ht(this.name)} 12857 ?disabled=${this.disabled} 12858 min=${Ht(this.min)} 12859 max=${Ht(this.max)} 12860 step=${Ht(this.step)} 12861 .value=${Qt(this.value.toString())} 12862 aria-describedby="help-text" 12863 @change=${this.handleChange} 12864 @focus=${this.handleFocus}
12865 @input=${this.handleInput} 12866 @invalid=${this.handleInvalid} 12867 @blur=${this.handleBlur} 12868 /> 12869 ${"none"===this.tooltip||this.disabled?"":W` 12870 <output part="tooltip" class="range__tooltip"> 12871 ${"function"==typeof this.tooltipFormatter?this.tooltipFormatter(this.value):this.value} 12872 </output> 12873 `} 12874 </div> 12875 </div> 12876 12877 <div 12878 part="form-control-help-text" 12879 id="help-text" 12880 class="form-control__help-text" 12881 aria-hidden=${r?"false":"true"} 12882 > 12883 <slot name="help-text">${this.helpText}</slot> 12884 </div> 12885 </div> 12886 `}};Wb.styles=[Se,Kt,Hb],Ne([Ye(".range__control")],Wb.prototype,"input",2),Ne([Ye(".range__tooltip")],Wb.prototype,"output",2),Ne([He()],Wb.prototype,"hasFocus",2),Ne([He()],Wb.prototype,"hasTooltip",2),Ne([Ve()],Wb.prototype,"title",2),Ne([Ve()],Wb.prototype,"name",2),Ne([Ve({type:Number})],Wb.prototype,"value",2),Ne([Ve()],Wb.prototype,"label",2),Ne([Ve({attribute:"help-text"})],Wb.prototype,"helpText",2),Ne([Ve({type:Boolean,reflect:!0})],Wb.prototype,"disabled",2),Ne([Ve({type:Number})],Wb.prototype,"min",2),Ne([Ve({type:Number})],Wb.prototype,"max",2),Ne([Ve({type:Number})],Wb.prototype,"step",2),Ne([Ve()],Wb.prototype,"tooltip",2),Ne([
12886Ve({attribute:!1})],Wb.prototype,"tooltipFormatter",2),Ne([Ve({reflect:!0})],Wb.prototype,"form",2),Ne([Yt()],Wb.prototype,"defaultValue",2),Ne([We({passive:!0})],Wb.prototype,"handleThumbDragStart",1),Ne([yt("value",{waitUntilFirstUpdate:!0})],Wb.prototype,"handleValueChange",1),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Wb.prototype,"handleDisabledChange",1),Ne([yt("hasTooltip",{waitUntilFirstUpdate:!0})],Wb.prototype,"syncRange",1),Wb.define("sl-range");var Gb=c` 12887 :host { 12888 --symbol-color: var(--sl-color-neutral-300); 12889 --symbol-color-active: var(--sl-color-amber-500); 12890 --symbol-size: 1.2rem; 12891 --symbol-spacing: var(--sl-spacing-3x-small); 12892 12893 display: inline-flex; 12894 } 12895 12896 .rating { 12897 position: relative; 12898 display: inline-flex; 12899 border-radius: var(--sl-border-radius-medium); 12900 vertical-align: middle; 12901 } 12902 12903 .rating:focus { 12904 outline: none; 12905 } 12906 12907 .rating:focus-visible { 12908 outline: var(--sl-focus-ring); 12909 outline-offset: var(--sl-focus-ring-offset); 12910 } 12911 12912 .rating__symbols { 12913 display: inline-flex; 12914 position: relative; 12915 font-size: var(--symbol-size); 12916 line-height: 0; 12917 color: var(--symbol-color); 12918 white-space: nowrap; 12919 cursor: pointer; 12920 } 12921 12922 .rating__symbols > * { 12923 padding: var(--symbol-spacing); 12924 } 12925 12926 .rating__symbol--active, 12927 .rating__partial--filled { 12928 color: var(--symbol-color-active); 12929 } 12930 12931 .rating__partial-symbol-container { 12932 position: relative; 12933 } 12934 12935 .rating__partial--filled { 12936 position: absolute; 12937 top: var(--symbol-spacing); 12938 left: var(--symbol-spacing); 12939 } 12940 12941 .rating__symbol { 12942 transition: var(--sl-transition-fast) scale; 12943 pointer-events: none; 12944 } 12945 12946 .rating__symbol--hover { 12947 scale: 1.2; 12948 } 12949 12950 .rating--disabled .rating__symbols, 12951 .rating--readonly .rating__symbols { 12952 cursor: default; 12953 } 12954 12955 .rating--disabled .rating__symbol--hover, 12956 .rating--readonly .rating__symbol--hover { 12957 scale: none; 12958 } 12959 12960 .rating--disabled { 12961 opacity: 0.5; 12962 } 12963 12964 .rating--disabled .rating__symbols { 12965 cursor: not-allowed; 12966 } 12967 12968 /* Forced colors mode */ 12969 @media (forced-colors: active) { 12970 .rating__symbol--active { 12971 color: SelectedItem; 12972 } 12973 } 12974`,Yb=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.hoverValue=0,this.isHovering=!1,this.label="",this.value=0,this.max=5,this.precision=1,this.readonly=!1,this.disabled=!1,this.getSymbol=()=>'<sl-icon name="star-fill" library="system"></sl-icon>'}getValueFromMousePosition(e){return this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const t="rtl"===this.localize.dir(),{left:i,right:r,width:s}=this.rating.getBoundingClientRect();return $b(t?this.roundToPrecision((r-e)/s*this.max,this.precision):this.roundToPrecision((e-i)/s*this.max,this.precision),0,this.max)}handleClick(e){this.disabled||(this.setValue(this.getValueFromMousePosition(e)),this.emit("sl-change"))}setValue(e){this.disabled||this.readonly||(this.value=e===this.value?0:e,this.isHovering=!1)}handleKeyDown(e){const t="ltr"===this.localize.dir(),i="rtl"===this.localize.dir(),r=this.value;if(!this.disabled&&!this.readonly){if("ArrowDown"===e.key||t&&"ArrowLeft"===e.key||i&&"ArrowRight"===e.key){const t=e.shiftKey?1:this.precision;this.value=Math.max(0,this.value-t),e.preventDefault()}if("ArrowUp"===e.key||t&&"ArrowRight"===e.key||i&&"ArrowLeft"===e.key){const t=e.shiftKey?1:this.precision;this.value=Math.min(this.max,this.value+t),e.preventDefault()}"Home"===e.key&&(this.value=0,e.preventDefault()),"End"===e.key&&(this.value=this.max,e.preventDefault()),this.value!==r&&this.emit("sl-change")}}handleMouseEnter(e){this.isHovering=!0,this.hoverValue=this.getValueFromMousePosition(e)}handleMouseMove(e){this.hoverValue=this.getValueFromMousePosition(e)}handleMouseLeave(){this.isHovering=!1}handleTouchStart(e){this.isHovering=!0,this.hoverValue=this.getValueFromTouchPosition(e),e.preventDefault()}handleTouchMove(e){this.hoverValue=this.getValueFromTouchPosition(e)}handleTouchEnd(e){this.isHovering=!1,this.setValue(this.hoverValue),this.emit
12974("sl-change"),e.preventDefault()}roundToPrecision(e,t=.5){const i=1/t;return Math.ceil(e*i)/i}handleHoverValueChange(){this.emit("sl-hover",{detail:{phase:"move",value:this.hoverValue}})}handleIsHoveringChange(){this.emit("sl-hover",{detail:{phase:this.isHovering?"start":"end",value:this.hoverValue}})}focus(e){this.rating.focus(e)}blur(){this.rating.blur()}render(){const e="rtl"===this.localize.dir(),t=Array.from(Array(this.max).keys());let i=0;return i=this.disabled||this.readonly?this.value:this.isHovering?this.hoverValue:this.value,W` 12975 <div 12976 part="base" 12977 class=${Mt({rating:!0,"rating--readonly":this.readonly,"rating--disabled":this.disabled,"rating--rtl":e})} 12978 role="slider" 12979 aria-label=${this.label} 12980 aria-disabled=${this.disabled?"true":"false"} 12981 aria-readonly=${this.readonly?"true":"false"} 12982 aria-valuenow=${this.value} 12983 aria-valuemin=${0} 12984 aria-valuemax=${this.max} 12985 tabindex=${this.disabled||this.readonly?"-1":"0"} 12986 @click=${this.handleClick} 12987 @keydown=${this.handleKeyDown} 12988 @mouseenter=${this.handleMouseEnter} 12989 @touchstart=${this.handleTouchStart} 12990 @mouseleave=${this.handleMouseLeave} 12991 @touchend=${this.handleTouchEnd} 12992 @mousemove=${this.handleMouseMove} 12993 @touchmove=${this.handleTouchMove} 12994 > 12995 <span class="rating__symbols"> 12996 ${t.map(t=>i>t&&i<t+1?W` 12997 <span 12998 class=${Mt({rating__symbol:!0,"rating__partial-symbol-container":!0,"rating__symbol--hover":this.isHovering&&Math.ceil(i)===t+1})} 12999 role="presentation" 13000 > 13001 <div 13002 style=${Ps({clipPath:e?`inset(0 ${100*(i-t)}% 0 0)`:`inset(0 0 0 ${100*(i-t)}%)`})} 13003 > 13004 ${Qs(this.getSymbol(t+1))} 13005 </div> 13006 <div 13007 class="rating__partial--filled" 13008 style=${Ps({clipPath:e?`inset(0 0 0 ${100-100*(i-t)}%)`:`inset(0 ${100-100*(i-t)}% 0 0)`})} 13009 > 13010 ${Qs(this.getSymbol(t+1))} 13011 </div> 13012 </span> 13013 `:W` 13014 <span 13015 class=${Mt({rating__symbol:!0,"rating__symbol--hover":this.isHovering&&Math.ceil(i)===t+1,"rating__symbol--active":i>=t+1})} 13016 role="presentation" 13017 > 13018 ${Qs(this.getSymbol(t+1))} 13019 </span> 13020 `)} 13021 </span> 13022 </div> 13023 `}};Yb.styles=[Se,Gb],Yb.dependencies={"sl-icon":Pt},Ne([Ye(".rating")],Yb.prototype,"rating",2),Ne([He()],Yb.prototype,"hoverValue",2),Ne([He()],Yb.prototype,"isHovering",2),Ne([Ve()],Yb.prototype,"label",2),Ne([Ve({type:Number})],Yb.prototype,"value",2),Ne([Ve({type:Number})],Yb.prototype,"max",2),Ne([Ve({type:Number})],Yb.prototype,"precision",2),Ne([Ve({type:Boolean,reflect:!0})],Yb.prototype,"readonly",2),Ne([Ve({type:Boolean,reflect:!0})],Yb.prototype,"disabled",2),Ne([Ve()],Yb.prototype,"getSymbol",2),Ne([We({passive:!0})],Yb.prototype,"handleTouchMove",1),Ne([yt("hoverValue")],Yb.prototype,"handleHoverValueChange",1),Ne([yt("isHovering")],Yb.prototype,"handleIsHoveringChange",1),Yb.define("sl-rating");var Kb=c` 13024 ${lt} 13025 13026 .button__prefix, 13027 .button__suffix, 13028 .button__label { 13029 display: inline-flex; 13030 position: relative; 13031 align-items: center; 13032 } 13033 13034 /* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons. 13035 We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */ 13036 .hidden-input { 13037 all: unset; 13038 position: absolute; 13039 top: 0; 13040 left: 0; 13041 bottom: 0; 13042 right: 0; 13043 outline: dotted 1px red; 13044 opacity: 0; 13045 z-index: -1; 13046 } 13047`,Qb=class extends Xe{constructor(){super(...arguments),this.hasSlotController=new dt(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="medium",this.pill=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}
13047handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleClick(e){if(this.disabled)return e.preventDefault(),void e.stopPropagation();this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){return Vt` 13048 <div part="base" role="presentation"> 13049 <button 13050 part="${"button"+(this.checked?" button--checked":"")}" 13051 role="radio" 13052 aria-checked="${this.checked}" 13053 class=${Mt({button:!0,"button--default":!0,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--checked":this.checked,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--outline":!0,"button--pill":this.pill,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})} 13054 aria-disabled=${this.disabled} 13055 type="button" 13056 value=${Ht(this.value)} 13057 @blur=${this.handleBlur} 13058 @focus=${this.handleFocus} 13059 @click=${this.handleClick} 13060 > 13061 <slot name="prefix" part="prefix" class="button__prefix"></slot> 13062 <slot part="label" class="button__label"></slot> 13063 <slot name="suffix" part="suffix" class="button__suffix"></slot> 13064 </button> 13065 </div> 13066 `}};Qb.styles=[Se,Kb],Ne([Ye(".button")],Qb.prototype,"input",2),Ne([Ye(".hidden-input")],Qb.prototype,"hiddenInput",2),Ne([He()],Qb.prototype,"hasFocus",2),Ne([Ve({type:Boolean,reflect:!0})],Qb.prototype,"checked",2),Ne([Ve()],Qb.prototype,"value",2),Ne([Ve({type:Boolean,reflect:!0})],Qb.prototype,"disabled",2),Ne([Ve({reflect:!0})],Qb.prototype,"size",2),Ne([Ve({type:Boolean,reflect:!0})],Qb.prototype,"pill",2),Ne([yt("disabled",{waitUntilFirstUpdate:!0})],Qb.prototype,"handleDisabledChange",1),Qb.define("sl-radio-button");var Xb=c` 13067 :host { 13068 --size: 128px; 13069 --track-width: 4px; 13070 --track-color: var(--sl-color-neutral-200); 13071 --indicator-width: var(--track-width); 13072 --indicator-color: var(--sl-color-primary-600); 13073 --indicator-transition-duration: 0.35s; 13074 13075 display: inline-flex; 13076 } 13077 13078 .progress-ring { 13079 display: inline-flex; 13080 align-items: center; 13081 justify-content: center; 13082 position: relative; 13083 } 13084 13085 .progress-ring__image { 13086 width: var(--size); 13087 height: var(--size); 13088 rotate: -90deg; 13089 transform-origin: 50% 50%; 13090 } 13091 13092 .progress-ring__track, 13093 .progress-ring__indicator { 13094 --radius: calc(var(--size) / 2 - max(var(--track-width), var(--indicator-width)) * 0.5); 13095 --circumference: calc(var(--radius) * 2 * 3.141592654); 13096 13097 fill: none; 13098 r: var(--radius); 13099 cx: calc(var(--size) / 2); 13100 cy: calc(var(--size) / 2); 13101 } 13102 13103 .progress-ring__track { 13104 stroke: var(--track-color); 13105 stroke-width: var(--track-width); 13106 } 13107 13108 .progress-ring__indicator { 13109 stroke: var(--indicator-color); 13110 stroke-width: var(--indicator-width); 13111 stroke-linecap: round; 13112 transition-property: stroke-dashoffset; 13113 transition-duration: var(--indicator-transition-duration); 13114 stroke-dasharray: var(--circumference) var(--circumference); 13115 stroke-dashoffset: calc(var(--circumference) - var(--percentage) * var(--circumference)); 13116 } 13117 13118 .progress-ring__label { 13119 display: flex; 13120 align-items: center; 13121 justify-content: center; 13122 position: absolute; 13123 top: 0; 13124 left: 0; 13125 width: 100%; 13126 height: 100%; 13127 text-align: center; 13128 user-select: none; 13129 -webkit-user-select: none; 13130 } 13131`,Jb=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.value=0,this.label=""}updated(e){if(super.updated(e),e.has("value")){const e=parseFloat(getComputedStyle(this.indicator).getPropertyValue("r")),t=2*Math.PI*e,i=t-this.value/100*t;this.indicatorOffset=`${i}px`}}render(){return W` 13132 <div 13133 part="base" 13134 class="progress-ring" 13135 role="progressbar" 13136 aria-label=${this.label.length>0?this.label:this.localize.term("progress")} 13137 aria-describedby="label" 13138 aria-valuemin="0" 13139 aria-valuemax="100" 13140 aria-valuenow="${this.value}" 13141 style="--percentage: ${this.value/100}" 13142 > 13143 <svg class="progress-ring__image"> 13144 <circle class="progress-ring__track"></circle> 13145 <circle class="progress-ring__indicator" style="stroke-dashoffset: ${this.indicatorOffset}"></circle> 13146 </svg> 13147 13148 <slot id="label" part="label" class="progress-ring__label"></slot> 13149 </div> 13150 `}};Jb.styles=[Se,Xb],Ne([Ye(".progress-ring__indicator")],Jb.prototype,"indicator",2),Ne([He()],Jb.prototype,"indicatorOffset",2),Ne([
vendor: 8,589 bytes, lines 13150-13154
13150Ve({type:Number,reflect:!0})],Jb.prototype,"value",2),Ne([Ve()],Jb.prototype,"label",2),Jb.define("sl-progress-ring");var Zb=c` 13151 :host { 13152 display: inline-block; 13153 } 13154`;let ev=null;class tv{}tv.render=function(e,t){ev(e,t)},self.QrCreator=tv,function(e){function t(t,i,r,s){var o={},a=e(r,i);a.u(t),a.J(),s=s||0;var n=a.h(),l=a.h()+2*s;return o.text=t,o.level=i,o.version=r,o.O=l,o.a=function(e,t){return t-=s,!(0>(e-=s)||e>=n||0>t||t>=n)&&a.a(e,t)},o}function i(e,t,i,r,s,o,a,n,l,d){function c(t,i,r,s,a,n,l){t?(e.lineTo(i+n,r+l),e.arcTo(i,r,s,a,o)):e.lineTo(i,r)}a?e.moveTo(t+o,i):e.moveTo(t,i),c(n,r,i,r,s,-o,0),c(l,r,s,t,s,0,-o),c(d,t,s,t,i,o,0),c(a,t,i,r,i,0,o)}function r(e,t,i,r,s,o,a,n,l,d){function c(t,i,r,s){e.moveTo(t+r,i),e.lineTo(t,i),e.lineTo(t,i+s),e.arcTo(t,i,t+r,i,o)}a&&c(t,i,o,o),n&&c(r,i,-o,o),l&&c(r,s,-o,-o),d&&c(t,s,o,-o)}function s(e,s){e:{var o=s.text,a=s.v,n=s.N,l=s.K,d=s.P;for(n=Math.max(1,n||1),l=Math.min(40,l||40);n<=l;n+=1)try{var c=t(o,a,n,d);break e}catch(e){}c=void 0}if(!c)return null;for(o=e.getContext("2d"),s.background&&(o.fillStyle=s.background,o.fillRect(s.left,s.top,s.size,s.size)),a=c.O,l=s.size/a,o.beginPath(),d=0;d<a;d+=1)for(n=0;n<a;n+=1){var h=o,u=s.left+n*l,p=s.top+d*l,f=d,m=n,g=c.a,b=u+l,v=p+l,y=f-1,_=f+1,w=m-1,k=m+1,x=Math.floor(Math.min(.5,Math.max(0,s.R))*l),$=g(f,m),S=g(y,w),C=g(y,m);y=g(y,k);var E=g(f,k);k=g(_,k),m=g(_,m),_=g(_,w),f=g(f,w),u=Math.round(u),p=Math.round(p),b=Math.round(b),v=Math.round(v),$?i(h,u,p,b,v,x,!C&&!f,!C&&!E,!m&&!E,!m&&!f):r(h,u,p,b,v,x,C&&f&&S,C&&E&&y,m&&E&&k,m&&f&&_)}return function(e,t){var i=t.fill;if("string"==typeof i)e.fillStyle=i;else{var r=i.type,s=i.colorStops;if(i=i.position.map(e=>Math.round(e*t.size)),"linear-gradient"===r)var o=e.createLinearGradient.apply(e,i);else{if("radial-gradient"!==r)throw Error("Unsupported fill");o=e.createRadialGradient.apply(e,i)}s.forEach(([e,t])=>{o.addColorStop(e,t)}),e.fillStyle=o}}(o,s),o.fill(),e}var o={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};ev=function(e,t){var i={};Object.assign(i,o,e),i.N=i.minVersion,i.K=i.maxVersion,i.v=i.ecLevel,i.left=i.left,i.top=i.top,i.size=i.size,i.fill=i.fill,i.background=i.background,i.text=i.text,i.R=i.radius,i.P=i.quiet,t instanceof HTMLCanvasElement?(t.width===i.size&&t.height===i.size||(t.width=i.size,t.height=i.size),t.getContext("2d").clearRect(0,0,t.width,t.height),s(t,i)):((e=document.createElement("canvas")).width=i.size,e.height=i.size,i=s(e,i),t.appendChild(i))}}(function(){function e(s,a){function n(e,t){for(var i=-1;7>=i;i+=1)if(!(-1>=e+i||h<=e+i))for(var r=-1;7>=r;r+=1)-1>=t+r||h<=t+r||(c[e+i][t+r]=0<=i&&6>=i&&(0==r||6==r)||0<=r&&6>=r&&(0==i||6==i)||2<=i&&4>=i&&2<=r&&4>=r)}function l(e,i){for(var a=h=4*s+17,l=Array(a),f=0;f<a;f+=1){l[f]=Array(a);for(var m=0;m<a;m+=1)l[f][m]=null}for(c=l,n(0,0),n(h-7,0),n(0,h-7),a=r.G(s),l=0;l<a.length;l+=1)for(f=0;f<a.length;f+=1){m=a[l];var g=a[f];if(null==c[m][g])for(var b=-2;2>=b;b+=1)for(var v=-2;2>=v;v+=1)c[m+b][g+v]=-2==b||2==b||-2==v||2==v||0==b&&0==v}for(a=8;a<h-8;a+=1)null==c[a][6]&&(c[a][6]=0==a%2);for(a=8;a<h-8;a+=1)null==c[6][a]&&(c[6][a]=0==a%2);for(a=r.w(d<<3|i),l=0;15>l;l+=1)f=!e&&1==(a>>l&1),c[6>l?l:8>l?l+1:h-15+l][8]=f,c[8][8>l?h-l-1:9>l?15-l:14-l]=f;if(c[h-8][8]=!e,7<=s){for(a=r.A(s),l=0;18>l;l+=1)f=!e&&1==(a>>l&1),c[Math.floor(l/3)][l%3+h-8-3]=f;for(l=0;18>l;l+=1)f=!e&&1==(a>>l&1),c[l%3+h-8-3][Math.floor(l/3)]=f}if(null==u){for(e=o.I(s,d),a=function(){var e=[],t=0,i={B:function(){return e},c:function(t){return 1==(e[Math.floor(t/8)]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)i.m(1==(e>>>t-r-1&1))},f:function(){return t},m:function(i){var r=Math.floor(t/8);e.length<=r&&e.push(0),i&&(e[r]|=128>>>t%8),t+=1}};return i}(),l=0;l<p.length;l+=1)f=p[l],a.put(4,4),a.put(f.b(),r.f(4,s)),f.write(a);for(l=f=0;l<e.length;l+=1)f+=e[l].j;if(a.f()>8*f)throw Error("code length overflow. ("+a.f()+">"+8*f+")");for(a.f()+4<=8*f&&a.put(0,4);0!=a.f()%8;)a.m(!1);for(;!(a.f()>=8*f)&&(a.put(236,8),!(a.f()>=8*f));)a.put(17,8);var y=0;for(f=l=0,m=Array(e.length),g=Array(e.length),b=0;b<e.length;b+=1){var _=e[b].j,w=e[b].o-_;for(l=Math.max(l,_),f=Math.max(f,w),m[b]=Array(_),v=0;v<m[b].length;v+=1)m[b][v]=255&a.B()[v+y];for(y+=_,v=r.C(w),_=t(m[b],v.b()-1).l(v),g[b]=Array(v.b()-1),v=0;v<g[b].length;v+=1)w=v+_.b()-g[b].length,g[b][v]=0<=w?_.c(w):0}for(v=a=0;v<e.length;v+=1)a+=e[v].o;for(a=Array(a),v=y=0;v<l;v+=1)for(b=0;b<e.length;b+=1)v<m[b].length&&(a[y]=m[b][v],y+=1);for(v=0;v<f;v+=1)for(b=0;b<e.length;b+=1)v<g[b].length&&(a[y]=g[b][v],y+=1);u=a}for(e=u,a=-1,l=h-1,f=7,m=0,i=r.F(i),g=h-1;0<g;g-=2)for(6==g&&--g;;){for(b=0;2>b;b+=1)null==c[l][g-b]&&(v=!1,m<e.length&&(v=1==(e[m]>>>f&1)),i(l,g-b)&&(v=!v),c[l][g-b]=v,-1==--f&&(m+=1,f=7));if(0>(l+=a)||h<=l){l-=a,a=-a;break}}}var d=i[a],c=null,h=0,u=null,p=[],f={u:function(t){t=function(t){var i=e.s(t);return{S:function(){return 4},b:function(){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}}}(t),p.push(t),u=null},a:function(e,t){if(0>e||h<=e||0>t||h<=t)throw Error(e+","+t);return c[e][t]},h:function(){return h},J:function(){for(var e=0,t=0,i=0;8>i;i+=1){l(!0,i);var s=r.D(f);(0==i||e>s)&&(e=s,t=i)}l(!1,t)}};return f}function t(e,i){if(void 0===e.length)throw Error(e.length+"/"+i);var r=function(){for(var t=0;t<e.length&&0==e[t];)t+=1;for(var r=Array(e.length-t+i),s=0;s<e.length-t;s+=1)r[s]=e[s+t];return r}(),o={c:function(e){return r[e]},b:function(){return r.length},multiply:function(e){for(var i=Array(o.b()+e.b()-1),r=0;r<o.b();r+=1)for(var a=0;a<e.b();a+=1)i[r+a]^=s.i(s.g(o.c(r))+s.g(e.c(a)));return t(i,0)},l:function(e){if(0>o.b()-e.b())return o;for(var i=s.g(o.c(0))-s.g(e.c(0)),r=Array(o.b()),a=0;a<o.b();a+=1)r[a]=o.c(a);for(a=0;a<e.b();a+=1)r[a]^=s.i(s.g(e.c(a))+i);return t(r,0).l(e)}};return o}e.s=function(e){for(var t=[],i=0;i<e.length;i++){var r=e.charCodeAt(i);128>r?t.push(r):2048>r?t.push(192|r>>6,128|63&r):55296>r||57344<=r?t.push(224|r>>12,128|r>>6&63,128|63&r):(i++,r=65536+((1023&r)<<10|1023&e.charCodeAt(i)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t};var i={L:1,M:0,Q:3,H:2},r=function(){function e(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t}var i=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r={w:function(t){for(var i=t<<10;0<=e(i)-e(1335);)i^=1335<<e(i)-e(1335);return 21522^(t<<10|i)},A:function(t){for(var i=t<<12;0<=e(i)-e(7973);)i^=7973<<e(i)-e(7973);return t<<12|i},G:function(e){return i[e-1]},F:function(e){switch(e){case 0:return function(e,t){return 0==(e+t)%2};case 1:return function(e){return 0==e%2};case 2:return function(e,t){return 0==t%3};case 3:return function(e,t){return 0==(e+t)%3};case 4:return function(e,t){return 0==(Math.floor(e/2)+Math.floor(t/3))%2};case 5:return function(e,t){return 0==e*t%2+e*t%3};case 6:return function(e,t){return 0==(e*t%2+e*t%3)%2};case 7:return function(e,t){return 0==(e*t%3+(e+t)%2)%2};default:throw Error("bad maskPattern:"+e)}},C:function(e){for(var i=t([1],0),r=0;r<e;r+=1)i=i.multiply(t([1,s.i(r)],0));return i},f:function(e,t){if(4!=e||1>t||40<t)throw Error("mode: "+e+"; type: "+t);return 10>t?8:16},D:function(e){for(var t=e.h(),i=0,r=0;r<t;r+=1)for(var s=0;s<t;s+=1){for(var o=0,a=e.a(r,s),n=-1;1>=n;n+=1)if(!(0>r+n||t<=r+n))for(var l=-1;1>=l;l+=1)0>s+l||t<=s+l||(0!=n||0!=l)&&a==e.a(r+n,s+l)&&(o+=1);5<o&&(i+=3+o-5)}for(r=0;r<t-1;r+=1)for(s=0;s<t-1;s+=1)o=0,e.a(r,s)&&(o+=1),e.a(r+1,s)&&(o+=1),e.a(r,s+1)&&(o+=1),e.a(r+1,s+1)&&(o+=1),(0==o||4==o)&&(i+=3);for(r=0;r<t;r+=1)for(s=0;s<t-6;s+=1)e.a(r,s)&&!e.a(r,s+1)&&e.a(r,s+2)&&e.a(r,s+3)&&e.a(r,s+4)&&!e.a(r,s+5)&&e.a(r,s+6)&&(i+=40);for(s=0;s<t;s+=1)for(r=0;r<t-6;r+=1)e.a(r,s)&&!e.a(r+1,s)&&e.a(r+2,s)&&e.a(r+3,s)&&e.a(r+4,s)&&!e.a(r+5,s)&&e.a(r+6,s)&&(i+=40);for(s=o=0;s<t;s+=1)for(r=0;r<t;r+=1)e.a(r,s)&&(o+=1);return i+Math.abs(100*o/t/t-50)/5*10}};return r}(),s=function(){for(var e=Array(256),t=Array(256),i=0;8>i;i+=1)e[i]=1<<i;for(i=8;256>i;i+=1)e[i]=e[i-4]^e[i-5]^e[i-6]^e[i-8];for(i=0;255>i;i+=1)t[e[i]]=i;
13154return{g:function(e){if(1>e)throw Error("glog("+e+")");return t[e]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),o=function(){function e(e,r){switch(r){case i.L:return t[4*(e-1)];case i.M:return t[4*(e-1)+1];case i.Q:return t[4*(e-1)+2];case i.H:return t[4*(e-1)+3]}}var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r={I:function(t,i){var r=e(t,i);if(void 0===r)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+i);t=r.length/3,i=[];for(var s=0;s<t;s+=1)for(var o=r[3*s],a=r[3*s+1],n=r[3*s+2],l=0;l<o;l+=1){var d=n,c={};c.o=a,c.j=d,i.push(c)}return i}};return r}();return e}());var iv=QrCreator,rv=class extends Xe{constructor(){super(...arguments),this.value="",this.label="",this.size=128,this.fill="black",this.background="white",this.radius=0,this.errorCorrection="H"}firstUpdated(){this.generate()}generate(){this.hasUpdated&&iv.render({text:this.value,radius:this.radius,ecLevel:this.errorCorrection,fill:this.fill,background:this.background,size:2*this.size},this.canvas)}render(){var e;return W` 13155 <canvas 13156 part="base" 13157 class="qr-code" 13158 role="img" 13159 aria-label=${(null==(e=this.label)?void 0:e.length)>0?this.label:this.value} 13160 style=${Ps({width:`${this.size}px`,height:`${this.size}px`})} 13161 ></canvas> 13162 `}};rv.styles=[Se,Zb],Ne([Ye("canvas")],rv.prototype,"canvas",2),Ne([
13162Ve()],rv.prototype,"value",2),Ne([Ve()],rv.prototype,"label",2),Ne([Ve({type:Number})],rv.prototype,"size",2),Ne([Ve()],rv.prototype,"fill",2),Ne([Ve()],rv.prototype,"background",2),Ne([Ve({type:Number})],rv.prototype,"radius",2),Ne([Ve({attribute:"error-correction"})],rv.prototype,"errorCorrection",2),Ne([yt(["background","errorCorrection","fill","radius","size","value"])],rv.prototype,"generate",1),rv.define("sl-qr-code");var sv=c` 13163 :host { 13164 display: block; 13165 } 13166 13167 .menu-label { 13168 display: inline-block; 13169 font-family: var(--sl-font-sans); 13170 font-size: var(--sl-font-size-small); 13171 font-weight: var(--sl-font-weight-semibold); 13172 line-height: var(--sl-line-height-normal); 13173 letter-spacing: var(--sl-letter-spacing-normal); 13174 color: var(--sl-color-neutral-500); 13175 padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-large); 13176 user-select: none; 13177 -webkit-user-select: none; 13178 } 13179`,ov=class extends Xe{render(){return W` <slot part="base" class="menu-label"></slot> `}};ov.styles=[Se,sv],ov.define("sl-menu-label");var av=c` 13180 :host { 13181 display: contents; 13182 } 13183`,nv=class extends Xe{constructor(){super(...arguments),this.attrOldValue=!1,this.charData=!1,this.charDataOldValue=!1,this.childList=!1,this.disabled=!1,this.handleMutation=e=>{this.emit("sl-mutation",{detail:{mutationList:e}})}}connectedCallback(){super.connectedCallback(),this.mutationObserver=new MutationObserver(this.handleMutation),this.disabled||this.startObserver()}disconnectedCallback(){super.disconnectedCallback(),this.stopObserver()}startObserver(){const e="string"==typeof this.attr&&this.attr.length>0,t=e&&"*"!==this.attr?this.attr.split(" "):void 0;try{this.mutationObserver.observe(this,{subtree:!0,childList:this.childList,attributes:e,attributeFilter:t,attributeOldValue:this.attrOldValue,characterData:this.charData,characterDataOldValue:this.charDataOldValue})}catch(e){}}stopObserver(){this.mutationObserver.disconnect()}handleDisabledChange(){this.disabled?this.stopObserver():this.startObserver()}handleChange(){this.stopObserver(),this.startObserver()}render(){return W` <slot></slot> `}};nv.styles=[Se,av],Ne([Ve({reflect:!0})],nv.prototype,"attr",2),Ne([Ve({attribute:"attr-old-value",type:Boolean,reflect:!0})],nv.prototype,"attrOldValue",2),Ne([Ve({attribute:"char-data",type:Boolean,reflect:!0})],nv.prototype,"charData",2),Ne([Ve({attribute:"char-data-old-value",type:Boolean,reflect:!0})],nv.prototype,"charDataOldValue",2),Ne([Ve({attribute:"child-list",type:Boolean,reflect:!0})],nv.prototype,"childList",2),Ne([Ve({type:Boolean,reflect:!0})],nv.prototype,"disabled",2),Ne([yt("disabled")],nv.prototype,"handleDisabledChange",1),Ne([yt("attr",{waitUntilFirstUpdate:!0}),yt("attr-old-value",{waitUntilFirstUpdate:!0}),yt("char-data",{waitUntilFirstUpdate:!0}),yt("char-data-old-value",{waitUntilFirstUpdate:!0}),yt("childList",{waitUntilFirstUpdate:!0})],nv.prototype,"handleChange",1),nv.define("sl-mutation-observer");var lv=c` 13184 :host { 13185 --divider-width: 2px; 13186 --handle-size: 2.5rem; 13187 13188 display: inline-block; 13189 position: relative; 13190 } 13191 13192 .image-comparer { 13193 max-width: 100%; 13194 max-height: 100%; 13195 overflow: hidden; 13196 } 13197 13198 .image-comparer__before, 13199 .image-comparer__after { 13200 display: block; 13201 pointer-events: none; 13202 } 13203 13204 .image-comparer__before::slotted(img), 13205 .image-comparer__after::slotted(img), 13206 .image-comparer__before::slotted(svg), 13207 .image-comparer__after::slotted(svg) { 13208 display: block; 13209 max-width: 100% !important; 13210 height: auto; 13211 } 13212 13213 .image-comparer__after { 13214 position: absolute; 13215 top: 0; 13216 left: 0; 13217 height: 100%; 13218 width: 100%; 13219 } 13220 13221 .image-comparer__divider { 13222 display: flex; 13223 align-items: center; 13224 justify-content: center; 13225 position: absolute; 13226 top: 0; 13227 width: var(--divider-width); 13228 height: 100%; 13229 background-color: var(--sl-color-neutral-0); 13230 translate: calc(var(--divider-width) / -2); 13231 cursor: ew-resize; 13232 } 13233 13234 .image-comparer__handle { 13235 display: flex; 13236 align-items: center; 13237 justify-content: center; 13238 position: absolute; 13239 top: calc(50% - (var(--handle-size) / 2)); 13240 width: var(--handle-size); 13241 height: var(--handle-size); 13242 background-color: var(--sl-color-neutral-0); 13243 border-radius: var(--sl-border-radius-circle); 13244 font-size: calc(var(--handle-size) * 0.5); 13245 color: var(--sl-color-neutral-700); 13246 cursor: inherit; 13247 z-index: 10; 13248 } 13249 13250 .image-comparer__handle:focus-visible { 13251 outline: var(--sl-focus-ring); 13252 outline-offset: var(--sl-focus-ring-offset); 13253 } 13254`,dv=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.position=50}handleDrag(e){const{width:t}=this.base.getBoundingClientRect(),i="rtl"===this.localize.dir();e.preventDefault(),qb(this.base,{onMove:e=>
13254{this.position=parseFloat($b(e/t*100,0,100).toFixed(2)),i&&(this.position=100-this.position)},initialEvent:e})}handleKeyDown(e){const t="ltr"===this.localize.dir(),i="rtl"===this.localize.dir();if(["ArrowLeft","ArrowRight","Home","End"].includes(e.key)){const r=e.shiftKey?10:1;let s=this.position;e.preventDefault(),(t&&"ArrowLeft"===e.key||i&&"ArrowRight"===e.key)&&(s-=r),(t&&"ArrowRight"===e.key||i&&"ArrowLeft"===e.key)&&(s+=r),"Home"===e.key&&(s=0),"End"===e.key&&(s=100),s=$b(s,0,100),this.position=s}}handlePositionChange(){this.emit("sl-change")}render(){const e="rtl"===this.localize.dir();return W` 13255 <div 13256 part="base" 13257 id="image-comparer" 13258 class=${Mt({"image-comparer":!0,"image-comparer--rtl":e})} 13259 @keydown=${this.handleKeyDown} 13260 > 13261 <div class="image-comparer__image"> 13262 <div part="before" class="image-comparer__before"> 13263 <slot name="before"></slot> 13264 </div> 13265 13266 <div 13267 part="after" 13268 class="image-comparer__after" 13269 style=${Ps({clipPath:e?`inset(0 0 0 ${100-this.position}%)`:`inset(0 ${100-this.position}% 0 0)`})} 13270 > 13271 <slot name="after"></slot> 13272 </div> 13273 </div> 13274 13275 <div 13276 part="divider" 13277 class="image-comparer__divider" 13278 style=${Ps({left:e?100-this.position+"%":`${this.position}%`})} 13279 @mousedown=${this.handleDrag} 13280 @touchstart=${this.handleDrag} 13281 > 13282 <div 13283 part="handle" 13284 class="image-comparer__handle" 13285 role="scrollbar" 13286 aria-valuenow=${this.position} 13287 aria-valuemin="0" 13288 aria-valuemax="100" 13289 aria-controls="image-comparer" 13290 tabindex="0" 13291 > 13292 <slot name="handle"> 13293 <sl-icon library="system" name="grip-vertical"></sl-icon> 13294 </slot> 13295 </div> 13296 </div> 13297 </div> 13298 `}};dv.styles=[Se,lv],dv.scopedElement={"sl-icon":Pt},Ne([Ye(".image-comparer")],dv.prototype,"base",2),Ne([Ye(".image-comparer__handle")],dv.prototype,"handle",2),Ne([Ve({type:Number,reflect:!0})],dv.prototype,"position",2),Ne([yt("position",{waitUntilFirstUpdate:!0})],dv.prototype,"handlePositionChange",1),dv.define("sl-image-comparer");var cv=c` 13299 :host { 13300 display: block; 13301 } 13302`,hv=new Map;var uv=class extends Xe{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(e){const t=document.createElement("script");[...e.attributes].forEach(e=>t.setAttribute(e.name,e.value)),t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}async handleSrcChange(){try{const e=this.src,t=await function(e,t="cors"){const i=hv.get(e);if(void 0!==i)return Promise.resolve(i);const r=fetch(e,{mode:t}).then(async t=>{const i={ok:t.ok,status:t.status,html:await t.text()};return hv.set(e,i),i});return hv.set(e,r),r}(e,this.mode);if(e!==this.src)return;if(!t.ok)return void this.emit("sl-error",{detail:{status:t.status}});this.innerHTML=t.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(e=>this.executeScript(e)),this.emit("sl-load")}catch(e){this.emit("sl-error",{detail:{status:-1}})}}render(){return W`<slot></slot>`}};uv.styles=[Se,cv],Ne([Ve()],uv.prototype,"src",2),Ne([Ve()],uv.prototype,"mode",2),Ne([Ve({attribute:"allow-scripts",type:Boolean})],uv.prototype,"allowScripts",2),Ne([yt("src")],uv.prototype,"handleSrcChange",1),uv.define("sl-include");var pv=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.value=0,this.unit="byte",this.display="short"}render(){if(isNaN(this.value))return"";const e="bit"===this.unit?["","kilo","mega","giga","tera"]:["","kilo","mega","giga","tera","peta"],t=Math.max(0,Math.min(Math.floor(Math.log10(this.value)/3),e.length-1)),i=e[t]+this.unit,r=parseFloat((this.value/Math.pow(1e3,t)).toPrecision(3));return this.localize.number(r,{style:"unit",unit:i,unitDisplay:this.display})}};Ne([Ve({type:Number})],pv.prototype,"value",2),Ne([Ve()],pv.prototype,"unit",2),Ne([Ve()],pv.prototype,"display",2),pv.define("sl-format-bytes");var fv=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.date=new Date,this.hourFormat="auto"}render(){const e=new Date(this.date),t="auto"===this.hourFormat?void 0:"12"===this.hourFormat;if(!isNaN(e.getMilliseconds()))return W` 13303 <time datetime=${e.toISOString()}> 13304 ${this.localize.date(e,{weekday:this.weekday,era:this.era,year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second,timeZoneName:this.timeZoneName,timeZone:this.timeZone,hour12:t})} 13305 </time> 13306 `}};
13306Ne([Ve()],fv.prototype,"date",2),Ne([Ve()],fv.prototype,"weekday",2),Ne([Ve()],fv.prototype,"era",2),Ne([Ve()],fv.prototype,"year",2),Ne([Ve()],fv.prototype,"month",2),Ne([Ve()],fv.prototype,"day",2),Ne([Ve()],fv.prototype,"hour",2),Ne([Ve()],fv.prototype,"minute",2),Ne([Ve()],fv.prototype,"second",2),Ne([Ve({attribute:"time-zone-name"})],fv.prototype,"timeZoneName",2),Ne([Ve({attribute:"time-zone"})],fv.prototype,"timeZone",2),Ne([Ve({attribute:"hour-format"})],fv.prototype,"hourFormat",2),fv.define("sl-format-date");var mv=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.value=0,this.type="decimal",this.noGrouping=!1,this.currency="USD",this.currencyDisplay="symbol"}render(){return isNaN(this.value)?"":this.localize.number(this.value,{style:this.type,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:!this.noGrouping,minimumIntegerDigits:this.minimumIntegerDigits,minimumFractionDigits:this.minimumFractionDigits,maximumFractionDigits:this.maximumFractionDigits,minimumSignificantDigits:this.minimumSignificantDigits,maximumSignificantDigits:this.maximumSignificantDigits})}};Ne([Ve({type:Number})],mv.prototype,"value",2),Ne([Ve()],mv.prototype,"type",2),Ne([Ve({attribute:"no-grouping",type:Boolean})],mv.prototype,"noGrouping",2),Ne([Ve()],mv.prototype,"currency",2),Ne([Ve({attribute:"currency-display"})],mv.prototype,"currencyDisplay",2),Ne([Ve({attribute:"minimum-integer-digits",type:Number}
vendor: 12,606 bytes, lines 13306-13651
13306)],mv.prototype,"minimumIntegerDigits",2),Ne([Ve({attribute:"minimum-fraction-digits",type:Number})],mv.prototype,"minimumFractionDigits",2),Ne([Ve({attribute:"maximum-fraction-digits",type:Number})],mv.prototype,"maximumFractionDigits",2),Ne([Ve({attribute:"minimum-significant-digits",type:Number})],mv.prototype,"minimumSignificantDigits",2),Ne([Ve({attribute:"maximum-significant-digits",type:Number})],mv.prototype,"maximumSignificantDigits",2),mv.define("sl-format-number");var gv=c` 13307 :host { 13308 --color: var(--sl-panel-border-color); 13309 --width: var(--sl-panel-border-width); 13310 --spacing: var(--sl-spacing-medium); 13311 } 13312 13313 :host(:not([vertical])) { 13314 display: block; 13315 border-top: solid var(--width) var(--color); 13316 margin: var(--spacing) 0; 13317 } 13318 13319 :host([vertical]) { 13320 display: inline-block; 13321 height: 100%; 13322 border-left: solid var(--width) var(--color); 13323 margin: 0 var(--spacing); 13324 } 13325`,bv=class extends Xe{constructor(){super(...arguments),this.vertical=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}handleVerticalChange(){this.setAttribute("aria-orientation",this.vertical?"vertical":"horizontal")}};bv.styles=[Se,gv],Ne([Ve({type:Boolean,reflect:!0})],bv.prototype,"vertical",2),Ne([yt("vertical")],bv.prototype,"handleVerticalChange",1),bv.define("sl-divider");var vv=c` 13326 :host { 13327 --error-color: var(--sl-color-danger-600); 13328 --success-color: var(--sl-color-success-600); 13329 13330 display: inline-block; 13331 } 13332 13333 .copy-button__button { 13334 flex: 0 0 auto; 13335 display: flex; 13336 align-items: center; 13337 background: none; 13338 border: none; 13339 border-radius: var(--sl-border-radius-medium); 13340 font-size: inherit; 13341 color: inherit; 13342 padding: var(--sl-spacing-x-small); 13343 cursor: pointer; 13344 transition: var(--sl-transition-x-fast) color; 13345 } 13346 13347 .copy-button--success .copy-button__button { 13348 color: var(--success-color); 13349 } 13350 13351 .copy-button--error .copy-button__button { 13352 color: var(--error-color); 13353 } 13354 13355 .copy-button__button:focus-visible { 13356 outline: var(--sl-focus-ring); 13357 outline-offset: var(--sl-focus-ring-offset); 13358 } 13359 13360 .copy-button__button[disabled] { 13361 opacity: 0.5; 13362 cursor: not-allowed !important; 13363 } 13364 13365 slot { 13366 display: inline-flex; 13367 } 13368`,yv=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.isCopying=!1,this.status="rest",this.value="",this.from="",this.disabled=!1,this.copyLabel="",this.successLabel="",this.errorLabel="",this.feedbackDuration=1e3,this.tooltipPlacement="top",this.hoist=!1}async handleCopy(){if(this.disabled||this.isCopying)return;this.isCopying=!0;let e=this.value;if(this.from){const t=this.getRootNode(),i=this.from.includes("."),r=this.from.includes("[")&&this.from.includes("]");let s=this.from,o="";i?[s,o]=this.from.trim().split("."):r&&([s,o]=this.from.trim().replace(/\]$/,"").split("["));const a="getElementById"in t?t.getElementById(s):null;a?e=r?a.getAttribute(o)||"":i?a[o]||"":a.textContent||"":(this.showStatus("error"),this.emit("sl-error"))}if(e)try{await navigator.clipboard.writeText(e),this.showStatus("success"),this.emit("sl-copy",{detail:{value:e}})}catch(e){this.showStatus("error"),this.emit("sl-error")}else this.showStatus("error"),this.emit("sl-error")}async showStatus(e){const t=this.copyLabel||this.localize.term("copy"),i=this.successLabel||this.localize.term("copied"),r=this.errorLabel||this.localize.term("error"),s="success"===e?this.successIcon:this.errorIcon,o=vi(this,"copy.in",{dir:"ltr"}),a=vi(this,"copy.out",{dir:"ltr"});this.tooltip.content="success"===e?i:r,await this.copyIcon.animate(a.keyframes,a.options).finished,this.copyIcon.hidden=!0,this.status=e,s.hidden=!1,await s.animate(o.keyframes,o.options).finished,setTimeout(async()=>{await s.animate(a.keyframes,a.options).finished,s.hidden=!0,this.status="rest",this.copyIcon.hidden=!1,await this.copyIcon.animate(o.keyframes,o.options).finished,this.tooltip.content=t,this.isCopying=!1},this.feedbackDuration)}render(){const e=this.copyLabel||this.localize.term("copy");return W` 13369 <sl-tooltip 13370 class=${Mt({"copy-button":!0,"copy-button--success":"success"===this.status,"copy-button--error":"error"===this.status})} 13371 content=${e} 13372 placement=${this.tooltipPlacement} 13373 ?disabled=${this.disabled} 13374 ?hoist=${this.hoist} 13375 exportparts=" 13376 base:tooltip__base, 13377 base__popup:tooltip__base__popup, 13378 base__arrow:tooltip__base__arrow, 13379 body:tooltip__body 13380 " 13381 > 13382 <button 13383 class="copy-button__button" 13384 part="button" 13385 type="button" 13386 ?disabled=${this.disabled} 13387 @click=${this.handleCopy} 13388 > 13389 <slot part="copy-icon" name="copy-icon"> 13390 <sl-icon library="system" name="copy"></sl-icon> 13391 </slot> 13392 <slot part="success-icon" name="success-icon" hidden> 13393 <sl-icon library="system" name="check"></sl-icon> 13394 </slot> 13395 <slot part="error-icon" name="error-icon" hidden> 13396 <sl-icon library="system" name="x-lg"></sl-icon> 13397 </slot> 13398 </button> 13399 </sl-tooltip> 13400 `}};yv.styles=[Se,vv],yv.dependencies={"sl-icon":Pt,"sl-tooltip":so},Ne([Ye('slot[name="copy-icon"]')],yv.prototype,"copyIcon",2),Ne([Ye('slot[name="success-icon"]')],yv.prototype,"successIcon",2),Ne([Ye('slot[name="error-icon"]')],yv.prototype,"errorIcon",2),Ne([Ye("sl-tooltip")],yv.prototype,"tooltip",2),Ne([He()],yv.prototype,"isCopying",2),Ne([He()],yv.prototype,"status",2),Ne([Ve()],yv.prototype,"value",2),Ne([Ve()],yv.prototype,"from",2),Ne([Ve({type:Boolean,reflect:!0})],yv.prototype,"disabled",2),Ne([Ve({attribute:"copy-label"})],yv.prototype,"copyLabel",2),Ne([Ve({attribute:"success-label"})],yv.prototype,"successLabel",2),Ne([Ve({attribute:"error-label"})],yv.prototype,"errorLabel",2),Ne([Ve({attribute:"feedback-duration",type:Number})],yv.prototype,"feedbackDuration",2),Ne([Ve({attribute:"tooltip-placement"})],yv.prototype,"tooltipPlacement",2),Ne([Ve({type:Boolean})],yv.prototype,"hoist",2),bi("copy.in",{keyframes:[{scale:".25",opacity:".25"},{scale:"1",opacity:"1"}],options:{duration:100}}),bi("copy.out",{keyframes:[{scale:"1",opacity:"1"},{scale:".25",opacity:"0"}],options:{duration:100}}),yv.define("sl-copy-button");var _v=c` 13401 :host { 13402 --grid-width: 280px; 13403 --grid-height: 200px; 13404 --grid-handle-size: 16px; 13405 --slider-height: 15px; 13406 --slider-handle-size: 17px; 13407 --swatch-size: 25px; 13408 13409 display: inline-block; 13410 } 13411 13412 .color-picker { 13413 width: var(--grid-width); 13414 font-family: var(--sl-font-sans); 13415 font-size: var(--sl-font-size-medium); 13416 font-weight: var(--sl-font-weight-normal); 13417 color: var(--color); 13418 background-color: var(--sl-panel-background-color); 13419 border-radius: var(--sl-border-radius-medium); 13420 user-select: none; 13421 -webkit-user-select: none; 13422 } 13423 13424 .color-picker--inline { 13425 border: solid var(--sl-panel-border-width) var(--sl-panel-border-color); 13426 } 13427 13428 .color-picker--inline:focus-visible { 13429 outline: var(--sl-focus-ring); 13430 outline-offset: var(--sl-focus-ring-offset); 13431 } 13432 13433 .color-picker__grid { 13434 position: relative; 13435 height: var(--grid-height); 13436 background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%), 13437 linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 100%); 13438 border-top-left-radius: var(--sl-border-radius-medium); 13439 border-top-right-radius: var(--sl-border-radius-medium); 13440 cursor: crosshair; 13441 forced-color-adjust: none; 13442 } 13443 13444 .color-picker__grid-handle { 13445 position: absolute; 13446 width: var(--grid-handle-size); 13447 height: var(--grid-handle-size); 13448 border-radius: 50%; 13449 box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); 13450 border: solid 2px white; 13451 margin-top: calc(var(--grid-handle-size) / -2); 13452 margin-left: calc(var(--grid-handle-size) / -2); 13453 transition: var(--sl-transition-fast) scale; 13454 } 13455 13456 .color-picker__grid-handle--dragging { 13457 cursor: none; 13458 scale: 1.5; 13459 } 13460 13461 .color-picker__grid-handle:focus-visible { 13462 outline: var(--sl-focus-ring); 13463 } 13464 13465 .color-picker__controls { 13466 padding: var(--sl-spacing-small); 13467 display: flex; 13468 align-items: center; 13469 } 13470 13471 .color-picker__sliders { 13472 flex: 1 1 auto; 13473 } 13474 13475 .color-picker__slider { 13476 position: relative; 13477 height: var(--slider-height); 13478 border-radius: var(--sl-border-radius-pill); 13479 box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); 13480 forced-color-adjust: none; 13481 } 13482 13483 .color-picker__slider:not(:last-of-type) { 13484 margin-bottom: var(--sl-spacing-small); 13485 } 13486 13487 .color-picker__slider-handle { 13488 position: absolute; 13489 top: calc(50% - var(--slider-handle-size) / 2); 13490 width: var(--slider-handle-size); 13491 height: var(--slider-handle-size); 13492 background-color: white; 13493 border-radius: 50%; 13494 box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); 13495 margin-left: calc(var(--slider-handle-size) / -2); 13496 } 13497 13498 .color-picker__slider-handle:focus-visible { 13499 outline: var(--sl-focus-ring); 13500 } 13501 13502 .color-picker__hue { 13503 background-image: linear-gradient( 13504 to right, 13505 rgb(255, 0, 0) 0%, 13506 rgb(255, 255, 0) 17%, 13507 rgb(0, 255, 0) 33%, 13508 rgb(0, 255, 255) 50%, 13509 rgb(0, 0, 255) 67%, 13510 rgb(255, 0, 255) 83%, 13511 rgb(255, 0, 0) 100% 13512 ); 13513 } 13514 13515 .color-picker__alpha .color-picker__alpha-gradient { 13516 position: absolute; 13517 top: 0; 13518 left: 0; 13519 width: 100%; 13520 height: 100%; 13521 border-radius: inherit; 13522 } 13523 13524 .color-picker__preview { 13525 flex: 0 0 auto; 13526 display: inline-flex; 13527 align-items: center; 13528 justify-content: center; 13529 position: relative; 13530 width: 2.25rem; 13531 height: 2.25rem; 13532 border: none; 13533 border-radius: var(--sl-border-radius-circle); 13534 background: none; 13535 margin-left: var(--sl-spacing-small); 13536 cursor: copy; 13537 forced-color-adjust: none; 13538 } 13539 13540 .color-picker__preview:before { 13541 content: ''; 13542 position: absolute; 13543 top: 0; 13544 left: 0; 13545 width: 100%; 13546 height: 100%; 13547 border-radius: inherit; 13548 box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); 13549 13550 /* We use a custom property in lieu of currentColor because of https://bugs.webkit.org/show_bug.cgi?id=216780 */ 13551 background-color: var(--preview-color); 13552 } 13553 13554 .color-picker__preview:focus-visible { 13555 outline: var(--sl-focus-ring); 13556 outline-offset: var(--sl-focus-ring-offset); 13557 } 13558 13559 .color-picker__preview-color { 13560 position: absolute; 13561 top: 0; 13562 left: 0; 13563 width: 100%; 13564 height: 100%; 13565 border: solid 1px rgba(0, 0, 0, 0.125); 13566 } 13567 13568 .color-picker__preview-color--copied { 13569 animation: pulse 0.75s; 13570 } 13571 13572 @keyframes pulse { 13573 0% { 13574 box-shadow: 0 0 0 0 var(--sl-color-primary-500); 13575 } 13576 70% { 13577 box-shadow: 0 0 0 0.5rem transparent; 13578 } 13579 100% { 13580 box-shadow: 0 0 0 0 transparent; 13581 } 13582 } 13583 13584 .color-picker__user-input { 13585 display: flex; 13586 padding: 0 var(--sl-spacing-small) var(--sl-spacing-small) var(--sl-spacing-small); 13587 } 13588 13589 .color-picker__user-input sl-input { 13590 min-width: 0; /* fix input width in Safari */ 13591 flex: 1 1 auto; 13592 } 13593 13594 .color-picker__user-input sl-button-group { 13595 margin-left: var(--sl-spacing-small); 13596 } 13597 13598 .color-picker__user-input sl-button { 13599 min-width: 3.25rem; 13600 max-width: 3.25rem; 13601 font-size: 1rem; 13602 } 13603 13604 .color-picker__swatches { 13605 display: grid; 13606 grid-template-columns: repeat(8, 1fr); 13607 grid-gap: 0.5rem; 13608 justify-items: center; 13609 border-top: solid 1px var(--sl-color-neutral-200); 13610 padding: var(--sl-spacing-small); 13611 forced-color-adjust: none; 13612 } 13613 13614 .color-picker__swatch { 13615 position: relative; 13616 width: var(--swatch-size); 13617 height: var(--swatch-size); 13618 border-radius: var(--sl-border-radius-small); 13619 } 13620 13621 .color-picker__swatch .color-picker__swatch-color { 13622 position: absolute; 13623 top: 0; 13624 left: 0; 13625 width: 100%; 13626 height: 100%; 13627 border: solid 1px rgba(0, 0, 0, 0.125); 13628 border-radius: inherit; 13629 cursor: pointer; 13630 } 13631 13632 .color-picker__swatch:focus-visible { 13633 outline: var(--sl-focus-ring); 13634 outline-offset: var(--sl-focus-ring-offset); 13635 } 13636 13637 .color-picker__transparent-bg { 13638 background-image: linear-gradient(45deg, var(--sl-color-neutral-300) 25%, transparent 25%), 13639 linear-gradient(45deg, transparent 75%, var(--sl-color-neutral-300) 75%), 13640 linear-gradient(45deg, transparent 75%, var(--sl-color-neutral-300) 75%), 13641 linear-gradient(45deg, var(--sl-color-neutral-300) 25%, transparent 25%); 13642 background-size: 10px 10px; 13643 background-position: 13644 0 0, 13645 0 0, 13646 -5px -5px, 13647 5px 5px; 13648 } 13649 13650 .color-picker--disabled { 13651 opacity: 0.5;
13652 cursor: not-allowed; 13653 } 13654 13655 .color-picker--disabled .color-picker__grid, 13656 .color-picker--disabled .color-picker__grid-handle, 13657 .color-picker--disabled .color-picker__slider, 13658 .color-picker--disabled .color-picker__slider-handle, 13659 .color-picker--disabled .color-picker__preview, 13660 .color-picker--disabled .color-picker__swatch, 13661 .color-picker--disabled .color-picker__swatch-color { 13662 pointer-events: none; 13663 } 13664 13665 /* 13666 * Color dropdown 13667 */ 13668 13669 .color-dropdown::part(panel) { 13670 max-height: none; 13671 background-color: var(--sl-panel-background-color); 13672 border: solid var(--sl-panel-border-width) var(--sl-panel-border-color); 13673 border-radius: var(--sl-border-radius-medium); 13674 overflow: visible; 13675 } 13676 13677 .color-dropdown__trigger { 13678 display: inline-block; 13679 position: relative; 13680 background-color: transparent; 13681 border: none; 13682 cursor: pointer; 13683 forced-color-adjust: none; 13684 } 13685 13686 .color-dropdown__trigger.color-dropdown__trigger--small { 13687 width: var(--sl-input-height-small); 13688 height: var(--sl-input-height-small); 13689 border-radius: var(--sl-border-radius-circle); 13690 } 13691 13692 .color-dropdown__trigger.color-dropdown__trigger--medium { 13693 width: var(--sl-input-height-medium); 13694 height: var(--sl-input-height-medium); 13695 border-radius: var(--sl-border-radius-circle); 13696 } 13697 13698 .color-dropdown__trigger.color-dropdown__trigger--large { 13699 width: var(--sl-input-height-large); 13700 height: var(--sl-input-height-large); 13701 border-radius: var(--sl-border-radius-circle); 13702 } 13703 13704 .color-dropdown__trigger:before { 13705 content: ''; 13706 position: absolute; 13707 top: 0; 13708 left: 0; 13709 width: 100%; 13710 height: 100%; 13711 border-radius: inherit; 13712 background-color: currentColor; 13713 box-shadow: 13714 inset 0 0 0 2px var(--sl-input-border-color), 13715 inset 0 0 0 4px var(--sl-color-neutral-0); 13716 } 13717 13718 .color-dropdown__trigger--empty:before { 13719 background-color: transparent; 13720 } 13721 13722 .color-dropdown__trigger:focus-visible { 13723 outline: none; 13724 } 13725 13726 .color-dropdown__trigger:focus-visible:not(.color-dropdown__trigger--disabled) { 13727 outline: var(--sl-focus-ring); 13728 outline-offset: var(--sl-focus-ring-offset); 13729 } 13730 13731 .color-dropdown__trigger.color-dropdown__trigger--disabled { 13732 opacity: 0.5; 13733 cursor: not-allowed; 13734 } 13735`;function wv(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");const i=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function kv(e){return Math.min(1,Math.max(0,e))}function xv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function $v(e){return Number(e)<=1?100*Number(e)+"%":e}function Sv(e){return 1===e.length?"0"+e:String(e)}function Cv(e,t,i){e=wv(e,255),t=wv(t,255),i=wv(i,255);const r=Math.max(e,t,i),s=Math.min(e,t,i);let o=0,a=0;const n=(r+s)/2;if(r===s)a=0,o=0;else{const l=r-s;switch(a=n>.5?l/(2-r-s):l/(r+s),r){case e:o=(t-i)/l+(t<i?6:0);break;case t:o=(i-e)/l+2;break;case i:o=(e-t)/l+4}o/=6}return{h:o,s:a,l:n}}function Ev(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*i*(t-e):i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function Iv(e,t,i){e=wv(e,255),t=wv(t,255),i=wv(i,255);const r=Math.max(e,t,i),s=Math.min(e,t,i);let o=0;const a=r,n=r-s,l=0===r?0:n/r;if(r===s)o=0;else{switch(r){case e:o=(t-i)/n+(t<i?6:0);break;case t:o=(i-e)/n+2;break;case i:o=(e-t)/n+4}o/=6}return{h:o,s:l,v:a}}function Tv(e,t,i,r){const s=[Sv(Math.round(e).toString(16)),Sv(Math.round(t).toString(16)),Sv(Math.round(i).toString(16))];return r&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function Av(e,t,i){let r=1-e/255,s=1-t/255,o=1-i/255,a=Math.min(r,s,o);return 1===a?(r=0,s=0,o=0):(r=(r-a)/(1-a)*100,s=(s-a)/(1-a)*100,o=(o-a)/(1-a)*100),a*=100,{c:Math.round(r),m:Math.round(s),y:Math.round(o),k:Math.round(a)}}function Rv(e){return Math.round(255*parseFloat(e)).toString(16)}function Pv(e){return Dv(e)/255}function Dv(e){return parseInt(e,16)}const Ov={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
13735almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function zv(e){let t={r:0,g:0,b:0},i=1,r=null,s=null,o=null,a=!1,n=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;let t=!1;if(Ov[e])e=Ov[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};let i=Mv.rgb.exec(e);if(i)return{r:i[1],g:i[2],b:i[3]};if(i=Mv.rgba.exec(e),i)return{r:i[1],g:i[2],b:i[3],a:i[4]};if(i=Mv.hsl.exec(e),i)return{h:i[1],s:i[2],l:i[3]};if(i=Mv.hsla.exec(e),i)return{h:i[1],s:i[2],l:i[3],a:i[4]};if(i=Mv.hsv.exec(e),i)return{h:i[1],s:i[2],v:i[3]};if(i=Mv.hsva.exec(e),i)return{h:i[1],s:i[2],v:i[3],a:i[4]};if(i=Mv.cmyk.exec(e),i)return{c:i[1],m:i[2],y:i[3],k:i[4]};if(i=Mv.hex8.exec(e),i)return{r:Dv(i[1]),g:Dv(i[2]),b:Dv(i[3]),a:Pv(i[4]),format:t?"name":"hex8"};if(i=Mv.hex6.exec(e),i)return{r:Dv(i[1]),g:Dv(i[2]),b:Dv(i[3]),format:t?"name":"hex"};if(i=Mv.hex4.exec(e),i)return{r:Dv(i[1]+i[1]),g:Dv(i[2]+i[2]),b:Dv(i[3]+i[3]),a:Pv(i[4]+i[4]),format:t?"name":"hex8"};if(i=Mv.hex3.exec(e),i)return{r:Dv(i[1]+i[1]),g:Dv(i[2]+i[2]),b:Dv(i[3]+i[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(qv(e.r)&&qv(e.g)&&qv(e.b)?(t=function(e,t,i){return{r:255*wv(e,255),g:255*wv(t,255),b:255*wv(i,255)}}(e.r,e.g,e.b),a=!0,n="%"===String(e.r).substr(-1)?"prgb":"rgb"):qv(e.h)&&qv(e.s)&&qv(e.v)?(r=$v(e.s),s=$v(e.v),t=function(e,t,i){e=6*wv(e,360),t=wv(t,100),i=wv(i,100);const r=Math.floor(e),s=e-r,o=i*(1-t),a=i*(1-s*t),n=i*(1-(1-s)*t),l=r%6;return{r:255*[i,a,o,o,n,i][l],g:255*[n,i,i,a,o,o][l],b:255*[o,o,n,i,i,a][l]}}(e.h,r,s),a=!0,n="hsv"):qv(e.h)&&qv(e.s)&&qv(e.l)?(r=$v(e.s),o=$v(e.l),t=function(e,t,i){let r,s,o;if(e=wv(e,360),t=wv(t,100),i=wv(i,100),0===t)s=i,o=i,r=i;else{const a=i<.5?i*(1+t):i+t-i*t,n=2*i-a;r=Ev(n,a,e+1/3),s=Ev(n,a,e),o=Ev(n,a,e-1/3)}return{r:255*r,g:255*s,b:255*o}}(e.h,r,o),a=!0,n="hsl"):qv(e.c)&&qv(e.m)&&qv(e.y)&&qv(e.k)&&(t=function(e,t,i,r){const s=r/100;return{r:255*(1-e/100)*(1-s),g:255*(1-t/100)*(1-s),b:255*(1-i/100)*(1-s)}}(e.c,e.m,e.y,e.k),a=!0,n="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=xv(i),{ok:a,format:e.format||n,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:i}}const Lv="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",Fv="[\\s|\\(]+("+Lv+")[,|\\s]+("+Lv+")[,|\\s]+("+Lv+")\\s*\\)?",Nv="[\\s|\\(]+("+Lv+")[,|\\s]+("+Lv+")[,|\\s]+("+Lv+")[,|\\s]+("+Lv+")\\s*\\)?",Mv={CSS_UNIT:new RegExp(Lv),rgb:new RegExp("rgb"+Fv),rgba:new RegExp("rgba"+Nv),hsl:new RegExp("hsl"+Fv),hsla:new RegExp("hsla"+Nv),hsv:new RegExp("hsv"+Fv),hsva:new RegExp("hsva"
vendor: 4,889 bytes, line 13735
13735+Nv),cmyk:new RegExp("cmyk"+Nv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function qv(e){return"number"==typeof e?!Number.isNaN(e):Mv.CSS_UNIT.test(e)}class Uv{constructor(e="",t={}){if(e instanceof Uv)return e;"number"==typeof e&&(e=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(e)),this.originalInput=e;const i=zv(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=t.format??i.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3}getLuminance(){const e=this.toRgb();let t,i,r;const s=e.r/255,o=e.g/255,a=e.b/255;return t=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),i=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),r=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),.2126*t+.7152*i+.0722*r}getAlpha(){return this.a}setAlpha(e){return this.a=xv(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return 0===e}toHsv(){const e=Iv(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=Iv(this.r,this.g,this.b),t=Math.round(360*e.h),i=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?`hsv(${t}, ${i}%, ${r}%)`:`hsva(${t}, ${i}%, ${r}%, ${this.roundA})`}toHsl(){const e=Cv(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}}toHslString(){const e=Cv(this.r,this.g,this.b),t=Math.round(360*e.h),i=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?`hsl(${t}, ${i}%, ${r}%)`:`hsla(${t}, ${i}%, ${r}%, ${this.roundA})`}toHex(e=!1){return Tv(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return function(e,t,i,r,s){const o=[Sv(Math.round(e).toString(16)),Sv(Math.round(t).toString(16)),Sv(Math.round(i).toString(16)),Sv(Rv(r))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return"#"+this.toHex8(e)}toHexShortString(e=!1){return 1===this.a?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const e=Math.round(this.r),t=Math.round(this.g),i=Math.round(this.b);return 1===this.a?`rgb(${e}, ${t}, ${i})`:`rgba(${e}, ${t}, ${i}, ${this.roundA})`}toPercentageRgb(){const e=e=>`${Math.round(100*wv(e,255))}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){const e=e=>Math.round(100*wv(e,255));return 1===this.a?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...Av(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:t,y:i,k:r}=Av(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${i}, ${r})`}toName(){if(0===this.a)return"transparent";if(this.a<1)return!1;const e="#"+Tv(this.r,this.g,this.b,!1);for(const[t,i]of Object.entries(Ov))if(e===i)return t;return!1}toString(e){const t=Boolean(e);e=e??this.format;let i=!1;const r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(i=this.toRgbString()),"prgb"===e&&(i=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(i=this.toHexString()),"hex3"===e&&(i=this.toHexString(!0)),"hex4"===e&&(i=this.toHex8String(!0)),"hex8"===e&&(i=this.toHex8String()),"name"===e&&(i=this.toName()),"hsl"===e&&(i=this.toHslString()),"hsv"===e&&(i=this.toHsvString()),"cmyk"===e&&(i=this.toCmykString()),i||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new Uv(this.toString())}lighten(e=10){const t=this.toHsl();return t.l+=e/100,t.l=kv(t.l),new Uv(t)}brighten(e=10){const t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(-e/100*255))),t.g=Math.max(0,Math.min(255,t.g-Math.round(-e/100*255))),t.b=Math.max(0,Math.min(255,t.b-Math.round(-e/100*255))),new Uv(t)}darken(e=10){const t=this.toHsl();return t.l-=e/100,t.l=kv(t.l),new Uv(t)}tint(e=10){return this.mix("white",e)}shade(e=10){return this.mix("black",e)}desaturate(e=10){const t=this.toHsl();return t.s-=e/100,t.s=kv(t.s),new Uv(t)}saturate(e=10){const t=this.toHsl();return t.s+=e/100,t.s=kv(t.s),new Uv(t)}greyscale(){return this.desaturate(100)}spin(e){const t=this.toHsl(),i=(t.h+e)%360;return t.h=i<0?360+i:i,new Uv(t)}
13735mix(e,t=50){const i=this.toRgb(),r=new Uv(e).toRgb(),s=t/100,o={r:(r.r-i.r)*s+i.r,g:(r.g-i.g)*s+i.g,b:(r.b-i.b)*s+i.b,a:(r.a-i.a)*s+i.a};return new Uv(o)}analogous(e=6,t=30){const i=this.toHsl(),r=360/t,s=[this];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,s.push(new Uv(i));return s}complement(){const e=this.toHsl();return e.h=(e.h+180)%360,new Uv(e)}monochromatic(e=6){const t=this.toHsv(),{h:i}=t,{s:r}=t;let{v:s}=t;const o=[],a=1/e;for(;e--;)o.push(new Uv({h:i,s:r,v:s})),s=(s+a)%1;return o}splitcomplement(){const e=this.toHsl(),{h:t}=e;return[this,new Uv({h:(t+72)%360,s:e.s,l:e.l}),new Uv({h:(t+216)%360,s:e.s,l:e.l})]}onBackground(e){const t=this.toRgb(),i=new Uv(e).toRgb(),r=t.a+i.a*(1-t.a);return new Uv({r:(t.r*t.a+i.r*i.a*(1-t.a))/r,g:(t.g*t.a+i.g*i.a*(1-t.a))/r,b:(t.b*t.a+i.b*i.a*(1-t.a))/r,a:r})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(e){const t=this.toHsl(),{h:i}=t,r=[this],s=360/e;for(let o=1;o<e;o++)r.push(new Uv({h:(i+o*s)%360,s:t.s,l:t.l}));return r}equals(e){const t=new Uv(e);return"cmyk"===this.format||"cmyk"===t.format?this.toCmykString()===t.toCmykString():this.toRgbString()===t.toRgbString()}}var Bv="EyeDropper"in window,jv=class extends Xe{constructor(){super(),this.formControlController=new st(this),this.isSafeValue=!1,this.localize=new $e(this),this.hasFocus=!1,this.isDraggingGridHandle=!1,this.isEmpty=!1,this.inputValue="",this.hue=0,this.saturation=100,this.brightness=100,this.alpha=100,this.value="",this.defaultValue="",this.label="",this.format="hex",this.inline=!1,this.size="medium",this.noFormatToggle=!1,this.name="",this.disabled=!1,this.hoist=!1,this.opacity=!1,this.uppercase=!1,this.swatches="",this.form="",this.required=!1,this.handleFocusIn=()=>{this.hasFocus=!0,this.emit("sl-focus")},this.handleFocusOut=()=>{this.hasFocus=!1,this.emit("sl-blur")},this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut)}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.input.updateComplete.then(()=>{this.formControlController.updateValidity()})}handleCopy(){this.input.select(),document.execCommand("copy"),this.previewButton.focus(),this.previewButton.classList.add("color-picker__preview-color--copied"),this.previewButton.addEventListener("animationend",()=>{this.previewButton.classList.remove("color-picker__preview-color--copied")})}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this.setColor(this.value),this.emit("sl-change"),this.emit("sl-input")}handleAlphaDrag(e){const t=this.shadowRoot.querySelector(".color-picker__slider.color-picker__alpha"),i=t.querySelector(".color-picker__slider-handle"),{width:r}=t.getBoundingClientRect();let s=this.value,o=this.value;i.focus(),e.preventDefault(),qb(t,{onMove:e=>{this.alpha=$b(e/r*100,0,100),this.syncValues(),this.value!==o&&(o=this.value,this.emit("sl-input"))},onStop:()=>{this.value!==s&&(s=this.value,this.emit("sl-change"))},initialEvent:e})}handleHueDrag(e){const t=this.shadowRoot.querySelector(".color-picker__slider.color-picker__hue"),i=t.querySelector(".color-picker__slider-handle"),{width:r}=t.getBoundingClientRect();let s=this.value,o=this.value;i.focus(),e.preventDefault(),qb(t,{onMove:e=>{this.hue=$b(e/r*360,0,360),this.syncValues(),this.value!==o&&(o=this.value,this.emit("sl-input"))},onStop:()=>{this.value!==s&&(s=this.value,this.emit("sl-change"))},initialEvent:e})}handleGridDrag(e){const t=this.shadowRoot.querySelector(".color-picker__grid"),i=t.querySelector(".color-picker__grid-handle"),{width:r,height:s}=t.getBoundingClientRect();let o=this.value,a=this.value;i.focus(),e.preventDefault(),this.isDraggingGridHandle=!0,qb(t,{onMove:(e,t)=>{this.saturation=$b(e/r*100,0,100),this.brightness=$b(100-t/s*100,0,100),this.syncValues(),this.value!==a&&(a=this.value,this.emit("sl-input"))},onStop:()=>{this.isDraggingGridHandle=!1,this.value!==o&&(o=this.value,this.emit("sl-change"))},initialEvent:e})}handleAlphaKeyDown(e){const t=e.shiftKey?10:1,i=this.value;"ArrowLeft"===e.key&&(e.preventDefault(),this.alpha=$b(this.alpha-t,0,100),this.syncValues()),"ArrowRight"===e.key&&(e.preventDefault(),this.alpha=$b(this.alpha+t,0,100),this.syncValues()),"Home"===e.key&&(e.preventDefault(),this.alpha=0,this.syncValues()),"End"===e.key&&(e.preventDefault(),this.alpha=100,this.syncValues()),this.value!==i&&(this.emit
13735("sl-change"),this.emit("sl-input"))}handleHueKeyDown(e){const t=e.shiftKey?10:1,i=this.value;"ArrowLeft"===e.key&&(e.preventDefault(),this.hue=$b(this.hue-t,0,360),this.syncValues()),"ArrowRight"===e.key&&(e.preventDefault(),this.hue=$b(this.hue+t,0,360),this.syncValues()),"Home"===e.key&&(e.preventDefault(),this.hue=0,this.syncValues()),"End"===e.key&&(e.preventDefault(),this.hue=360,this.syncValues()),this.value!==i&&(this.emit("sl-change"),this.emit("sl-input"))}handleGridKeyDown(e){const t=e.shiftKey?10:1,i=this.value;"ArrowLeft"===e.key&&(e.preventDefault(),this.saturation=$b(this.saturation-t,0,100),this.syncValues()),"ArrowRight"===e.key&&(e.preventDefault(),this.saturation=$b(this.saturation+t,0,100),this.syncValues()),"ArrowUp"===e.key&&(e.preventDefault(),this.brightness=$b(this.brightness+t,0,100),this.syncValues()),"ArrowDown"===e.key&&(e.preventDefault(),this.brightness=$b(this.brightness-t,0,100),this.syncValues()),this.value!==i&&(this.emit("sl-change"),this.emit("sl-input"))}handleInputChange(e){const t=e.target,i=this.value;e.stopPropagation(),this.input.value?(this.setColor(t.value),t.value=this.value):this.value="",this.value!==i&&(this.emit("sl-change"),this.emit("sl-input"))}handleInputInput(e){this.formControlController.updateValidity(),e.stopPropagation()}handleInputKeyDown(e){if("Enter"===e.key){const e=this.value;this.input.value?(this.setColor(this.input.value),this.input.value=this.value,this.value!==e&&(this.emit
13735("sl-change"),this.emit("sl-input")),setTimeout(()=>this.input.select())):this.hue=0}}handleInputInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleTouchMove(e){e.preventDefault()}parseColor(e){const t=new Uv(e);if(!t.isValid)return null;const i=t.toHsl(),r={h:i.h,s:100*i.s,l:100*i.l,a:i.a},s=t.toRgb(),o=t.toHexString(),a=t.toHex8String(),n=t.toHsv(),l={h:n.h,s:100*n.s,v:100*n.v,a:n.a};return{hsl:{h:r.h,s:r.s,l:r.l,string:this.setLetterCase(`hsl(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`)},hsla:{h:r.h,s:r.s,l:r.l,a:r.a,string:this.setLetterCase(`hsla(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%, ${r.a.toFixed(2).toString()})`)},hsv:{h:l.h,s:l.s,v:l.v,string:this.setLetterCase(`hsv(${Math.round(l.h)}, ${Math.round(l.s)}%, ${Math.round(l.v)}%)`)},hsva:{h:l.h,s:l.s,v:l.v,a:l.a,string:this.setLetterCase(`hsva(${Math.round(l.h)}, ${Math.round(l.s)}%, ${Math.round(l.v)}%, ${l.a.toFixed(2).toString()})`)},rgb:{r:s.r,g:s.g,b:s.b,string:this.setLetterCase(`rgb(${Math.round(s.r)}, ${Math.round(s.g)}, ${Math.round(s.b)})`)},rgba:{r:s.r,g:s.g,b:s.b,a:s.a,string:this.setLetterCase(`rgba(${Math.round(s.r)}, ${Math.round(s.g)}, ${Math.round(s.b)}, ${s.a.toFixed(2).toString()})`)},hex:this.setLetterCase(o),hexa:this.setLetterCase(a)}}setColor(e){const t=this.parseColor(e);return null!==t&&(this.hue=t.hsva.h,this.saturation=t.hsva.s,this.brightness=t.hsva.v,this.alpha=this.opacity?100*t.hsva.a:100,this.syncValues(),!0)}setLetterCase(e){return"string"!=typeof e?"":this.uppercase?e.toUpperCase():e.toLowerCase()}async syncValues(){const e=this.parseColor(`hsva(${this.hue}, ${this.saturation}%, ${this.brightness}%, ${this.alpha/100})`);null!==e&&("hsl"===this.format?this.inputValue=this.opacity?e.hsla.string:e.hsl.string:"rgb"===this.format?this.inputValue=this.opacity?e.rgba.string:e.rgb.string:"hsv"===this.format?this.inputValue=this.opacity?e.hsva.string:e.hsv.string:this.inputValue=this.opacity?e.hexa:e.hex,this.isSafeValue=!0,this.value=this.inputValue,await this.updateComplete,this.isSafeValue=!1)}handleAfterHide(){this.previewButton.classList.remove("color-picker__preview-color--copied")}handleEyeDropper(){if(!Bv)return;(new EyeDropper).open().then(e=>{const t=this.value;
13735this.setColor(e.sRGBHex),this.value!==t&&(this.emit("sl-change"),this.emit("sl-input"))}).catch(()=>{})}selectSwatch(e){const t=this.value;this.disabled||(this.setColor(e),this.value!==t&&(this.emit("sl-change"),this.emit("sl-input")))}getHexString(e,t,i,r=100){const s=new Uv(`hsva(${e}, ${t}%, ${i}%, ${r/100})`);return s.isValid?s.toHex8String():""}stopNestedEventPropagation(e){e.stopImmediatePropagation()}handleFormatChange(){this.syncValues()}handleOpacityChange(){this.alpha=100}handleValueChange(e,t){if(this.isEmpty=!t,t||(this.hue=0,this.saturation=0,this.brightness=100,this.alpha=100),!this.isSafeValue){const i=this.parseColor(t);null!==i?(this.inputValue=this.value,this.hue=i.hsva.h,this.saturation=i.hsva.s,this.brightness=i.hsva.v,this.alpha=100*i.hsva.a,this.syncValues()):this.inputValue=null!=e?e:""}}focus(e){this.inline?this.base.focus(e):this.trigger.focus(e)}blur(){var e;const t=this.inline?this.base:this.trigger;this.hasFocus&&(t.focus({preventScroll:!0}),t.blur()),(null==(e=this.dropdown)?void 0:e.open)&&this.dropdown.hide()}getFormattedValue(e="hex"){const t=this.parseColor(`hsva(${this.hue}, ${this.saturation}%, ${this.brightness}%, ${this.alpha/100})`);if(null===t)return"";switch(e){case"hex":return t.hex;case"hexa":return t.hexa;case"rgb":return t.rgb.string;case"rgba":return t.rgba.string;case"hsl":return t.hsl.string;case"hsla":return t.hsla.string;case"hsv":return t.hsv.string;case"hsva":return t.hsva.string;default:return""}}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.inline||this.validity.valid?this.input.reportValidity():(this.dropdown.show(),this.addEventListener("sl-after-show",()=>this.input.reportValidity(),{once:!0}),this.disabled||this.formControlController.emitInvalidEvent(),!1)}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.saturation,t=100-this.brightness,i=Array.isArray(this.swatches)?this.swatches:this.swatches.split(";").filter(e=>""!==e.trim()),r=W` 13736 <div 13737 part="base" 13738 class=${Mt({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled,"color-picker--focused":this.hasFocus})} 13739 aria-disabled=${this.disabled?"true":"false"} 13740 aria-labelledby="label" 13741 tabindex=${this.inline?"0":"-1"} 13742 > 13743 ${this.inline?W` 13744 <sl-visually-hidden id="label"> 13745 <slot name="label">${this.label}</slot> 13746 </sl-visually-hidden> 13747 `:null} 13748 13749 <div 13750 part="grid" 13751 class="color-picker__grid" 13752 style=${Ps({backgroundColor:this.getHexString(this.hue,100,100)})} 13753 @pointerdown=${this.handleGridDrag} 13754 @touchmove=${this.handleTouchMove} 13755 > 13756 <span 13757 part="grid-handle" 13758 class=${Mt({"color-picker__grid-handle":!0,"color-picker__grid-handle--dragging":this.isDraggingGridHandle})} 13759 style=${Ps({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.brightness,this.alpha)})} 13760 role="application" 13761 aria-label="HSV" 13762 tabindex=${Ht(this.disabled?void 0:"0")} 13763 @keydown=${this.handleGridKeyDown} 13764 ></span> 13765 </div> 13766 13767 <div class="color-picker__controls"> 13768 <div class="color-picker__sliders"> 13769 <div 13770 part="slider hue-slider" 13771 class="color-picker__hue color-picker__slider" 13772 @pointerdown=${this.handleHueDrag} 13773 @touchmove=${this.handleTouchMove} 13774 > 13775 <span 13776 part="slider-handle hue-slider-handle" 13777 class="color-picker__slider-handle" 13778 style=${Ps({left:(0===this.hue?0:100/(360/this.hue))+"%"})} 13779 role="slider" 13780 aria-label="hue" 13781 aria-orientation="horizontal" 13782 aria-valuemin="0" 13783 aria-valuemax="360" 13784 aria-valuenow=${`${Math.round(this.hue)}`} 13785 tabindex=${Ht(this.disabled?void 0:"0")} 13786 @keydown=${this.handleHueKeyDown} 13787 ></span> 13788 </div> 13789 13790 ${this.opacity?W` 13791 <div 13792 part="slider opacity-slider" 13793 class="color-picker__alpha color-picker__slider color-picker__transparent-bg" 13794 @pointerdown="${this.handleAlphaDrag}" 13795 @touchmove=${this.handleTouchMove} 13796 > 13797 <div 13798 class="color-picker__alpha-gradient" 13799 style=${Ps({backgroundImage:`linear-gradient(\n to right,\n ${this.getHexString(this.hue,this.saturation,this.brightness,0)} 0%,\n ${this.getHexString(this.hue,this.saturation,this.brightness,100)} 100%\n )`})} 13800 ></div>
13801 <span 13802 part="slider-handle opacity-slider-handle" 13803 class="color-picker__slider-handle" 13804 style=${Ps({left:`${this.alpha}%`})} 13805 role="slider" 13806 aria-label="alpha" 13807 aria-orientation="horizontal" 13808 aria-valuemin="0" 13809 aria-valuemax="100" 13810 aria-valuenow=${Math.round(this.alpha)} 13811 tabindex=${Ht(this.disabled?void 0:"0")} 13812 @keydown=${this.handleAlphaKeyDown} 13813 ></span> 13814 </div> 13815 `:""} 13816 </div> 13817 13818 <button 13819 type="button" 13820 part="preview" 13821 class="color-picker__preview color-picker__transparent-bg" 13822 aria-label=${this.localize.term("copy")} 13823 style=${Ps({"--preview-color":this.getHexString(this.hue,this.saturation,this.brightness,this.alpha)})} 13824 @click=${this.handleCopy} 13825 ></button> 13826 </div> 13827 13828 <div class="color-picker__user-input" aria-live="polite"> 13829 <sl-input 13830 part="input" 13831 type="text" 13832 name=${this.name} 13833 autocomplete="off" 13834 autocorrect="off" 13835 autocapitalize="off" 13836 spellcheck="false" 13837 value=${this.isEmpty?"":this.inputValue} 13838 ?required=${this.required} 13839 ?disabled=${this.disabled} 13840 aria-label=${this.localize.term("currentValue")} 13841 @keydown=${this.handleInputKeyDown} 13842 @sl-change=${this.handleInputChange} 13843 @sl-input=${this.handleInputInput} 13844 @sl-invalid=${this.handleInputInvalid} 13845 @sl-blur=${this.stopNestedEventPropagation} 13846 @sl-focus=${this.stopNestedEventPropagation} 13847 ></sl-input> 13848 13849 <sl-button-group> 13850 ${this.noFormatToggle?"":W` 13851 <sl-button 13852 part="format-button" 13853 aria-label=${this.localize.term("toggleColorFormat")} 13854 exportparts=" 13855 base:format-button__base, 13856 prefix:format-button__prefix, 13857 label:format-button__label, 13858 suffix:format-button__suffix, 13859 caret:format-button__caret 13860 " 13861 @click=${this.handleFormatToggle} 13862 @sl-blur=${this.stopNestedEventPropagation} 13863 @sl-focus=${this.stopNestedEventPropagation} 13864 > 13865 ${this.setLetterCase(this.format)} 13866 </sl-button> 13867 `} 13868 ${Bv?W` 13869 <sl-button 13870 part="eye-dropper-button" 13871 exportparts=" 13872 base:eye-dropper-button__base, 13873 prefix:eye-dropper-button__prefix, 13874 label:eye-dropper-button__label, 13875 suffix:eye-dropper-button__suffix, 13876 caret:eye-dropper-button__caret 13877 " 13878 @click=${this.handleEyeDropper} 13879 @sl-blur=${this.stopNestedEventPropagation} 13880 @sl-focus=${this.stopNestedEventPropagation} 13881 > 13882 <sl-icon 13883 library="system" 13884 name="eyedropper" 13885 label=${this.localize.term("selectAColorFromTheScreen")} 13886 ></sl-icon> 13887 </sl-button> 13888 `:""} 13889 </sl-button-group> 13890 </div> 13891 13892 ${i.length>0?W` 13893 <div part="swatches" class="color-picker__swatches"> 13894 ${i.map(e=>{const t=this.parseColor(e);return t?W` 13895 <div 13896 part="swatch" 13897 class="color-picker__swatch color-picker__transparent-bg" 13898 tabindex=${Ht(this.disabled?void 0:"0")} 13899 role="button" 13900 aria-label=${e} 13901 @click=${()=>this.selectSwatch(e)} 13902 @keydown=${e=>!this.disabled&&"Enter"===e.key&&this.setColor(t.hexa)} 13903 > 13904 <div 13905 class="color-picker__swatch-color" 13906 style=${Ps({backgroundColor:t.hexa})} 13907 ></div> 13908 </div> 13909 `:(console.error(`Unable to parse swatch color: "${e}"`,this),"")})} 13910 </div> 13911 `:""} 13912 </div> 13913 `;return this.inline?r:W` 13914 <sl-dropdown 13915 class="color-dropdown" 13916 aria-disabled=${this.disabled?"true":"false"} 13917 .containingElement=${this} 13918 ?disabled=${this.disabled} 13919 ?hoist=${this.hoist}
13920 @sl-after-hide=${this.handleAfterHide} 13921 > 13922 <button 13923 part="trigger" 13924 slot="trigger" 13925 class=${Mt({"color-dropdown__trigger":!0,"color-dropdown__trigger--disabled":this.disabled,"color-dropdown__trigger--small":"small"===this.size,"color-dropdown__trigger--medium":"medium"===this.size,"color-dropdown__trigger--large":"large"===this.size,"color-dropdown__trigger--empty":this.isEmpty,"color-dropdown__trigger--focused":this.hasFocus,"color-picker__transparent-bg":!0})} 13926 style=${Ps({color:this.getHexString(this.hue,this.saturation,this.brightness,this.alpha)})} 13927 type="button" 13928 > 13929 <sl-visually-hidden> 13930 <slot name="label">${this.label}</slot> 13931 </sl-visually-hidden> 13932 </button> 13933 ${r} 13934 </sl-dropdown> 13935 `}};jv.styles=[Se,_v],jv.dependencies={"sl-button-group":Ls,"sl-button":Wt,"sl-dropdown":ns,"sl-icon":Pt,"sl-input":cs,"sl-visually-hidden":Ib},Ne([Ye('[part~="base"]')],jv.prototype,"base",2),Ne([Ye('[part~="input"]')],jv.prototype,"input",2),Ne([Ye(".color-dropdown")],jv.prototype,"dropdown",2),Ne([Ye('[part~="preview"]')],jv.prototype,"previewButton",2),Ne([Ye('[part~="trigger"]')],jv.prototype,"trigger",2),Ne([He()],jv.prototype,"hasFocus",2),Ne([He()],jv.prototype,"isDraggingGridHandle",2),Ne([He()],jv.prototype,"isEmpty",2),Ne([He()],jv.prototype,"inputValue",2),Ne([He()],jv.prototype,"hue",2),Ne([He()],jv.prototype,"saturation",2),Ne([He()],jv.prototype,"brightness",2),Ne([He()],jv.prototype,"alpha",2),Ne([Ve()],jv.prototype,"value",2),Ne([Yt()],jv.prototype,"defaultValue",2),Ne([Ve()],jv.prototype,"label",2),Ne([Ve()],jv.prototype,"format",2),Ne([Ve({type:Boolean,reflect:!0})],jv.prototype,"inline",2),Ne([Ve({reflect:!0})],jv.prototype,"size",2),Ne([Ve({attribute:"no-format-toggle",type:Boolean})],jv.prototype,"noFormatToggle",2),Ne([Ve()],jv.prototype,"name",2),Ne([Ve({type:Boolean,reflect:!0})],jv.prototype,"disabled",2),Ne([Ve({type:Boolean})],jv.prototype,"hoist",2),Ne([Ve({type:Boolean}
13935)],jv.prototype,"opacity",2),Ne([Ve({type:Boolean})],jv.prototype,"uppercase",2),Ne([Ve()],jv.prototype,"swatches",2),Ne([Ve({reflect:!0})],jv.prototype,"form",2),Ne([Ve({type:Boolean,reflect:!0})],jv.prototype,"required",2),Ne([We({passive:!1})],jv.prototype,"handleTouchMove",1),Ne([yt("format",{waitUntilFirstUpdate:!0})],jv.prototype,"handleFormatChange",1),Ne([yt("opacity",{waitUntilFirstUpdate:!0})],jv.prototype,"handleOpacityChange",1),Ne([yt("value")],jv.prototype,"handleValueChange",1),jv.define("sl-color-picker");var Vv=c` 13936 :host { 13937 --border-color: var(--sl-color-neutral-200); 13938 --border-radius: var(--sl-border-radius-medium); 13939 --border-width: 1px; 13940 --padding: var(--sl-spacing-large); 13941 13942 display: inline-block; 13943 } 13944 13945 .card { 13946 display: flex; 13947 flex-direction: column; 13948 background-color: var(--sl-panel-background-color); 13949 box-shadow: var(--sl-shadow-x-small); 13950 border: solid var(--border-width) var(--border-color); 13951 border-radius: var(--border-radius); 13952 } 13953 13954 .card__image { 13955 display: flex; 13956 border-top-left-radius: var(--border-radius); 13957 border-top-right-radius: var(--border-radius); 13958 margin: calc(-1 * var(--border-width)); 13959 overflow: hidden; 13960 } 13961 13962 .card__image::slotted(img) { 13963 display: block; 13964 width: 100%; 13965 } 13966 13967 .card:not(.card--has-image) .card__image { 13968 display: none; 13969 } 13970 13971 .card__header { 13972 display: block; 13973 border-bottom: solid var(--border-width) var(--border-color); 13974 padding: calc(var(--padding) / 2) var(--padding); 13975 } 13976 13977 .card:not(.card--has-header) .card__header { 13978 display: none; 13979 } 13980 13981 .card:not(.card--has-image) .card__header { 13982 border-top-left-radius: var(--border-radius); 13983 border-top-right-radius: var(--border-radius); 13984 } 13985 13986 .card__body { 13987 display: block; 13988 padding: var(--padding); 13989 } 13990 13991 .card--has-footer .card__footer { 13992 display: block; 13993 border-top: solid var(--border-width) var(--border-color); 13994 padding: var(--padding); 13995 } 13996 13997 .card:not(.card--has-footer) .card__footer { 13998 display: none; 13999 } 14000`,Hv=class extends Xe{constructor(){super(...arguments),this.hasSlotController=new dt(this,"footer","header","image")}render(){return W` 14001 <div 14002 part="base" 14003 class=${Mt({card:!0,"card--has-footer":this.hasSlotController.test("footer"),"card--has-image":this.hasSlotController.test("image"),"card--has-header":this.hasSlotController.test("header")})} 14004 > 14005 <slot name="image" part="image" class="card__image"></slot> 14006 <slot name="header" part="header" class="card__header"></slot> 14007 <slot part="body" class="card__body"></slot> 14008 <slot name="footer" part="footer" class="card__footer"></slot> 14009 </div> 14010 `}};Hv.styles=[Se,Vv],Hv.define("sl-card");var Wv=class{constructor(e,t){this.timerId=0,this.activeInteractions=0,this.paused=!1,this.stopped=!0,this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())},this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())},e.addController(this),this.host=e,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(e){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},e)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}},Gv=c` 14011 :host { 14012 --slide-gap: var(--sl-spacing-medium, 1rem); 14013 --aspect-ratio: 16 / 9; 14014 --scroll-hint: 0px; 14015 14016 display: flex; 14017 } 14018 14019 .carousel { 14020 display: grid; 14021 grid-template-columns: min-content 1fr min-content; 14022 grid-template-rows: 1fr min-content; 14023 grid-template-areas: 14024 '. slides .' 14025 '. pagination .'; 14026 gap: var(--sl-spacing-medium); 14027 align-items: center; 14028 min-height: 100%; 14029 min-width: 100%; 14030 position: relative; 14031 } 14032 14033 .carousel__pagination { 14034 grid-area: pagination; 14035 display: flex; 14036 flex-wrap: wrap; 14037 justify-content: center; 14038 gap: var(--sl-spacing-small); 14039 } 14040 14041 .carousel__slides { 14042 grid-area: slides; 14043 14044 display: grid; 14045 height: 100%; 14046 width: 100%; 14047 align-items: center; 14048 justify-items: center; 14049 overflow: auto; 14050 overscroll-behavior-x: contain; 14051 scrollbar-width: none; 14052 aspect-ratio: calc(var(--aspect-ratio) * var(--slides-per-page)); 14053 border-radius: var(--sl-border-radius-small); 14054 14055 --slide-size: calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap
14055)) / var(--slides-per-page)); 14056 } 14057 14058 @media (prefers-reduced-motion) { 14059 :where(.carousel__slides) { 14060 scroll-behavior: auto; 14061 } 14062 } 14063 14064 .carousel__slides--horizontal { 14065 grid-auto-flow: column; 14066 grid-auto-columns: var(--slide-size); 14067 grid-auto-rows: 100%; 14068 column-gap: var(--slide-gap); 14069 scroll-snap-type: x mandatory; 14070 scroll-padding-inline: var(--scroll-hint); 14071 padding-inline: var(--scroll-hint); 14072 overflow-y: hidden; 14073 } 14074 14075 .carousel__slides--vertical { 14076 grid-auto-flow: row; 14077 grid-auto-columns: 100%; 14078 grid-auto-rows: var(--slide-size); 14079 row-gap: var(--slide-gap); 14080 scroll-snap-type: y mandatory; 14081 scroll-padding-block: var(--scroll-hint); 14082 padding-block: var(--scroll-hint); 14083 overflow-x: hidden; 14084 } 14085 14086 .carousel__slides--dragging { 14087 } 14088 14089 :host([vertical]) ::slotted(sl-carousel-item) { 14090 height: 100%; 14091 } 14092 14093 .carousel__slides::-webkit-scrollbar { 14094 display: none; 14095 } 14096 14097 .carousel__navigation { 14098 grid-area: navigation; 14099 display: contents; 14100 font-size: var(--sl-font-size-x-large); 14101 } 14102 14103 .carousel__navigation-button { 14104 flex: 0 0 auto; 14105 display: flex; 14106 align-items: center; 14107 background: none; 14108 border: none; 14109 border-radius: var(--sl-border-radius-small); 14110 font-size: inherit; 14111 color: var(--sl-color-neutral-600); 14112 padding: var(--sl-spacing-x-small); 14113 cursor: pointer; 14114 transition: var(--sl-transition-medium) color; 14115 appearance: none; 14116 } 14117 14118 .carousel__navigation-button--disabled { 14119 opacity: 0.5; 14120 cursor: not-allowed; 14121 } 14122 14123 .carousel__navigation-button--disabled::part(base) { 14124 pointer-events: none; 14125 } 14126 14127 .carousel__navigation-button--previous { 14128 grid-column: 1; 14129 grid-row: 1; 14130 } 14131 14132 .carousel__navigation-button--next { 14133 grid-column: 3; 14134 grid-row: 1; 14135 } 14136 14137 .carousel__pagination-item { 14138 display: block; 14139 cursor: pointer; 14140 background: none; 14141 border: 0; 14142 border-radius: var(--sl-border-radius-circle); 14143 width: var(--sl-spacing-small); 14144 height: var(--sl-spacing-small); 14145 background-color: var(--sl-color-neutral-300); 14146 padding: 0; 14147 margin: 0; 14148 } 14149 14150 .carousel__pagination-item--active { 14151 background-color: var(--sl-color-neutral-700); 14152 transform: scale(1.2); 14153 } 14154 14155 /* Focus styles */ 14156 .carousel__slides:focus-visible, 14157 .carousel__navigation-button:focus-visible, 14158 .carousel__pagination-item:focus-visible { 14159 outline: var(--sl-focus-ring); 14160 outline-offset: var(--sl-focus-ring-offset); 14161 } 14162`,Yv=class extends Xe{constructor(){super(...arguments),this.loop=!1,this.navigation=!1,this.pagination=!1,this.autoplay=!1,this.autoplayInterval=3e3,this.slidesPerPage=1,this.slidesPerMove=1,this.orientation="horizontal",this.mouseDragging=!1,this.activeSlide=0,this.scrolling=!1,this.dragging=!1,this.autoplayController=new Wv(this,()=>this.next()),this.dragStartPosition=[-1,-1],this.localize=new $e(this),this.pendingSlideChange=!1,this.handleMouseDrag=e=>{this.dragging||(this.scrollContainer.style.setProperty("scroll-snap-type","none"),this.dragging=!0,this.dragStartPosition=[e.clientX,e.clientY]),this.scrollContainer.scrollBy({left:-e.movementX,top:-e.movementY,behavior:"instant"})},this.handleMouseDragEnd=()=>{const e=this.scrollContainer;document.removeEventListener("pointermove",this.handleMouseDrag,{capture:!0});const t=e.scrollLeft,i=e.scrollTop;e.style.removeProperty("scroll-snap-type"),e.style.setProperty("overflow","hidden");const r=e.scrollLeft,s=e.scrollTop;e.style.removeProperty("overflow"),e.style.setProperty("scroll-snap-type","none"),e.scrollTo({left:t,top:i,behavior:"instant"}),requestAnimationFrame(async()=>{t===r&&i===s||(e.scrollTo({left:r,top:s,behavior:ki()?"auto":"smooth"}),await yi(e,"scrollend")),e.style.removeProperty("scroll-snap-type"),this.dragging=!1,this.dragStartPosition=[-1,-1],this.handleScrollEnd()})},this.handleSlotChange=e=>{e.some(e=>[...e.addedNodes,...e.removedNodes].some(e=>this.isCarouselItem(e)&&!e.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-label",this.localize.term("carousel"))}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this.mutationObserver)||e.disconnect()}firstUpdated(){this.initializeSlides(),this.mutationObserver=new MutationObserver(this.handleSlot
14162Change),this.mutationObserver.observe(this,{childList:!0,subtree:!0})}willUpdate(e){(e.has("slidesPerMove")||e.has("slidesPerPage"))&&(this.slidesPerMove=Math.min(this.slidesPerMove,this.slidesPerPage))}getPageCount(){const e=this.getSlides().length,{slidesPerPage:t,slidesPerMove:i,loop:r}=this,s=r?e/i:(e-t)/i+1;return Math.ceil(s)}getCurrentPage(){return Math.ceil(this.activeSlide/this.slidesPerMove)}canScrollNext(){return this.loop||this.getCurrentPage()<this.getPageCount()-1}canScrollPrev(){return this.loop||this.getCurrentPage()>0}getSlides({excludeClones:e=!0}={}){return[...this.children].filter(t=>this.isCarouselItem(t)&&(!e||!t.hasAttribute("data-clone")))}handleClick(e){if(this.dragging&&this.dragStartPosition[0]>0&&this.dragStartPosition[1]>0){const t=Math.abs(this.dragStartPosition[0]-e.clientX),i=Math.abs(this.dragStartPosition[1]-e.clientY);Math.sqrt(t*t+i*i)>=10&&e.preventDefault()}}handleKeyDown(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)){const t=e.target,i="rtl"===this.localize.dir(),r=null!==t.closest('[part~="pagination-item"]'),s="ArrowDown"===e.key||!i&&"ArrowRight"===e.key||i&&"ArrowLeft"===e.key,o="ArrowUp"===e.key||!i&&"ArrowLeft"===e.key||i&&"ArrowRight"===e.key;e.preventDefault(),o&&this.previous(),s&&this.next(),"Home"===e.key&&this.goToSlide(0),"End"===e.key&&this.goToSlide(this.getSlides().length-1),r&&this.updateComplete.then(()=>{var e;const t=null==(e=this.shadowRoot)?void 0:e.querySelector('[part~="pagination-item--active"]');t&&t.focus()})}}handleMouseDragStart(e){this.mouseDragging&&0===e.button&&(e.preventDefault(),document.addEventListener("pointermove",this.handleMouseDrag,{capture:!0,passive:!0}),document.addEventListener("pointerup",this.handleMouseDragEnd,{capture:!0,once:!0}))}handleScroll(){this.scrolling=!0,this.pendingSlideChange||this.synchronizeSlides()}synchronizeSlides(){const e=new IntersectionObserver(t=>{e.disconnect();for(const e of t){const t=e.target;t.toggleAttribute("inert",!e.isIntersecting),t.classList.toggle("--in-view",e.isIntersecting),t.setAttribute("aria-hidden",e.isIntersecting?"false":"true")}const i=t.find(e=>e.isIntersecting);if(!i)return;const r=this.getSlides({excludeClones:!1}),s=this.getSlides().length,o=r.indexOf(i.target),a=this.loop?o-this.slidesPerPage:o;if(this.activeSlide=(Math.ceil(a/this.slidesPerMove)*this.slidesPerMove+s)%s,!this.scrolling&&this.loop&&i.target.hasAttribute("data-clone")){const e=Number(i.target.getAttribute("data-clone"));this.goToSlide(e,"instant")}},{root:this.scrollContainer,threshold:.6});this.getSlides({excludeClones:!1}).forEach(t=>{e.observe(t)})}handleScrollEnd(){this.scrolling&&!this.dragging&&(this.scrolling=!1,this.pendingSlideChange=!1,this.synchronizeSlides())}isCarouselItem(e){return e instanceof Element&&"sl-carousel-item"===e.tagName.toLowerCase()}initializeSlides(){this.getSlides({excludeClones:!1}).forEach((e,t)=>{e.classList.remove("--in-view"),e.classList.remove("--is-active"),e.setAttribute("role","group"),e.setAttribute("aria-label",this.localize.term("slideNum",t+1)),this.pagination&&(e.setAttribute("id",`slide-${t+1}`),e.setAttribute("role","tabpanel"),e.removeAttribute("aria-label"),e.setAttribute("aria-labelledby",`tab-${t+1}`)),e.hasAttribute("data-clone")&&e.remove()}),this.updateSlidesSnap(),this.loop&&this.createClones(),this.goToSlide(this.activeSlide,"auto"),this.synchronizeSlides()}createClones(){const e=this.getSlides(),t=this.slidesPerPage,i=e.slice(-t),r=e.slice(0,t);i.reverse().forEach((t,i)=>{const r=t.cloneNode(!0);r.setAttribute("data-clone",String(e.length-i-1)),this.prepend(r)}),r.forEach((e,t)=>{const i=e.cloneNode(!0);i.setAttribute("data-clone",String(t)),this.append(i)})}handleSlideChange(){const e=this.getSlides();e.forEach((e,t)=>{e.classList.toggle("--is-active",t===this.activeSlide)}),this.hasUpdated&&this.emit("sl-slide-change",{detail:{index:this.activeSlide,slide:e[this.activeSlide]}})}updateSlidesSnap(){const e=this.getSlides(),t=this.slidesPerMove;e.forEach((e,i)=>{(i+t)%t===0?e.style.removeProperty("scroll-snap-align"):e.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&this.autoplayController.start(this.autoplayInterval)}previous(e="smooth"){this.goToSlide(this.activeSlide-this.slidesPerMove,e)}next(e="smooth"){this.goToSlide(this.activeSlide+this.slidesPerMove,e)}goToSlide(e,t="smooth"){const{slidesPerPage:i,loop:r}=this,s=this.getSlides(),o=this.getSlides({excludeClones:!1});if(!s.length)return;const a=r?(e+s.length)%s.length:$b(e,0,s.length-i);this.activeSlide=a;const n=o[$b(e+(r?i:0)+("rtl"===this.localize.dir()?i-1:0),0,o.length-1)];this.scrollToSlide(n,ki()?"auto":t)}scrollToSlide(e,t="smooth"){this.pendingSlideChange=!0,window.requestAnimationFrame(()=>{if(!this.scrollContainer)return;const i=this.scrollContainer,r=i.getBoundingClientRect(),s=e.getBoundingClientRect(),o=s.left-r.left,a=s.top-r.top;o||a?(this.pendingSlideChange=!0,i.scrollTo({left:o+i.scrollLeft,top:a+i.scrollTop,behavior:t})):this.pendingSlideChange=!1})}render(){const{slidesPerMove:e,scrolling:t}=this,i=this.getPageCount(),r=this.getCurrentPage(),s=this.canScrollPrev(),o=this.canScrollNext(),a="ltr"===this.localize.dir();return W` 14163 <div part="base" class="carousel"> 14164 <div 14165 id="scroll-container" 14166 part="scroll-container" 14167 class="${Mt({carousel__slides:!0,"carousel__slides--horizontal":"horizontal"===this.orientation,"carousel__slides--vertical":"vertical"===this.orientation,"carousel__slides--dragging":this.dragging})}" 14168 style="--slides-per-page: ${this.slidesPerPage};" 14169 aria-busy="${t?"true":"false"}" 14170 aria-atomic="true" 14171 tabindex="0" 14172 @keydown=${this.handleKeyDown} 14173 @mousedown="${this.handleMouseDragStart}" 14174 @scroll="${this.handleScroll}" 14175 @scrollend=${this.handleScrollEnd} 14176 @click=${this.handleClick} 14177 > 14178 <slot></slot> 14179 </div> 14180 14181 ${this.navigation?W` 14182 <div part="navigation" class="carousel__navigation"> 14183 <button
14184 part="navigation-button navigation-button--previous" 14185 class="${Mt({"carousel__navigation-button":!0,"carousel__navigation-button--previous":!0,"carousel__navigation-button--disabled":!s})}" 14186 aria-label="${this.localize.term("previousSlide")}" 14187 aria-controls="scroll-container" 14188 aria-disabled="${s?"false":"true"}" 14189 @click=${s?()=>this.previous():null} 14190 > 14191 <slot name="previous-icon"> 14192 <sl-icon library="system" name="${a?"chevron-left":"chevron-right"}"></sl-icon> 14193 </slot> 14194 </button> 14195 14196 <button 14197 part="navigation-button navigation-button--next" 14198 class=${Mt({"carousel__navigation-button":!0,"carousel__navigation-button--next":!0,"carousel__navigation-button--disabled":!o})} 14199 aria-label="${this.localize.term("nextSlide")}" 14200 aria-controls="scroll-container" 14201 aria-disabled="${o?"false":"true"}" 14202 @click=${o?()=>this.next():null} 14203 > 14204 <slot name="next-icon"> 14205 <sl-icon library="system" name="${a?"chevron-right":"chevron-left"}"></sl-icon> 14206 </slot> 14207 </button> 14208 </div> 14209 `:""} 14210 ${this.pagination?W` 14211 <div part="pagination" role="tablist" class="carousel__pagination"> 14212 ${Bh(Uh(i),t=>{const s=t===r;return W` 14213 <button 14214 part="pagination-item ${s?"pagination-item--active":""}" 14215 class="${Mt({"carousel__pagination-item":!0,"carousel__pagination-item--active":s})}" 14216 role="tab" 14217 id="tab-${t+1}" 14218 aria-controls="slide-${t+1}" 14219 aria-selected="${s?"true":"false"}" 14220 aria-label="${s?this.localize.term("slideNum",t+1):this.localize.term("goToSlide",t+1,i)}" 14221 tabindex=${s?"0":"-1"} 14222 @click=${()=>this.goToSlide(t*e)} 14223 @keydown=${this.handleKeyDown} 14224 ></button> 14225 `})} 14226 </div> 14227 `:""} 14228 </div> 14229 `}};Yv.styles=[Se,Gv],Yv.dependencies={"sl-icon":Pt},Ne([Ve({type:Boolean,reflect:!0})],Yv.prototype,"loop",2),Ne([Ve({type:Boolean,reflect:!0})],Yv.prototype,"navigation",2),Ne([Ve({type:Boolean,reflect:!0})],Yv.prototype,"pagination",2),Ne([Ve({type:Boolean,reflect:!0})],Yv.prototype,"autoplay",2),Ne([Ve({type:Number,attribute:"autoplay-interval"})],Yv.prototype,"autoplayInterval",2),Ne([Ve({type:Number,attribute:"slides-per-page"})],Yv.prototype,"slidesPerPage",2),Ne([Ve({type:Number,attribute:"slides-per-move"})],Yv.prototype,"slidesPerMove",2),Ne([Ve()],Yv.prototype,"orientation",2),Ne([Ve({type:Boolean,reflect:!0,attribute:"mouse-dragging"})],Yv.prototype,"mouseDragging",2),Ne([Ye(".carousel__slides")],Yv.prototype,"scrollContainer",2),Ne([Ye(".carousel__pagination")],Yv.prototype,"paginationContainer",2),Ne([He()],Yv.prototype,"activeSlide",2),Ne([He()],Yv.prototype,"scrolling",2),Ne([He()],Yv.prototype,"dragging",2),Ne([We({passive:!0})],Yv.prototype,"handleScroll",1),Ne([yt("loop",{waitUntilFirstUpdate:!0}),yt("slidesPerPage",{waitUntilFirstUpdate:!0})],Yv.prototype,"initializeSlides",1),Ne([yt("activeSlide")],Yv.prototype,"handleSlideChange",1),Ne([yt("slidesPerMove")],Yv.prototype,"updateSlidesSnap",1),Ne([yt("autoplay")],Yv.prototype,"handleAutoplayChange",1),Yv.define("sl-carousel");var Kv=(e,t)=>{let i=0;return function(...r){window.clearTimeout(i),i=window.setTimeout(()=>{e.call(this,...r)},t)}},Qv=(e,t,i)=>{const r=e[t];e[t]=function(...e){r.call(this,...e),i.call(this,r,...e)}};(()=>{if("undefined"==typeof window)return;if(!("onscrollend"in window)){const e=new Set,t=new WeakMap,i=t=>{for(const i of t.changedTouches)e.add(i.identifier)},r=t=>{for(const i of t.changedTouches)e.delete(i.identifier)};document.addEventListener("touchstart",i,!0),document.addEventListener("touchend",r,!0),document.addEventListener("touchcancel",r,!0),Qv(EventTarget.prototype,"addEventListener",function(i,r){if("scrollend"!==r)return;const s=Kv(()=>{e.size?s():this.dispatchEvent(new Event("scrollend"))},100);i.call(this,"scroll",s,{passive:!0}),t.set(this,s)}),Qv(EventTarget.prototype,"removeEventListener",function(e,i){if("scrollend"!==i)return;const r=t.get(this);r&&e.call(this,"scroll",r,{passive:!0})})}})();var Xv=c` 14230 :host { 14231 --aspect-ratio: inherit; 14232 14233 display: flex; 14234 align-items: center; 14235 justify-content: center; 14236 flex-direction: column; 14237 width: 100%; 14238 max-height: 100%; 14239 aspect-ratio: var(--aspect-ratio); 14240 scroll-snap-align: start; 14241 scroll-snap-stop: always; 14242 } 14243 14244 ::slotted(img) { 14245 width: 100% !important; 14246 height: 100% !important; 14247 object-fit: cover; 14248 } 14249`,Jv=class extends Xe{connectedCallback(){super.connectedCallback()}render(){return W` <slot></slot> `}};Jv.styles=[Se,Xv],Jv.define("sl-carousel-item");var Zv=c` 14250 :host { 14251 display: inline-flex; 14252 } 14253 14254 .breadcrumb-item { 14255 display: inline-flex; 14256 align-items: center; 14257 font-family: var(--sl-font-sans); 14258 font-size: var(--sl-font-size-small);
14259 font-weight: var(--sl-font-weight-semibold); 14260 color: var(--sl-color-neutral-600); 14261 line-height: var(--sl-line-height-normal); 14262 white-space: nowrap; 14263 } 14264 14265 .breadcrumb-item__label { 14266 display: inline-block; 14267 font-family: inherit; 14268 font-size: inherit; 14269 font-weight: inherit; 14270 line-height: inherit; 14271 text-decoration: none; 14272 color: inherit; 14273 background: none; 14274 border: none; 14275 border-radius: var(--sl-border-radius-medium); 14276 padding: 0; 14277 margin: 0; 14278 cursor: pointer; 14279 transition: var(--sl-transition-fast) --color; 14280 } 14281 14282 :host(:not(:last-of-type)) .breadcrumb-item__label { 14283 color: var(--sl-color-primary-600); 14284 } 14285 14286 :host(:not(:last-of-type)) .breadcrumb-item__label:hover { 14287 color: var(--sl-color-primary-500); 14288 } 14289 14290 :host(:not(:last-of-type)) .breadcrumb-item__label:active { 14291 color: var(--sl-color-primary-600); 14292 } 14293 14294 .breadcrumb-item__label:focus { 14295 outline: none; 14296 } 14297 14298 .breadcrumb-item__label:focus-visible { 14299 outline: var(--sl-focus-ring); 14300 outline-offset: var(--sl-focus-ring-offset); 14301 } 14302 14303 .breadcrumb-item__prefix, 14304 .breadcrumb-item__suffix { 14305 display: none; 14306 flex: 0 0 auto; 14307 display: flex; 14308 align-items: center; 14309 } 14310 14311 .breadcrumb-item--has-prefix .breadcrumb-item__prefix { 14312 display: inline-flex; 14313 margin-inline-end: var(--sl-spacing-x-small); 14314 } 14315 14316 .breadcrumb-item--has-suffix .breadcrumb-item__suffix { 14317 display: inline-flex; 14318 margin-inline-start: var(--sl-spacing-x-small); 14319 } 14320 14321 :host(:last-of-type) .breadcrumb-item__separator { 14322 display: none; 14323 } 14324 14325 .breadcrumb-item__separator { 14326 display: inline-flex; 14327 align-items: center; 14328 margin: 0 var(--sl-spacing-x-small); 14329 user-select: none; 14330 -webkit-user-select: none; 14331 } 14332`,ey=class extends Xe{constructor(){super(...arguments),this.hasSlotController=new dt(this,"prefix","suffix"),this.renderType="button",this.rel="noreferrer noopener"}setRenderType(){const e=this.defaultSlot.assignedElements({flatten:!0}).filter(e=>"sl-dropdown"===e.tagName.toLowerCase()).length>0;this.href?this.renderType="link":this.renderType=e?"dropdown":"button"}hrefChanged(){this.setRenderType()}handleSlotChange(){this.setRenderType()}render(){return W` 14333 <div 14334 part="base" 14335 class=${Mt({"breadcrumb-item":!0,"breadcrumb-item--has-prefix":this.hasSlotController.test("prefix"),"breadcrumb-item--has-suffix":this.hasSlotController.test("suffix")})} 14336 > 14337 <span part="prefix" class="breadcrumb-item__prefix"> 14338 <slot name="prefix"></slot> 14339 </span> 14340 14341 ${"link"===this.renderType?W` 14342 <a 14343 part="label" 14344 class="breadcrumb-item__label breadcrumb-item__label--link" 14345 href="${this.href}" 14346 target="${Ht(this.target?this.target:void 0)}" 14347 rel=${Ht(this.target?this.rel:void 0)} 14348 > 14349 <slot @slotchange=${this.handleSlotChange}></slot> 14350 </a> 14351 `:""} 14352 ${"button"===this.renderType?W` 14353 <button part="label" type="button" class="breadcrumb-item__label breadcrumb-item__label--button"> 14354 <slot @slotchange=${this.handleSlotChange}></slot> 14355 </button> 14356 `:""} 14357 ${"dropdown"===this.renderType?W` 14358 <div part="label" class="breadcrumb-item__label breadcrumb-item__label--drop-down"> 14359 <slot @slotchange=${this.handleSlotChange}></slot> 14360 </div> 14361 `:""} 14362 14363 <span part="suffix" class="breadcrumb-item__suffix"> 14364 <slot name="suffix"></slot> 14365 </span> 14366 14367 <span part="separator" class="breadcrumb-item__separator" aria-hidden="true"> 14368 <slot name="separator"></slot> 14369 </span> 14370 </div> 14371 `}};ey.styles=[Se,Zv],Ne([Ye("slot:not([name])")],ey.prototype,"defaultSlot",2),Ne([He()],ey.prototype,"renderType",2),Ne([Ve()],ey.prototype,"href",2),Ne([Ve()],ey.prototype,"target",2),Ne([Ve()],ey.prototype,"rel",2),Ne([yt("href",{waitUntilFirstUpdate:!0})],ey.prototype,"hrefChanged",1),ey.define("sl-breadcrumb-item"),Ls.define("sl-button-group");var ty=c` 14372 :host { 14373 display: inline-block; 14374 14375 --size: 3rem; 14376 } 14377 14378 .avatar { 14379 display: inline-flex; 14380 align-items: center; 14381 justify-content: center; 14382 position: relative; 14383 width: var(--size); 14384 height: var(--size); 14385 background-color: var(--sl-color-neutral-400); 14386 font-family: var(--sl-font-sans); 14387 font-size: calc(var(--size) * 0.5);
14388 font-weight: var(--sl-font-weight-normal); 14389 color: var(--sl-color-neutral-0); 14390 user-select: none; 14391 -webkit-user-select: none; 14392 vertical-align: middle; 14393 } 14394 14395 .avatar--circle, 14396 .avatar--circle .avatar__image { 14397 border-radius: var(--sl-border-radius-circle); 14398 } 14399 14400 .avatar--rounded, 14401 .avatar--rounded .avatar__image { 14402 border-radius: var(--sl-border-radius-medium); 14403 } 14404 14405 .avatar--square { 14406 border-radius: 0; 14407 } 14408 14409 .avatar__icon { 14410 display: flex; 14411 align-items: center; 14412 justify-content: center; 14413 position: absolute; 14414 top: 0; 14415 left: 0; 14416 width: 100%; 14417 height: 100%; 14418 } 14419 14420 .avatar__initials { 14421 line-height: 1; 14422 text-transform: uppercase; 14423 } 14424 14425 .avatar__image { 14426 position: absolute; 14427 top: 0; 14428 left: 0; 14429 width: 100%; 14430 height: 100%; 14431 object-fit: cover; 14432 overflow: hidden; 14433 } 14434`,iy=class extends Xe{constructor(){super(...arguments),this.hasError=!1,this.image="",this.label="",this.initials="",this.loading="eager",this.shape="circle"}handleImageChange(){this.hasError=!1}handleImageLoadError(){this.hasError=!0,this.emit("sl-error")}render(){const e=W` 14435 <img 14436 part="image" 14437 class="avatar__image" 14438 src="${this.image}" 14439 loading="${this.loading}" 14440 alt="" 14441 @error="${this.handleImageLoadError}" 14442 /> 14443 `;let t=W``;return t=this.initials?W`<div part="initials" class="avatar__initials">${this.initials}</div>`:W` 14444 <div part="icon" class="avatar__icon" aria-hidden="true"> 14445 <slot name="icon"> 14446 <sl-icon name="person-fill" library="system"></sl-icon> 14447 </slot> 14448 </div> 14449 `,W` 14450 <div 14451 part="base" 14452 class=${Mt({avatar:!0,"avatar--circle":"circle"===this.shape,"avatar--rounded":"rounded"===this.shape,"avatar--square":"square"===this.shape})} 14453 role="img" 14454 aria-label=${this.label} 14455 > 14456 ${this.image&&!this.hasError?e:t} 14457 </div> 14458 `}};iy.styles=[Se,ty],iy.dependencies={"sl-icon":Pt},Ne([He()],iy.prototype,"hasError",2),Ne([Ve()],iy.prototype,"image",2),Ne([Ve()],iy.prototype,"label",2),Ne([Ve()],iy.prototype,"initials",2),Ne([Ve()],iy.prototype,"loading",2),Ne([Ve({reflect:!0})],iy.prototype,"shape",2),Ne([yt("image")],iy.prototype,"handleImageChange",1),iy.define("sl-avatar");var ry=c` 14459 .breadcrumb { 14460 display: flex; 14461 align-items: center; 14462 flex-wrap: wrap; 14463 } 14464`,sy=class extends Xe{constructor(){super(...arguments),this.localize=new $e(this),this.separatorDir=this.localize.dir(),this.label=""}getSeparator(){const e=this.separatorSlot.assignedElements({flatten:!0})[0].cloneNode(!0);return[e,...e.querySelectorAll("[id]")].forEach(e=>e.removeAttribute("id")),e.setAttribute("data-default",""),e.slot="separator",e}handleSlotChange(){const e=[...this.defaultSlot.assignedElements({flatten:!0})].filter(e=>"sl-breadcrumb-item"===e.tagName.toLowerCase());e.forEach((t,i)=>{const r=t.querySelector('[slot="separator"]');null===r?t.append(this.getSeparator()):r.hasAttribute("data-default")&&r.replaceWith(this.getSeparator()),i===e.length-1?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current")})}render(){return this.separatorDir!==this.localize.dir()&&(this.separatorDir=this.localize.dir(),this.updateComplete.then(()=>this.handleSlotChange())),W` 14465 <nav part="base" class="breadcrumb" aria-label=${this.label}> 14466 <slot @slotchange=${this.handleSlotChange}></slot> 14467 </nav> 14468 14469 <span hidden aria-hidden="true"> 14470 <slot name="separator"> 14471 <sl-icon name=${"rtl"===this.localize.dir()?"chevron-left":"chevron-right"} library="system"></sl-icon> 14472 </slot> 14473 </span> 14474 `}};sy.styles=[Se,ry],sy.dependencies={"sl-icon":Pt},Ne([Ye("slot")],sy.prototype,"defaultSlot",2),Ne([Ye('slot[name="separator"]')],sy.prototype,"separatorSlot",2),Ne([Ve()],sy.prototype,"label",2),sy.define("sl-breadcrumb");var oy=c` 14475 :host { 14476 --control-box-size: 3rem; 14477 --icon-size: calc(var(--control-box-size) * 0.625); 14478 14479 display: inline-flex; 14480 position: relative; 14481 cursor: pointer; 14482 } 14483 14484 img { 14485 display: block; 14486 width: 100%; 14487 height: 100%; 14488 } 14489 14490 img[aria-hidden='true'] { 14491 display: none; 14492 } 14493 14494 .animated-image__control-box { 14495 display: flex; 14496 position: absolute;
14497 align-items: center; 14498 justify-content: center; 14499 top: calc(50% - var(--control-box-size) / 2); 14500 right: calc(50% - var(--control-box-size) / 2); 14501 width: var(--control-box-size); 14502 height: var(--control-box-size); 14503 font-size: var(--icon-size); 14504 background: none; 14505 border: solid 2px currentColor; 14506 background-color: rgb(0 0 0 /50%); 14507 border-radius: var(--sl-border-radius-circle); 14508 color: white; 14509 pointer-events: none; 14510 transition: var(--sl-transition-fast) opacity; 14511 } 14512 14513 :host([play]:hover) .animated-image__control-box { 14514 opacity: 1; 14515 } 14516 14517 :host([play]:not(:hover)) .animated-image__control-box { 14518 opacity: 0; 14519 } 14520 14521 :host([play]) slot[name='play-icon'], 14522 :host(:not([play])) slot[name='pause-icon'] { 14523 display: none; 14524 } 14525`,ay=class extends Xe{constructor(){super(...arguments),this.isLoaded=!1}handleClick(){this.play=!this.play}handleLoad(){const e=document.createElement("canvas"),{width:t,height:i}=this.animatedImage;e.width=t,e.height=i,e.getContext("2d").drawImage(this.animatedImage,0,0,t,i),this.frozenFrame=e.toDataURL("image/gif"),this.isLoaded||(this.emit("sl-load"),this.isLoaded=!0)}handleError(){this.emit("sl-error")}handlePlayChange(){this.play&&(this.animatedImage.src="",this.animatedImage.src=this.src)}handleSrcChange(){this.isLoaded=!1}render(){return W` 14526 <div class="animated-image"> 14527 <img 14528 class="animated-image__animated" 14529 src=${this.src} 14530 alt=${this.alt} 14531 crossorigin="anonymous" 14532 aria-hidden=${this.play?"false":"true"} 14533 @click=${this.handleClick} 14534 @load=${this.handleLoad} 14535 @error=${this.handleError} 14536 /> 14537 14538 ${this.isLoaded?W` 14539 <img 14540 class="animated-image__frozen" 14541 src=${this.frozenFrame} 14542 alt=${this.alt} 14543 aria-hidden=${this.play?"true":"false"} 14544 @click=${this.handleClick} 14545 /> 14546 14547 <div part="control-box" class="animated-image__control-box"> 14548 <slot name="play-icon"><sl-icon name="play-fill" library="system"></sl-icon></slot> 14549 <slot name="pause-icon"><sl-icon name="pause-fill" library="system"></sl-icon></slot> 14550 </div> 14551 `:""} 14552 </div> 14553 `}};ay.styles=[Se,oy],ay.dependencies={"sl-icon":Pt},Ne([Ye(".animated-image__animated")],ay.prototype,"animatedImage",2),Ne([He()],ay.prototype,"frozenFrame",2),Ne([He()],ay.prototype,"isLoaded",2),Ne([Ve()],ay.prototype,"src",2),Ne([Ve()],ay.prototype,"alt",2),Ne([Ve({type:Boolean,reflect:!0})],ay.prototype,"play",2),Ne([yt("play",{waitUntilFirstUpdate:!0})],ay.prototype,"handlePlayChange",1),Ne([yt("src")],ay.prototype,"handleSrcChange",1),ay.define("sl-animated-image");var ny=c` 14554 :host { 14555 display: contents; 14556 14557 /* For better DX, we'll reset the margin here so the base part can inherit it */ 14558 margin: 0; 14559 } 14560 14561 .alert { 14562 position: relative; 14563 display: flex; 14564 align-items: stretch; 14565 background-color: var(--sl-panel-background-color); 14566 border: solid var(--sl-panel-border-width) var(--sl-panel-border-color); 14567 border-top-width: calc(var(--sl-panel-border-width) * 3); 14568 border-radius: var(--sl-border-radius-medium); 14569 font-family: var(--sl-font-sans); 14570 font-size: var(--sl-font-size-small); 14571 font-weight: var(--sl-font-weight-normal); 14572 line-height: 1.6; 14573 color: var(--sl-color-neutral-700); 14574 margin: inherit; 14575 overflow: hidden; 14576 } 14577 14578 .alert:not(.alert--has-icon) .alert__icon, 14579 .alert:not(.alert--closable) .alert__close-button { 14580 display: none; 14581 } 14582 14583 .alert__icon { 14584 flex: 0 0 auto; 14585 display: flex; 14586 align-items: center; 14587 font-size: var(--sl-font-size-large); 14588 padding-inline-start: var(--sl-spacing-large); 14589 } 14590 14591 .alert--has-countdown { 14592 border-bottom: none; 14593 } 14594 14595 .alert--primary { 14596 border-top-color: var(--sl-color-primary-600); 14597 } 14598 14599 .alert--primary .alert__icon { 14600 color: var(--sl-color-primary-600); 14601 } 14602 14603 .alert--success { 14604 border-top-color: var(--sl-color-success-600); 14605 } 14606 14607 .alert--success .alert__icon { 14608 color: var(--sl-color-success-600); 14609 } 14610 14611 .alert--neutral { 14612 border-top-color: var(--sl-color-neutral-600); 14613 } 14614 14615 .alert--neutral .alert__icon { 14616 color: var(--sl-color-neutral-600); 14617 } 14618 14619 .alert--warning { 14620 border-top-color: var(--sl-color-warning-600); 14621 } 14622 14623 .alert--warning .alert__icon { 14624 color: var(--sl-color-warning-600); 14625 } 14626 14627 .alert--danger { 14628 border-top-color: var(--sl-color-danger-600); 14629 } 14630 14631 .alert--danger .alert__icon { 14632 color: var(--sl-color-danger-600); 14633 } 14634 14635 .alert__message { 14636 flex: 1 1 auto; 14637 display: block; 14638 padding: var(--sl-spacing-large); 14639 overflow: hidden; 14640 } 14641 14642 .alert__close-button { 14643 flex: 0 0 auto; 14644 display: flex; 14645 align-items: center; 14646 font-size: var(--sl-font-size-medium); 14647 margin-inline-end: var(--sl-spacing-medium); 14648 align-self: center; 14649 } 14650 14651 .alert__countdown { 14652 position: absolute; 14653 bottom: 0; 14654 left: 0; 14655 width: 100%; 14656 height: calc(var(--sl-panel-border-width) * 3); 14657 background-color: var(--sl-panel-border-color); 14658 display: flex; 14659 } 14660 14661 .alert__countdown--ltr { 14662 justify-content: flex-end; 14663 } 14664 14665 .alert__countdown .alert__countdown-elapsed { 14666 height: 100%; 14667 width: 0; 14668 } 14669 14670 .alert--primary .alert__countdown-elapsed { 14671 background-color: var(--sl-color-primary-600); 14672 } 14673 14674 .alert--success .alert__countdown-elapsed { 14675 background-color: var(--sl-color-success-600); 14676 } 14677 14678 .alert--neutral .alert__countdown-elapsed { 14679 background-color: var(--sl-color-neutral-600); 14680 } 14681 14682 .alert--warning .alert__countdown-elapsed { 14683 background-color: var(--sl-color-warning-600); 14684 } 14685 14686 .alert--danger .alert__countdown-elapsed { 14687 background-color: var(--sl-color-danger-600); 14688 } 14689 14690 .alert__timer { 14691 display: none; 14692 } 14693`,ly=class e extends Xe{constructor(){super(...arguments),this.hasSlotController=new dt(this,"icon","suffix"),this.localize=new $e(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0,this.remainingTime=this.duration}static get toastStack(){return this.currentToastStack||(this.currentToastStack=Object.assign(document.createElement("div"),{className:"sl-toast-stack"})),this.currentToastStack}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){this.handleCountdownChange(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration),this.remainingTime=this.duration,this.remainingTimeInterval=window.setInterval(()=>{this.remainingTime-=100},100))}pauseAutoHide(){var e;null==(e=this.countdownAnimation)||e.pause(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval)}resumeAutoHide(){var e;this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.remainingTime),this.remainingTimeInterval=window.setInterval(()=>{this.remainingTime-=100},100),null==(e=this.countdownAnimation)||e.play())}handleCountdownChange(){if(this.open&&this.duration<1/0&&this.countdown){const{countdownElement:e}=this,t="100%",i="0";this.countdownAnimation=e.animate([{width:t},{width:i}],{duration:this.duration,easing:"linear"})}}handleCloseClick(){this.hide()}
14693async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await xi(this.base),this.base.hidden=!1;const{keyframes:e,options:t}=vi(this,"alert.show",{dir:this.localize.dir()});await _i(this.base,e,t),this.emit("sl-after-show")}else{hi(this),this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),await xi(this.base);const{keyframes:e,options:t}=vi(this,"alert.hide",{dir:this.localize.dir()});await _i(this.base,e,t),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,yi(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,yi(this,"sl-after-hide")}async toast(){return new Promise(t=>{this.handleCountdownChange(),null===e.toastStack.parentElement&&document.body.append(e.toastStack),e.toastStack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sl-after-hide",()=>{e.toastStack.removeChild(this),t(),null===e.toastStack.querySelector("sl-alert")&&e.toastStack.remove()},{once:!0})})}render(){return W` 14694 <div 14695 part="base" 14696 class=${Mt({alert:!0,"alert--open":this.open,"alert--closable":this.closable,"alert--has-countdown":!!this.countdown,"alert--has-icon":this.hasSlotController.test("icon"),"alert--primary":"primary"===this.variant,"alert--success":"success"===this.variant,"alert--neutral":"neutral"===this.variant,"alert--warning":"warning"===this.variant,"alert--danger":"danger"===this.variant})} 14697 role="alert" 14698 aria-hidden=${this.open?"false":"true"} 14699 @mouseenter=${this.pauseAutoHide} 14700 @mouseleave=${this.resumeAutoHide} 14701 > 14702 <div part="icon" class="alert__icon"> 14703 <slot name="icon"></slot> 14704 </div> 14705 14706 <div part="message" class="alert__message" aria-live="polite"> 14707 <slot></slot> 14708 </div> 14709 14710 ${this.closable?W` 14711 <sl-icon-button 14712 part="close-button" 14713 exportparts="base:close-button__base" 14714 class="alert__close-button" 14715 name="x-lg" 14716 library="system" 14717 label=${this.localize.term("close")} 14718 @click=${this.handleCloseClick} 14719 ></sl-icon-button> 14720 `:""} 14721 14722 <div role="timer" class="alert__timer">${this.remainingTime}</div> 14723 14724 ${this.countdown?W` 14725 <div 14726 class=${Mt({alert__countdown:!0,"alert__countdown--ltr":"ltr"===this.countdown})} 14727 > 14728 <div class="alert__countdown-elapsed"></div> 14729 </div> 14730 `:""} 14731 </div> 14732 `}};ly.styles=[Se,ny],ly.dependencies={"sl-icon-button":pi},Ne([Ye('[part~="base"]')],ly.prototype,"base",2),Ne([Ye(".alert__countdown-elapsed")],ly.prototype,"countdownElement",2),Ne([Ve({type:Boolean,reflect:!0})],ly.prototype,"open",2),Ne([Ve({type:Boolean,reflect:!0})],ly.prototype,"closable",2),Ne([Ve({reflect:!0})],ly.prototype,"variant",2),Ne([Ve({type:Number})],ly.prototype,"duration",2),Ne([Ve({type:String,reflect:!0})],ly.prototype,"countdown",2),Ne([He()],ly.prototype,"remainingTime",2),Ne([yt("open",{waitUntilFirstUpdate:!0})],ly.prototype,"handleOpenChange",1),Ne([yt("duration")],ly.prototype,"handleDurationChange",1);var dy=ly;bi("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),bi("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),dy.define("sl-alert");const cy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",easeInSine:"cubic-bezier(0.47, 0, 0.745, 0.715)",easeOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInOutSine:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",easeInQuad:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",easeOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInOutQuad:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",easeInCubic:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",easeOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1)",easeInQuart:"cubic-bezier(0.895, 0.03,
147320.685, 0.22)",easeOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInOutQuart:"cubic-bezier(0.77, 0, 0.175, 1)",easeInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuint:"cubic-bezier(0.86, 0, 0.07, 1)",easeInExpo:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInOutExpo:"cubic-bezier(1, 0, 0, 1)",easeInCirc:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",easeOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",easeInBack:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",easeInOutBack:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};var hy=Object.freeze({__proto__:null,backInDown:[{offset:0,transform:"translateY(-1200px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInLeft:[{offset:0,transform:"translateX(-2000px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInRight:[{offset:0,transform:"translateX(2000px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInUp:[{offset:0,transform:"translateY(1200px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backOutDown:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateY(700px) scale(0.7)",opacity:"0.7"}],backOutLeft:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateX(-2000px) scale(0.7)",opacity:"0.7"}],backOutRight:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateX(2000px) scale(0.7)",opacity:"0.7"}],backOutUp:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateY(-700px) scale(0.7)",opacity:"0.7"}],bounce:[{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.2,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.4,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -30px, 0) scaleY(1.1)"},{offset:.43,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -30px, 0) scaleY(1.1)"},{offset:.53,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.7,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -15px, 0) scaleY(1.05)"},{offset:.8,"transition-timing-function":"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0) scaleY(0.95)"},{offset:.9,transform:"translate3d(0, -4px, 0) scaleY(1.02)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"}],bounceIn:[{offset:0,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.2,transform:"scale3d(1.1, 1.1, 1.1)"},{offset:.2,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.4,transform:"scale3d(0.9, 0.9, 0.9)"},{offset:.4,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"scale3d(1.03, 1.03, 1.03)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.8,transform:"scale3d(0.97, 0.97, 0.97)"},{offset:.8,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,opacity:"1",transform:"scale3d(1, 1, 1)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInDown:[{offset:0,opacity:"0",transform:"translate3d(0, -3000px, 0) scaleY(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(0, 25px, 0) scaleY(0.9)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(0, -10px, 0) scaleY(0.95)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(0, 5px, 0) scaleY(0.985)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInLeft:[{offset:0,opacity:"0",transform:"translate3d(-3000px, 0, 0) scaleX(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(25px, 0, 0) scaleX(1)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(-10px, 0, 0) scaleX(0.98)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(5px, 0, 0) scaleX(0.995)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInRight:[{offset:0,opacity:"0",transform:"translate3d(3000px, 0, 0) scaleX(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(-25px, 0, 0) scaleX(1)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(10px, 0, 0) scaleX(0.98)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(-5px, 0, 0) scaleX(0.995)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInUp:[{offset:0,opacity:"0",transform:"translate3d(0, 3000px, 0) scaleY(5)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}
14732,{offset:.6,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(0, 10px, 0) scaleY(0.95)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(0, -5px, 0) scaleY(0.985)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceOut:[{offset:.2,transform:"scale3d(0.9, 0.9, 0.9)"},{offset:.5,opacity:"1",transform:"scale3d(1.1, 1.1, 1.1)"},{offset:.55,opacity:"1",transform:"scale3d(1.1, 1.1, 1.1)"},{offset:1,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"}],bounceOutDown:[{offset:.2,transform:"translate3d(0, 10px, 0) scaleY(0.985)"},{offset:.4,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:.45,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:1,opacity:"0",transform:"translate3d(0, 2000px, 0) scaleY(3)"}],bounceOutLeft:[{offset:.2,opacity:"1",transform:"translate3d(20px, 0, 0) scaleX(0.9)"},{offset:1,opacity:"0",transform:"translate3d(-2000px, 0, 0) scaleX(2)"}],bounceOutRight:[{offset:.2,opacity:"1",transform:"translate3d(-20px, 0, 0) scaleX(0.9)"},{offset:1,opacity:"0",transform:"translate3d(2000px, 0, 0) scaleX(2)"}],bounceOutUp:[{offset:.2,transform:"translate3d(0, -10px, 0) scaleY(0.985)"},{offset:.4,opacity:"1",transform:"translate3d(0, 20px, 0) scaleY(0.9)"},{offset:.45,opacity:"1",transform:"translate3d(0, 20px, 0) scaleY(0.9)"},{offset:1,opacity:"0",transform:"translate3d(0, -2000px, 0) scaleY(3)"}],easings:cy,fadeIn:[{offset:0,opacity:"0"},{offset:1,opacity:"1"}],fadeInBottomLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInBottomRight:[{offset:0,opacity:"0",transform:"translate3d(100%, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInDown:[{offset:0,opacity:"0",transform:"translate3d(0, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInDownBig:[{offset:0,opacity:"0",transform:"translate3d(0, -2000px, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInLeftBig:[{offset:0,opacity:"0",transform:"translate3d(-2000px, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInRight:[{offset:0,opacity:"0",transform:"translate3d(100%, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInRightBig:[{offset:0,opacity:"0",transform:"translate3d(2000px, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInTopLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInTopRight:[{offset:0,opacity:"0",transform:"translate3d(100%, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInUp:[{offset:0,opacity:"0",transform:"translate3d(0, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInUpBig:[{offset:0,opacity:"0",transform:"translate3d(0, 2000px, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeOut:[{offset:0,opacity:"1"},{offset:1,opacity:"0"}],fadeOutBottomLeft:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(-100%, 100%, 0)"}],fadeOutBottomRight:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(100%, 100%, 0)"}],fadeOutDown:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, 100%, 0)"}],fadeOutDownBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, 2000px, 0)"}],fadeOutLeft:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(-100%, 0, 0)"}],fadeOutLeftBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(-2000px, 0, 0)"}],fadeOutRight:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(100%, 0, 0)"}],fadeOutRightBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(2000px, 0, 0)"}],fadeOutTopLeft:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(-100%, -100%, 0)"}],fadeOutTopRight:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(100%, -100%, 0)"}],fadeOutUp:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, -100%, 0)"}],fadeOutUpBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, -2000px, 0)"}],flash:[{offset:0,opacity:"1"},{offset:.25,opacity:"0"},{offset:.5,opacity:"1"},{offset:.75,opacity:"0"},{offset:1,opacity:"1"}],flip:[{offset:0,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg)",easing:"ease-out"},{offset:.4,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -190deg)",easing:"ease-out"},{offset:.5,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -170deg)",easing:"ease-in"},{offset:.8,transform:"perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, 1, 0, 0deg)",easing:"ease-in"},{offset:1,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg)",easing:"ease-in"}],flipInX:[{offset:0,transform:"perspective(400px) rotate3d(1, 0, 0, 90deg)",easing:"ease-in",opacity:"0"}
14732,{offset:.4,transform:"perspective(400px) rotate3d(1, 0, 0, -20deg)",easing:"ease-in"},{offset:.6,transform:"perspective(400px) rotate3d(1, 0, 0, 10deg)",opacity:"1"},{offset:.8,transform:"perspective(400px) rotate3d(1, 0, 0, -5deg)"},{offset:1,transform:"perspective(400px)"}],flipInY:[{offset:0,transform:"perspective(400px) rotate3d(0, 1, 0, 90deg)",easing:"ease-in",opacity:"0"},{offset:.4,transform:"perspective(400px) rotate3d(0, 1, 0, -20deg)",easing:"ease-in"},{offset:.6,transform:"perspective(400px) rotate3d(0, 1, 0, 10deg)",opacity:"1"},{offset:.8,transform:"perspective(400px) rotate3d(0, 1, 0, -5deg)"},{offset:1,transform:"perspective(400px)"}],flipOutX:[{offset:0,transform:"perspective(400px)"},{offset:.3,transform:"perspective(400px) rotate3d(1, 0, 0, -20deg)",opacity:"1"},{offset:1,transform:"perspective(400px) rotate3d(1, 0, 0, 90deg)",opacity:"0"}],flipOutY:[{offset:0,transform:"perspective(400px)"},{offset:.3,transform:"perspective(400px) rotate3d(0, 1, 0, -15deg)",opacity:"1"},{offset:1,transform:"perspective(400px) rotate3d(0, 1, 0, 90deg)",opacity:"0"}],headShake:[{offset:0,transform:"translateX(0)"},{offset:.065,transform:"translateX(-6px) rotateY(-9deg)"},{offset:.185,transform:"translateX(5px) rotateY(7deg)"},{offset:.315,transform:"translateX(-3px) rotateY(-5deg)"},{offset:.435,transform:"translateX(2px) rotateY(3deg)"},{offset:.5,transform:"translateX(0)"}],heartBeat:[{offset:0,transform:"scale(1)"},{offset:.14,transform:"scale(1.3)"},{offset:.28,transform:"scale(1)"},{offset:.42,transform:"scale(1.3)"},{offset:.7,transform:"scale(1)"}],hinge:[{offset:0,easing:"ease-in-out"},{offset:.2,transform:"rotate3d(0, 0, 1, 80deg)",easing:"ease-in-out"},{offset:.4,transform:"rotate3d(0, 0, 1, 60deg)",easing:"ease-in-out",opacity:"1"},{offset:.6,transform:"rotate3d(0, 0, 1, 80deg)",easing:"ease-in-out"},{offset:.8,transform:"rotate3d(0, 0, 1, 60deg)",easing:"ease-in-out",opacity:"1"},{offset:1,transform:"translate3d(0, 700px, 0)",opacity:"0"}],jackInTheBox:[{offset:0,opacity:"0",transform:"scale(0.1) rotate(30deg)","transform-origin":"center bottom"},{offset:.5,transform:"rotate(-10deg)"},{offset:.7,transform:"rotate(3deg)"},{offset:1,opacity:"1",transform:"scale(1)"}],jello:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.111,transform:"translate3d(0, 0, 0)"},{offset:.222,transform:"skewX(-12.5deg) skewY(-12.5deg)"},{offset:.33299999999999996,transform:"skewX(6.25deg) skewY(6.25deg)"},{offset:.444,transform:"skewX(-3.125deg) skewY(-3.125deg)"},{offset:.555,transform:"skewX(1.5625deg) skewY(1.5625deg)"},{offset:.6659999999999999,transform:"skewX(-0.78125deg) skewY(-0.78125deg)"},{offset:.777,transform:"skewX(0.390625deg) skewY(0.390625deg)"},{offset:.888,transform:"skewX(-0.1953125deg) skewY(-0.1953125deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],lightSpeedInLeft:[{offset:0,transform:"translate3d(-100%, 0, 0) skewX(30deg)",opacity:"0"},{offset:.6,transform:"skewX(-20deg)",opacity:"1"},{offset:.8,transform:"skewX(5deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],lightSpeedInRight:[{offset:0,transform:"translate3d(100%, 0, 0) skewX(-30deg)",opacity:"0"},{offset:.6,transform:"skewX(20deg)",opacity:"1"},{offset:.8,transform:"skewX(-5deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],lightSpeedOutLeft:[{offset:0,opacity:"1"},{offset:1,transform:"translate3d(-100%, 0, 0) skewX(-30deg)",opacity:"0"}],lightSpeedOutRight:[{offset:0,opacity:"1"},{offset:1,transform:"translate3d(100%, 0, 0) skewX(30deg)",opacity:"0"}],pulse:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.5,transform:"scale3d(1.05, 1.05, 1.05)"},{offset:1,transform:"scale3d(1, 1, 1)"}],rollIn:[{offset:0,opacity:"0",transform:"translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],rollOut:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg)"}],rotateIn:[{offset:0,transform:"rotate3d(0, 0, 1, -200deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInDownLeft:[{offset:0,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInDownRight:[{offset:0,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInUpLeft:[{offset:0,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}
14732],rotateInUpRight:[{offset:0,transform:"rotate3d(0, 0, 1, -90deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateOut:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 200deg)",opacity:"0"}],rotateOutDownLeft:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"}],rotateOutDownRight:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"}],rotateOutUpLeft:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"}],rotateOutUpRight:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 90deg)",opacity:"0"}],rubberBand:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.3,transform:"scale3d(1.25, 0.75, 1)"},{offset:.4,transform:"scale3d(0.75, 1.25, 1)"},{offset:.5,transform:"scale3d(1.15, 0.85, 1)"},{offset:.65,transform:"scale3d(0.95, 1.05, 1)"},{offset:.75,transform:"scale3d(1.05, 0.95, 1)"},{offset:1,transform:"scale3d(1, 1, 1)"}],shake:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(-10px, 0, 0)"},{offset:.2,transform:"translate3d(10px, 0, 0)"},{offset:.3,transform:"translate3d(-10px, 0, 0)"},{offset:.4,transform:"translate3d(10px, 0, 0)"},{offset:.5,transform:"translate3d(-10px, 0, 0)"},{offset:.6,transform:"translate3d(10px, 0, 0)"},{offset:.7,transform:"translate3d(-10px, 0, 0)"},{offset:.8,transform:"translate3d(10px, 0, 0)"},{offset:.9,transform:"translate3d(-10px, 0, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],shakeX:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(-10px, 0, 0)"},{offset:.2,transform:"translate3d(10px, 0, 0)"},{offset:.3,transform:"translate3d(-10px, 0, 0)"},{offset:.4,transform:"translate3d(10px, 0, 0)"},{offset:.5,transform:"translate3d(-10px, 0, 0)"},{offset:.6,transform:"translate3d(10px, 0, 0)"},{offset:.7,transform:"translate3d(-10px, 0, 0)"},{offset:.8,transform:"translate3d(10px, 0, 0)"},{offset:.9,transform:"translate3d(-10px, 0, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],shakeY:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(0, -10px, 0)"},{offset:.2,transform:"translate3d(0, 10px, 0)"},{offset:.3,transform:"translate3d(0, -10px, 0)"},{offset:.4,transform:"translate3d(0, 10px, 0)"},{offset:.5,transform:"translate3d(0, -10px, 0)"},{offset:.6,transform:"translate3d(0, 10px, 0)"},{offset:.7,transform:"translate3d(0, -10px, 0)"},{offset:.8,transform:"translate3d(0, 10px, 0)"},{offset:.9,transform:"translate3d(0, -10px, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInDown:[{offset:0,transform:"translate3d(0, -100%, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInLeft:[{offset:0,transform:"translate3d(-100%, 0, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInRight:[{offset:0,transform:"translate3d(100%, 0, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInUp:[{offset:0,transform:"translate3d(0, 100%, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideOutDown:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(0, 100%, 0)"}],slideOutLeft:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(-100%, 0, 0)"}],slideOutRight:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(100%, 0, 0)"}],slideOutUp:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(0, -100%, 0)"}],swing:[{offset:.2,transform:"rotate3d(0, 0, 1, 15deg)"},{offset:.4,transform:"rotate3d(0, 0, 1, -10deg)"},{offset:.6,transform:"rotate3d(0, 0, 1, 5deg)"},{offset:.8,transform:"rotate3d(0, 0, 1, -5deg)"},{offset:1,transform:"rotate3d(0, 0, 1, 0deg)"}],tada:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.1,transform:"scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)"},{offset:.2,transform:"scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)"},{offset:.3,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.4,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.5,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.6,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.7,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.8,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.9,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:1,transform:"scale3d(1, 1, 1)"}],wobble:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.15,transform:"translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg)"},{offset:.3,transform:"translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)"},{offset:.45,transform:"translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)"},{offset:.6,transform:"translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)"},{offset:.75,transform:"translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],zoomIn:[{offset:0,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:.5,opacity:"1"}],zoomInDown:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInLeft:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInRight:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInUp:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomOut:[{offset:0,opacity:"1"},{offset:.5,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:1,opacity:"0"}],zoomOutDown:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:1,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomOutLeft:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0)"},{offset:1,opacity:"0",transform:"scale(0.1) translate3d(-2000px, 0, 0)"}],zoomOutRight:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0)"},{offset:1,opacity:"0",transform:"scale(0.1) translate3d(2000px, 0, 0)"}],zoomOutUp:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:1,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}]}),uy=c` 14733 :host { 14734 display: contents; 14735 } 14736`,py=class extends Xe{constructor(){super(...arguments),this.hasStarted=!1,this.name="none",this.play=!1,this.delay=0,this.direction="normal",this.duration=1e3,this.easing="linear",this.endDelay=0,this.fill="auto",this.iterations=1/0,this.iterationStart=0,this.playbackRate=1,this.handleAnimationFinish=()=>
14736{this.play=!1,this.hasStarted=!1,this.emit("sl-finish")},this.handleAnimationCancel=()=>{this.play=!1,this.hasStarted=!1,this.emit("sl-cancel")}}get currentTime(){var e,t;return null!=(t=null==(e=this.animation)?void 0:e.currentTime)?t:0}set currentTime(e){this.animation&&(this.animation.currentTime=e)}connectedCallback(){super.connectedCallback(),this.createAnimation()}disconnectedCallback(){super.disconnectedCallback(),this.destroyAnimation()}handleSlotChange(){this.destroyAnimation(),this.createAnimation()}async createAnimation(){var e,t;const i=null!=(e=cy[this.easing])?e:this.easing,r=null!=(t=this.keyframes)?t:hy[this.name],s=(await this.defaultSlot).assignedElements()[0];return!(!s||!r)&&(this.destroyAnimation(),this.animation=s.animate(r,{delay:this.delay,direction:this.direction,duration:this.duration,easing:i,endDelay:this.endDelay,fill:this.fill,iterationStart:this.iterationStart,iterations:this.iterations}),this.animation.playbackRate=this.playbackRate,this.animation.addEventListener("cancel",this.handleAnimationCancel),this.animation.addEventListener("finish",this.handleAnimationFinish),this.play?(this.hasStarted=!0,this.emit("sl-start")):this.animation.pause(),!0)}destroyAnimation(){this.animation&&(this.animation.cancel(),this.animation.removeEventListener("cancel",this.handleAnimationCancel),this.animation.removeEventListener("finish",this.handleAnimationFinish),this.hasStarted=!1)}handleAnimationChange(){this.hasUpdated&&this.createAnimation()}handlePlayChange(){return!!this.animation&&(this.play&&!this.hasStarted&&(this.hasStarted=!0,this.emit("sl-start")),this.play?this.animation.play():this.animation.pause(),!0)}handlePlaybackRateChange(){this.animation&&(this.animation.playbackRate=this.playbackRate)}cancel(){var e;null==(e=this.animation)||e.cancel()}finish(){var e;null==(e=this.animation)||e.finish()}render(){return W` <slot @slotchange=${this.handleSlotChange}></slot> `}};py.styles=[Se,uy],Ne([function(e){return(t,i)=>Ge(t,i,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}("slot")],py.prototype,"defaultSlot",2),Ne([Ve()],py.prototype,"name",2),Ne([Ve({type:Boolean,reflect:!0})],py.prototype,"play",2),Ne([Ve({type:Number})],py.prototype,"delay",2),Ne([Ve()],py.prototype,"direction",2),Ne([Ve({type:Number})],py.prototype,"duration",2),Ne([Ve()],py.prototype,"easing",2),Ne([Ve({attribute:"end-delay",type:Number})],py.prototype,"endDelay",2),Ne([Ve()],py.prototype,"fill",2),Ne([Ve({type:Number})],py.prototype,"iterations",2),Ne([Ve({attribute:"iteration-start",type:Number})],py.prototype,"iterationStart",2),Ne([Ve({attribute:!1}
14736)],py.prototype,"keyframes",2),Ne([Ve({attribute:"playback-rate",type:Number})],py.prototype,"playbackRate",2),Ne([yt(["name","delay","direction","duration","easing","endDelay","fill","iterations","iterationsStart","keyframes"])],py.prototype,"handleAnimationChange",1),Ne([yt("play")],py.prototype,"handlePlayChange",1),Ne([yt("playbackRate")],py.prototype,"handlePlaybackRateChange",1),py.define("sl-animation");var fy=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let my=class extends ce{constructor(){super(...arguments),this.slDropdownRef=ws(),this.slInputRef=ws(),this.value="",this.candidates=[],this.prefix=null,this.chunkStart=0,this.chunkEnd=0,this.wasDismissed=!1,this.termWasCompleted=!1,this.placeholder=""}static get styles(){return[...lo,c` 14737 chromedash-typeahead-dropdown { 14738 width: 100%; 14739 } 14740 #inputfield::part(base) { 14741 background: #eee; 14742 border: none; 14743 border-radius: 8px; 14744 } 14745 `]}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}reflectValue(e){e&&e.stopPropagation();const t=this.slInputRef.value;this.value=t.value}hide(){this.slDropdownRef.value.hide()}show(){this.slDropdownRef.value.show()}focus(){const e=this.slInputRef.value;e?.focus()}blur(){const e=this.slInputRef.value;e?.blur()}findPrefix(){const e=this.slInputRef.value?.input;if(!e)return;const t=e.value,i=e.selectionStart||0;i==e.selectionEnd?(this.chunkStart=t.lastIndexOf(" ",i-1)+1,this.chunkEnd=t.indexOf(" ",i),-1===this.chunkEnd&&(this.chunkEnd=t.length),this.prefix=t.substring(this.chunkStart,i)):this.prefix=null}shouldShowCandidate(e,t){if(null===t)return!1;t=t.toLowerCase();const i=e.name.toLowerCase(),r=e.doc.toLowerCase();return i.split(/\s+/).some(e=>e.startsWith(t))||r.split(/\s+/).some(e=>e.startsWith(t))||i.split(/\W+/).some(e=>e.startsWith(t))||r.split(/\W+/).some(e=>e.startsWith(t))}shouldGroup(e){if(null===e)return!0;return!["=",":","<",">"].some(t=>e.includes(t))}groupCandidates(e){const t=new Set,i=new Set;for(const r of e)t.has(r.group)?i.add(r.group):t.add(r.group);const r=new Set,s=[];for(const t of e)i.has(t.group)?r.has(t.group)||(s.push({group:t.group,name:t.group+":",doc:t.doc}),r.add(t.group)):s.push(t);return s}async handleCandidateSelected(e){const t=e.detail.item.value,i=this.slInputRef.value?.renderRoot.querySelector("input");if(!i)return;const r=i.value,s=r.substring(0,this.chunkStart)+t+r.substring(this.chunkEnd,r.length);
14745this.slInputRef.value.value=s,this.reflectValue(),await this.updateComplete,this.chunkStart=this.chunkStart+t.length,this.chunkEnd=this.chunkStart,i.selectionStart=this.chunkStart,i.selectionEnd=this.chunkEnd;const o=this.vocabulary.filter(e=>e.name.startsWith(t));this.termWasCompleted=o.length<=1,this.calcCandidates(),i.focus()}handleInputFieldKeyDown(e){if("Enter"===e.key){const t=this.slDropdownRef.value;if(!t)return;const i=t.getCurrentItem();t.open&&i||(this._fireEvent("sl-change",this),e.stopPropagation())}}handleInputFieldKeyUp(e){["Escape"].includes(e.key)?this.wasDismissed=!0:["ArrowDown","ArrowUp","Enter"].includes(e.key)?this.wasDismissed=!1:(this.termWasCompleted=!1,this.calcCandidates())}calcCandidates(e){e&&e.stopPropagation(),this.findPrefix(),this.candidates=this.vocabulary.filter(e=>this.shouldShowCandidate(e,this.prefix)),this.shouldGroup(this.prefix)&&(this.candidates=this.groupCandidates(this.candidates));const t=this.slDropdownRef.value;t&&(this.candidates.length>0&&!this.wasDismissed&&!this.termWasCompleted?t.show():t.hide())}renderInputField(){return W` 14746 <sl-input 14747 id="inputfield" 14748 slot="trigger" 14749 placeholder=${this.placeholder} 14750 value=${Qt(this.value)} 14751 ${$s(this.slInputRef)} 14752 autocomplete="off" 14753 spellcheck="false" 14754 @keydown="${this.handleInputFieldKeyDown}" 14755 @keyup="${this.handleInputFieldKeyUp}" 14756 @focus="${this.calcCandidates}" 14757 @click="${this.calcCandidates}" 14758 @sl-change="${this.reflectValue}" 14759 @sl-input="${this.reflectValue}" 14760 > 14761 <slot name="prefix" slot="prefix"></slot> 14762 <slot name="suffix" slot="suffix"></slot> 14763 </sl-input> 14764 `}renderAutocompleteMenu(){const e=W` 14765 <chromedash-typeahead-invisible-item></chromedash-typeahead-invisible-item> 14766 `;return W` 14767 <sl-menu 14768 @click=${e=>e.preventDefault()} 14769 @sl-select=${this.handleCandidateSelected} 14770 > 14771 ${e} 14772 ${this.candidates.map(e=>W` 14773 <chromedash-typeahead-item 14774 value=${e.name} 14775 doc=${e.doc} 14776 prefix=${this.prefix??Y} 14777 ></chromedash-typeahead-item> 14778 `)} 14779 </sl-menu> 14780 `}render(){return W` 14781 <chromedash-typeahead-dropdown 14782 stay-open-on-select 14783 sync="width" 14784 ${$s(this.slDropdownRef)} 14785 > 14786 ${this.renderInputField()} ${this.renderAutocompleteMenu()} 14787 </chromedash-typeahead-dropdown> 14788 `}};fy([Ve()],my.prototype,"value",void 0),fy([He()],my.prototype,"candidates",void 0),fy([He()],my.prototype,"prefix",void 0),fy([He()],my.prototype,"chunkStart",void 0),fy([He()],my.prototype,"chunkEnd",void 0),fy([He()],my.prototype,"wasDismissed",void 0),fy([He()],my.prototype,"termWasCompleted",void 0),fy([Ve({type:String})],my.prototype,"placeholder",void 0),fy([Ve({type:Array,attribute:!1})],my.prototype,"vocabulary",void 0),my=fy([Ue("chromedash-typeahead")],my);let gy=class extends ls{getCurrentItem(){const e=this.getMenu().getCurrentItem();if(e&&!(e instanceof vy))return e}setCurrentItem(e){this.getMenu().setCurrentItem(e),e.scrollIntoView({block:"nearest",behavior:"smooth"})}getAllVisibleItems(e){return e.getAllItems().filter(e=>!(e instanceof vy))}resetSelection(){const e=this.getCurrentItem();e?.setAttribute("tabindex","-1")}async handleTriggerKeyDown(e){const t=this.getMenu();if(!t)return;const i=this.getAllVisibleItems(t);if(0===i.length)return;const r=t.getCurrentItem();if(["Enter"].includes(e.key)&&(e.preventDefault(),this.open&&r&&(r.click(),this.resetSelection())),["ArrowDown","ArrowUp"].includes(e.key))if(e.preventDefault(),e.stopPropagation(),this.open||this.show(),r){const t=i.indexOf(r);"ArrowDown"===e.key&&i[t+1]&&this.setCurrentItem(i[t+1]),"ArrowUp"===e.key&&i[t-1]&&this.setCurrentItem(i[t-1])}else"ArrowDown"===e.key&&this.setCurrentItem(i[1]),"ArrowUp"===e.key&&this.setCurrentItem(i[i.length-1])}};gy=fy([Ue("chromedash-typeahead-dropdown")],gy);let by=class extends ce{constructor(){super(...arguments),this.value="",this.doc="",this.prefix="",this.tabindex=-1,this.role="menuitem"}static get styles(){return[...lo,c` 14789 .menu-item { 14790 display: flex; 14791 flex-wrap: wrap; 14792 font-family: var(--sl-font-sans); 14793 font-size: var(--sl-font-size-medium);
14794 font-weight: var(--sl-font-weight-normal); 14795 line-height: var(--sl-line-height-normal); 14796 letter-spacing: var(--sl-letter-spacing-normal); 14797 color: var(--sl-color-neutral-700); 14798 padding: var(--sl-spacing-2x-small) var(--sl-spacing-2x-small); 14799 transition: var(--sl-transition-fast) fill; 14800 user-select: none; 14801 -webkit-user-select: none; 14802 white-space: nowrap; 14803 cursor: pointer; 14804 } 14805 14806 .active { 14807 outline: none; 14808 background-color: var(--sl-color-primary-200); 14809 opacity: 1; 14810 } 14811 #value { 14812 width: 24em; 14813 overflow-x: hidden; 14814 } 14815 code { 14816 font-size: 85%; 14817 background: #eee; 14818 padding: var(--content-padding-quarter); 14819 } 14820 `]}handleMouseOver(e){this.parentElement&&this.parentElement.setCurrentItem(this),e.stopPropagation()}highlight(e){const t=e.toLowerCase().indexOf(this.prefix.toLowerCase());if(-1===t)return e;const i=e.substring(0,t),r=e.substring(t,t+this.prefix.length),s=e.substring(t+this.prefix.length);return W`${i}<b>${r}</b>${s}`}render(){const e=this.highlight(this.value),t=this.highlight(this.doc);return W` 14821 <div 14822 class="menu-item ${0===this.tabindex?"active":""}" 14823 @mouseover=${this.handleMouseOver} 14824 > 14825 <span id="value"><code>${e}</code></span> 14826 <span id="doc">${t}</span> 14827 </div> 14828 `}};fy([Ve({type:String})],by.prototype,"value",void 0),fy([Ve({type:String})],by.prototype,"doc",void 0),fy([Ve({type:String})],by.prototype,"prefix",void 0),fy([Ve({type:Number})],by.prototype,"tabindex",void 0),fy([Ve({type:String,reflect:!0})],by.prototype,"role",void 0),by=fy([Ue("chromedash-typeahead-item")],by);let vy=class extends by{render(){return W`${Y}`}};vy=fy([Ue("chromedash-typeahead-invisible-item")],vy);var yy=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let _y=class extends ce{static get styles(){return lo}render(){return W` 14829 <div id="subheader">Which group's reviews do you want to see?</div> 14830 <ul> 14831 <li><a href="/reports/external_reviews/tag">W3C TAG</a></li> 14832 <li> 14833 <a href="/reports/external_reviews/gecko" 14834 >Gecko / Firefox / Mozilla</a 14835 > 14836 </li> 14837 <li> 14838 <a href="/reports/external_reviews/webkit">WebKit / Safari / Apple</a> 14839 </li> 14840 </ul> 14841 `}};_y=yy([Ue("chromedash-report-external-reviews-dispatch-page")],_y); 14842/** 14843 * @license 14844 * Copyright 2017 Google LLC 14845 * SPDX-License-Identifier: BSD-3-Clause 14846 */ 14847const wy=Symbol();class ky{get taskComplete(){return this.t||(1===this.i?this.t=new Promise((e,t)=>{this.o=e,this.h=t}):3===this.i?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(e,t,i){this.p=0,this.i=0,(this._=e).addController(this);const r="object"==typeof t?t:{task:t,args:i};this.v=r.task,this.j=r.args,this.m=r.argsEqual??xy,this.k=r.onComplete,this.A=r.onError,this.autoRun=r.autoRun??!0,"initialValue"in r&&(this.u=r.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){!0===this.autoRun&&this.S()}hostUpdated(){"afterUpdate"===this.autoRun&&this.S()}T(){if(void 0===this.j)return;const e=this.j();if(!Array.isArray(e))throw Error("The args function must return an array");return e}async S(){const e=this.T(),t=this.O;this.O=e,e===t||void 0===e||void 0!==t&&this.m(t,e)||await this.run(e)}async run(e){let t,i;e??=this.T(),this.O=e,1===this.i?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,"afterUpdate"===this.autoRun?queueMicrotask(()=>this._.requestUpdate()):this._.requestUpdate();const r=++this.p;this.q=new AbortController;let s=!1;try{t=await this.v(e,{signal:this.q.signal})}catch(e){s=!0,i=e}if(this.p===r){if(t===wy)this.i=0;else{if(!1===s){try{this.k?.(t)}catch{}this.i=2,this.o?.(t)}else{try{this.A?.(i)}catch{}this.i=3,this.h?.(i)}this.u=t,this.l=i}this._.requestUpdate()}}abort(e){1===this.i&&this.q?.abort(e)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(e){switch(this.i){case 0:return e.initial?.();case 1:return e.pending?.();case 2:return e.complete?.(this.value);case 3:return e.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}}const xy=(e,t)=>e===t||e.length===t.length&&e.every((e,i)=>!$(e,t[i])); 14848/** 14849 * @license 14850 * Copyright 2021 Google LLC 14851 * SPDX-License-Identifier: BSD-3-Clause 14852 */var $y=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};function Sy(e,t){return e===t?0:void 0===e?1:void 0===t?-1:e-t}function Cy(e,t){return console.assert(e.current_stage===t.current_stage,`Tried to compare features at stages ${e.current_stage} and ${t.current_stage} using a function that ignores features' stages.`),e.estimated_end_milestone!==t.estimated_end_milestone?Sy(e.estimated_end_milestone,t.estimated_end_milestone):e.estimated_start_milestone!==t.estimated_start_milestone?Sy(e.estimated_start_milestone,t.estimated_start_milestone):e.review_link<t.review_link?-1:e.review_link>t.review_link?1:0}let Ey=class extends ce{constructor(){super(...arguments),this.reviewer=void 0,this._client=window.csOpenApiClient,this._reviewsTask=new ky(this,{task:async([e],{signal:t})=>{if(void 0===e)throw new Error('Element must have "reviewer" attribute.',{cause:this});if(!["tag","gecko","webkit"].includes(e))throw new Error(`Reviewer (${e}) must be 'tag', 'gecko', or 'webkit'.`,{cause:this});const i=await this._client.listExternalReviews({reviewGroup:e},{signal:t});return{reviews:this.groupReviews(i.reviews),links:i.link_previews,noOutstandingReviews:0===i.reviews.length}},args:()=>[this.reviewer]})}static get styles(){return[...lo,c` 14853 #subheader { 14854 display: block; 14855 } 14856 h3 { 14857 margin-top: var(--content-padding); 14858 margin-bottom: var(--content-padding-quarter); 14859 14860 sl-skeleton { 14861 width: 30%; 14862 height: 1lh; 14863 } 14864 } 14865 td.feature, 14866 td.review { 14867 width: 45%; 14868 } 14869 td.milestones { 14870 width: 10%; 14871 } 14872 `]}groupReviews(e){const t={incubating:[],prototyping:[],"dev-trial":[],"wide-review":[],"origin-trial":[],shipping:[],shipped:[]};for(const i of e)i.current_stage&&t[i.current_stage].push(i);for(const e of Object.values(t))e.sort(Cy);return t}headerRow(){return W`<tr> 14873 <th>Feature</th> 14874 <th>Review</th> 14875 <th>Target Milestones</th> 14876 </tr>`}renderOutstandingReviews(e,t){return[["Preparing to ship","shipping"],["In Origin Trial","origin-trial"],["Getting wide review","wide-review"],["In developer trials","dev-trial"],["Prototyping","prototyping"],["Incubating","incubating"],["Already shipped","shipped"]].map(([i,r])=>e[r].length>0?W`<section> 14877 <h3 id=${r}>${i}</h3> 14878 <table class="data-table"> 14879 ${this.headerRow()} 14880 ${e[r].map(e=>W` 14881 <tr> 14882 <td class="feature"> 14883 <a href="/feature/${e.feature.id}" 14884 >${e.feature.name}</a 14885 > 14886 </td> 14887 <td class="review"> 14888 <chromedash-link 14889 href=${e.review_link} 14890 .featureLinks=${t} 14891 ></chromedash-link> 14892 </td> 14893 <td class="milestones">
14894 ${e.estimated_start_milestone?"M"+e.estimated_start_milestone:Y}${["shipping","shipped"].includes(e.current_stage)?Y:W`${e.estimated_start_milestone||e.estimated_end_milestone?"â":Y}${e.estimated_end_milestone?"M"+e.estimated_end_milestone:Y}`} 14895 </td> 14896 </tr> 14897 `)} 14898 </table> 14899 </section>`:Y)}render(){return W` 14900 <div id="subheader"> 14901 <h2> 14902 Open 14903 ${((e,t,i)=>{for(const i of t)if(i[0]===e)return(0,i[1])();return i?.()})(this.reviewer,[["tag",()=>W`W3C TAG`],["webkit",()=>W`WebKit`],["gecko",()=>W`Mozilla`]])} 14904 reviews for Chromium features 14905 </h2> 14906 <p> 14907 Reviews are in rough order of urgency, from about-to-ship down to 14908 incubations. Already-shipped features are listed at the bottom. 14909 </p> 14910 </div> 14911 ${this._reviewsTask.render({pending:()=>W` 14912 <section> 14913 <h3><sl-skeleton effect="sheen"></sl-skeleton></h3> 14914 <table class="data-table"> 14915 ${this.headerRow()} 14916 ${[1,2,3].map(()=>W` 14917 <tr> 14918 <td class="feature"> 14919 <sl-skeleton effect="sheen"></sl-skeleton> 14920 </td> 14921 <td class="review"> 14922 <sl-skeleton effect="sheen"></sl-skeleton> 14923 </td> 14924 <td class="milestones"> 14925 <sl-skeleton effect="sheen"></sl-skeleton> 14926 </td> 14927 </tr> 14928 `)} 14929 </table> 14930 </section> 14931 `,complete:({reviews:e,links:t,noOutstandingReviews:i})=>i?W`No outstanding reviews. Congratulations!`:this.renderOutstandingReviews(e,t),error:e=>(console.error(`Couldn't fetch ${this.reviewer}'s reviews: `,e),W`<p> 14932 Some errors occurred. Please refresh the page or try again later. 14933 </p>`)})} 14934 `}};$y([Ve({type:String})],Ey.prototype,"reviewer",void 0),$y([Ve({type:Object})],Ey.prototype,"_client",void 0),$y([Ve({attribute:!1})],Ey.prototype,"_reviewsTask",void 0),Ey=$y([Ue("chromedash-report-external-reviews-page")],Ey);var Iy=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Ty=class extends ce{constructor(){super(...arguments),this.rawQuery={},this._client=window.csOpenApiClient,this.latencyList=[],this._latencyTask=new ky(this,{task:async([e,t],{signal:i})=>(this.latencyList=await this._client.listFeatureLatency({startAt:e,endAt:t},{signal:i}),this.latencyList),args:()=>[this.startAtDate,this.endAtDate]}),this.startAtDate=new Date("January 1, 2023"),this.endAtDate=new Date("January 1, 2024")}static get styles(){return[...lo,c` 14935 p { 14936 margin: var(--content-padding) 0; 14937 } 14938 14939 table { 14940 border: var(--table-divider); 14941 } 14942 td, 14943 th { 14944 padding: var(--content-padding); 14945 border-bottom: var(--table-divider); 14946 vertical-align: baseline; 14947 } 14948 th { 14949 background: var(--table-header-background); 14950 } 14951 tr { 14952 background: var(--table-row-background); 14953 } 14954 `]}static get properties(){return{latencyList:{type:Array},startAtDate:{state:!0},endAtDate:{state:!0}}}connectedCallback(){super.connectedCallback(),this.initializeParams()}initializeParams(){if(this.rawQuery){if(this.rawQuery.startAt){const e=Date.parse(this.rawQuery.startAt);isNaN(e)||(this.startAtDate=new Date(e))}if(this.rawQuery.endAt){const e=Date.parse(this.rawQuery.endAt);isNaN(e)||(this.endAtDate=new Date(e))}}}renderCount(){return W` 14955 <p> 14956 Launched ${this.latencyList.length} features between 14957 ${this.startAtDate.toLocaleDateString()} and 14958 ${this.endAtDate.toLocaleDateString()}. 14959 </p> 14960 <p>Latency is measured in calendar days.</p> 14961 `}renderLatencyRow(e){const t=e.shipped_date-e.entry_created_date,i=Math.ceil(t/864e5);return W` 14962 <tr> 14963 <td> 14964 <a href="/feature/${e.feature.id}"> 14965 ${e.feature.name} 14966 </a> 14967 </td> 14968 <td> 14969 ${e.owner_emails.map(e=>W`<div>${e}</div>`)} 14970 </td> 14971 <td>${e.entry_created_date.toLocaleDateString()}</td> 14972 <td>${e.shipped_date.toLocaleDateString()}</td> 14973 <td>${i}</td> 14974 </tr> 14975 `}renderTable(){return W` 14976 <table> 14977 <tr> 14978 <th>Feature</th> 14979 <th>Owners</th> 14980 <th>Created</th> 14981 <th>Shipped</th> 14982 <th>Latency</th> 14983 </tr> 14984 ${this.latencyList.map(e=>this.renderLatencyRow(e))} 14985 </table> 14986 `}renderWhenComplete(){return W` ${this.renderCount()} ${this.renderTable()} `}render(){return this._latencyTask.render({initial:()=>W`<p>Loading...</p>`,pending:()=>W`<p>Loading...</p>`,complete:()=>this.renderWhenComplete(),error:e=>(console.error(e),W`<p> 14987 Some errors occurred. Please refresh the page or try again later. 14988 </p>`)})}};Iy([Ve({type:Object})],Ty.prototype,"rawQuery",void 0),Iy([Ve({attribute:!1})],Ty.prototype,"_client",void 0),Iy([Ve({attribute:!1})],Ty.prototype,"latencyList",void 0),Iy([Ve({attribute:!1})],Ty.prototype,"_latencyTask",void 0),Iy([He()],Ty.prototype,"startAtDate",void 0),Iy([He()],Ty.prototype,"endAtDate",void 0),Ty=Iy([Ue("
14988chromedash-report-feature-latency-page")],Ty);var Ay=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Ry=class extends ce{static get styles(){return[...lo,c``]}render(){return W` 14989 <sl-details summary="${this.mentor.email} has mentored:" open> 14990 <table> 14991 ${this.mentor.mentored_features.map(e=>W` 14992 <chromedash-feature-row 14993 .feature="${e}" 14994 ></chromedash-feature-row> 14995 `)} 14996 </table> 14997 </sl-details> 14998 `}};Ay([Ve({attribute:!1})],Ry.prototype,"mentor",void 0),Ry=Ay([Ue("chromedash-report-spec-mentor")],Ry);var Py=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Dy=class extends ce{constructor(){super(...arguments),this.rawQuery={},this._client=window.csOpenApiClient,this._mentorsTask=new ky(this,{task:async([e],{signal:t})=>{const i=await this._client.listSpecMentors({after:e},{signal:t});return i.sort((e,t)=>e.email.localeCompare(t.email)),i},args:()=>[this._updatedAfter]}),this._updatedAfter=new Date(Date.now()-31536e6)}static get styles(){return[...lo,c``]}connectedCallback(){super.connectedCallback(),this.initializeParams()}initializeParams(){if(this.rawQuery&&this.rawQuery.after){const e=Date.parse(this.rawQuery.after);isNaN(e)||(this._updatedAfter=new Date(e))}}afterChanged(e){e.stopPropagation();const t=e.target.valueAsDate;t&&(this._updatedAfter=t,this.dispatchEvent(new CustomEvent("afterchanged",{detail:{after:this._updatedAfter},bubbles:!0,composed:!0})))}render(){return W` 14999 <div id="subheader"> 15000 <sl-input 15001 type="date" 15002 name="after" 15003 value=${sh(this._updatedAfter)} 15004 label="List spec mentors who've worked on features that were updated after this date" 15005 @sl-change=${this.afterChanged} 15006 ></sl-input> 15007 </div> 15008 ${this._mentorsTask.render({pending:()=>W` <details open> 15009 <summary><sl-skeleton effect="sheen"></sl-skeleton></summary> 15010 <sl-skeleton effect="sheen"></sl-skeleton> 15011 </details>`,complete:e=>e.map(e=>W`<chromedash-report-spec-mentor 15012 .mentor=${e} 15013 ></chromedash-report-spec-mentor>`),error:e=>(console.error(e),W`<p> 15014 Some errors occurred. Please refresh the page or try again later. 15015 </p>`)})} 15016 `}};Py([Ve({type:Object})],Dy.prototype,"rawQuery",void 0),Py([Ve({attribute:!1})],Dy.prototype,"_client",void 0),Py([Ve({attribute:!1})],Dy.prototype,"_mentorsTask",void 0),Py([He()],Dy.prototype,"_updatedAfter",void 0),Dy=Py([Ue("chromedash-report-spec-mentors-page")],Dy);var Oy=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let zy=class extends ce{constructor(){super(...arguments),this._client=window.csOpenApiClient,this.reviewLatencyList=[],this._reviewLatencyTask=new ky(this,{task:async([],{signal:e})=>{this.reviewLatencyList=await this._client.listReviewsWithLatency({signal:e})},args:()=>[]})}static get styles(){return[...lo,c` 15017 p { 15018 margin: var(--content-padding) 0; 15019 } 15020 table { 15021 border-collapse: collapse; 15022 border: 1px solid #888; 15023 } 15024 td, 15025 th { 15026 padding: var(--content-padding-half); 15027 text-align: center; 15028 } 15029 td { 15030 border-top: 1px solid #888; 15031 border-bottom: 1px solid #888; 15032 } 15033 colgroup { 15034 border: 1px solid #888; 15035 } 15036 th { 15037 background: var(--table-header-background); 15038 } 15039 tr { 15040 background: var(--table-row-background); 15041 } 15042 .left { 15043 text-align: left; 15044 min-width: 18em; 15045 } 15046 `]}static get properties(){return{featureReviewList:{state:!0}}}renderCount(){let e=0;for(const t of this.reviewLatencyList)for(const i of t.gate_reviews)i.latency_days>=0&&e++;return W` 15047 <p> 15048 ${e} reviews of ${this.reviewLatencyList.length} distinct features 15049 in the past 90 days. 15050 </p> 15051 <p>Latency is measured in weekdays from request to initial response.</p> 15052 `}renderFeatureReviewsRow(e){const t={};for(const i of e.gate_reviews){let e=i.latency_days;-1===i.latency_days?e="":-2==i.latency_days&&(e="Pending"),t[i.gate_type]=e}return W` 15053 <tr> 15054 <td class="left"> 15055 <a href="/feature/${e.feature.id}"> 15056 ${e.feature.name} 15057 </a> 15058 </td> 15059 <td>${t[qd]}</td> 15060 <td>${t[Ud]}</td> 15061 <td>${t[Bd]}</td> 15062 <td>${t[jd]}</td> 15063 <td>${t[Vd]}</td> 15064 <td>${t[Wd]}</td> 15065 <td>${t[Gd]}</td> 15066 <td>${t[Kd]}</td> 15067 <td>${t[Ld]}</td> 15068 <td>${t[Nd]}</td> 15069 </tr> 15070 `}renderTable(){return W` 15071 <table> 15072 <colgroup> 15073 <col /> 15074 </colgroup> 15075 <colgroup> 15076 <col /> 15077 <col /> 15078 </colgroup> 15079 <colgroup> 15080 <col /> 15081 <col /> 15082 </colgroup> 15083 <colgroup> 15084 <col /> 15085 </colgroup> 15086 <colgroup> 15087 <col /> 15088 <col /> 15089 </colgroup> 15090 <colgroup> 15091 <col /> 15092 </colgroup> 15093 <colgroup> 15094 <col /> 15095 <col /> 15096 </colgroup> 15097 <tr> 15098 <th scope="col" rowspan="2" class="left">Feature</th> 15099 <th scope="col" colspan="2">Privacy</th> 15100 <th scope="col" colspan="2">Security</th> 15101 <th scope="col" colspan="1">Enterprise</th> 15102 <th scope="col" colspan="2">Debugability</th> 15103 <th scope="col" colspan="1">Testing</th> 15104 <th scope="col" colspan="2">API Owners</th> 15105 </tr> 15106 <tr> 15107 <th>OT</th> 15108 <th>Ship</th> 15109 <th>OT</th> 15110 <th>Ship</th> 15111 <th>Ship</th> 15112 <th>OT</th> 15113 <th>Ship</th> 15114 <th>Ship</th> 15115 <th>OT</th> 15116 <th>Ship</th> 15117 </tr> 15118 15119 ${this.reviewLatencyList.map(e=>this.renderFeatureReviewsRow(e))} 15120 </table> 15121 `}renderWhenComplete(){return W` ${this.renderCount()} ${this.renderTable()} `}render(){return this._reviewLatencyTask.render({initial:()=>W`<p>Loading...</p>`,pending:()=>W`<p>Loading...</p>`,complete:()=>this.renderWhenComplete(),error:e=>(console.error(e),W`<p> 15122 Some errors occurred. Please refresh the page or try again later. 15123 </p>`)})}};Oy([Ve({attribute:!1})],zy.prototype,"_client",void 0),Oy([Ve({attribute:!1})],zy.prototype,"reviewLatencyList",void 0),Oy([Ve({attribute:!1})],zy.prototype,"_reviewLatencyTask",void 0),zy=Oy([Ue("chromedash-report-review-latency-page")],zy);var Ly=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Fy={stable_minus_one:{channelLabel:"Released",h1Class:"",dateText:"was",featureHeader:"Features in this release"},stable:{channelLabel:"Stable",h1Class:"",dateText:"was",featureHeader:"Features in this release"},stable_soon:{channelLabel:"Stable soon",h1Class:"",dateText:"was",featureHeader:"Features planned in this release"},beta:{channelLabel:"Next up",h1Class:"chrome_version--beta",channelTag:"BETA",dateText:"between",featureHeader:"Features planned in this release"},dev:{channelLabel:"Dev",h1Class:"chrome_version--dev",channelTag:"DEV",dateText:"coming",featureHeader:"Features planned in this release"},dev_plus_one:{channelLabel:"Later",h1Class:"chrome_version--dev_plus_one",dateText:"coming",featureHeader:"Features planned in this release"}},Ny=["stable","beta","dev"],My=["stable","stable_soon","beta","dev"],qy=!0,Uy=(e,t)=>e.name.localeCompare(t.name,"fr",{ignorePunctuation:!0});let By=class extends ce{constructor(){super(...arguments),this.numColumns=0,this.cardWidth=0,this.channels={},this.starredFeatures=new Set,this.futureMilestoneArray=[],this.pastMilestoneArray=[],this.highlightFeature=void 0,this.cardOffset=0,this.shownChannelNames=[]}static get styles(){return[...lo,c` 15124 :host { 15125 display: inline-flex; 15126 padding: 0 0em var(--content-padding-huge); 15127 margin-right: var(--content-padding-negative); 15128 position: relative; 15129 } 15130 `]}connectedCallback(){super.connectedCallback(),Promise.all([window.csClient.getChannels(),window.csClient.getStars()]).then(([e,t])=>{this.fetchFirstBatch(e),this.starredFeatures=new Set(t)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}fetchFirstBatch(e){this.shownChannelNames=e.stable_soon?My:Ny;const t=this.shownChannelNames.map(t=>window.csClient.getFeaturesInMilestone(e[t].version));Promise.all(t).then(t=>{t.map((t,i)=>
15130{Object.keys(t).forEach(e=>{t[e].sort(Uy)}),e[this.shownChannelNames[i]].features=t}),this.channels=e,this.fetchNextBatch(e.beta.version,!0),this.fetchPreviousBatch(e.stable.version);const i=this.numColumns>0?this.numColumns-1:0,r=this.shownChannelNames[i];r&&e[r]&&(this.lastMilestoneVisible=e[r].version)})}fetchNextBatch(e,t=!1){const i=t?e+2:e+3+1,r=e+3+1,s=[...Array(r-i+1).keys()].map(e=>e+i),o=window.csClient.getSpecifiedChannels(i,r),a=s.map(e=>window.csClient.getFeaturesInMilestone(e));this.futureMilestoneArray=[...this.futureMilestoneArray,...s],this.lastFutureFetchedOn=e,o.then(e=>{Promise.all(a).then(t=>{t.map((t,i)=>{Object.keys(t).forEach(e=>{t[e].sort(Uy)});const r=s[i];e[r].features=t,e[r].version=r,this.milestoneInfo=Object.assign({},this.milestoneInfo,e)})})}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}fetchPreviousBatch(e){const t=e-1;if(t<2)return;const i=window.csClient.getSpecifiedChannels(t,t),r=window.csClient.getFeaturesInMilestone(t);this.cardOffset-=1,this.style.left=this.cardOffset*(this.cardWidth+16)+"px",this.pastMilestoneArray=[t,...this.pastMilestoneArray],this.lastPastFetchedOn=e,Promise.all([i,r]).then(([e,i])=>
15130{Object.keys(i).forEach(e=>{i[e].sort(Uy)}),e[t].features=i,e[t].version=t,this.milestoneInfo=Object.assign({},this.milestoneInfo,e)}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}handleStarToggle(e){const t=new Set(this.starredFeatures);window.csClient.setStar(e.detail.feature,e.detail.doStar).then(()=>{e.detail.doStar?t.add(e.detail.feature):t.delete(e.detail.feature),this.starredFeatures=t}).catch(()=>{Vc("Unable to star the Feature. Please Try Again.")})}handleHighlightEvent(e){this.highlightFeature=e.detail.feature}render(){return W` 15131 ${Tg(this.pastMilestoneArray,e=>e,e=>W` 15132 <chromedash-roadmap-milestone-card 15133 style="width:${this.cardWidth}px;" 15134 .channel=${this.milestoneInfo?.[e]} 15135 .templateContent=${Fy.stable_minus_one} 15136 ?showdates=${qy} 15137 .starredFeatures=${this.starredFeatures} 15138 .highlightFeature=${this.highlightFeature} 15139 ?signedin=${this.signedIn} 15140 @star-toggle-event=${this.handleStarToggle} 15141 @highlight-feature-event=${this.handleHighlightEvent} 15142 > 15143 </chromedash-roadmap-milestone-card> 15144 `)} 15145 ${Tg(this.shownChannelNames,e=>e,e=>W` 15146 <chromedash-roadmap-milestone-card 15147 style="width:${this.cardWidth}px;" 15148 .channel=${this.channels?.[e]} 15149 .templateContent=${Fy[e]} 15150 ?showdates=${qy} 15151 .starredFeatures=${this.starredFeatures} 15152 .highlightFeature=${this.highlightFeature} 15153 ?signedin=${this.signedIn} 15154 .stableMilestone=${this.channels?.stable?.version} 15155 @star-toggle-event=${this.handleStarToggle} 15156 @highlight-feature-event=${this.handleHighlightEvent} 15157 > 15158 </chromedash-roadmap-milestone-card> 15159 `)} 15160 ${Tg(this.futureMilestoneArray,e=>e,e=>W` 15161 <chromedash-roadmap-milestone-card 15162 style="width:${this.cardWidth}px;" 15163 .channel=${this.milestoneInfo?.[e]} 15164 .templateContent=${Fy.dev_plus_one} 15165 ?showdates=${qy} 15166 .starredFeatures=${this.starredFeatures} 15167 .highlightFeature=${this.highlightFeature} 15168 ?signedin=${this.signedIn} 15169 @star-toggle-event=${this.handleStarToggle} 15170 @highlight-feature-event=${this.handleHighlightEvent} 15171 > 15172 </chromedash-roadmap-milestone-card> 15173 `)} 15174 `}};Ly([Ve({type:Boolean})],By.prototype,"signedIn",void 0),Ly([Ve({type:Number,attribute:!1})],By.prototype,"numColumns",void 0),Ly([Ve({type:Number,attribute:!1})],By.prototype,"cardWidth",void 0),Ly([He()],By.prototype,"channels",void 0),Ly([He()],By.prototype,"starredFeatures",void 0),Ly([He()],By.prototype,"lastFutureFetchedOn",void 0),Ly([He()],By.prototype,"lastPastFetchedOn",void 0),Ly([He()],By.prototype,"lastMilestoneVisible",void 0),Ly([He()],By.prototype,"futureMilestoneArray",void 0),Ly([He()],By.prototype,"pastMilestoneArray",void 0),Ly([He()],By.prototype,"milestoneInfo",void 0),Ly([He()],By.prototype,"highlightFeature",void 0),Ly([He()],By.prototype,"cardOffset",void 0),Ly([He()],By.prototype,"shownChannelNames",void 0),By=Ly([Ue("chromedash-roadmap")],By);const jy=[lo,c` 15175 .layout { 15176 display: flex; 15177 } 15178 .layout.wrap { 15179 flex-wrap: wrap; 15180 } 15181 .layout.center { 15182 align-items: center; 15183 } 15184 .layout.center-center { 15185 align-items: center; 15186 justify-content: center; 15187 } 15188 .layout.vertical { 15189 flex-direction: column; 15190 } 15191 :host { 15192 padding: 16px; 15193 background: #fff; 15194 padding: 16px; 15195 margin-bottom: 16px !important; 15196 border-radius: 3px; 15197 margin-right: 8px !important; 15198 margin-left: 8px !important; 15199 counter-reset: featurecount; 15200 margin: 8px; 15201 } 15202 sl-icon { 15203 font-size: 1.4rem; 15204 color: #366597; 15205 } 15206 sl-icon:hover { 15207 color: #248; 15208 } 15209 sl-icon.pushicon { 15210 cursor: pointer; 15211 } 15212 sl-icon-button { 15213 font-size: 16px; 15214 } 15215 .popup-content { 15216 border: 2px solid #888; 15217 border-radius: 8px; 15218 background: #f8f8f8; 15219 color: black; 15220 font-size: 12pt; 15221 padding: 1em; 15222 width: 14em; 15223 } 15224 .chrome_version { 15225 font-size: 45px; 15226 margin: 8px 0 16px 0; 15227 white-space: nowrap; 15228 } 15229 .channel_label { 15230 font-weight: 600; 15231 text-transform: uppercase; 15232 font-size: 24px; 15233 text-align: center; 15234 } 15235 .chrome_version .chrome-logo, 15236 .chrome_version--stable .chrome-logo { 15237 position: relative; 15238 width: 45px; 15239 height: 45px; 15240 background: url(/static/img/chrome_logo.svg) no-repeat 50% 50%; 15241 background-size: contain; 15242 margin-right: 8px; 15243 } 15244 .chrome_version--beta .chrome-logo { 15245 background-image: url(/static/img/chrome_logo.svg); 15246 } 15247 .chrome_version--dev .chrome-logo { 15248 background-image: url(/static/img/chrome_logo.svg); 15249 } 15250 .chrome_version--canary .chrome-logo { 15251 background-image: url(/static/img/chrome_logo_canary.svg); 15252 background-size: 42px; 15253 } 15254 .chrome_version--dev_plus_one .chrome-logo { 15255 filter: gray; 15256 -webkit-filter: grayscale(1); 15257 filter: grayscale(1); 15258 } 15259 .chrome-logo .channel-tag { 15260 position: absolute; 15261 right: 0; 15262 top: 50%; 15263 padding: 1px 2px; 15264 font-size: 10px; 15265 font-weight: bold; 15266 color: white; 15267 background: var(--sl-color-neutral-900); 15268 } 15269 .release { 15270 padding: 16px; 15271 background: #fff; 15272 padding: 16px; 15273 margin-bottom: 16px !important; 15274 border-radius: 3px; 15275 flex: 1 0 0; 15276 min-width: 300px; 15277 counter-reset: featurecount; 15278 } 15279 .release.no-components .feature_shipping_type { 15280 display: none; 15281 } 15282 .release.no-components .feature_shipping_type + ul { 15283 margin-top: 0; 15284 } 15285 .milestone_info { 15286 margin-bottom: 8px; 15287 } 15288 .milestone_info:nth-of-type(3) { 15289 border-bottom: 1px solid #e6e6e6; 15290 padding-bottom: 16px; 15291 } 15292 .milestone_info .channel_label { 15293 font-size: inherit; 15294 font-weight: 500; 15295 text-transform: none; 15296 } 15297 .no_feature_released { 15298 color: #737373; 15299 } 15300 .features_list { 15301 margin-top: 32px; 15302 } 15303 .features_list ul, 15304 .features_list ol { 15305 margin-top: 8px; 15306 list-style: none; 15307 padding: 0; 15308 } 15309 .features_list li { 15310 padding: 8px; 15311 font-weight: 500; 15312 } 15313 .features_list li .icon_row { 15314 flex-shrink: 0; 15315 } 15316 .features_list .features_header { 15317 font-weight: 500; 15318 text-transform: uppercase; 15319 margin-bottom: 16px; 15320 } 15321 .feature_shipping_type { 15322 margin-top: 16px; 15323 overflow: hidden; 15324 text-overflow: ellipsis; 15325 } 15326 .highlight { 15327 background: var(--light-accent-color); 15328 } 15329 #feature_link { 15330 width: 100%; 15331 } 15332 .sl-skeleton-header-container { 15333 display: flex; 15334 width: 100%; 15335 gap: 10px; 15336 justify-content: center; 15337 margin-top: 10px; 15338 } 15339 .sl-skeleton-header-container sl-skeleton { 15340 width: 60%; 15341 } 15342 .sl-skeleton-title-container { 15343 width: 50%; 15344 } 15345 .features_list sl-skeleton { 15346 height: 20px; 15347 margin: 8px; 15348 } 15349 .experiment { 15350 font-size: 85%; 15351 padding: 2px 8px; 15352 background: #fea; 15353 border-radius: 8px; 15354 } 15355 `];var Vy=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Hy={"Not started":"arrow_circle_right_20px","In-progress":"pending_20px","Needs work":"autorenew_20px",Approved:"check_circle_filled_20px",Denied:"block_20px"};let Wy=class extends ce{constructor(){super(...arguments),this.gates=[]}static get styles(){return[...lo,c` 15356 sl-icon { 15357 width: 26px; 15358 height: 18px; 15359 } 15360 15361 sl-icon.not-started { 15362 color: var(--gate-preparing-icon-color); 15363 } 15364 sl-icon.in-progress { 15365 color: var(--gate-pending-icon-color); 15366 } 15367 sl-icon.needs-work { 15368 color: var(--gate-needs-work-icon-color); 15369 } 15370 sl-icon.approved { 15371 color: var(--gate-approved-icon-color); 15372 } 15373 sl-icon.denied { 15374 color: var(--gate-denied-icon-color); 15375 } 15376 `]}connectedCallback(){super.connectedCallback(),this.fetchData()}fetchData(){this.gates=[],window.csClient?.getGates(this.feature?.id).then(e=>{let t=e.gates;this.gates=t.filter(e=>this.feature.roadmap_stage_ids?.includes(e.stage_id))})}calcStatus(){let e,t,i="Not started";for(const r of this.gates)0!==r.state&&(i="In-progress"),r.state!==Zd.APPROVED[0]&&r.state!==Zd.NA[0]&&r.state!==ec&&r.state!==tc&&(e=r.id),"API Owners"===r.team_name&&(t=r.id);this.gates.length>0&&this.gates.every(e=>e.state===Zd.APPROVED[0]||e.state===Zd.NA[0]||e.state===ec||e.state===tc)&&(i="Approved",e=t),this.feature?.feature_type_int===Yl.FEATURE_TYPE_CODE_CHANGE_ID[0]&&(i="Approved",e=void 0);for(const t of this.gates)t.state==Zd.NEEDS_WORK[0]&&(i="Needs work",e=t.id);for(const t of this.gates)t.state==Zd.DENIED[0]&&(i="Denied",e=t.id);return{status:i,targetGateId:e}}
15376render(){if(0===this.gates.length)return W`<sl-icon></sl-icon>`;const{status:e,targetGateId:t}=this.calcStatus();let i=e.toLowerCase().replace(" ","-");const r=W` 15377 <sl-icon 15378 library="material" 15379 title="${"Reviews: "+e}" 15380 class="${i}" 15381 name="${Hy[e]}" 15382 ></sl-icon> 15383 `;return t?W` 15384 <a href="/feature/${this.feature.id}?gate=${t}">${r}</a> 15385 `:r}};Vy([Ve({type:Object})],Wy.prototype,"feature",void 0),Vy([He()],Wy.prototype,"gates",void 0),Wy=Vy([Ue("chromedash-review-status-icon")],Wy);var Gy=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Yy=["Removed"],Ky=["Origin trial"],Qy=["Deprecation trial"];let Xy=class extends ce{constructor(){super(...arguments),this.infoPopupRef=ws(),this.starredFeatures=new Set,this.showDates=!1,this.signedIn=!1,this.currentDate=Date.now()}static{this.styles=jy}_dateDiffInDays(e,t){const i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),s=Math.floor((r-i)/864e5);return{days:Math.abs(s),future:s<1}}_computeDate(e,t=!1){const i={month:"short",day:"numeric"};t&&(i.year="numeric");const r=new Date(e);return new Intl.DateTimeFormat("en-US",i).format(r)}_fireEvent(e,t){const i=new CustomEvent(e,{bubbles:!0,composed:!0,detail:t});this.dispatchEvent(i)}_isAnyFeatureReleased(){for(const e of this._objKeys(this.channel?.features))if(0!=this.channel?.features[e].length)return!0;return!1}toggleStar(e){e.preventDefault(),e.stopPropagation();const t=e.target,i=Number(t.dataset.featureId),r=!this.starredFeatures.has(i);this._fireEvent("star-toggle-event",{feature:i,doStar:r})}highlight(e){e.preventDefault(),e.stopPropagation();const t=e.target.parentNode.parentNode,i=Number(t.dataset.featureId);this._fireEvent("highlight-feature-event",{feature:i})}removeHighlight(e){e.preventDefault(),e.stopPropagation(),this._fireEvent("highlight-feature-event",{feature:null})}_computeDaysUntil(e){const t=new Date(e);if(isNaN(t.getTime()))return Y;const i=new Date;return this._dateDiffInDays(t,i).days<1?"coming soon":W`<sl-relative-time 15386 class="no-squeeze" 15387 date="${t.toISOString()}" 15388 > 15389 </sl-relative-time>`}_objKeys(e){return e?Object.keys(e).sort():[]}hidePopup(e){e.relatedTarget!=this.renderRoot.querySelector("#detailed-info-link")&&(this.infoPopupRef.value.active=!1)}renderInfoIcon(){return W` 15390 <sl-icon-button 15391 name="info-circle" 15392 id="info-button" 15393 @click=${()=>this.infoPopupRef.value.active=!this.infoPopupRef.value.active} 15394 @focusout=${this.hidePopup} 15395 ></sl-icon-button> 15396 15397 <sl-popup 15398 anchor="info-button" 15399 placement="bottom" 15400 strategy="fixed" 15401 ${$s(this.infoPopupRef)} 15402 > 15403 <div class="popup-content"> 15404 New versions are offered to users gradually. <br /> 15405 See 15406 <a 15407 @focusout=${this.hidePopup} 15408 id="detailed-info-link" 15409 href="https://chromiumdash.appspot.com/schedule" 15410 target="_blank" 15411 >detailed dates</a 15412 >. 15413 </div> 15414 </sl-popup> 15415 `}renderCardHeader(){if(!this.channel)return Y;const e=this.channel.version>=110?this.channel?.early_stable:this.channel?.stable_date,t=W` 15416 <span class="chrome-logo"> 15417 ${this.templateContent.channelTag?W` 15418 <span class="channel-tag" 15419 >${this.templateContent.channelTag}</span 15420 > 15421 `:Y} 15422 </span> 15423 `;return W` 15424 <div class="layout vertical center"> 15425 <h1 class="channel_label">${this.templateContent.channelLabel}</h1> 15426 <h1 15427 class="chrome_version layout horizontal center ${this.templateContent.h1Class}" 15428 > 15429 ${t} Chrome ${this.channel?.version} 15430 </h1> 15431 </div> 15432 ${this.showDates&&this.channel?.earliest_beta?W` 15433 <div class="milestone_info layout horizontal center-center"> 15434 <h3>
15435 <span class="channel_label">Beta</span> ${this.templateContent.dateText} 15436 <span class="milestone_info-beta"> 15437 ${this._computeDate(this.channel?.earliest_beta)} - 15438 ${this._computeDate(this.channel?.latest_beta)} 15439 </span> 15440 </h3> 15441 </div> 15442 <div class="milestone_info layout horizontal center-center"> 15443 <h3> 15444 <span class="channel_label">Stable</span> 15445 ${this._computeDaysUntil(e)} 15446 <span class="release-stable" 15447 >(${this._computeDate(e,!0)})</span 15448 > 15449 ${this.renderInfoIcon()} 15450 </h3> 15451 </div> 15452 `:Y} 15453 `}_isFeatureOutdated(e,t){if(0===this.stableMilestone||!t)return!1;if(this.stableMilestone+1!==t&&this.stableMilestone+2!==t)return!1;return!mh(e,this.currentDate)}_cardFeatureItemTemplate(e,t){return W` 15454 <li 15455 data-feature-id="${e.id}" 15456 class="hbox align-top ${e.id==this.highlightFeature?"highlight":""}" 15457 > 15458 <chromedash-review-status-icon 15459 .feature=${e} 15460 ></chromedash-review-status-icon> 15461 <span> 15462 <a 15463 id="feature_link" 15464 href="/feature/${e.id}" 15465 @mouseenter="${this.highlight}" 15466 @mouseleave="${this.removeHighlight}" 15467 > 15468 ${e.name} 15469 </a> 15470 ${e.finch_urls?.map(e=>W` 15471 <a 15472 target="_blank" 15473 class="experiment" 15474 href=${e} 15475 title="Deploying to some users as an experiment" 15476 >Exp</a 15477 > 15478 `)} 15479 </span> 15480 <span class="spacer"></span> 15481 <span class="icon_row"> 15482 ${this._isFeatureOutdated(e.accurate_as_of,this.channel?.version)?W` 15483 <span 15484 class="tooltip" 15485 id="outdated-icon" 15486 title="Feature outdated - last checked for overall accuracy more than four weeks ago" 15487 > 15488 <sl-icon 15489 name="exclamation-circle-fill" 15490 data-tooltip 15491 ></sl-icon> 15492 </span> 15493 `:Y} 15494 ${Qy.includes(t)?W` 15495 <span class="tooltip" title="Deprecation Trial"> 15496 <sl-icon 15497 library="material" 15498 name="extension" 15499 class="experimental" 15500 data-tooltip 15501 ></sl-icon> 15502 </span> 15503 `:Y} 15504 ${Yy.includes(t)?W` 15505 <span class="tooltip" title="Removed"> 15506 <sl-icon 15507 name="x-circle-fill" 15508 class="remove" 15509 data-tooltip 15510 ></sl-icon> 15511 </span> 15512 `:Y} 15513 ${this.signedIn?W` 15514 <span 15515 class="tooltip" 15516 title="Receive an email notification when there are updates" 15517 > 15518 <sl-icon 15519 name="${this.starredFeatures.has(Number(e.id))?"star-fill":"star"}" 15520 class="pushicon" 15521 data-feature-id="${e.id}" 15522 @click="${this.toggleStar}" 15523 > 15524 </sl-icon> 15525 </span> 15526 `:Y} 15527 </span> 15528 </li> 15529 `}renderOTFeatures(e){if(!e)return[];const t=[],i=e.filter(e=>e.feature_type_int!==Yl.FEATURE_TYPE_DEPRECATION_ID[0]),r=e.filter(e=>e.feature_type_int===Yl.FEATURE_TYPE_DEPRECATION_ID[0]);return i.length>0&&t.push(W` 15530 <h3 class="feature_shipping_type">${Ky[0]}</h3> 15531 <ul> 15532 ${i.map(e=>W` ${this._cardFeatureItemTemplate(e,Ky[0])} `)} 15533 </ul> 15534 `),r.length>0&&t.push(W` 15535 <h3 class="feature_shipping_type">${Qy[0]}</h3> 15536 <ul> 15537 ${r.map(e=>W` 15538 ${this._cardFeatureItemTemplate(e,Qy[0])} 15539 `)} 15540 </ul> 15541 `),t}renderCardFeatureList(){const e=this._objKeys(this.channel?.features).map(e=>e===Ky[0]?this.renderOTFeatures(this.channel?.features[e]):0!==this.channel?.features[e].length?W` 15542 <h3 class="feature_shipping_type">${e}</h3> 15543 <ul> 15544 ${this.channel?.features[e].map(t=>W` ${this._cardFeatureItemTemplate(t,e)} `)} 15545 </ul> 15546 `:Y);return W` 15547 <div class="features_list"> 15548 ${this._isAnyFeatureReleased()?W` 15549 <div class="features_header">${this.templateContent.featureHeader}:</div> 15550 ${e} 15551 </div>`:W` 15552 <div class="features_header no_feature_released"> 15553 ${"NO FEATURES ARE PLANNED FOR THIS MILESTONE YET"} 15554 </div> 15555 `} 15556 </div> 15557 `}renderSkeletons(){return W` 15558 <div class="layout vertical center"> 15559 <h1 class="channel_label">${this.templateContent.channelLabel}</h1> 15560 <h1 class="chrome_version layout horizontal sl-skeleton-header-container ${this.templateContent.h1Class}">
15561 <span class="chrome-logo"></span> 15562 <sl-skeleton effect="sheen"></sl-skeleton> 15563 </h1> 15564 </div> 15565 <div class="milestone_info layout horizontal center-center"> 15566 <h3 class="sl-skeleton-header-container"> 15567 <sl-skeleton effect="sheen"></sl-skeleton> 15568 </h3> 15569 </div> 15570 <div class="milestone_info layout horizontal center-center"> 15571 <h3 class="sl-skeleton-header-container"> 15572 <sl-skeleton effect="sheen"></sl-skeleton> 15573 </h3> 15574 </div> 15575 <div class="features_list"> 15576 <div class="sl-skeleton-title-container"> 15577 <sl-skeleton effect="sheen"></sl-skeleton> 15578 </div> 15579 <sl-skeleton effect="sheen"></sl-skeleton> 15580 <sl-skeleton effect="sheen"></sl-skeleton> 15581 <sl-skeleton effect="sheen"></sl-skeleton> 15582 <sl-skeleton effect="sheen"></sl-skeleton> 15583 </div> 15584 </div> 15585 <div class="features_list"> 15586 <div class="sl-skeleton-title-container"> 15587 <sl-skeleton effect="sheen"></sl-skeleton> 15588 </div> 15589 <sl-skeleton effect="sheen"></sl-skeleton> 15590 <sl-skeleton effect="sheen"></sl-skeleton> 15591 <sl-skeleton effect="sheen"></sl-skeleton> 15592 <sl-skeleton effect="sheen"></sl-skeleton> 15593 </div> 15594 </div> 15595 `}render(){return W` 15596 <section class="release"> 15597 ${this.channel?W` ${this.renderCardHeader()} ${this.renderCardFeatureList()} `:W` ${this.renderSkeletons()} `} 15598 </section> 15599 `}};Gy([Ve({attribute:!1})],Xy.prototype,"starredFeatures",void 0),Gy([Ve({attribute:!1})],Xy.prototype,"highlightFeature",void 0),Gy([Ve({attribute:!1})],Xy.prototype,"templateContent",void 0),Gy([Ve({attribute:!1})],Xy.prototype,"channel",void 0),Gy([Ve({type:Boolean})],Xy.prototype,"showDates",void 0),Gy([Ve({type:Boolean})],Xy.prototype,"signedIn",void 0),Gy([Ve({attribute:!1})],Xy.prototype,"stableMilestone",void 0),Gy([He()],Xy.prototype,"currentDate",void 0),Xy=Gy([Ue("chromedash-roadmap-milestone-card")],Xy);var Jy=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Zy;async function e_(){Zy||(Zy=document.createElement("chromedash-roadmap-help-dialog"),document.body.appendChild(Zy),await Zy.updateComplete),Zy.show()}let t_=class extends ce{static get styles(){return[...lo,c` 15600 #dialog-content { 15601 max-width: 60rem; 15602 } 15603 #legend li { 15604 padding: var(--content-padding-quarter); 15605 white-space: nowrap; 15606 } 15607 #legend span { 15608 display: inline-block; 15609 width: 8em; 15610 } 15611 15612 #legend sl-icon { 15613 width: 26px; 15614 height: 18px; 15615 } 15616 sl-icon.not-started { 15617 color: var(--gate-preparing-icon-color); 15618 } 15619 sl-icon.in-progress { 15620 color: var(--gate-pending-icon-color); 15621 } 15622 sl-icon.needs-work { 15623 color: var(--gate-needs-work-icon-color); 15624 } 15625 sl-icon.approved { 15626 color: var(--gate-approved-icon-color); 15627 } 15628 sl-icon.denied { 15629 color: var(--gate-denied-icon-color); 15630 } 15631 `]}show(){this.renderRoot.querySelector("sl-dialog")?.show()}hide(){this.renderRoot.querySelector("sl-dialog")?.hide()}renderDialogContent(){return W` 15632 <div id="dialog-content"> 15633 <ul id="legend"> 15634 <li> 15635 <sl-icon 15636 library="material" 15637 class="approved" 15638 name="check_circle_filled_20px" 15639 ></sl-icon> 15640 <span>Approved</span> 15641 <span>Reviewers approved feature at this stage</span> 15642 </li> 15643 <li> 15644 <sl-icon 15645 library="material" 15646 class="not-started" 15647 name="arrow_circle_right_20px" 15648 ></sl-icon> 15649 <span>Not started</span> 15650 <span>Feature owners have not requested reviews yet</span> 15651 </li> 15652 <li> 15653 <sl-icon 15654 library="material" 15655 class="in-progress" 15656 name="pending_20px" 15657 ></sl-icon>
15658 <span>In-progress</span> 15659 <span>Not all reviews have finished</span> 15660 </li> 15661 <li> 15662 <sl-icon 15663 library="material" 15664 class="needs-work" 15665 name="autorenew_20px" 15666 ></sl-icon> 15667 <span>Needs work</span> 15668 <span>Reviewers have asked for changes</span> 15669 </li> 15670 <li> 15671 <sl-icon 15672 library="material" 15673 class="denied" 15674 name="block_20px" 15675 ></sl-icon> 15676 <span>Denied</span> 15677 <span>Reviewers suggested directional changes</span> 15678 </li> 15679 </ul> 15680 </div> 15681 `}render(){return W` 15682 <sl-dialog label="Roadmap legend" style="--width:fit-content"> 15683 ${this.renderDialogContent()} 15684 </sl-dialog> 15685 `}};t_=Jy([Ue("chromedash-roadmap-help-dialog")],t_);var i_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let r_=class extends ce{constructor(){super(...arguments),this.sectionRef=ws(),this.roadmapRef=ws(),this.cardWidth=0,this.numColumns=0,this.viewOffset=0,this.boundHandleResize=this.handleResize.bind(this)}static get styles(){return[...lo,c` 15686 .animate { 15687 transition: margin 0.4s ease; 15688 } 15689 #help-button { 15690 font-size: 1.4rem; 15691 color: var(--unimportant-text-color); 15692 float: right; 15693 } 15694 15695 #releases-section { 15696 overflow: hidden; 15697 } 15698 15699 .timeline-controls { 15700 text-align: center; 15701 padding-bottom: var(--content-padding); 15702 margin: 0 var(--content-padding-half); 15703 } 15704 `]}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.boundHandleResize)}disconnectedCallback(){window.removeEventListener("resize",this.boundHandleResize),super.disconnectedCallback()}firstUpdated(){requestAnimationFrame(()=>{this.handleResize()})}handleResize(){if(!this.sectionRef.value)return;const e=this.sectionRef.value.offsetWidth;let t=3;e<768?t=1:e<1152&&(t=2),this.numColumns=t,e&&(this.cardWidth=e/t-16),this.updateRoadmapMargin(!1)}handleMove(e){const t=this.roadmapRef.value;t?.lastFutureFetchedOn&&("next-button"==e.target.id?(this.viewOffset-=1,t.lastMilestoneVisible+=1,this.updateRoadmapMargin(!0)):(this.viewOffset+=1,t.lastMilestoneVisible-=1,this.updateRoadmapMargin(!0)),t.lastMilestoneVisible-t.lastFutureFetchedOn>1?t.fetchNextBatch(t.lastFutureFetchedOn+1):t.lastMilestoneVisible-t.lastPastFetchedOn<=0&&t.fetchPreviousBatch(t.lastPastFetchedOn-1))}updateRoadmapMargin(e){const t=this.roadmapRef.value;if(!t)return;e?t.classList.add("animate"):t.classList.remove("animate");t.style.marginLeft=this.viewOffset*(this.cardWidth+16)+"px",t.style.left=t.cardOffset*(this.cardWidth+16)+"px"}renderHelpIcon(){return W` 15705 <sl-icon 15706 id="help-button" 15707 library="material" 15708 name="help_20px" 15709 @click="${e_}" 15710 > 15711 </sl-icon> 15712 `}render(){return W` 15713 <div id="subheader"> 15714 <div> 15715 <h3>Roadmap</h3> 15716 </div> 15717 </div> 15718 <section id="releases-section" ${$s(this.sectionRef)}> 15719 <div class="timeline-controls"> 15720 <button 15721 id="previous-button" 15722 aria-label="Button to move to previous release" 15723 @click=${this.handleMove} 15724 > 15725 Previous 15726 </button> 15727 <button 15728 id="next-button" 15729 aria-label="Button to move to later release" 15730 @click=${this.handleMove} 15731 > 15732 Next 15733 </button> 15734 ${this.renderHelpIcon()} 15735 </div> 15736 <chromedash-roadmap 15737 ${$s(this.roadmapRef)} 15738 class="animate" 15739 aria-label="List of milestone releases" 15740 .numColumns=${this.numColumns} 15741 .cardWidth=${this.cardWidth} 15742 ?signedIn=${Boolean(this.user)} 15743 > 15744 </chromedash-roadmap> 15745 </section> 15746 `}};i_([Ve({type:Object,attribute:!1})],r_.prototype,"user",void 0),i_([He()],r_.prototype,"cardWidth",void 0),i_([He()],r_.prototype,"numColumns",void 0),i_([He()],r_.prototype,"viewOffset",void 0),r_=i_([Ue("chromedash-roadmap-page")],r_);var s_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let o_=class extends ce{constructor(){super(...arguments),this.users=[]}static get styles(){return[...lo,c` 15747 form { 15748 padding: var(--content-padding); 15749 background: var(--card-background); 15750 border: var(--card-border); 15751 margin-bottom: var(--content-padding); 15752 max-width: 20em; 15753 } 15754 form > * + * { 15755 margin-top: var(--content-padding-half); 15756 } 15757 15758 ul { 15759 margin-top: 10px; 15760 } 15761 ul li { 15762 transition: opacity 600ms ease-in-out; 15763 margin-bottom: 5px; 15764 } 15765 ul li.faded { 15766 opacity: 0; 15767 } 15768 ul li a { 15769 margin-right: 10px; 15770 } 15771 `]}addUser(e){this.users.splice(0,0,e),this.users=this.users.slice(0)}removeUser(e){this.users.splice(e,1),this.users=this.users.slice(0)}sortUsers(){this.users.sort((e,t)=>
15771e.is_admin&&!t.is_admin||e.is_site_editor&&!t.is_site_editor&&!t.is_admin?-1:t.is_admin&&!e.is_admin||t.is_site_editor&&!e.is_site_editor&&!e.is_admin?1:e.email.localeCompare(t.email))}_onAdminToggle(){const e=this.renderRoot.querySelector("form"),t=e?.querySelector('input[name="is_admin"]'),i=e?.querySelector('input[name="is_site_editor"]');t.checked?(i.checked=!0,i.disabled=!0):i.disabled=!1}async ajaxSubmit(e){e.preventDefault();const t=this.renderRoot.querySelector("form");if(t.checkValidity()){const e=t.querySelector('input[name="email"]'),i=t.querySelector('input[name="is_admin"]'),r=t.querySelector('input[name="is_site_editor"]'),s=e?.value,o=i?.checked,a=r?.checked;window.csClient.createAccount(s,o,a).then(e=>{e.error_message?alert(e.error_message):(this.addUser(e),t.reset(),r&&(r.disabled=!1))}).catch(e=>{alert(e.message||"An error occurred")})}}ajaxDelete(e){if(e.preventDefault(),!confirm("Remove user?"))return;const t=e.target.dataset.index;window.csClient.deleteAccount(e.target.dataset.account).then(()=>{this.removeUser(t)})}render(){return this.sortUsers(),W` 15772 <form id="form" name="user_form" method="post"> 15773 <div> 15774 <input 15775 type="email" 15776 placeholder="Email address" 15777 name="email" 15778 required 15779 /> 15780 </div> 15781 <div> 15782 <label 15783 ><input 15784 type="checkbox" 15785 name="is_admin" 15786 @click="${this._onAdminToggle}" 15787 /> 15788 User is admin</label 15789 > 15790 </div> 15791 <div> 15792 <label 15793 ><input type="checkbox" name="is_site_editor" /> User is site 15794 editor</label 15795 > 15796 </div> 15797 <div> 15798 <input type="submit" @click="${this.ajaxSubmit}" value="Add user" /> 15799 </div> 15800 </form> 15801 15802 <ul id="user-list"> 15803 ${this.users.map((e,t)=>W` 15804 <li> 15805 <a 15806 href="#" 15807 data-index="${t}" 15808 data-account="${e.id}" 15809 @click="${this.ajaxDelete}" 15810 >delete</a 15811 > 15812 ${e.is_admin?W`(admin)`:Y} 15813 ${!e.is_admin&&e.is_site_editor?W`(site editor)`:Y} 15814 <span>${e.email}</span> 15815 </li> 15816 `)} 15817 </ul> 15818 `}};s_([He()],o_.prototype,"users",void 0),o_=s_([Ue("chromedash-userlist")],o_);var a_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let n_=class extends Qh{renderBox(e){return W` 15819 <chromedash-feature-table 15820 query=${e} 15821 ?signedIn=${Boolean(this.user)} 15822 ?canEdit=${this.user&&this.user.can_edit_all} 15823 .starredFeatures=${this.starredFeatures} 15824 @star-toggle-event=${this.handleStarToggle} 15825 num="100" 15826 alwaysOfferPagination 15827 columns="normal" 15828 > 15829 </chromedash-feature-table> 15830 `}renderEnterpriseFeatures(){return this.renderBox('feature_type="New Feature or removal affecting enterprises" OR enterprise_impact>1')}render(){return W` 15831 <h2>Enterprise features and breaking changes</h2> 15832 ${this.renderEnterpriseFeatures()} 15833 `}};n_=a_([Ue("chromedash-enterprise-page")],n_);var l_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const d_="milestone";let c_=class extends ce{constructor(){super(...arguments),this.currentChromeBrowserUpdates=[],this.upcomingChromeBrowserUpdates=[],this.currentChromeEnterpriseCore=[],this.upcomingChromeEnterpriseCore=[],this.currentChromeEnterprisePremium=[],this.upcomingChromeEnterprisePremium=[],this.features=[],this.editingFeatureIds=new Set,this.previewingIds=new Set}static get styles(){return[...lo,c` 15834 :host > * { 15835 margin: 2rem 0; 15836 } 15837 15838 *[hidden] { 15839 display: none; 15840 } 15841 h1 { 15842 font-size: 2rem; 15843 line-height: 2.5rem; 15844 margin: 0 0 0.5rem; 15845 } 15846 15847 h2 { 15848 font-size: 1.5rem; 15849 letter-spacing: 0rem; 15850 line-height: 2rem; 15851 margin: 2rem 0 0.5rem; 15852 font-weight: bold; 15853 } 15854 15855 h3 { 15856 margin: 16px 0; 15857 } 15858 15859 table { 15860 width: 100%; 15861 } 15862 15863 tr { 15864 background-color: var(--table-row-background); 15865 } 15866 15867 th { 15868 background-color: var(--table-header-background); 15869 } 15870 15871 table, 15872 th, 15873 td { 15874 border: var(--table-divider); 15875 } 15876 15877 table th, 15878 .bold { 15879 font-weight: bold; 15880 } 15881 15882 table th, 15883 table td { 15884 padding: 16px 32px; 15885 vertical-align: top; 15886 } 15887 15888 ul { 15889 padding-inline-start: 1rem; 15890 } 15891 15892 .stage { 15893 margin-top: 16px; 15894 } 15895 15896 .feature { 15897 margin: 1rem 0 2rem; 15898 background: var(--card-background); 15899 border: var(--card-border); 15900 border-radius: var(--default-border-radius);
15901 box-shadow: var(--card-box-shadow); 15902 padding: var(--content-padding); 15903 } 15904 15905 .toremove { 15906 margin: 1rem 0; 15907 } 15908 15909 .labels { 15910 margin-bottom: var(--content-padding-half); 15911 } 15912 .confidential::part(base) { 15913 background: var(--warning-background); 15914 font-weight: bold; 15915 } 15916 .reviewed::part(base) { 15917 background: var(--sl-color-blue-100); 15918 } 15919 .ready::part(base) { 15920 background: var(--success-background); 15921 } 15922 15923 .toremove { 15924 font-style: italic; 15925 } 15926 15927 td:not(:first-child), 15928 th:not(:first-child) { 15929 text-align: center; 15930 } 15931 15932 .edit-button { 15933 float: right; 15934 } 15935 .feature-summary { 15936 margin-bottom: var(--content-padding); 15937 } 15938 .rollout-milestone { 15939 width: 6em; 15940 } 15941 .rollout-platforms { 15942 margin-left: 2em; 15943 flex-grow: 1; 15944 } 15945 15946 .screenshots { 15947 display: flex; 15948 flex-wrap: wrap; 15949 gap: 1rem; 15950 } 15951 15952 .screenshots img { 15953 flex: 0 1 auto; 15954 max-height: 300px; 15955 max-width: calc(50% - 0.5rem); 15956 } 15957 `]}convertShippingStageToRolloutStages(e){const t=[e.desktop_first,e.android_first,e.ios_first,e.webview_first,e.desktop_last,e.android_last,e.ios_last,e.webview_last].reduce((e,t)=>({...e,[t]:new Set}),{});return e.desktop_first&&(t[e.desktop_first].add(Ll.PLATFORM_WINDOWS[0]),t[e.desktop_first].add(Ll.PLATFORM_MAC[0]),t[e.desktop_first].add(Ll.PLATFORM_LINUX[0])),e.android_first&&t[e.android_first].add(Ll.PLATFORM_ANDROID[0]),e.ios_first&&t[e.ios_first].add(Ll.PLATFORM_IOS[0]),e.webview_first&&t[e.webview_first].add(Ll.PLATFORM_ANDROID[0]),e.desktop_last&&(t[e.desktop_last].add(Ll.PLATFORM_WINDOWS[0]),t[e.desktop_last].add(Ll.PLATFORM_MAC[0]),t[e.desktop_last].add(Ll.PLATFORM_LINUX[0])),e.android_last&&t[e.android_last].add(Ll.PLATFORM_ANDROID[0]),e.ios_last&&t[e.ios_last].add(Ll.PLATFORM_IOS[0]),e.webview_last&&t[e.webview_last].add(Ll.PLATFORM_ANDROID[0]),Object.entries(t).map(([e,t])=>({stage_type:bd,rollout_milestone:Number(e),rollout_platforms:Array.from(t).map(String),rollout_stage_plan:Nl.ROLLOUT_STAGE_PLAN_CUSTOM[0],rollout_details:"No rollout step"}))}convertFeatureShippingStagesToRolloutStages(e){const t=e.stages.filter(e=>e.stage_type===bd),i=e.stages.filter(e=>wd.has(e.stage_type)).map(e=>this.convertShippingStageToRolloutStages(e)).flatMap(e=>e);let r=t.length>0?t:i;return r=r.filter(e=>!!e.rollout_milestone),r=r.sort((e,t)=>e.rollout_milestone-t.rollout_milestone),{...e,stages:r}}updateFeatures(e){e=e.map(e=>this.convertFeatureShippingStagesToRolloutStages(e)),this.features=e.filter(({stages:e})=>e.some(e=>e.stage_type===bd)),this.categorizeFeatures()}categorizeFeatures(){const e=this.features.filter(({stages:e})=>e.some(e=>e.rollout_milestone===this.selectedMilestone)).sort((e,t)=>t.enterprise_impact-e.enterprise_impact);this.currentChromeBrowserUpdates=e.filter(e=>e.enterprise_product_category===Kl.CHROME_BROWSER_UPDATE[0]),this.currentChromeEnterpriseCore=e.filter(e=>e.enterprise_product_category===Kl.CHROME_ENTERPRISE_CORE[0]),this.currentChromeEnterprisePremium=e.filter(e=>e.enterprise_product_category===Kl.CHROME_ENTERPRISE_PREMIUM[0]);const t=this.features.filter(({stages:e})=>!e.some(e=>e.rollout_milestone===this.selectedMilestone)&&e.some(e=>e.rollout_milestone>this.selectedMilestone)).sort((e,t)=>{const i=Math.min(...e.stages.filter(e=>(e.rollout_milestone||0)>this.selectedMilestone).map(e=>e.rollout_milestone))||0,r=Math.min(...t.stages.filter(e=>(e.rollout_milestone||0)>this.selectedMilestone).map(e=>e.rollout_milestone))||0;return i-r});this.upcomingChromeBrowserUpdates=t.filter(e=>e.enterprise_product_category===Kl.CHROME_BROWSER_UPDATE[0]),this.upcomingChromeEnterpriseCore=t.filter(e=>e.enterprise_product_category===Kl.CHROME_ENTERPRISE_CORE[0]),this.upcomingChromeEnterprisePremium=t.filter(e=>e.enterprise_product_category===Kl.CHROME_ENTERPRISE_PREMIUM[0])}replaceOneFeature(e){const t=this.features.map(t=>
15957t.id===e.id?e:t);this.features=t,this.categorizeFeatures()}connectedCallback(){window.csClient.getChannels().then(e=>{this.channels=e;const t=oh(window.location.search);d_ in t?this.selectedMilestone=parseInt(t[d_],10):(this.selectedMilestone=this.channels.stable.version,lh(d_,this.selectedMilestone))}).then(()=>window.csClient.getFeaturesForEnterpriseReleaseNotes(this.selectedMilestone)).then(({features:e})=>this.updateFeatures(e)).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")}).finally(()=>super.connectedCallback())}updateSelectedMilestone(){const e=this.shadowRoot.querySelector("#milestone-selector");this.selectedMilestone=parseInt(e.value),window.csClient.getFeaturesForEnterpriseReleaseNotes(this.selectedMilestone).then(({features:e})=>this.updateFeatures(e)).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")})}update(e){void 0!==this.selectedMilestone&&lh(d_,this.selectedMilestone),super.update(e)}renderMilestoneSelector(){const e=[];for(let t=0;t<this.selectedMilestone+20;++t)e.push(W`<sl-option value="${t}">Chrome ${t} release summary</sl-option>`);return W` <sl-select 15958 id="milestone-selector" 15959 placement="top" 15960 hoist 15961 size="small" 15962 value=${this.selectedMilestone} 15963 @sl-change=${this.updateSelectedMilestone} 15964 > 15965 ${e.map(e=>e)} 15966 </sl-select>`}getFeatureMarkerForCategory(e,t){return e.enterprise_feature_categories.includes(t.toString())?"â":""}renderReleaseNotesSummarySection(e,t){return W` 15967 <tr> 15968 <th>${e}</th> 15969 <th>Security / Privacy</th> 15970 <th>User productivity / Apps</th> 15971 <th>Management</th> 15972 </tr> 15973 ${0===t.length?W`<tr> 15974 <td colspan="4">Nothing</td> 15975 </tr>`:t.map(e=>W` 15976 <tr> 15977 <td>${e.name}</td> 15978 <td> 15979 ${this.getFeatureMarkerForCategory(e,Ol.SECURITYANDPRIVACY[0])} 15980 </td> 15981 <td> 15982 ${this.getFeatureMarkerForCategory(e,Ol.USERPRODUCTIVITYANDAPPS[0])} 15983 </td> 15984 <td> 15985 ${this.getFeatureMarkerForCategory(e,Ol.MANAGEMENT[0])} 15986 </td> 15987 </tr> 15988 `)} 15989 `}renderReleaseNotesSummary(){return W` <table id="release-notes-summary"> 15990 ${this.renderReleaseNotesSummarySection("Chrome Browser updates",this.currentChromeBrowserUpdates)} 15991 ${this.renderReleaseNotesSummarySection("Chrome Enterprise Core (CEC)",this.currentChromeEnterpriseCore)} 15992 ${this.renderReleaseNotesSummarySection("Chrome Enterprise Premium (CEP, paid SKU)",this.currentChromeEnterprisePremium)} 15993 ${this.renderReleaseNotesSummarySection("Upcoming Chrome Browser updates",this.upcomingChromeBrowserUpdates)} 15994 ${this.renderReleaseNotesSummarySection("Upcoming Chrome Enterprise Core (CEC)",this.upcomingChromeEnterpriseCore)} 15995 ${this.renderReleaseNotesSummarySection("Upcoming Chrome Enterprise Premium (CEP, paid SKU)",this.upcomingChromeEnterprisePremium)} 15996 </table>`}getStageTitle(e){if(0===e.rollout_platforms.length||e.rollout_platforms.length===Object.values(Fl).length)return`Chrome ${e.rollout_milestone}`;const t=e.rollout_stage_plan!==Nl.ROLLOUT_STAGE_PLAN_CUSTOM[0]?Ml[e.rollout_stage_plan]:"";return`Chrome ${e.rollout_milestone} on ${e.rollout_platforms.map(e=>Fl[e]).join(", ")} `+(t?"- "+t:"")}userCanEdit(e){return this.user&&(this.user.can_edit_all||this.user.editable_features.includes(e.id))}userCanReview(){return this.user&&(this.user.is_admin||this.user.can_review_release_notes)}startEditing(e){const t=new Set(this.editingFeatureIds);t.add(e),this.editingFeatureIds=t}cancel(e){const t=new Set(this.editingFeatureIds);t.delete(e),this.editingFeatureIds=t}nowString(){const e=new Date;let t=new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,timeZone:"UTC"}).format(e);return t=t.replace(",",""),t}save(e){const t=[],i=(e,i,r,s)=>{const o="SL-CHECKBOX"===i?.tagName?i?.checked:i?.value;void 0!==o&&""+o!=""+r&&t.push({name:e,value:o,touched:!0,stageId:s?.id})};let r=this.shadowRoot?.querySelector("#edit-name-"+e.id);i("name",r,e.name);let s=this.shadowRoot?.querySelector("#edit-confidential-"+e.id);i("confidential",s,e.confidential);let o=this.shadowRoot?.querySelector("#edit-reviewed-"+e.id);i("is_releasenotes_content_reviewed",o,e.is_releasenotes_content_reviewed);let a=this.shadowRoot?.querySelector("#edit-ready-"+e.id);i("is_releasenotes_publish_ready",a,e.is_releasenotes_publish_ready);let n=this.shadowRoot?.querySelector("#edit-summary-"+e.id);i("summary",n,e.summary);const l=(e.markdown_fields||[]).includes("summary");let d=this.shadowRoot?.querySelector("#summary-is-markdown-"+e.id);i("summary_is_markdown",d,l);for(const t of e.stages)if(t.id){const e=this.shadowRoot?.querySelector("#edit-rollout-milestone-"+t.id);i("rollout_milestone",e,t.rollout_milestone,t);const r=this.shadowRoot?.querySelector("#edit-rollout-platforms-"+t.id);i("rollout_platforms",r,t.rollout_platforms,t);const s=this.shadowRoot?.querySelector("#edit-rollout-stage-plan-"+t.id);i("rollout_stage_plan",s,t.rollout_stage_plan,t);const o=this.shadowRoot?.querySelector("#edit-rollout-details-"+t.id);i("rollout_details",o,t.rollout_details,t)}const c=uh(t,e.id);
15996window.csClient.updateFeature(c).then(t=>{window.csClient.getFeature(e.id).then(e=>{this.replaceOneFeature(this.convertFeatureShippingStagesToRolloutStages(e))})}).catch(()=>{Vc("Some errors occurred. Please refresh the page or try again later.")}).finally(()=>{this.cancel(e.id)})}renderToRemoveParagraph(e){return W` 15997 <p class="toremove"> 15998 <b>< To remove</b> 15999 - <a target="_blank" href="/feature/${e.id}">Feature details</a> - 16000 <b>Owners:</b> ${e.browsers.chrome.owners?.join(", ")} - 16001 <b>Editors:</b> ${(e.editors||[]).join(", ")} - 16002 <b>Enterprise impact:</b> ${ql[e.enterprise_impact]} 16003 - <b>First notice:</b> ${e.first_enterprise_notification_milestone} - 16004 <b>Last updated:</b> 16005 <a 16006 href="/feature/${e.id}/activity" 16007 target="_blank" 16008 title=${Ht(e.updated.when)} 16009 > 16010 ${rh(e.updated.when)} 16011 </a> 16012 by ${e.updated.by} - 16013 <b>Accurate as of:</b> 16014 ${e.accurate_as_of?e.accurate_as_of.split(" ")[0]:"Unknown"} 16015 <b>></b> 16016 </p> 16017 `}renderEditButton(e){return this.userCanEdit(e)&&!this.editingFeatureIds.has(e.id)?W` 16018 <sl-button 16019 @click=${()=>{this.startEditing(e.id)}} 16020 class="edit-button" 16021 size="small" 16022 >Edit</sl-button 16023 > 16024 `:W``}renderLabels(e){let t=W``;e.confidential&&(t=W`<sl-tag pill size="small" class="confidential" 16025 >CONFIDENTIAL</sl-tag 16026 >`);let i=W``;e.is_releasenotes_content_reviewed&&(i=W`<sl-tag pill size="small" class="reviewed" 16027 >Release Notes Content Finalized</sl-tag 16028 >`);let r=W``;return e.is_releasenotes_publish_ready&&(r=W`<sl-tag pill size="small" class="ready" 16029 >Ready for Publishing</sl-tag 16030 >`),W`<div class="labels"> 16031 ${t} ${i} ${r} 16032 </div>`}renderEditableLabels(e){let t=W` 16033 <div> 16034 <sl-checkbox 16035 class="feature-confidential" 16036 id="edit-confidential-${e.id}" 16037 ?checked=${e.confidential} 16038 size="small" 16039 > 16040 Confidential 16041 </sl-checkbox> 16042 </div> 16043 `,i=W``;this.userCanReview()&&(i=W` 16044 <div> 16045 <sl-checkbox 16046 class="feature-reviewed" 16047 id="edit-reviewed-${e.id}" 16048 ?checked=${e.is_releasenotes_content_reviewed} 16049 size="small" 16050 > 16051 Release Notes Content Finalized 16052 </sl-checkbox> 16053 </div> 16054 `);let r=W``;return this.userCanReview()&&(r=W`<div> 16055 <sl-checkbox 16056 class="feature-ready" 16057 id="edit-ready-${e.id}" 16058 ?checked=${e.is_releasenotes_publish_ready} 16059 size="small" 16060 > 16061 Ready for Publishing 16062 </sl-checkbox> 16063 </div> `),W`${t} ${i} ${r}`}renderFeatureName(e){return W`<strong>${e.name}</strong>`}renderEditableFeatureName(e){return W` 16064 <sl-input 16065 class="feature-name" 16066 id="edit-name-${e.id}" 16067 value=${e.name} 16068 size="small" 16069 > 16070 </sl-input> 16071 `}renderFeatureSummary(e){const t=(e.markdown_fields||[]).includes("summary"),i=jc(e.summary,[],t);return t?W`${i}`:W`<p class="summary preformatted">${i}</p>`}handlePreviewChecked(e,t){const i=new Set(this.previewingIds);e.target.checked?i.add(t):i.delete(t),this.previewingIds=i}renderEditableFeatureSummary(e){const t=(e.markdown_fields||[]).includes("summary"),i=this.previewingIds.has(e.id),r=W` <sl-textarea 16072 ?hidden=${i} 16073 class="feature-summary" 16074 id="edit-summary-${e.id}" 16075 value=${e.summary} 16076 size="small" 16077 resize="auto" 16078 > 16079 </sl-textarea>`,s=this.shadowRoot?.querySelector("#edit-summary-"+e.id)?.value??e.summary,o=this.shadowRoot?.querySelector("#summary-is-markdown-"+e.id)?.checked??t,a=W` 16080 <div 16081 id="preview" 16082 ?hidden=${!i} 16083 style="border:var(--card-border); padding:0 var(--content-padding); min-height:14em; background:var(--table-alternate-background)" 16084 > 16085 ${jc(s,[],o)} 16086 </div> 16087 `,n=W` 16088 <sl-checkbox 16089 class="markdown-checkbox" 16090 id="summary-is-markdown-${e.id}" 16091 size="small" 16092 ?checked=${t} 16093 >Use markdown</sl-checkbox 16094 > 16095 <sl-icon-button 16096 name="info-circle" 16097 id="info-button" 16098 title="GitHub flavored markdown docs" 16099 href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax" 16100 target="_blank" 16101 ></sl-icon-button> 16102 <sl-checkbox 16103 id="show-preview-${e.id}" 16104 size="small" 16105 ?checked=${i}
16106 @sl-change=${t=>this.handlePreviewChecked(t,e.id)} 16107 > 16108 Preview 16109 </sl-checkbox> 16110 `;return W` ${a} ${r} ${n} `}renderEditableStageItem(e,t,i){const r=t.rollout_platforms,s=Ll,o=Object.values(s).filter(([e,t,i])=>!i||r.includes(""+e)),a=this.previewingIds.has(t.id),n=W` <sl-textarea 16111 ?hidden=${a} 16112 class="rollout-details" 16113 id="edit-rollout-details-${t.id}" 16114 value=${t.rollout_details} 16115 size="small" 16116 rows="1" 16117 resize="auto" 16118 > 16119 </sl-textarea>`,l=this.shadowRoot?.querySelector("#edit-rollout-details-"+t.id)?.value??t.rollout_details,d=W` 16120 <div 16121 ?hidden=${!a} 16122 id="preview" 16123 style="border:var(--card-border); padding:0 var(--content-padding); min-height:14em; background:var(--table-alternate-background)" 16124 > 16125 ${jc(l,[],!0)} 16126 </div> 16127 `,c=W` 16128 <sl-checkbox class="markdown-checkbox" size="small" checked disabled 16129 >Use markdown</sl-checkbox 16130 > 16131 <sl-icon-button 16132 name="info-circle" 16133 id="info-button" 16134 title="GitHub flavored markdown docs" 16135 href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax" 16136 target="_blank" 16137 ></sl-icon-button> 16138 <sl-checkbox 16139 id="show-preview-${t.id}" 16140 size="small" 16141 ?checked=${a} 16142 @sl-change=${e=>this.handlePreviewChecked(e,t.id)} 16143 > 16144 Preview 16145 </sl-checkbox> 16146 `;return W` 16147 <li class="stage"> 16148 <div class="hbox"> 16149 <sl-input 16150 class="rollout-milestone" 16151 id="edit-rollout-milestone-${t.id}" 16152 type="number" 16153 value=${t.rollout_milestone} 16154 ></sl-input> 16155 16156 <sl-select 16157 class="rollout-platforms" 16158 multiple 16159 clearable 16160 id="edit-rollout-platforms-${t.id}" 16161 .value=${r} 16162 > 16163 ${o.map(([e,t])=>W` 16164 <sl-option value="${e}"> ${t} </sl-option> 16165 `)} 16166 </sl-select> 16167 </div> 16168 <sl-select 16169 class="rollout-stage-plan" 16170 id="edit-rollout-stage-plan-${t.id}" 16171 value=${t.rollout_stage_plan} 16172 > 16173 ${Object.values(Nl).map(([e,t])=>W`<sl-option value=${e}>${t}</sl-option>`)} 16174 </sl-select> 16175 ${d} ${n} ${c} 16176 </li> 16177 `}renderStageItem(e,t,i){let r=W``;if(t.rollout_details){const e=jc(t.rollout_details,[],!0);r=W`${e}`}return W` 16178 <li class="stage"> 16179 <span 16180 class="${i(t.rollout_milestone,e.stages.map(e=>e.rollout_milestone).sort())?"bold":""}" 16181 > 16182 ${this.getStageTitle(t)} 16183 </span> 16184 ${r} 16185 </li> 16186 `}renderSaveAndCancel(e){return this.editingFeatureIds.has(e.id)?W` 16187 <sl-button 16188 class="save-button" 16189 @click=${()=>{this.save(e)}} 16190 size="small" 16191 variant="primary" 16192 >Save</sl-button 16193 > 16194 <sl-button 16195 class="cancel-button" 16196 @click=${()=>{this.cancel(e.id)}} 16197 size="small" 16198 >Cancel</sl-button 16199 > 16200 `:W``}renderFeatureReleaseNote(e,t){const i=this.editingFeatureIds.has(e.id);return W` <section class="feature"> 16201 ${this.renderEditButton(e)} 16202 ${i?this.renderEditableLabels(e):this.renderLabels(e)} 16203 ${i?this.renderEditableFeatureName(e):this.renderFeatureName(e)} 16204 ${this.renderToRemoveParagraph(e)} 16205 ${i?this.renderEditableFeatureSummary(e):this.renderFeatureSummary(e)} 16206 <ul class="stages"> 16207 ${e.stages.map(r=>i&&r.id?this.renderEditableStageItem(e,r,t):this.renderStageItem(e,r,t))} 16208 </ul> 16209 ${this.renderSaveAndCancel(e)} 16210 16211 <div class="screenshots"> 16212 ${e.screenshot_links.map((e,t)=>W`<img src="${e}" alt="Feature screenshot ${t+1}" />`)} 16213 </div> 16214 </section>`}renderReleaseNotesDetailsSection(e,t,i){return W` <div class="note-section"> 16215 <h2>${e}</h2> 16216 ${t.map(e=>this.renderFeatureReleaseNote(e,i))} 16217 </div>`}renderReleaseNotesDetails(){return W` ${this.renderReleaseNotesDetailsSection("Chrome Browser updates",this.currentChromeBrowserUpdates,e=>e===this.selectedMilestone)} 16218 ${this.renderReleaseNotesDetailsSection("Chrome Enterprise Core (CEC)",this.currentChromeEnterpriseCore,e=>e===this.selectedMilestone)} 16219 ${this.renderReleaseNotesDetailsSection("Chrome Enterprise Premium (CEP, paid SKU)",this.currentChromeEnterprisePremium,e=>e===this.selectedMilestone)} 16220 ${this.renderReleaseNotesDetailsSection("Upcoming Chrome Browser updates",this.upcomingChromeBrowserUpdates,(e,t)=>t.find(e=>parseInt(e)>this.selectedMilestone)===e)} 16221 ${this.renderReleaseNotesDetailsSection("Upcoming Chrome Enterprise Core (CEC)",this.upcomingChromeEnterpriseCore,(e,t)=>t.find(e=>parseInt(e)>this.selectedMilestone)===e)} 16222 ${this.renderReleaseNotesDetailsSection("Upcoming Chrome Enterprise Premium (CEP, paid SKU)",this.upcomingChromeEnterprisePremium,(e,t)=>t.find(e=>parseInt(e)>this.selectedMilestone)===e)}`}render(){return W` 16223 <h1>Chrome Enterprise and Education release notes</h1> 16224 ${this.renderMilestoneSelector()} ${this.renderReleaseNotesSummary()} 16225 ${this.renderReleaseNotesDetails()} 16226 `}};l_([Ve({attribute:!1})],c_.prototype,"user",void 0),l_([He()],c_.prototype,"currentChromeBrowserUpdates",void 0),l_([He()],c_.prototype,"upcomingChromeBrowserUpdates",void 0),l_([He()],c_.prototype,"currentChromeEnterpriseCore",void 0),l_([He()],c_.prototype,"upcomingChromeEnterpriseCore",void 0),l_([He()],c_.prototype,"currentChromeEnterprisePremium",void 0),l_([He()],c_.prototype,"upcomingChromeEnterprisePremium",void 0),l_([He()],c_.prototype,"features",void 0),l_([He()],c_.prototype,"channels",void 0),l_([He()],c_.prototype,"selectedMilestone",void 0),l_([He()],c_.prototype,"editingFeatureIds",void 0),l_([He()],c_.prototype,"previewingIds",void 0),c_=l_([Ue("chromedash-enterprise-release-notes-page")],c_);var h_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const u_=/(https?:\/\/wpt\.fyi\/results[^\s?]+)/g,p_=18e5;let f_=class extends ce{constructor(){super(...arguments),this.featureId=0,this.feature=null,this.loading=!1,this.isRequirementsFulfilled=!1,this.completedInThisSession=!1,this.includeExplainer=!1,this._cooldownRemaining=0,this._reportContentChanged=!1,this._pollIntervalId=null,this._cooldownIntervalId=null,this._previousReportContent=null}static get styles(){return[...lo,c` 16227 :host { 16228 display: block; 16229 min-height: 100vh; 16230 background: var(--sl-color-neutral-50); 16231 padding: 2em; 16232 } 16233 16234 h1 { 16235 font-size: 2rem; 16236 font-weight: 300; 16237 margin-bottom: 1.5rem; 16238 padding-bottom: 0.5rem; 16239 } 16240 16241 h2 { 16242 font-size: 1.5rem; 16243 font-weight: 400; 16244 margin-top: 0; 16245 margin-bottom: 1rem; 16246 } 16247 16248 h3 { 16249 margin-top: 1.5em; 16250 } 16251 16252 .experimental-tag { 16253 font-size: 0.6em; 16254 font-weight: normal; 16255 vertical-align: middle; 16256 background: var(--sl-color-neutral-200); 16257 padding: 2px 8px; 16258 border-radius: 12px; 16259 margin-left: 8px; 16260 } 16261 16262 .card { 16263 background: var(--sl-color-neutral-0); 16264 border: 1px solid var(--sl-color-neutral-200); 16265 border-radius: var(--sl-border-radius-medium); 16266 padding: var(--sl-spacing-x-large); 16267 box-shadow: var(--sl-shadow-x-small); 16268 margin-bottom: var(--sl-spacing-large); 16269 } 16270 16271 .description ul { 16272 line-height: 1.6; 16273 } 16274 .description li { 16275 margin-bottom: 0.5em; 16276 } 16277 16278 .requirements-list { 16279 display: flex; 16280 flex-direction: column; 16281 gap: 12px; 16282 } 16283 16284 .requirement-item { 16285 display: flex; 16286 align-items: center; 16287 gap: 12px; 16288 font-size: 16px; 16289 padding: 8px; 16290 border-radius: var(--sl-border-radius-medium); 16291 transition: background 0.2s ease; 16292 } 16293 .requirement-item:hover { 16294 background: var(--sl-color-neutral-50); 16295 } 16296 16297 .requirement-item sl-icon { 16298 font-size: 20px; 16299 flex-shrink: 0; 16300 } 16301 .requirement-item .success { 16302 color: var(--sl-color-success-600); 16303 } 16304 .requirement-item .danger { 16305 color: var(--sl-color-danger-600); 16306 } 16307 16308 .edit-link { 16309 font-size: 0.9em; 16310 margin-left: auto; 16311 padding: 4px 12px; 16312 background: var(--sl-color-primary-50); 16313 border-radius: 12px; 16314 text-decoration: none; 16315 font-weight: 600; 16316 } 16317 .edit-link:hover { 16318 background: var(--sl-color-primary-100); 16319 } 16320 16321 .url-list-container { 16322 margin-left: 44px; 16323 } 16324 .url-list { 16325 list-style: none; 16326 margin: 0; 16327 padding: 12px; 16328 font-size: 0.85em; 16329 background: var(--sl-color-neutral-100); 16330 border-radius: 4px; 16331 border: 1px solid var(--sl-color-neutral-200); 16332 max-height: 150px; 16333 overflow-y: auto; 16334 } 16335 .url-list li { 16336 margin-bottom: 4px; 16337 white-space: nowrap; 16338 overflow: hidden; 16339 text-overflow: ellipsis; 16340 } 16341 .url-list a { 16342 text-decoration: none; 16343 } 16344 .url-list a:hover { 16345 text-decoration: underline; 16346 } 16347 16348 .action-section { 16349 display: flex; 16350 flex-direction: column; 16351 align-items: center; 16352 justify-content: center; 16353 text-align: center; 16354 min-height: 120px; 16355 } 16356 16357 .generate-button { 16358 font-size: 1.1rem; 16359 padding-left: 2rem; 16360 padding-right: 2rem; 16361 } 16362 .generate-button sl-icon { 16363 font-size: 1.3em; 16364 } 16365 16366 .cooldown-message { 16367 margin-top: 12px; 16368 color: var(--sl-color-neutral-600); 16369 font-size: 0.9em; 16370 display: flex; 16371 align-items: center; 16372 gap: 6px; 16373 } 16374 16375 .help-text { 16376 margin-top: 8px; 16377 color: var(--sl-color-neutral-600); 16378 font-size: 0.9rem; 16379 max-width: 400px; 16380 line-height: 1.4; 16381 } 16382 16383 .status-in-progress, 16384 .status-complete { 16385 display: flex; 16386 flex-direction: column; 16387 align-items: center; 16388 gap: 16px; 16389 font-size: 1.1rem; 16390 } 16391 .status-in-progress { 16392 color: var(--sl-color-primary-600); 16393 } 16394 .status-in-progress sl-spinner { 16395 font-size: 3rem; 16396 --track-width: 4px; 16397 } 16398 .status-complete { 16399 color: var(--sl-color-success-700); 16400 } 16401 .status-complete sl-icon { 16402 font-size: 3rem; 16403 color: var(--sl-color-success-600); 16404 } 16405 16406 .report-content { 16407 overflow-wrap: break-word; 16408 line-height: 1.6; 16409 } 16410 .report-content h1, 16411 .report-content h2, 16412 .report-content h3 { 16413 margin-top: 1.5em; 16414 margin-bottom: 0.75em; 16415 color: var(--sl-color-neutral-1000); 16416 } 16417 .report-content *:first-child { 16418 margin-top: 0; 16419 } 16420 .report-content pre { 16421 background: var(--sl-color-neutral-900); 16422 padding: 16px; 16423 border-radius: 6px; 16424 overflow-x: auto; 16425 } 16426 .report-content code { 16427 background: var(--sl-color-neutral-200); 16428 padding: 2px 4px; 16429 border-radius: 4px; 16430 font-size: 0.9em; 16431 font-family: monospace; 16432 } 16433 .report-content pre code { 16434 background: transparent; 16435 padding: 0; 16436 color: inherit; 16437 } 16438 16439 .prewrap { 16440 white-space: pre-wrap; 16441 } 16442 16443 @keyframes fadeIn { 16444 from { 16445 opacity: 0; 16446 transform: translateY(20px); 16447 } 16448 to { 16449 opacity: 1; 16450 transform: translateY(0); 16451 } 16452 } 16453 16454 .fade-in { 16455 animation: fadeIn 0.8s ease-out forwards; 16456 } 16457 .delay-title { 16458 animation-delay: 0.1s; 16459 } 16460 .delay-content { 16461 animation-delay: 0.4s; 16462 } 16463 16464 sl-alert { 16465 margin-bottom: var(--sl-spacing-large); 16466 } 16467 16468 .report-header { 16469 display: flex; 16470 justify-content: space-between; 16471 align-items: center; 16472 margin-bottom: 1rem; 16473 } 16474 .report-header h2 { 16475 margin: 0; 16476 } 16477 16478 .dir-note { 16479 margin-left: 6px; 16480 opacity: 0.75; 16481 font-style: italic; 16482 } 16483 16484 .report-actions { 16485 display: flex; 16486 gap: 12px; 16487 } 16488 `]}async fetchData(){this.feature||(this.loading=!0);try{const e=await window.csClient.getFeature(this.featureId);if(!this.isConnected)return;this.feature=e,this.checkRequirements(),this.managePolling(),this.updateCooldown()}catch(e){if(!this.isConnected)return;Vc("Some errors occurred. Please refresh the page or try again later.")}finally{this.isConnected&&(this.loading=!1)}}willUpdate(e){if(e.has("feature")&&this.feature){const e=this.feature.ai_test_eval_report||null;e&&e!==this._previousReportContent&&(this._reportContentChanged=!0,setTimeout(()=>{this._reportContentChanged=!1},100)),this._previousReportContent=e}}connectedCallback(){super.connectedCallback(),this.fetchData()}disconnectedCallback(){super.disconnectedCallback(),this.stopPolling(),this.stopCooldownTimer()}checkRequirements(){if(!this.feature)return void(this.isRequirementsFulfilled=!1);const e=!!this.feature.spec_link,t=!!this.feature.wpt_descr,i=null!==(this.feature.wpt_descr||"").match(u_);this.isRequirementsFulfilled=e&&t&&i}updateCooldown(){const e=this.feature?.ai_test_eval_run_status;if(e!==Wl.COMPLETE&&e!==Wl.DELETED||!this.feature?.ai_test_eval_status_timestamp)return this._cooldownRemaining=0,void this.stopCooldownTimer();const t=kh(this.feature?.ai_test_eval_status_timestamp);if(t){const e=Date.now()-t;e<p_?(this._cooldownRemaining=p_-e,this.startCooldownTimer()):(this._cooldownRemaining=0,this.stopCooldownTimer())}}startCooldownTimer(){this._cooldownIntervalId||(this._cooldownIntervalId=window.setInterval(()=>{this.updateCooldown()},6e4))}stopCooldownTimer(){this._cooldownIntervalId&&(window.clearInterval(this._cooldownIntervalId),this._cooldownIntervalId=null)}managePolling(){const e=this.feature?.ai_test_eval_run_status;e===Wl.IN_PROGRESS?this.startPolling():(this._pollIntervalId&&e===Wl.COMPLETE&&(this.completedInThisSession=!0),this.stopPolling())}startPolling(){this._pollIntervalId||(this._pollIntervalId=window.setInterval(()=>{this.fetchData()},5e3))}stopPolling(){this._pollIntervalId&&(window.clearInterval(this._pollIntervalId),this._pollIntervalId=null)}async handleGenerateClick(){if(this.isRequirementsFulfilled&&this.feature&&!(this._cooldownRemaining>
164880))try{if(this.feature={...this.feature,ai_test_eval_run_status:Wl.IN_PROGRESS,ai_test_eval_status_timestamp:(new Date).toISOString()},this.completedInThisSession=!1,this.managePolling(),await window.csClient.generateWPTCoverageEvaluation(this.featureId,this.includeExplainer),!this.isConnected)return}catch(e){if(!this.isConnected)return;Vc("Failed to generate report. Please try again later."),this.fetchData()}}async handleCopyReport(){if(this.feature?.ai_test_eval_report)try{await navigator.clipboard.writeText(this.feature.ai_test_eval_report),Vc("Report copied to clipboard.")}catch(e){console.error("Failed to copy text: ",e),Vc("Failed to copy report.")}}async handleDeleteReport(){if(this.feature?.ai_test_eval_report&&window.confirm("Delete this WPT coverage report? This action cannot be undone."))try{await window.csClient.deleteWPTCoverageEvaluation(this.featureId),Vc("Report deleted successfully."),this.fetchData()}catch(e){console.error("Failed to delete report: ",e),Vc("Failed to delete report. Please try again later.")}}renderRequirementItem(e,t,i){const r=e?W`<sl-icon 16489 class="success" 16490 library="material" 16491 name="check_circle_20px" 16492 ></sl-icon>`:W`<sl-icon 16493 library="material" 16494 name="cancel_20px" 16495 class="danger" 16496 style="font-size: 20px" 16497 ></sl-icon>`;return W` 16498 <div class="requirement-item"> 16499 ${r} 16500 <span>${e?`${t} provided`:`Missing ${t}`}</span> 16501 <a 16502 class="edit-link" 16503 href="/guide/editall/${this.featureId}?intent=wpt_eval#${i}" 16504 > 16505 Edit 16506 </a> 16507 </div> 16508 `}_renderPreformattedText(e){return e?W`<div class="url-list prewrap">${e}</div>`:Y}_isDirectoryWptUrl(e){const t=e.split("#")[0].split("?")[0].split("/"),i=t[t.length-1]??"";return!/\.[a-z0-9]{1,6}$/i.test(i)}renderRequirementsChecks(){if(!this.feature)return W`${Y}`;const e=!!this.feature.spec_link,t=!!this.feature.wpt_descr,i=(this.feature.wpt_descr||"").match(u_)||[],r=i.length>0;return W` 16509 <section class="card"> 16510 <h2>Prerequisites Checklist</h2> 16511 <div class="requirements-list"> 16512 <!-- Name and summary are assumed to always be filled -->
16513 ${this.renderRequirementItem(!0,"Feature name","id_name")} 16514 <div class="url-list-container"> 16515 <div class="url-list">${this.feature.name}</div> 16516 </div> 16517 ${this.renderRequirementItem(!0,"Feature summary","id_summary")} 16518 <div class="url-list-container"> 16519 ${this._renderPreformattedText(this.feature.summary)} 16520 </div> 16521 ${this.renderRequirementItem(e,"Spec URL","id_spec_link")} 16522 ${e?W` 16523 <div class="url-list-container"> 16524 <div class="url-list"> 16525 <a 16526 href="${Ht(this.feature.spec_link)}" 16527 target="_blank" 16528 >${this.feature.spec_link}</a 16529 > 16530 </div> 16531 </div> 16532 `:Y} 16533 ${this.renderRequirementItem(t,"WPT description","id_wpt_descr")} 16534 ${t?W` 16535 <div class="url-list-container"> 16536 ${this._renderPreformattedText(this.feature.wpt_descr)} 16537 </div> 16538 `:Y} 16539 ${this.renderRequirementItem(r,"Valid wpt.fyi results URLs","id_wpt_descr")} 16540 ${r?W` 16541 <div class="url-list-container"> 16542 <ul class="url-list"> 16543 ${i.map(e=>{const t=this._isDirectoryWptUrl(e);return W` 16544 <li> 16545 <a href="${e}" target="_blank" title="${e}" 16546 >${e}</a 16547 > 16548 ${t?W`<span class="dir-note" 16549 >(all tests in directory)</span 16550 >`:Y} 16551 </li> 16552 `})} 16553 </ul> 16554 </div> 16555 `:Y} 16556 <div class="requirement-item"> 16557 ${this.includeExplainer?this.feature.explainer_links?.length?W`<sl-icon 16558 class="success" 16559 library="material" 16560 name="check_circle_20px" 16561 ></sl-icon>`:W`<sl-icon 16562 library="material" 16563 name="cancel_20px" 16564 class="danger" 16565 style="font-size: 20px" 16566 ></sl-icon>`:W`<sl-icon 16567 library="material" 16568 name="info_20px" 16569 style="color: var(--sl-color-neutral-600); font-size: 20px" 16570 ></sl-icon>`} 16571 <sl-checkbox 16572 ?checked=${this.includeExplainer} 16573 @sl-change=${e=>this.includeExplainer=e.target.checked} 16574 > 16575 Include feature explainers 16576 ${this.feature.explainer_links?.length?Y:W`<sl-badge variant="neutral" size="small" 16577 >Optional</sl-badge 16578 >`} 16579 </sl-checkbox> 16580 <a 16581 class="edit-link" 16582 href="/guide/editall/${this.featureId}#id_explainer_links" 16583 > 16584 Edit 16585 </a> 16586 </div> 16587 ${this.includeExplainer?W` 16588 <div class="url-list-container"> 16589 <ul class="url-list"> 16590 ${this.feature.explainer_links?.length?this.feature.explainer_links.map(e=>W` 16591 <li> 16592 <a href="${e}" target="_blank">${e}</a> 16593 </li> 16594 `):W`<li> 16595 None provided. Use the "Edit" link above to add 16596 one. 16597 </li>`} 16598 </ul> 16599 </div> 16600 `:Y} 16601 </div> 16602 </section> 16603 `}renderActionSection(){if(!this.feature)return W`${Y}`;const e=this.feature.ai_test_eval_run_status;let t=!1;if(e===Wl.IN_PROGRESS&&this.feature.ai_test_eval_status_timestamp){const e=kh(this.feature.ai_test_eval_status_timestamp);if(e){Date.now()-e>36e5&&(t=!0)}}if(e===Wl.IN_PROGRESS&&!t)return W` 16604 <section class="card action-section"> 16605 <div class="status-in-progress"> 16606 <sl-spinner></sl-spinner>
16607 <span>Analysis in progress... This may take a few minutes.</span> 16608 </div> 16609 </section> 16610 `;if(this.completedInThisSession&&e!==Wl.IN_PROGRESS&&e!==Wl.DELETED)return W` 16611 <section class="card action-section"> 16612 <div class="status-complete fade-in"> 16613 <sl-icon library="material" name="check_circle_20px"></sl-icon> 16614 <span>Analysis complete! The report is available above.</span> 16615 </div> 16616 </section> 16617 `;if(this.completedInThisSession&&e===Wl.DELETED)return W` 16618 <section class="card action-section"> 16619 <div class="status-complete fade-in"> 16620 <sl-icon library="material" name="check_circle_20px"></sl-icon> 16621 <span>Report deleted.</span> 16622 </div> 16623 </section> 16624 `;const i=this._cooldownRemaining>0,r=Math.ceil(this._cooldownRemaining/6e4);let s="Evaluate test coverage";return t?s="Retry analysis (Process timed out)":this.feature.ai_test_eval_report&&(s="Discard this report and reevaluate test coverage"),W` 16625 <section class="card action-section"> 16626 ${e===Wl.FAILED?W` 16627 <sl-alert variant="danger" open> 16628 The previous analysis run failed. Please try again. 16629 </sl-alert> 16630 `:Y} 16631 16632 <sl-button 16633 variant="${this.feature.ai_test_eval_report?"danger":"primary"}" 16634 size="large" 16635 class="generate-button" 16636 ?disabled=${!this.isRequirementsFulfilled||i||this.feature.confidential} 16637 @click=${this.handleGenerateClick} 16638 > 16639 ${s} 16640 </sl-button> 16641 16642 ${this.feature.confidential?W` 16643 <div class="help-text"> 16644 This feature is set to "confidential". The feature's 16645 information cannot be sent to Gemini for evaluation. 16646 </div> 16647 `:Y} 16648 ${t?W` 16649 <div class="help-text"> 16650 The previous analysis seems to be stuck. You can try starting 16651 a new one. 16652 </div> 16653 `:Y} 16654 ${i&&!this.feature.confidential?W` 16655 <div class="cooldown-message"> 16656 <sl-icon name="hourglass-split"></sl-icon> 16657 Available in ${r} 16658 minute${1!==r?"s":""} 16659 </div> 16660 `:Y} 16661 </section> 16662 `}renderReport(){if(!this.feature?.ai_test_eval_report)return W`${Y}`;const e=ml.parse(this.feature.ai_test_eval_report),t=La(window).sanitize(e),i=this._reportContentChanged?"fade-in delay-title":"",r=this._reportContentChanged?"fade-in delay-content":"";return W` 16663 <section class="card report-section"> 16664 <div class="report-header"> 16665 <h2 class="${i}">Analysis Results</h2> 16666 <div class="report-actions"> 16667 <sl-button 16668 variant="danger" 16669 outline 16670 size="small" 16671 @click=${this.handleDeleteReport} 16672 title="Delete report" 16673 > 16674 <sl-icon slot="prefix" name="trash"></sl-icon> 16675 Delete Report 16676 </sl-button> 16677 <sl-button 16678 variant="default" 16679 size="small" 16680 @click=${this.handleCopyReport} 16681 title="Copy report to clipboard" 16682 > 16683 <sl-icon slot="prefix" name="copy"></sl-icon> 16684 Copy Report 16685 </sl-button> 16686 </div> 16687 </div> 16688 <div class="report-content ${r}"> 16689 ${Qs(t)} 16690 </div> 16691 </section> 16692 `}renderSkeletonSection(){return W` 16693 <section class="card"> 16694 <h3><sl-skeleton effect="sheen" style="width: 50%"></sl-skeleton></h3> 16695 <p> 16696 <sl-skeleton effect="sheen"></sl-skeleton> 16697 <sl-skeleton effect="sheen"></sl-skeleton> 16698 <sl-skeleton effect="sheen"></sl-skeleton> 16699 </p> 16700 </section> 16701 `}renderSkeletons(){return W` 16702 <div style="margin-top: 2em;"> 16703 ${this.renderSkeletonSection()} ${this.renderSkeletonSection()} 16704 </div> 16705 `}render(){return W` 16706 <div> 16707 <h1> 16708 AI-powered WPT coverage analysis
16709 <span class="experimental-tag">Experimental</span> 16710 </h1> 16711 16712 <sl-alert variant="primary" open> 16713 <sl-icon slot="icon" library="material" name="info_20px"></sl-icon> 16714 This feature is experimental and reports may be inaccurate. Please 16715 <a 16716 href="https://github.com/GoogleChrome/chromium-dashboard/issues/new?labels=Feedback,WPT-AI" 16717 target="_blank" 16718 >file an issue</a 16719 > 16720 if you have feedback or suggestions. 16721 </sl-alert> 16722 16723 <section class="card description"> 16724 <h2>About</h2> 16725 <p> 16726 Here you can generate an AI-powered test coverage report for your 16727 feature using Gemini. Gemini will analyze your feature's details, 16728 specification, and listed Web Platform Tests to analyze coverage and 16729 suggest additional tests to increase test coverage. 16730 </p> 16731 16732 <h3>Before you begin</h3> 16733 <p> 16734 To ensure an accurate report, please verify the following feature 16735 details: 16736 </p> 16737 <ul> 16738 <li> 16739 <strong>Specification:</strong> A valid Spec URL must be provided. 16740 Although not recommended, this can be provided as a GitHub pull 16741 request URL. 16742 </li> 16743 <li> 16744 <strong>Metadata:</strong> Ensure the feature name and summary are 16745 accurate. These will be used to narrow the scope of the test 16746 coverage requirements. 16747 </li> 16748 <li> 16749 <strong>Explainers (Optional):</strong> You can optionally include 16750 explainer links to provide more context to Gemini. This helps 16751 Gemini understand the intent and design of your feature, which can 16752 lead to more accurate coverage analysis. 16753 </li> 16754 <li> 16755 <strong>Test Results:</strong> Add relevant 16756 <code>wpt.fyi</code> URLs to the 16757 <i>Web Platform Tests</i> description field. 16758 <ul> 16759 <li> 16760 URLs must begin with <code>https://wpt.fyi/results/</code>. 16761 </li> 16762 <li> 16763 Individual test file URLs are accepted (e.g., 16764 <code>dom/historical.html</code>). 16765 </li> 16766 <li> 16767 Directory URLs are accepted, but <strong>only</strong> if 16768 every test in that directory is relevant to your feature. 16769 </li> 16770 <li> 16771 There is a limit of <strong>50 individual test files</strong> 16772 In the Web Platform Tests repository. If more than 50 relevant 16773 test files are found via the listed URLs, the test suite size 16774 is too big for automated test coverage analysis. 16775 </li> 16776 <li> 16777 <em 16778 >Note: Subdirectories within listed directories are not 16779 scanned.</em 16780 > 16781 </li> 16782 </ul> 16783 </li> 16784 </ul> 16785 </section> 16786 16787 ${this.loading?this.renderSkeletons():W` 16788 ${this.renderRequirementsChecks()} ${this.renderReport()} 16789 ${this.renderActionSection()} 16790 `} 16791 </div> 16792 `}};h_([Ve({type:Number})],f_.prototype,"featureId",void 0),h_([He()],f_.prototype,"feature",void 0),h_([He()],f_.prototype,"loading",void 0),h_([He()],f_.prototype,"isRequirementsFulfilled",void 0),h_([He()],f_.prototype,"completedInThisSession",void 0),h_([He()],f_.prototype,"includeExplainer",void 0),h_([He()],f_.prototype,"_cooldownRemaining",void 0),h_([He()],f_.prototype,"_reportContentChanged",void 0),f_=h_([Ue("chromedash-wpt-eval-page")],f_);var m_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let g_=class extends ce{constructor(){super(...arguments),this.currentSummary="",this.suggestedSummary="",this.suggestedDocLinks=[],this.isEditing=!1,this.disabled=!1,this.editBuffer=""}static get styles(){return[...lo,c` 16793 :host { 16794 display: block; 16795 } 16796 16797 .comparison-grid { 16798 display: grid; 16799 grid-template-columns: 1fr 1fr; 16800 gap: var(--sl-spacing-medium); 16801 margin-bottom: var(--sl-spacing-medium); 16802 } 16803 16804 .column-card { 16805 border: 1px solid var(--sl-color-neutral-200); 16806 border-radius: var(--sl-border-radius-medium); 16807 background: var(--sl-color-neutral-50); 16808 display: flex; 16809 flex-direction: column; 16810 overflow: hidden; 16811 } 16812 16813 .column-header { 16814 padding: var(--sl-spacing-small) var(--sl-spacing-medium); 16815 background: var(--sl-color-neutral-100); 16816 border-bottom: 1px solid var(--sl-color-neutral-200);
16817 font-weight: var(--sl-font-weight-semibold); 16818 font-size: var(--sl-font-size-small); 16819 color: var(--sl-color-neutral-700); 16820 display: flex; 16821 align-items: center; 16822 justify-content: space-between; 16823 min-height: 2.25rem; 16824 } 16825 16826 .column-content { 16827 padding: var(--sl-spacing-medium); 16828 font-size: var(--sl-font-size-small); 16829 color: var(--sl-color-neutral-800); 16830 line-height: var(--sl-line-height-normal); 16831 flex-grow: 1; 16832 min-height: 140px; 16833 } 16834 16835 .column-content.empty { 16836 color: var(--sl-color-neutral-400); 16837 font-style: italic; 16838 } 16839 16840 .column-content sl-textarea { 16841 width: 100%; 16842 } 16843 16844 .column-content sl-textarea::part(textarea) { 16845 font-family: inherit; 16846 font-size: var(--sl-font-size-small); 16847 min-height: 140px; 16848 } 16849 16850 .sources-section { 16851 margin-top: var(--sl-spacing-small); 16852 padding-top: var(--sl-spacing-small); 16853 border-top: 1px solid var(--sl-color-neutral-200); 16854 } 16855 16856 .sources-title { 16857 font-weight: var(--sl-font-weight-semibold); 16858 font-size: var(--sl-font-size-x-small); 16859 color: var(--sl-color-neutral-600); 16860 text-transform: uppercase; 16861 letter-spacing: var(--sl-letter-spacing-loose); 16862 margin-bottom: var(--sl-spacing-2x-small); 16863 } 16864 16865 .sources-list { 16866 display: flex; 16867 flex-wrap: wrap; 16868 gap: var(--sl-spacing-2x-small); 16869 list-style: none; 16870 margin: 0; 16871 padding: 0; 16872 } 16873 16874 .source-link { 16875 text-decoration: none; 16876 } 16877 16878 @media (max-width: 768px) { 16879 .comparison-grid { 16880 grid-template-columns: 1fr; 16881 gap: var(--sl-spacing-small); 16882 } 16883 16884 .column-content { 16885 min-height: auto; 16886 padding: var(--sl-spacing-small) var(--sl-spacing-medium); 16887 } 16888 } 16889 `]}willUpdate(e){e.has("suggestedSummary")&&!this.isEditing&&(this.editBuffer=this.suggestedSummary)}async toggleEdit(){this.isEditing&&this.textareaEl&&(this.editBuffer=this.textareaEl.value),this.isEditing=!this.isEditing,this.dispatchEvent(new CustomEvent("summary-edit-toggle",{bubbles:!0,composed:!0,detail:{isEditing:this.isEditing,value:this.editBuffer}})),this.isEditing&&(await this.updateComplete,this.textareaEl?.focus())}_handleInput(e){const t=this.textareaEl?.value??e.target?.value??"";this.editBuffer=t,this.dispatchEvent(new CustomEvent("summary-value-change",{bubbles:!0,composed:!0,detail:{value:this.editBuffer}}))}_renderCurrentSummaryColumn(){return W` 16890 <div 16891 class="column-card" 16892 role="region" 16893 aria-labelledby="current-summary-header" 16894 > 16895 <div class="column-header" id="current-summary-header"> 16896 <span>Current Feature Summary</span> 16897 </div> 16898 <div class="column-content ${this.currentSummary?"":"empty"}"> 16899 ${this.currentSummary?jc(this.currentSummary,[],!0):"(No existing summary)"} 16900 </div> 16901 </div> 16902 `}_renderSuggestedSummaryColumn(){const e=this.editBuffer||this.suggestedSummary;return W` 16903 <div 16904 class="column-card" 16905 role="region" 16906 aria-labelledby="suggested-summary-header" 16907 > 16908 <div class="column-header" id="suggested-summary-header"> 16909 <span>AI Suggested Summary</span> 16910 <sl-button 16911 size="small" 16912 variant="text" 16913 @click=${this.toggleEdit} 16914 ?disabled=${this.disabled} 16915 > 16916 <sl-icon 16917 slot="prefix" 16918 name=${this.isEditing?"eye":"pencil"} 16919 ></sl-icon> 16920 ${this.isEditing?"Preview":"Edit"} 16921 </sl-button> 16922 </div> 16923 <div class="column-content"> 16924 ${this.isEditing?W` 16925 <sl-textarea 16926 .value=${this.editBuffer} 16927 rows="6" 16928 placeholder="Edit summary..." 16929 label="AI Suggested Summary Editor" 16930 ?disabled=${this.disabled}
16931 @input=${this._handleInput} 16932 ></sl-textarea> 16933 `:jc(e,[],!0)} 16934 ${this._renderDocLinks()} 16935 </div> 16936 </div> 16937 `}_renderDocLinks(){return this.suggestedDocLinks&&0!==this.suggestedDocLinks.length?W` 16938 <div class="sources-section"> 16939 <div class="sources-title">Referenced Resources</div> 16940 <ul class="sources-list"> 16941 ${this.suggestedDocLinks.map(e=>W` 16942 <li> 16943 <a 16944 class="source-link" 16945 href="${e}" 16946 target="_blank" 16947 rel="noopener noreferrer" 16948 > 16949 <sl-badge variant="neutral" pill>${e}</sl-badge> 16950 </a> 16951 </li> 16952 `)} 16953 </ul> 16954 </div> 16955 `:Y}render(){return W` 16956 <div class="comparison-grid"> 16957 ${this._renderCurrentSummaryColumn()} 16958 ${this._renderSuggestedSummaryColumn()} 16959 </div> 16960 `}};m_([Ve({type:String})],g_.prototype,"currentSummary",void 0),m_([Ve({type:String})],g_.prototype,"suggestedSummary",void 0),m_([Ve({attribute:!1})],g_.prototype,"suggestedDocLinks",void 0),m_([Ve({type:Boolean})],g_.prototype,"isEditing",void 0),m_([Ve({type:Boolean})],g_.prototype,"disabled",void 0),m_([He()],g_.prototype,"editBuffer",void 0),m_([Ye("sl-textarea")],g_.prototype,"textareaEl",void 0),g_=m_([Ue("chromedash-summary-diff-view")],g_);var b_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let v_=class extends ce{constructor(){super(...arguments),this.featureId=0,this.currentSummary="",this.suggestion=null,this.editedSummary="",this.isEditing=!1,this.loading=!1,this.occConflict=!1,this.newerSuggestionAvailable=!1,this.errorMessage=null}static get styles(){return[...lo,c` 16961 sl-dialog { 16962 --width: min(900px, 95vw); 16963 } 16964 16965 sl-alert { 16966 margin-bottom: var(--sl-spacing-medium); 16967 } 16968 16969 .dialog-footer { 16970 display: flex; 16971 align-items: center; 16972 justify-content: space-between; 16973 gap: var(--sl-spacing-small); 16974 width: 100%; 16975 } 16976 16977 .footer-left { 16978 display: flex; 16979 align-items: center; 16980 gap: var(--sl-spacing-x-small); 16981 } 16982 16983 .footer-right { 16984 display: flex; 16985 align-items: center; 16986 gap: var(--sl-spacing-small); 16987 } 16988 16989 @media (max-width: 768px) { 16990 .dialog-footer { 16991 flex-direction: column-reverse; 16992 align-items: stretch; 16993 gap: var(--sl-spacing-medium); 16994 } 16995 16996 .footer-left, 16997 .footer-right { 16998 width: 100%; 16999 display: flex; 17000 flex-wrap: wrap; 17001 gap: var(--sl-spacing-small); 17002 } 17003 17004 .footer-left sl-button { 17005 width: 100%; 17006 } 17007 17008 .footer-right sl-button { 17009 flex: 1 1 110px; 17010 min-width: 0; 17011 } 17012 } 17013 `]}show(){this.dialogEl?.show()}hide(){this.dialogEl?.hide()}willUpdate(e){if(e.has("suggestion")){const e=this.suggestion?.suggested_summary||"";this.isEditing&&this.editedSummary!==e?this.newerSuggestionAvailable=!0:(this.editedSummary=e,this.isEditing=!1,this.newerSuggestionAvailable=!1,this.occConflict=!1,this.errorMessage=null)}}handleLoadNewestSuggestion(){this.editedSummary=this.suggestion?.suggested_summary||"",this.isEditing=!1,this.newerSuggestionAvailable=!1}handleDismissNewerSuggestion(){this.newerSuggestionAvailable=!1}async applySuggestion(e,t){return window.csClient.updateSummarySuggestion(e,t)}async rejectSuggestion(e,t){return window.csClient.updateSummarySuggestion(e,t)}async fetchSuggestion(e){return window.csClient.getSummarySuggestion(e)}async triggerRegeneration(e,t){return window.csClient.triggerSummaryGeneration(e,t)}async handleAccept(){if(this.featureId&&"number"==typeof this.suggestion?.version_token&&!this.loading)try{this.loading=!0,this.errorMessage=null,this.occConflict=!1;const e={status:i.APPLIED,suggested_summary:this.editedSummary,version_token:this.suggestion.version_token},t=await this.applySuggestion(this.featureId,e);this.dispatchEvent(new CustomEvent("summary-suggestion-applied",{bubbles:!0,composed:!0,detail:{featureId:this.featureId,summary:this.editedSummary,response:t}})),Vc("AI summary applied successfully."),this.hide()}catch(e){this._handleApiError(e)}finally{this.loading=!1}}async handleReject(){if(this.featureId&&"number"==typeof this.suggestion?.version_token&&!this.loading)try{this.loading=!0,this.errorMessage=null,this.occConflict=!1;const e={status:i.REJECTED,version_token:this.suggestion.version_token},t=await this.rejectSuggestion(this.featureId,e);this.dispatchEvent(new CustomEvent("summary-suggestion-rejected",{bubbles:!0,composed:!0,detail:{featureId:this.featureId,response:t}})),Vc("AI summary discarded."),this.hide()}catch(e){this._handleApiError(e)}finally{this.loading=!1}}async handleRegenerate(){if(this.featureId&&!this.loading)try{this.loading=!0,this.errorMessage=null,this.occConflict=!1,await this.triggerRegeneration(this.featureId,!0),this.dispatchEvent(new CustomEvent("summary-generation-requested",{bubbles:!0,composed:!0,detail:{featureId:this.featureId,force:!0}}
17013)),Vc("Summary regeneration enqueued."),this.hide()}catch(e){this._handleApiError(e)}finally{this.loading=!1}}async handleRefresh(){if(this.featureId&&!this.loading)try{this.loading=!0,this.errorMessage=null,this.occConflict=!1,this.newerSuggestionAvailable=!1;const e=await this.fetchSuggestion(this.featureId);this.suggestion=e.suggestion??null,this.editedSummary=this.suggestion?.suggested_summary||"",this.isEditing=!1}catch(e){this._handleApiError(e)}finally{this.loading=!1}}_handleApiError(e){if(e instanceof t&&409===e.status)this.occConflict=!0,this.errorMessage="This suggestion was modified in another session. Please refresh to view the latest version.";else{const t=e instanceof Error?e:new Error(String(e));this.errorMessage=t.message||"An unexpected error occurred."}}_renderAlertBanner(){return this.occConflict?W` 17014 <sl-alert variant="warning" open> 17015 <sl-icon slot="icon" name="exclamation-triangle"></sl-icon> 17016 <span>${this.errorMessage}</span> 17017 <sl-button 17018 size="small" 17019 variant="text" 17020 @click=${this.handleRefresh} 17021 ?disabled=${this.loading} 17022 > 17023 Refresh 17024 </sl-button> 17025 </sl-alert> 17026 `:this.newerSuggestionAvailable?W` 17027 <sl-alert variant="primary" open> 17028 <sl-icon slot="icon" name="info-circle"></sl-icon> 17029 <span>A newer suggestion is available on the server.</span> 17030 <sl-button 17031 size="small" 17032 variant="text" 17033 @click=${this.handleLoadNewestSuggestion} 17034 > 17035 Load Newest 17036 </sl-button> 17037 <sl-button 17038 size="small" 17039 variant="text" 17040 @click=${this.handleDismissNewerSuggestion} 17041 > 17042 Keep My Edits 17043 </sl-button> 17044 </sl-alert> 17045 `:this.errorMessage?W` 17046 <sl-alert variant="danger" open> 17047 <sl-icon slot="icon" name="exclamation-octagon"></sl-icon> 17048 <span>${this.errorMessage}</span> 17049 </sl-alert> 17050 `:Y}_renderFooter(){const e=this.loading||!this.suggestion||"number"!=typeof this.suggestion.version_token||this.occConflict,t=this.loading||!this.suggestion||"number"!=typeof this.suggestion.version_token;return W` 17051 <div slot="footer" class="dialog-footer"> 17052 <div class="footer-left"> 17053 <sl-button 17054 variant="default" 17055 size="small" 17056 @click=${this.handleRegenerate} 17057 ?loading=${this.loading} 17058 ?disabled=${this.loading} 17059 > 17060 <sl-icon slot="prefix" name="arrow-clockwise"></sl-icon> 17061 Regenerate 17062 </sl-button> 17063 </div> 17064 <div class="footer-right"> 17065 <sl-button 17066 variant="default" 17067 size="small" 17068 @click=${this.hide} 17069 ?disabled=${this.loading} 17070 > 17071 Cancel 17072 </sl-button> 17073 <sl-button 17074 variant="danger" 17075 size="small" 17076 @click=${this.handleReject} 17077 ?loading=${this.loading} 17078 ?disabled=${t} 17079 > 17080 Discard 17081 </sl-button> 17082 <sl-button 17083 variant="primary" 17084 size="small" 17085 @click=${this.handleAccept} 17086 ?loading=${this.loading} 17087 ?disabled=${e} 17088 > 17089 Accept & Apply 17090 </sl-button> 17091 </div> 17092 </div> 17093 `}render(){return W` 17094 <sl-dialog label="Review AI Summary Suggestion"> 17095 ${this._renderAlertBanner()} 17096 17097 <chromedash-summary-diff-view 17098 .currentSummary=${this.currentSummary} 17099 .suggestedSummary=${this.editedSummary} 17100 .suggestedDocLinks=${this.suggestion?.suggested_doc_links??[]} 17101 .isEditing=${this.isEditing} 17102 .disabled=${this.loading} 17103 @summary-edit-toggle=${e=>{this.isEditing=e.detail.isEditing,this.editedSummary=e.detail.value}} 17104 @summary-value-change=${e=>{this.editedSummary=e.detail.value}} 17105 ></chromedash-summary-diff-view> 17106 17107 ${this._renderFooter()} 17108 </sl-dialog> 17109 `}};b_([Ve({type:Number})],v_.prototype,"featureId",void 0),b_([Ve({type:String})],v_.prototype,"currentSummary",void 0),b_([Ve({attribute:!1})],v_.prototype,"suggestion",void 0),b_([He()],v_.prototype,"editedSummary",void 0),b_([He()],v_.prototype,"isEditing",void 0),b_([He()],v_.prototype,"loading",void 0),b_([He()],v_.prototype,"occConflict",void 0),b_([He()],v_.prototype,"newerSuggestionAvailable",void 0),b_([He()],v_.prototype,"errorMessage",void 0),b_([Ye("sl-dialog")],v_.prototype,"dialogEl",void 0),v_=b_([Ue("chromedash-summary-review-dialog")],v_);var y_=function(e,t,i,r){var s,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const __={[s.BUG]:"Tracking bug",[s.CHROMESTATUS]:"ChromeStatus",[s.SPEC]:"Spec",[s.ORIGIN_TRIAL]:"Origin trial",[s.DOC]:"Docs",[s.EXPLAINER]:"Explainer",[s.DEMO]:"Demo",[s.OTHER]:"Resource"};let w_=class extends ce{constructor(){super(...arguments),this.feature=null,this.suggestion=null,this.reviewMode=!1,this.isCopied=!1}disconnectedCallback(){super.disconnectedCallback(),this._copiedTimeout&&(clearTimeout(this._copiedTimeout),this._copiedTimeout=void 0)}static get styles(){return[...lo,c` 17110 :host { 17111 display: block; 17112 } 17113 17114 .feature-card { 17115 border: var(--card-border); 17116 border-radius: var(--border-radius);
17117 box-shadow: var(--card-box-shadow); 17118 padding: var(--content-padding); 17119 background-color: var(--card-background); 17120 display: flex; 17121 flex-direction: column; 17122 gap: var(--content-padding-half); 17123 scroll-margin-top: 5rem; 17124 transition: 17125 box-shadow 0.15s ease, 17126 border-color 0.15s ease; 17127 } 17128 17129 .feature-card:hover { 17130 box-shadow: var(--sl-shadow-medium, 0 4px 12px rgba(0, 0, 0, 0.08)); 17131 } 17132 17133 .card-header { 17134 display: flex; 17135 align-items: flex-start; 17136 justify-content: space-between; 17137 flex-wrap: wrap; 17138 gap: var(--content-padding-half); 17139 } 17140 17141 .title-wrapper { 17142 display: flex; 17143 align-items: center; 17144 gap: var(--content-padding-quarter); 17145 flex-wrap: wrap; 17146 } 17147 17148 .feature-title { 17149 font-size: var(--sl-font-size-large, 1.25rem); 17150 font-weight: 600; 17151 margin: 0; 17152 line-height: 1.3; 17153 overflow-wrap: break-word; 17154 } 17155 17156 .feature-name { 17157 color: var(--link-color, #1a73e8); 17158 text-decoration: none; 17159 } 17160 17161 .feature-name:hover { 17162 text-decoration: underline; 17163 } 17164 17165 .heading-anchor-link { 17166 opacity: 0; 17167 display: inline-flex; 17168 align-items: center; 17169 justify-content: center; 17170 min-width: 1.5rem; 17171 min-height: 1.5rem; 17172 padding: 2px; 17173 border-radius: var(--border-radius); 17174 color: var(--unimportant-text-color); 17175 text-decoration: none; 17176 position: relative; 17177 transition: 17178 opacity 0.15s ease, 17179 background-color 0.15s ease; 17180 } 17181 17182 .feature-card:hover .heading-anchor-link, 17183 .heading-anchor-link:focus-visible { 17184 opacity: 1; 17185 } 17186 17187 .heading-anchor-link:hover { 17188 background-color: var(--light-accent-color); 17189 color: var(--default-color); 17190 } 17191 17192 .heading-anchor-link:focus-visible { 17193 background-color: var(--light-accent-color); 17194 color: var(--default-color); 17195 outline: 2px solid var(--primary-button-background); 17196 outline-offset: 2px; 17197 } 17198 17199 @media (hover: none) { 17200 .heading-anchor-link { 17201 opacity: 0.6; 17202 min-width: 2rem; 17203 min-height: 2rem; 17204 } 17205 } 17206 17207 .anchor-tooltip { 17208 position: absolute; 17209 bottom: calc(100% + var(--content-padding-quarter)); 17210 left: 50%; 17211 transform: translateX(-50%); 17212 background-color: var(--toast-background, #323232); 17213 color: var(--toast-color, #fff); 17214 font-size: var(--button-small-font-size, 0.75rem); 17215 padding: 4px 8px; 17216 border-radius: var(--border-radius); 17217 white-space: nowrap; 17218 pointer-events: none; 17219 opacity: 0; 17220 transition: 17221 opacity 0.2s ease, 17222 transform 0.2s ease; 17223 z-index: 10; 17224 } 17225 17226 .heading-anchor-link.copied .anchor-tooltip { 17227 opacity: 1; 17228 transform: translateX(-50%) translateY(-2px); 17229 } 17230 17231 .badges-wrapper { 17232 display: flex; 17233 align-items: center; 17234 gap: var(--sl-spacing-2x-small); 17235 flex-wrap: wrap; 17236 } 17237 17238 .feature-summary { 17239 line-height: 1.5; 17240 color: var(--default-color); 17241 overflow-wrap: break-word; 17242 } 17243 17244 .feature-summary p { 17245 margin: 0 0 var(--content-padding-half) 0; 17246 } 17247 17248 .feature-summary p:last-child { 17249 margin-bottom: 0; 17250 } 17251 17252 .feature-summary code { 17253 font-family: monospace; 17254 background-color: var(--light-accent-color); 17255 padding: 2px 4px; 17256 border-radius: var(--border-radius); 17257 border: var(--default-border); 17258 } 17259 17260 .feature-summary a { 17261 text-decoration: underline; 17262 text-underline-offset: 2px; 17263 } 17264 17265 .feature-links-bar { 17266 display: flex; 17267 flex-wrap: wrap; 17268 align-items: center; 17269 gap: var(--content-padding-quarter) var(--content-padding-half); 17270 border-top: var(--default-border); 17271 padding-top: var(--content-padding-half); 17272 margin-top: auto; 17273 font-size: var(--button-font-size, 0.875rem); 17274 } 17275 17276 .feature-links-bar a { 17277 text-decoration: underline; 17278 text-underline-offset: 2px; 17279 } 17280 17281 .link-separator { 17282 color: var(--sl-color-neutral-400); 17283 user-select: none; 17284 } 17285 17286 .feature-link-item { 17287 display: inline-flex; 17288 align-items: center; 17289 gap: var(--content-padding-quarter); 17290 max-width: 100%; 17291 text-decoration: underline; 17292 text-underline-offset: 2px; 17293 min-width: 0; 17294 } 17295 17296 .doc-link-text { 17297 overflow: hidden; 17298 text-overflow: ellipsis; 17299 white-space: nowrap; 17300 min-width: 0; 17301 } 17302 17303 .sr-only { 17304 position: absolute; 17305 width: 1px; 17306 height: 1px; 17307 padding: 0; 17308 margin: -1px; 17309 overflow: hidden; 17310 clip: rect(0, 0, 0, 0); 17311 white-space: nowrap; 17312 border: 0; 17313 } 17314 17315 .external-icon { 17316 font-size: var(--button-font-size, 0.875rem); 17317 line-height: 1; 17318 } 17319 17320 .card-actions { 17321 display: flex; 17322 align-items: center; 17323 justify-content: space-between; 17324 flex-wrap: wrap; 17325 gap: var(--sl-spacing-small); 17326 border-top: var(--default-border); 17327 padding-top: var(--content-padding-half); 17328 } 17329 17330 .action-buttons { 17331 display: flex; 17332 align-items: center; 17333 gap: var(--sl-spacing-small); 17334 } 17335 17336 .suggestion-meta { 17337 display: flex; 17338 align-items: center; 17339 gap: var(--sl-spacing-x-small); 17340 font-size: var(--button-small-font-size, 0.875rem); 17341 color: var(--unimportant-text-color); 17342 } 17343 `]}async handleAnchorCopy(e){const t=this.feature;if(!t)return;const i=`#feature-${t.id}`,r=new URL(i,window.location.href).href;if(navigator.clipboard&&navigator.clipboard.writeText){e.preventDefault();try{await navigator.clipboard.writeText(r),this._copiedTimeout&&clearTimeout(this._copiedTimeout),this.isCopied=!0,this._copiedTimeout=setTimeout(()=>{this.isCopied=!1,this._copiedTimeout=void 0},2e3)}catch(e){console.warn("Could not copy anchor link to clipboard:",e),window.location.hash=i}}}handleReviewClick(){this.dispatchEvent(new CustomEvent("review-click",{detail:{feature:this.feature,featureId:this.feature?.id,suggestion:this.suggestion??null},bubbles:!0,composed:!0}))}handleGenerateClick(){this.dispatchEvent(new CustomEvent("generate-click",{detail:{feature:this.feature,featureId:this.feature?.id,suggestion:this.suggestion??null},bubbles:!0,composed:!0}))}renderCategoryBadge(){const e=this.feature;if(!e)return Y;let t=e.category_name?.trim();if(!t&&"number"==typeof e.category){const i=e.category,r=Object.values(Dl).find(e=>e[0]===i);t=r?r[1]:void 0}return t?W`<sl-badge variant="neutral" pill>${t}</sl-badge>`:Y}renderProvenanceBadge(){const e=this.feature;return e?e.summary_source===r.AI_APPLIED?W`<sl-badge variant="success" pill>AI Applied</sl-badge>`:W`<sl-badge variant="neutral" pill>Human Authored</sl-badge>`:Y}renderReviewBadge(){return this.suggestion&&this.suggestion.status===i.PENDING?W`<sl-badge variant="warning" pill 17344 >AI Review Pending</sl-badge 17345 >`:Y}renderDocLinks(){const e=this.feature;if(!e)return Y;const t=function(e,t){const i=[],r=new Set;function o(e,t=s.DOC,o){const a=e?.trim();a&&!r.has(a)&&(r.add(a),i.push({url:a,type:t,title:o?.trim()}))}if(Array.isArray(e.links)&&e.links.length>0)for(const t of e.links)o(t.url,t.type,t.title);else{if(Array.isArray(e.doc_links))for(const t of e.doc_links)o(t,s.DOC);if(e.spec_link&&o(e.spec_link,s.SPEC),Array.isArray(e.explainer_links))for(const t of e.explainer_links)o(t,s.EXPLAINER)}if(Array.isArray(t?.suggested_doc_links))for(const e of t.suggested_doc_links)o(e,s.DOC);return i}(e,this.suggestion);return 0===t.length?Y:W` 17346 <div 17347 class="feature-links-bar" 17348 aria-label="Feature metadata and resources" 17349 > 17350 ${t.map((e,t)=>{const i=!(e.url.startsWith("/")&&!e.url.startsWith("//")||e.url.startsWith("#")),r=e.title?.trim(),s=r||__[e.type]||e.url;return W` 17351 ${t>0?W`<span class="link-separator" aria-hidden="true">|</span>`:Y} 17352 <a 17353 class="feature-link-item" 17354 href=${e.url} 17355 target=${i?"_blank":"_self"} 17356 rel=${i?"noopener noreferrer":""} 17357 title=${e.url} 17358 >
17359 <span class="doc-link-text">${s}</span> 17360 ${i?W`<span aria-hidden="true" class="external-icon">â</span 17361 ><span class="sr-only">(opens in new window)</span>`:Y} 17362 </a> 17363 `})} 17364 </div> 17365 `}renderPrimaryReviewButton(e){return e?W` 17366 <sl-button 17367 size="small" 17368 variant="primary" 17369 class="review-button" 17370 @click=${this.handleReviewClick} 17371 > 17372 <sl-icon slot="prefix" name="pencil"></sl-icon> 17373 Review Suggestion 17374 </sl-button> 17375 `:W` 17376 <sl-button 17377 size="small" 17378 variant="default" 17379 class="review-button" 17380 @click=${this.handleReviewClick} 17381 > 17382 <sl-icon slot="prefix" name="eye"></sl-icon> 17383 Inspect / Edit 17384 </sl-button> 17385 `}renderGenerateButton(e){const t=e?"Regenerate":"Generate AI Summary";return W` 17386 <sl-button 17387 size="small" 17388 variant="default" 17389 class="generate-button" 17390 @click=${this.handleGenerateClick} 17391 > 17392 <sl-icon slot="prefix" name="arrow-clockwise"></sl-icon> 17393 ${t} 17394 </sl-button> 17395 `}renderReasoningMeta(){const e=this.suggestion?.reasoning?.trim();return e?W` 17396 <div class="suggestion-meta"> 17397 <sl-tooltip content=${e}> 17398 <sl-icon 17399 tabindex="0" 17400 name="info-circle" 17401 aria-label="Summary reasoning details" 17402 ></sl-icon> 17403 </sl-tooltip> 17404 <span>Grounding available</span> 17405 </div> 17406 `:Y}renderReviewActions(){if(!this.reviewMode||!this.feature)return Y;const e=this.suggestion?.status===i.PENDING;return W` 17407 <div class="card-actions"> 17408 <div class="action-buttons"> 17409 ${this.renderPrimaryReviewButton(e)} 17410 ${this.renderGenerateButton(e)} 17411 </div> 17412 ${this.renderReasoningMeta()} 17413 </div> 17414 `}renderFeatureSummary(){const e=this.feature;if(!e||!e.summary?.trim())return Y;const t=Boolean(e.markdown_fields?.includes("summary")),i=jc(e.summary,[],t);return W` 17415 <div class="feature-summary ${t?"":"preformatted"}"> 17416 ${i} 17417 </div> 17418 `}render(){const e=this.feature;return e?W` 17419 <article 17420 class="feature-card" 17421 id="feature-${e.id}" 17422 aria-labelledby="feature-title-${e.id}" 17423 > 17424 <header class="card-header"> 17425 <div class="title-wrapper"> 17426 <h3 class="feature-title" id="feature-title-${e.id}"> 17427 <a class="feature-name" href="/feature/${e.id}"> 17428 ${e.name} 17429 </a> 17430 </h3> 17431 <a 17432 class="heading-anchor-link ${this.isCopied?"copied":""}" 17433 href="#feature-${e.id}" 17434 aria-label=${this.isCopied?`Link to ${e.name} copied to clipboard`:`Copy link to ${e.name}`} 17435 title="Copy link to feature" 17436 data-anchor="#feature-${e.id}" 17437 @click=${this.handleAnchorCopy} 17438 > 17439 <span aria-hidden="true">#</span> 17440 <span class="anchor-tooltip" role="status" aria-live="polite"> 17441 ${this.isCopied?"Link copied!":"Copy link"} 17442 </span> 17443 </a> 17444 </div> 17445 17446 <div class="badges-wrapper"> 17447 ${this.renderCategoryBadge()} ${this.renderProvenanceBadge()} 17448 ${this.renderReviewBadge()} 17449 </div> 17450 </header> 17451 17452 ${this.renderFeatureSummary()} ${this.renderDocLinks()} 17453 ${this.renderReviewActions()} 17454 </article> 17455 `:Y}};var k_,x_;y_([Ve({attribute:!1})],w_.prototype,"feature",void 0),y_([Ve({attribute:!1})],w_.prototype,"suggestion",void 0),y_([Ve({type:Boolean})],w_.prototype,"reviewMode",void 0),y_([Ve({type:Number})],w_.prototype,"milestone",void 0),y_([He()],w_.prototype,"isCopied",void 0),w_=y_([Ue("chromedash-release-feature-card")],w_),ht("/static/shoelace"),x_={resolver:e=>`/static/shoelace/assets/material-icons/${e}.svg`,mutator:e=>e.setAttribute("fill","currentColor")},function(e){mt=mt.filter(t=>t.name!==e)}(k_="material"),mt.push({name:k_,resolver:x_.resolver,mutator:x_.mutator,spriteSheet:x_.spriteSheet}
17455),gt.forEach(e=>{e.library===k_&&e.setIcon()});//# sourceMappingURL=components.js.map
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.