@aurodesignsystem/auro-formkit 6.2.1 → 6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/components/bibtemplate/dist/index.js +9 -7
  3. package/components/bibtemplate/dist/registered.js +9 -7
  4. package/components/checkbox/demo/customize.min.js +8 -4
  5. package/components/checkbox/demo/demo-support.min.js +1303 -643
  6. package/components/checkbox/demo/getting-started.min.js +8 -4
  7. package/components/checkbox/demo/index.min.js +8 -4
  8. package/components/checkbox/dist/index.js +7 -3
  9. package/components/checkbox/dist/registered.js +7 -3
  10. package/components/combobox/demo/customize.min.js +516 -193
  11. package/components/combobox/demo/demo-support.min.js +1303 -643
  12. package/components/combobox/demo/getting-started.min.js +516 -193
  13. package/components/combobox/demo/index.min.js +516 -193
  14. package/components/combobox/dist/auro-combobox.d.ts +14 -0
  15. package/components/combobox/dist/index.js +421 -178
  16. package/components/combobox/dist/registered.js +421 -178
  17. package/components/counter/demo/api.md +0 -1
  18. package/components/counter/demo/customize.md +4 -4
  19. package/components/counter/demo/customize.min.js +341 -182
  20. package/components/counter/demo/demo-support.min.js +1303 -643
  21. package/components/counter/demo/getting-started.min.js +341 -182
  22. package/components/counter/demo/index.min.js +341 -182
  23. package/components/counter/dist/auro-counter-group.d.ts +0 -7
  24. package/components/counter/dist/index.js +339 -180
  25. package/components/counter/dist/registered.js +339 -180
  26. package/components/datepicker/demo/customize.min.js +425 -192
  27. package/components/datepicker/demo/demo-support.min.js +1303 -643
  28. package/components/datepicker/demo/getting-started.min.js +425 -192
  29. package/components/datepicker/demo/index.min.js +425 -192
  30. package/components/datepicker/dist/index.js +423 -190
  31. package/components/datepicker/dist/registered.js +423 -190
  32. package/components/dropdown/demo/customize.min.js +313 -154
  33. package/components/dropdown/demo/demo-support.min.js +1303 -643
  34. package/components/dropdown/demo/getting-started.min.js +375 -168
  35. package/components/dropdown/demo/index.min.js +313 -154
  36. package/components/dropdown/dist/index.js +311 -152
  37. package/components/dropdown/dist/registered.js +311 -152
  38. package/components/form/demo/customize.min.js +1702 -763
  39. package/components/form/demo/demo-support.min.js +1303 -643
  40. package/components/form/demo/getting-started.min.js +1702 -763
  41. package/components/form/demo/index.min.js +1702 -763
  42. package/components/form/demo/registerDemoDeps.min.js +1702 -763
  43. package/components/input/demo/customize.min.js +64 -16
  44. package/components/input/demo/demo-support.min.js +1303 -643
  45. package/components/input/demo/getting-started.min.js +64 -16
  46. package/components/input/demo/index.min.js +64 -16
  47. package/components/input/dist/auro-input.d.ts +14 -0
  48. package/components/input/dist/index.js +62 -14
  49. package/components/input/dist/registered.js +62 -14
  50. package/components/menu/demo/api.md +1 -1
  51. package/components/menu/demo/demo-support.min.js +1303 -643
  52. package/components/menu/demo/index.min.js +93 -13
  53. package/components/menu/dist/auro-menu-utils.d.ts +15 -2
  54. package/components/menu/dist/auro-menu.d.ts +1 -1
  55. package/components/menu/dist/index.js +92 -12
  56. package/components/menu/dist/registered.js +92 -12
  57. package/components/radio/demo/customize.min.js +8 -4
  58. package/components/radio/demo/demo-support.min.js +1303 -643
  59. package/components/radio/demo/getting-started.min.js +8 -4
  60. package/components/radio/demo/index.min.js +8 -4
  61. package/components/radio/dist/index.js +7 -3
  62. package/components/radio/dist/registered.js +7 -3
  63. package/components/select/demo/customize.min.js +433 -187
  64. package/components/select/demo/demo-support.min.js +1303 -643
  65. package/components/select/demo/getting-started.min.js +433 -187
  66. package/components/select/demo/index.min.js +433 -187
  67. package/components/select/dist/index.js +339 -173
  68. package/components/select/dist/registered.js +339 -173
  69. package/custom-elements.json +7551 -7498
  70. package/package.json +56 -56
@@ -30,7 +30,7 @@ function customExample() {
30
30
  * Copyright 2017 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
32
  */
33
- const t$2=globalThis,i$5=t=>t,s$4=t$2.trustedTypes,e$6=s$4?s$4.createPolicy("lit-html",{createHTML:t=>t}):void 0,h$3="$lit$",o$7=`lit$${Math.random().toFixed(9).slice(2)}$`,n$5="?"+o$7,r$4=`<${n$5}>`,l$2=document,c$3=()=>l$2.createComment(""),a$2=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u$3=Array.isArray,d$1=t=>u$3(t)||"function"==typeof t?.[Symbol.iterator],f$3="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$1=/-->/g,m$1=/>/g,p$2=RegExp(`>|${f$3}(?:([^\\s"'>=/]+)(${f$3}*=${f$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g$1=/'/g,$=/"/g,y$2=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$1=x(1),E$1=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l$2.createTreeWalker(l$2,129);function V(t,i){if(!u$3(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$6?e$6.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_$1:void 0!==u[1]?c=m$1:void 0!==u[2]?(y$2.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p$2):void 0!==u[3]&&(c=p$2):c===p$2?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p$2:'"'===u[3]?$:g$1):c===$||c===g$1?c=p$2:c===_$1||c===m$1?c=v:(c=p$2,n=void 0);const x=c===p$2&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r$4:d>=0?(e.push(a),s.slice(0,d)+h$3+s.slice(d)+o$7+x):s+o$7+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};let S$1 = class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h$3)){const i=v[a++],s=r.getAttribute(t).split(o$7),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z$1:H}),r.removeAttribute(t);}else t.startsWith(o$7)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y$2.test(r.tagName)){const t=r.textContent.split(o$7),i=t.length-1;if(i>0){r.textContent=s$4?s$4.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c$3()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c$3());}}}else if(8===r.nodeType)if(r.data===n$5)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$7,t+1));)d.push({type:7,index:l}),t+=o$7.length-1;}l++;}}static createElement(t,i){const s=l$2.createElement("template");return s.innerHTML=t,s}};function M$1(t,i,s=t,e){if(i===E$1)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a$2(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M$1(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l$2).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k$1(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l$2,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}let k$1 = class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M$1(this,t,i),a$2(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E$1&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==A&&a$2(this._$AH)?this._$AA.nextSibling.data=t:this.T(l$2.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S$1.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S$1(t)),i}k(t){u$3(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c$3()),this.O(c$3()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$5(t).nextSibling;i$5(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M$1(this,t,i,0),o=!a$2(t)||t!==this._$AH&&t!==E$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M$1(this,e[s+n],i,n),r===E$1&&(r=this._$AH[n]),o||=!a$2(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class I extends H{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}class L extends H{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A);}}let z$1 = class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M$1(this,t,i,0)??A)===E$1)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M$1(this,t);}}const B=t$2.litHtmlPolyfillSupport;B?.(S$1,k$1),(t$2.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k$1(i.insertBefore(c$3(),t),t,void 0,s??{});}return h._$AI(t),h};
33
+ const t$2=globalThis,i$5=t=>t,s$4=t$2.trustedTypes,e$6=s$4?s$4.createPolicy("lit-html",{createHTML:t=>t}):void 0,h$3="$lit$",o$7=`lit$${Math.random().toFixed(9).slice(2)}$`,n$5="?"+o$7,r$4=`<${n$5}>`,l$2=document,c$3=()=>l$2.createComment(""),a$2=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u$3=Array.isArray,d$1=t=>u$3(t)||"function"==typeof t?.[Symbol.iterator],f$3="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$1=/-->/g,m$1=/>/g,p$2=RegExp(`>|${f$3}(?:([^\\s"'>=/]+)(${f$3}*=${f$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g$1=/'/g,$=/"/g,y$2=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$1=x(1),E$1=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l$2.createTreeWalker(l$2,129);function V(t,i){if(!u$3(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$6?e$6.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_$1:void 0!==u[1]?c=m$1:void 0!==u[2]?(y$2.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p$2):void 0!==u[3]&&(c=p$2):c===p$2?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p$2:'"'===u[3]?$:g$1):c===$||c===g$1?c=p$2:c===_$1||c===m$1?c=v:(c=p$2,n=void 0);const x=c===p$2&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r$4:d>=0?(e.push(a),s.slice(0,d)+h$3+s.slice(d)+o$7+x):s+o$7+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};let S$1 = class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h$3)){const i=v[a++],s=r.getAttribute(t).split(o$7),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z$1:H}),r.removeAttribute(t);}else t.startsWith(o$7)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y$2.test(r.tagName)){const t=r.textContent.split(o$7),i=t.length-1;if(i>0){r.textContent=s$4?s$4.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c$3()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c$3());}}}else if(8===r.nodeType)if(r.data===n$5)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$7,t+1));)d.push({type:7,index:l}),t+=o$7.length-1;}l++;}}static createElement(t,i){const s=l$2.createElement("template");return s.innerHTML=t,s}};function M$1(t,i,s=t,e){if(i===E$1)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a$2(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M$1(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l$2).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k$1(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l$2,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}let k$1 = class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M$1(this,t,i),a$2(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E$1&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==A&&a$2(this._$AH)?this._$AA.nextSibling.data=t:this.T(l$2.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S$1.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S$1(t)),i}k(t){u$3(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c$3()),this.O(c$3()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$5(t).nextSibling;i$5(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M$1(this,t,i,0),o=!a$2(t)||t!==this._$AH&&t!==E$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M$1(this,e[s+n],i,n),r===E$1&&(r=this._$AH[n]),o||=!a$2(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class I extends H{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}class L extends H{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A);}}let z$1 = class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M$1(this,t,i,0)??A)===E$1)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M$1(this,t);}}const B=t$2.litHtmlPolyfillSupport;B?.(S$1,k$1),(t$2.litHtmlVersions??=[]).push("3.3.3");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k$1(i.insertBefore(c$3(),t),t,void 0,s??{});}return h._$AI(t),h};
34
34
 
35
35
  /**
36
36
  * @license
@@ -68,7 +68,7 @@ const t$1={ATTRIBUTE:1,CHILD:2},e$5=t=>(...e)=>({_$litDirective$:t,values:e});le
68
68
  * @license
69
69
  * Copyright 2020 Google LLC
70
70
  * SPDX-License-Identifier: BSD-3-Clause
71
- */const e$3=()=>new h$1;let h$1 = class h{};const o$4=new WeakMap,n$2=e$5(class extends f$2{render(i){return A}update(i,[s]){const e=s!==this.G;return e&&void 0!==this.G&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),A}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const i=this.ht??globalThis;let s=o$4.get(i);void 0===s&&(s=new WeakMap,o$4.set(i,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t);}else this.G.value=t;}get lt(){return "function"==typeof this.G?o$4.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});
71
+ */const e$3=()=>new h$1;let h$1 = class h{};const o$4=new WeakMap,n$2=e$5(class extends f$2{render(i){return A}update(i,[s]){const e=s!==this.G;return e&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),A}rt(t){if(void 0!==this.G)if(this.isConnected||(t=void 0),"function"==typeof this.G){const i=this.ht??globalThis;let s=o$4.get(i);void 0===s&&(s=new WeakMap,o$4.set(i,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t);}else this.G.value=t;}get lt(){return "function"==typeof this.G?o$4.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});
72
72
 
73
73
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
74
74
  // See LICENSE in the project root for license information.
@@ -253,12 +253,12 @@ function getOppositePlacement(placement) {
253
253
  return oppositeSideMap[side] + placement.slice(side.length);
254
254
  }
255
255
  function expandPaddingObject(padding) {
256
+ var _padding$top, _padding$right, _padding$bottom, _padding$left;
256
257
  return {
257
- top: 0,
258
- right: 0,
259
- bottom: 0,
260
- left: 0,
261
- ...padding
258
+ top: (_padding$top = padding.top) != null ? _padding$top : 0,
259
+ right: (_padding$right = padding.right) != null ? _padding$right : 0,
260
+ bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
261
+ left: (_padding$left = padding.left) != null ? _padding$left : 0
262
262
  };
263
263
  }
264
264
  function getPaddingObject(padding) {
@@ -333,13 +333,9 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
333
333
  y: reference.y
334
334
  };
335
335
  }
336
- switch (getAlignment(placement)) {
337
- case 'start':
338
- coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
339
- break;
340
- case 'end':
341
- coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
342
- break;
336
+ const alignment = getAlignment(placement);
337
+ if (alignment) {
338
+ coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);
343
339
  }
344
340
  return coords;
345
341
  }
@@ -388,10 +384,7 @@ async function detectOverflow(state, options) {
388
384
  height: rects.floating.height
389
385
  } : rects.reference;
390
386
  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
391
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
392
- x: 1,
393
- y: 1
394
- } : {
387
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
395
388
  x: 1,
396
389
  y: 1
397
390
  };
@@ -546,13 +539,11 @@ const autoPlacement$1 = function (options) {
546
539
  ...detectOverflowOptions
547
540
  } = evaluate(options, state);
548
541
  const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
549
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
550
542
  const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
551
543
  const currentPlacement = placements$1[currentIndex];
552
544
  if (currentPlacement == null) {
553
545
  return {};
554
546
  }
555
- const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
556
547
 
557
548
  // Make `computeCoords` start from the right place.
558
549
  if (placement !== currentPlacement) {
@@ -562,6 +553,8 @@ const autoPlacement$1 = function (options) {
562
553
  }
563
554
  };
564
555
  }
556
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
557
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
565
558
  const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
566
559
  const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
567
560
  placement: currentPlacement,
@@ -869,23 +862,16 @@ const shift$1 = function (options) {
869
862
  y
870
863
  };
871
864
  const overflow = await platform.detectOverflow(state, detectOverflowOptions);
872
- const crossAxis = getSideAxis(getSide(placement));
865
+ const crossAxis = getSideAxis(placement);
873
866
  const mainAxis = getOppositeAxis(crossAxis);
874
867
  let mainAxisCoord = coords[mainAxis];
875
868
  let crossAxisCoord = coords[crossAxis];
869
+ const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);
876
870
  if (checkMainAxis) {
877
- const minSide = mainAxis === 'y' ? 'top' : 'left';
878
- const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
879
- const min = mainAxisCoord + overflow[minSide];
880
- const max = mainAxisCoord - overflow[maxSide];
881
- mainAxisCoord = clamp(min, mainAxisCoord, max);
871
+ mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
882
872
  }
883
873
  if (checkCrossAxis) {
884
- const minSide = crossAxis === 'y' ? 'top' : 'left';
885
- const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
886
- const min = crossAxisCoord + overflow[minSide];
887
- const max = crossAxisCoord - overflow[maxSide];
888
- crossAxisCoord = clamp(min, crossAxisCoord, max);
874
+ crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
889
875
  }
890
876
  const limitedCoords = limiter.fn({
891
877
  ...state,
@@ -1042,7 +1028,7 @@ function getParentNode(node) {
1042
1028
  function getNearestOverflowAncestor(node) {
1043
1029
  const parentNode = getParentNode(node);
1044
1030
  if (isLastTraversableNode(parentNode)) {
1045
- return node.ownerDocument ? node.ownerDocument.body : node.body;
1031
+ return (node.ownerDocument || node).body;
1046
1032
  }
1047
1033
  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1048
1034
  return parentNode;
@@ -1139,10 +1125,7 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1139
1125
  if (isFixed === void 0) {
1140
1126
  isFixed = false;
1141
1127
  }
1142
- if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1143
- return false;
1144
- }
1145
- return isFixed;
1128
+ return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
1146
1129
  }
1147
1130
 
1148
1131
  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
@@ -1169,12 +1152,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1169
1152
  let y = (clientRect.top + visualOffsets.y) / scale.y;
1170
1153
  let width = clientRect.width / scale.x;
1171
1154
  let height = clientRect.height / scale.y;
1172
- if (domElement) {
1155
+ if (domElement && offsetParent) {
1173
1156
  const win = getWindow(domElement);
1174
- const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1157
+ const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1175
1158
  let currentWin = win;
1176
1159
  let currentIFrame = getFrameElement(currentWin);
1177
- while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1160
+ while (currentIFrame && offsetWin !== currentWin) {
1178
1161
  const iframeScale = getScale(currentIFrame);
1179
1162
  const iframeRect = currentIFrame.getBoundingClientRect();
1180
1163
  const css = getComputedStyle$1(currentIFrame);
@@ -1238,7 +1221,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1238
1221
  let scale = createCoords(1);
1239
1222
  const offsets = createCoords(0);
1240
1223
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
1241
- if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1224
+ if (isOffsetParentAnElement || !isFixed) {
1242
1225
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1243
1226
  scroll = getNodeScroll(offsetParent);
1244
1227
  }
@@ -1259,18 +1242,17 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1259
1242
  }
1260
1243
 
1261
1244
  function getClientRects(element) {
1262
- return Array.from(element.getClientRects());
1245
+ return element.getClientRects ? Array.from(element.getClientRects()) : [];
1263
1246
  }
1264
1247
 
1265
1248
  // Gets the entire size of the scrollable document area, even extending outside
1266
1249
  // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1267
- function getDocumentRect(element) {
1268
- const html = getDocumentElement(element);
1269
- const scroll = getNodeScroll(element);
1270
- const body = element.ownerDocument.body;
1250
+ function getDocumentRect(html) {
1251
+ const scroll = getNodeScroll(html);
1252
+ const body = html.ownerDocument.body;
1271
1253
  const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1272
1254
  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1273
- let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1255
+ let x = -scroll.scrollLeft + getWindowScrollBarX(html);
1274
1256
  const y = -scroll.scrollTop;
1275
1257
  if (getComputedStyle$1(body).direction === 'rtl') {
1276
1258
  x += max(html.clientWidth, body.clientWidth) - width;
@@ -1287,7 +1269,11 @@ function getDocumentRect(element) {
1287
1269
  // calculation is affected by unusual styles.
1288
1270
  // Most scrollbars leave 15-18px of space.
1289
1271
  const SCROLLBAR_MAX = 25;
1290
- function getViewportRect(element, strategy) {
1272
+ function getViewportRect(element, strategy, rootBoundary) {
1273
+ if (rootBoundary === void 0) {
1274
+ rootBoundary = 'viewport';
1275
+ }
1276
+ const isLayoutViewport = rootBoundary === 'layoutViewport';
1291
1277
  const win = getWindow(element);
1292
1278
  const html = getDocumentElement(element);
1293
1279
  const visualViewport = win.visualViewport;
@@ -1296,31 +1282,42 @@ function getViewportRect(element, strategy) {
1296
1282
  let x = 0;
1297
1283
  let y = 0;
1298
1284
  if (visualViewport) {
1299
- width = visualViewport.width;
1300
- height = visualViewport.height;
1301
- const visualViewportBased = isWebKit();
1302
- if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
1303
- x = visualViewport.offsetLeft;
1304
- y = visualViewport.offsetTop;
1285
+ // Client coordinates are relative to the layout viewport, except in
1286
+ // WebKit with an `absolute` strategy, where they are relative to the
1287
+ // visual viewport.
1288
+ const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';
1289
+ if (isLayoutViewport) {
1290
+ if (!layoutRelativeClientCoords) {
1291
+ x = -visualViewport.offsetLeft;
1292
+ y = -visualViewport.offsetTop;
1293
+ }
1294
+ } else {
1295
+ width = visualViewport.width;
1296
+ height = visualViewport.height;
1297
+ if (layoutRelativeClientCoords) {
1298
+ x = visualViewport.offsetLeft;
1299
+ y = visualViewport.offsetTop;
1300
+ }
1305
1301
  }
1306
1302
  }
1307
1303
  const windowScrollbarX = getWindowScrollBarX(html);
1308
- // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
1309
- // visual width of the <html> but this is not considered in the size
1310
- // of `html.clientWidth`.
1304
+ // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks
1305
+ // the visual width but isn't reflected in `html.clientWidth`, so subtract it.
1306
+ // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also
1307
+ // reserves an empty inline-start gutter that clips nothing, so exclude just
1308
+ // the one scrollbar-side gutter — halve the measured (two-gutter) total. A
1309
+ // left-side scrollbar (`windowScrollbarX > 0`) is already handled by
1310
+ // `getHTMLOffset`/`visualViewport.width`; skip it here.
1311
1311
  if (windowScrollbarX <= 0) {
1312
1312
  const doc = html.ownerDocument;
1313
1313
  const body = doc.body;
1314
1314
  const bodyStyles = getComputedStyle(body);
1315
1315
  const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1316
- const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1317
- if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
1318
- width -= clippingStableScrollbarWidth;
1316
+ const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1317
+ const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;
1318
+ if (gutter <= SCROLLBAR_MAX) {
1319
+ width -= gutter;
1319
1320
  }
1320
- } else if (windowScrollbarX <= SCROLLBAR_MAX) {
1321
- // If the <body> scrollbar is on the left, the width needs to be extended
1322
- // by the scrollbar amount so there isn't extra space on the right.
1323
- width += windowScrollbarX;
1324
1321
  }
1325
1322
  return {
1326
1323
  width,
@@ -1335,7 +1332,7 @@ function getInnerBoundingClientRect(element, strategy) {
1335
1332
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1336
1333
  const top = clientRect.top + element.clientTop;
1337
1334
  const left = clientRect.left + element.clientLeft;
1338
- const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1335
+ const scale = getScale(element);
1339
1336
  const width = element.clientWidth * scale.x;
1340
1337
  const height = element.clientHeight * scale.y;
1341
1338
  const x = left * scale.x;
@@ -1349,8 +1346,8 @@ function getInnerBoundingClientRect(element, strategy) {
1349
1346
  }
1350
1347
  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1351
1348
  let rect;
1352
- if (clippingAncestor === 'viewport') {
1353
- rect = getViewportRect(element, strategy);
1349
+ if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {
1350
+ rect = getViewportRect(element, strategy, clippingAncestor);
1354
1351
  } else if (clippingAncestor === 'document') {
1355
1352
  rect = getDocumentRect(getDocumentElement(element));
1356
1353
  } else if (isElement(clippingAncestor)) {
@@ -1366,13 +1363,6 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
1366
1363
  }
1367
1364
  return rectToClientRect(rect);
1368
1365
  }
1369
- function hasFixedPositionAncestor(element, stopNode) {
1370
- const parentNode = getParentNode(element);
1371
- if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1372
- return false;
1373
- }
1374
- return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1375
- }
1376
1366
 
1377
1367
  // A "clipping ancestor" is an `overflow` element with the characteristic of
1378
1368
  // clipping (or hiding) child elements. This returns all clipping ancestors
@@ -1383,7 +1373,7 @@ function getClippingElementAncestors(element, cache) {
1383
1373
  return cachedResult;
1384
1374
  }
1385
1375
  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1386
- let currentContainingBlockComputedStyle = null;
1376
+ let lastKeptComputedStyle = null;
1387
1377
  const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1388
1378
  let currentNode = elementIsFixed ? getParentNode(element) : element;
1389
1379
 
@@ -1391,16 +1381,20 @@ function getClippingElementAncestors(element, cache) {
1391
1381
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1392
1382
  const computedStyle = getComputedStyle$1(currentNode);
1393
1383
  const currentNodeIsContaining = isContainingBlock(currentNode);
1394
- if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1395
- currentContainingBlockComputedStyle = null;
1396
- }
1397
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1384
+ // Position of the containing block chain below the current node. A fixed
1385
+ // element whose containing block hasn't been found yet is a fixed chain.
1386
+ const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
1387
+
1388
+ // A non-containing ancestor does not clip the element when the chain
1389
+ // below it escapes it: a fixed chain escapes all ancestors up to the
1390
+ // next containing block, an absolute chain escapes static ancestors.
1391
+ const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');
1398
1392
  if (shouldDropCurrentNode) {
1399
1393
  // Drop non-containing blocks.
1400
1394
  result = result.filter(ancestor => ancestor !== currentNode);
1401
1395
  } else {
1402
- // Record last containing block for next iteration.
1403
- currentContainingBlockComputedStyle = computedStyle;
1396
+ // The kept node carries the chain position for the next iteration.
1397
+ lastKeptComputedStyle = computedStyle;
1404
1398
  }
1405
1399
  currentNode = getParentNode(currentNode);
1406
1400
  }
@@ -1460,13 +1454,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1460
1454
  scrollTop: 0
1461
1455
  };
1462
1456
  const offsets = createCoords(0);
1463
-
1464
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1465
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1466
- function setLeftRTLScrollbarOffset() {
1467
- offsets.x = getWindowScrollBarX(documentElement);
1468
- }
1469
- if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1457
+ if (isOffsetParentAnElement || !isFixed) {
1470
1458
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1471
1459
  scroll = getNodeScroll(offsetParent);
1472
1460
  }
@@ -1474,12 +1462,13 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1474
1462
  const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1475
1463
  offsets.x = offsetRect.x + offsetParent.clientLeft;
1476
1464
  offsets.y = offsetRect.y + offsetParent.clientTop;
1477
- } else if (documentElement) {
1478
- setLeftRTLScrollbarOffset();
1479
1465
  }
1480
1466
  }
1481
- if (isFixed && !isOffsetParentAnElement && documentElement) {
1482
- setLeftRTLScrollbarOffset();
1467
+
1468
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1469
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1470
+ if (!isOffsetParentAnElement && documentElement) {
1471
+ offsets.x = getWindowScrollBarX(documentElement);
1483
1472
  }
1484
1473
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1485
1474
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
@@ -1579,7 +1568,7 @@ function rectsAreEqual(a, b) {
1579
1568
  }
1580
1569
 
1581
1570
  // https://samthor.au/2021/observing-dom/
1582
- function observeMove(element, onMove) {
1571
+ function observeMove(element, onMove, ancestorResize) {
1583
1572
  let io = null;
1584
1573
  let timeoutId;
1585
1574
  const root = getDocumentElement(element);
@@ -1622,13 +1611,22 @@ function observeMove(element, onMove) {
1622
1611
  let isFirstUpdate = true;
1623
1612
  function handleObserve(entries) {
1624
1613
  const ratio = entries[0].intersectionRatio;
1614
+
1615
+ // The entry is a snapshot, so the reference may have moved since the
1616
+ // intersection was computed (under performance constraints, or between
1617
+ // consecutive frames of a multi-frame layout shift). The reported ratio
1618
+ // and the observed area are stale in that case and cannot be trusted to
1619
+ // detect subsequent movement, so refresh regardless of the ratio.
1620
+ if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
1621
+ return refresh();
1622
+ }
1625
1623
  if (ratio !== threshold) {
1626
1624
  if (!isFirstUpdate) {
1627
1625
  return refresh();
1628
1626
  }
1629
1627
  if (!ratio) {
1630
- // If the reference is clipped, the ratio is 0. Throttle the refresh
1631
- // to prevent an infinite loop of updates.
1628
+ // If the reference is clipped in place, the ratio is 0. Throttle
1629
+ // the refresh to prevent an infinite loop of updates.
1632
1630
  timeoutId = setTimeout(() => {
1633
1631
  refresh(false, 1e-7);
1634
1632
  }, 1000);
@@ -1636,16 +1634,6 @@ function observeMove(element, onMove) {
1636
1634
  refresh(false, ratio);
1637
1635
  }
1638
1636
  }
1639
- if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
1640
- // It's possible that even though the ratio is reported as 1, the
1641
- // element is not actually fully within the IntersectionObserver's root
1642
- // area anymore. This can happen under performance constraints. This may
1643
- // be a bug in the browser's IntersectionObserver implementation. To
1644
- // work around this, we compare the element's bounding rect now with
1645
- // what it was at the time we created the IntersectionObserver. If they
1646
- // are not equal then the element moved, so we refresh.
1647
- refresh();
1648
- }
1649
1637
  isFirstUpdate = false;
1650
1638
  }
1651
1639
 
@@ -1662,8 +1650,18 @@ function observeMove(element, onMove) {
1662
1650
  }
1663
1651
  io.observe(element);
1664
1652
  }
1653
+ const win = getWindow(element);
1654
+ // The window is a resize ancestor, so when `ancestorResize` is enabled its
1655
+ // listener already runs the update on resize. Here we only need to rebuild
1656
+ // the `IntersectionObserver` for the new root size, skipping a redundant
1657
+ // update. When `ancestorResize` is disabled, this becomes the sole update.
1658
+ const handleResize = () => refresh(ancestorResize);
1659
+ win.addEventListener('resize', handleResize);
1665
1660
  refresh(true);
1666
- return cleanup;
1661
+ return () => {
1662
+ win.removeEventListener('resize', handleResize);
1663
+ cleanup();
1664
+ };
1667
1665
  }
1668
1666
 
1669
1667
  /**
@@ -1688,12 +1686,10 @@ function autoUpdate(reference, floating, update, options) {
1688
1686
  const referenceEl = unwrapElement(reference);
1689
1687
  const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
1690
1688
  ancestors.forEach(ancestor => {
1691
- ancestorScroll && ancestor.addEventListener('scroll', update, {
1692
- passive: true
1693
- });
1689
+ ancestorScroll && ancestor.addEventListener('scroll', update);
1694
1690
  ancestorResize && ancestor.addEventListener('resize', update);
1695
1691
  });
1696
- const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
1692
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
1697
1693
  let reobserveFrame = -1;
1698
1694
  let resizeObserver = null;
1699
1695
  if (elementResize) {
@@ -1788,11 +1784,9 @@ const computePosition = (reference, floating, options) => {
1788
1784
  // multiple lifecycle resets re-use the same result. It only lives for a
1789
1785
  // single call. If other functions become expensive, we can add them as well.
1790
1786
  const cache = new Map();
1791
- const mergedOptions = {
1792
- platform,
1793
- ...options
1794
- };
1787
+ const mergedOptions = options != null ? options : {};
1795
1788
  const platformWithCache = {
1789
+ ...platform,
1796
1790
  ...mergedOptions.platform,
1797
1791
  _c: cache
1798
1792
  };
@@ -2131,30 +2125,61 @@ class AuroFloatingUI {
2131
2125
 
2132
2126
  /**
2133
2127
  * @private
2134
- * Controls whether to lock the scrolling for the document's body.
2135
- * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
2128
+ * Mirrors `aria-modal` onto the `<dialog>` inside the bib, tracking the page
2129
+ * scroll lock: an overlay that holds the page hides it from assistive tech.
2130
+ *
2131
+ * The removal is called only from inside lockScroll()'s ownership guard: run
2132
+ * outside it, it fired on every autoUpdate tick of every NON-owning instance,
2133
+ * and a repositioning dropdown stripped `aria-modal` off an open modal dialog
2134
+ * it had nothing to do with. The write is unguarded by design — see the call
2135
+ * site — but is skipped when the attribute already reads correctly, so the
2136
+ * repeat costs no mutation record.
2137
+ * @param {Boolean} modal - True to mark the dialog modal; false to unmark it.
2136
2138
  */
2137
- lockScroll(lock = true) {
2139
+ mirrorAriaModal(modal) {
2138
2140
  const element = this.element;
2141
+ const dialog = element?.bib
2142
+ ? (element.bib?.shadowRoot || element.bib || element).querySelector(
2143
+ "dialog",
2144
+ )
2145
+ : undefined;
2139
2146
 
2140
- if (!element?.bib) {
2147
+ if (!dialog) {
2141
2148
  return;
2142
2149
  }
2143
2150
 
2144
- const dialog = (
2145
- element.bib?.shadowRoot ||
2146
- element.bib ||
2147
- element
2148
- ).querySelector("dialog");
2149
- if (dialog) {
2150
- if (lock) {
2151
+ if (modal) {
2152
+ if (dialog.getAttribute("aria-modal") !== "true") {
2151
2153
  dialog.setAttribute("aria-modal", "true");
2152
- } else {
2153
- dialog.removeAttribute("aria-modal");
2154
2154
  }
2155
+ } else {
2156
+ dialog.removeAttribute("aria-modal");
2157
+ }
2158
+ }
2159
+
2160
+ /**
2161
+ * @private
2162
+ * Controls whether to lock the scrolling for the document's body.
2163
+ * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
2164
+ */
2165
+ lockScroll(lock = true) {
2166
+ const element = this.element;
2167
+
2168
+ // Locking needs a bib to lock around; unlocking must not, or a bib that has
2169
+ // already been detached would leave the page frozen with no way back.
2170
+ if (lock && !element?.bib) {
2171
+ return;
2155
2172
  }
2156
2173
 
2157
2174
  if (lock) {
2175
+ // Re-asserted on every lock call rather than only on the unlocked ->
2176
+ // locked transition. If the bib's inner <dialog> is replaced while this
2177
+ // instance still holds the lock, the replacement would otherwise go
2178
+ // unmarked until a full unlock/lock cycle. Safe to repeat: it targets
2179
+ // this instance's own element, so it cannot reach another overlay's
2180
+ // dialog, and mirrorAriaModal() skips the write when already correct.
2181
+ this.mirrorAriaModal(true);
2182
+
2158
2183
  if (!this._scrollLocked) {
2159
2184
  this._scrollLocked = true;
2160
2185
  this._savedScrollY = window.scrollY;
@@ -2212,6 +2237,8 @@ class AuroFloatingUI {
2212
2237
  }
2213
2238
  } else {
2214
2239
  if (this._scrollLocked) {
2240
+ this.mirrorAriaModal(false);
2241
+
2215
2242
  if (this._viewportHandler && window.visualViewport) {
2216
2243
  window.visualViewport.removeEventListener(
2217
2244
  "resize",
@@ -2324,15 +2351,47 @@ class AuroFloatingUI {
2324
2351
  } else if (this.configureTrial < MAX_CONFIGURATION_COUNT) {
2325
2352
  this.configureTrial += 1;
2326
2353
 
2327
- setTimeout(() => {
2354
+ // The id is retained so disconnect() can cancel it. A retry that fires
2355
+ // after teardown re-enters this method with isPopoverVisible still true
2356
+ // — nothing clears it on the teardown path — and takes the page scroll
2357
+ // lock back, with no owner left to release it.
2358
+ //
2359
+ // This is not the rare timing race it reads as: the lookup above wants
2360
+ // a `.container` inside the BIB's own shadow root, which only a bib
2361
+ // that is itself a custom element has. A consumer whose bib is a plain
2362
+ // element (auro-dialog's `#bib` is a div, with its `.container` a
2363
+ // sibling in the host's shadow root) can never satisfy it, so it
2364
+ // retries the full MAX_CONFIGURATION_COUNT every time. Correcting the
2365
+ // lookup would change bib sizing for those consumers and is tracked
2366
+ // separately; cancelling the timer is what keeps it from freezing the
2367
+ // page.
2368
+ this._configureRetryId = setTimeout(() => {
2369
+ this._configureRetryId = undefined;
2328
2370
  this.configureBibStrategy(value);
2329
2371
  }, 0);
2330
2372
  }
2331
2373
 
2332
2374
  if (element.isPopoverVisible) {
2333
- this.lockScroll(value === "fullscreen");
2375
+ // Positioning strategy is not scroll ownership. Both "fullscreen" and
2376
+ // "dialog" lay the bib over the page and trap focus inside it, so both
2377
+ // must freeze the page behind them (AB#1647843). Gating this on
2378
+ // "fullscreen" alone left dismissible desktop dialogs and drawers
2379
+ // scrollable, and actively released the lock on every reposition
2380
+ // (AB#1625424, AB#1625435). The nested "cover" strategy takes the else
2381
+ // branch and stays scrollable by design — it sits inside its parent
2382
+ // rather than over the page.
2383
+ this.lockScroll(true);
2334
2384
  }
2335
2385
  } else {
2386
+ // The mirror of the lock above: a strategy that does not own the page must
2387
+ // hand the lock back, not merely decline to take it. autoUpdate re-runs
2388
+ // this method on every resize tick, and getPositioningStrategy() flips
2389
+ // "fullscreen" -> "floating" across the breakpoint for dropdown behavior —
2390
+ // so an overlay that locked while narrow can land here while still open.
2391
+ // Without this, the page stays frozen behind a small floating bib until
2392
+ // hideBib() happens to run.
2393
+ this.lockScroll(false);
2394
+
2336
2395
  element.bib.style.position = "";
2337
2396
  element.bib.removeAttribute("isfullscreen");
2338
2397
  element.isBibFullscreen = false;
@@ -2442,6 +2501,46 @@ class AuroFloatingUI {
2442
2501
  this.hideBib("focusloss");
2443
2502
  }
2444
2503
 
2504
+ /**
2505
+ * @private
2506
+ * Installs the handlers that dismiss an open overlay.
2507
+ *
2508
+ * Shared by showBib(), which opens the overlay, and configure(), which has to
2509
+ * put these back after a rewire tore them down under an overlay that is still
2510
+ * open. A non-modal overlay dismisses on outside click, focus loss and
2511
+ * Escape; a modal one instead swallows Escape so the native dialog's
2512
+ * CloseWatcher never sees it (AB#1613688).
2513
+ */
2514
+ setupDismissHandlers() {
2515
+ const element = this.element;
2516
+ if (!element) {
2517
+ return;
2518
+ }
2519
+
2520
+ if (!element.modal) {
2521
+ this.setupHideHandlers();
2522
+ return;
2523
+ }
2524
+
2525
+ if (this.keyDownHandler) {
2526
+ document.removeEventListener("keydown", this.keyDownHandler);
2527
+ }
2528
+ this.keyDownHandler = (evt) => {
2529
+ if (evt.key === "Escape" && element.isPopoverVisible) {
2530
+ // Intercept at keydown so CloseWatcher never sees the keystroke.
2531
+ // Canceling `cancel` alone is insufficient — a second Esc with no
2532
+ // intervening user activation triggers the anti-trap and fires `close`
2533
+ // directly, bypassing any `cancel` preventDefault (AB#1613688).
2534
+ // stopImmediatePropagation is intentional: it prevents other document
2535
+ // keydown handlers (e.g. consumer code, auro-dialog) from also acting
2536
+ // on Escape while the modal owns the key.
2537
+ evt.preventDefault();
2538
+ evt.stopImmediatePropagation();
2539
+ }
2540
+ };
2541
+ document.addEventListener("keydown", this.keyDownHandler);
2542
+ }
2543
+
2445
2544
  setupHideHandlers() {
2446
2545
  const element = this.element;
2447
2546
  if (!element) {
@@ -2614,27 +2713,7 @@ class AuroFloatingUI {
2614
2713
 
2615
2714
  // prevent double showing: isPopovervisible gets first and showBib gets called later
2616
2715
  if (!this.showing) {
2617
- if (!element.modal) {
2618
- this.setupHideHandlers();
2619
- } else {
2620
- if (this.keyDownHandler) {
2621
- document.removeEventListener("keydown", this.keyDownHandler);
2622
- }
2623
- this.keyDownHandler = (evt) => {
2624
- if (evt.key === "Escape" && element.isPopoverVisible) {
2625
- // Intercept at keydown so CloseWatcher never sees the keystroke.
2626
- // Canceling `cancel` alone is insufficient — a second Esc with no
2627
- // intervening user activation triggers the anti-trap and fires `close`
2628
- // directly, bypassing any `cancel` preventDefault (AB#1613688).
2629
- // stopImmediatePropagation is intentional: it prevents other document
2630
- // keydown handlers (e.g. consumer code, auro-dialog) from also acting
2631
- // on Escape while the modal owns the key.
2632
- evt.preventDefault();
2633
- evt.stopImmediatePropagation();
2634
- }
2635
- };
2636
- document.addEventListener("keydown", this.keyDownHandler);
2637
- }
2716
+ this.setupDismissHandlers();
2638
2717
  this.showing = true;
2639
2718
  element.isPopoverVisible = true;
2640
2719
  this.position();
@@ -2874,7 +2953,35 @@ class AuroFloatingUI {
2874
2953
  this.enableKeyboardHandling = enableKeyboardHandling;
2875
2954
 
2876
2955
  this.eventPrefix = eventPrefix;
2877
- if (this.element !== elem) {
2956
+
2957
+ // A retained scroll lock's saved body styles were captured for whichever
2958
+ // element held it, so only a same-element rewire may keep it. An actual
2959
+ // element swap has to take the full teardown, or this instance is left
2960
+ // holding a lock that no longer describes the page it points at — with no
2961
+ // owner able to release it (AB#1647843).
2962
+ const rewiringSameElement = this.element === elem;
2963
+
2964
+ if (!rewiringSameElement) {
2965
+ // Tear down against the outgoing element, before this.element is
2966
+ // repointed. Everything disconnect() releases is element-scoped:
2967
+ // aria-modal on that element's inner dialog, the bib transform saved for
2968
+ // it, its autoUpdate loop and its trigger listeners. Repointing first
2969
+ // aimed all of it at the incoming element — the outgoing dialog kept
2970
+ // aria-modal="true" for good, its bib stayed transformed, and the
2971
+ // incoming bib had the outgoing element's saved transform written onto
2972
+ // it. The trigger gate below read the incoming element's trigger, which
2973
+ // is not assigned until later in this method, so on a swap teardown was
2974
+ // usually skipped outright and the page stayed locked with no owner.
2975
+ if (this.element?.trigger) {
2976
+ this.disconnect({ teardown: true });
2977
+ }
2978
+
2979
+ // disconnect() does not clear this.showing, and the rewire block at the
2980
+ // end of this method only runs for a same-element rewire. Left true, the
2981
+ // incoming element's first showBib() is silently dropped by its
2982
+ // `!this.showing` guard and the overlay never opens.
2983
+ this.showing = false;
2984
+
2878
2985
  this.element = elem;
2879
2986
  }
2880
2987
 
@@ -2887,8 +2994,10 @@ class AuroFloatingUI {
2887
2994
  this.behavior = element.behavior;
2888
2995
  }
2889
2996
 
2890
- if (element.trigger) {
2891
- this.disconnect();
2997
+ if (rewiringSameElement && element.trigger) {
2998
+ // Rewiring, not tearing down — an overlay that is open right now keeps
2999
+ // its page scroll lock across a trigger change.
3000
+ this.disconnect({ teardown: false });
2892
3001
  }
2893
3002
  element.trigger =
2894
3003
  element.triggerElement ||
@@ -2917,11 +3026,61 @@ class AuroFloatingUI {
2917
3026
  element.trigger.addEventListener("focus", this.handleEvent);
2918
3027
  element.trigger.addEventListener("blur", this.handleEvent);
2919
3028
  }
3029
+
3030
+ // disconnect() above stripped the dismissal handlers and killed the
3031
+ // autoUpdate loop; the trigger listeners re-registered here replace
3032
+ // neither. An overlay that is open right now would otherwise be left on
3033
+ // screen with outside-click, focus-loss and Escape all dead and its
3034
+ // position frozen — and, since the lock is deliberately retained, holding
3035
+ // the page with only its original trigger able to give it back.
3036
+ if (rewiringSameElement && this.showing) {
3037
+ this.setupDismissHandlers();
3038
+
3039
+ if (element.bib && (element.trigger || element.parentNode)) {
3040
+ element.cleanup = autoUpdate(
3041
+ element.trigger || element.parentNode,
3042
+ element.bib,
3043
+ () => {
3044
+ this.position();
3045
+ },
3046
+ );
3047
+ }
3048
+ }
2920
3049
  }
2921
3050
 
2922
- disconnect() {
3051
+ /**
3052
+ * Tears the floater's connections down.
3053
+ *
3054
+ * Two callers with different intent share this: a real teardown, which must
3055
+ * release the page scroll lock, and configure(), which re-runs it purely to
3056
+ * rewire a changed trigger and must leave an open overlay's lock alone.
3057
+ * @param {Object} [options] - Teardown options.
3058
+ * @param {Boolean} [options.teardown] - False when only rewiring; keeps the
3059
+ * page scroll lock held for an overlay that is still open.
3060
+ * @returns {void}
3061
+ */
3062
+ disconnect({ teardown = true } = {}) {
2923
3063
  this.cleanupHideHandlers();
2924
3064
 
3065
+ // Cancel any pending configureBibStrategy() retry. It would otherwise fire
3066
+ // a macrotask after the unlock below, re-lock the page, and leave it frozen
3067
+ // with the floater already gone. Cancelled on a rewire too: configure()
3068
+ // re-runs position() itself, so a stale retry has nothing to contribute.
3069
+ if (this._configureRetryId !== undefined) {
3070
+ clearTimeout(this._configureRetryId);
3071
+ this._configureRetryId = undefined;
3072
+ }
3073
+
3074
+ // Tearing down while the bib is still open would otherwise strand
3075
+ // body{position:fixed} and leave the page permanently unscrollable —
3076
+ // hideBib() is the only other unlock, and it never runs in this path.
3077
+ // Skipped when merely rewiring: configure() routes through here on every
3078
+ // triggerElement change, and releasing the lock there would unlock the page
3079
+ // behind an overlay that is still open (AB#1625424, AB#1625435).
3080
+ if (teardown) {
3081
+ this.lockScroll(false);
3082
+ }
3083
+
2925
3084
  const element = this.element;
2926
3085
  if (!element) {
2927
3086
  return;
@@ -3938,7 +4097,7 @@ class AuroHelpText extends i {
3938
4097
  }
3939
4098
  }
3940
4099
 
3941
- var formkitVersion = '202609242008';
4100
+ var formkitVersion = '202610081824';
3942
4101
 
3943
4102
  /**
3944
4103
  * AuroElement is the shared base class for layout-aware Auro form components.