/*! For license information please see 37199.4fb80db3061df71d.js.LICENSE.txt */
export const __rspack_esm_id="37199";export const __rspack_esm_ids=["37199"];export const __webpack_modules__={65213(t,e,o){var i=o(44576),r=o(79039),n=i.RegExp,s=!r(function(){var t=!0;try{n(".","d")}catch(e){t=!1}var e={},o="",i=t?"dgimsy":"gimsy",r=function(t,i){Object.defineProperty(e,t,{get:function(){return o+=i,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in t&&(s.hasIndices="d"),s)r(a,s[a]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(e)!==i||o!==i});t.exports={correct:s}},67979(t,e,o){var i=o(28551);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},69479(t,e,o){var i=o(43724),r=o(62106),n=o(65213),s=o(67979);i&&!n.correct&&(r(RegExp.prototype,"flags",{configurable:!0,get:s}),n.correct=!0)},52630(t,e,o){o.a(t,async function(t,i){try{o.d(e,{A:()=>C});o(44114),o(18111),o(22489);var r=o(96196),n=o(97735),s=o(94333),a=o(17051),h=o(42462),l=o(28438),p=o(98779),d=o(27259),c=o(984),u=o(53720),v=o(9395),w=o(12754),b=o(40158),y=o(51920),g=t([b]);b=(g.then?(await g)():g)[0];var m=Object.defineProperty,f=Object.getOwnPropertyDescriptor,k=(t,e,o,i)=>{for(var r,n=i>1?void 0:i?f(e,o):e,s=t.length-1;s>=0;s--)(r=t[s])&&(n=(i?r(e,o,n):r(n))||n);return i&&n&&m(e,o,n),n};let C=class extends w.A{connectedCallback(){super.connectedCallback(),this.eventController.signal.aborted&&(this.eventController=new AbortController),this.addEventListener("mouseout",this.handleMouseOut),this.open&&(this.open=!1,this.updateComplete.then(()=>{this.open=!0})),this.id||(this.id=(0,u.N)("wa-tooltip-")),this.for&&this.anchor?(this.anchor=null,this.handleForChange()):this.for&&this.handleForChange()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.eventController.abort(),this.anchor&&this.removeFromAriaLabelledBy(this.anchor,this.id)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}addToAriaLabelledBy(t,e){const o=(t.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean);o.includes(e)||(o.push(e),t.setAttribute("aria-labelledby",o.join(" ")))}removeFromAriaLabelledBy(t,e){const o=(t.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean).filter(t=>t!==e);o.length>0?t.setAttribute("aria-labelledby",o.join(" ")):t.removeAttribute("aria-labelledby")}async handleOpenChange(){if(this.open){if(this.disabled)return;const t=new p.k;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);document.addEventListener("keydown",this.handleDocumentKeyDown,{signal:this.eventController.signal}),this.body.hidden=!1,this.popup.active=!0,await(0,d.Ud)(this.popup.popup,"show-with-scale"),this.popup.reposition(),this.dispatchEvent(new h.q)}else{const t=new l.L;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);document.removeEventListener("keydown",this.handleDocumentKeyDown),await(0,d.Ud)(this.popup.popup,"hide-with-scale"),this.popup.active=!1,this.body.hidden=!0,this.dispatchEvent(new a.Z)}}handleForChange(){const t=this.getRootNode();if(!t)return;const e=this.for?t.getElementById(this.for):null,o=this.anchor;if(e===o)return;const{signal:i}=this.eventController;e&&(this.addToAriaLabelledBy(e,this.id),e.addEventListener("blur",this.handleBlur,{capture:!0,signal:i}),e.addEventListener("focus",this.handleFocus,{capture:!0,signal:i}),e.addEventListener("click",this.handleClick,{signal:i}),e.addEventListener("mouseover",this.handleMouseOver,{signal:i}),e.addEventListener("mouseout",this.handleMouseOut,{signal:i})),o&&(this.removeFromAriaLabelledBy(o,this.id),o.removeEventListener("blur",this.handleBlur,{capture:!0}),o.removeEventListener("focus",this.handleFocus,{capture:!0}),o.removeEventListener("click",this.handleClick),o.removeEventListener("mouseover",this.handleMouseOver),o.removeEventListener("mouseout",this.handleMouseOut)),this.anchor=e}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,(0,c.l)(this,"wa-after-show")}async hide(){if(this.open)return this.open=!1,(0,c.l)(this,"wa-after-hide")}render(){return r.qy` <wa-popup part="base" exportparts="
          popup:base__popup,
          arrow:base__arrow
        " class="${(0,s.H)({tooltip:!0,"tooltip-open":this.open})}" placement="${this.placement}" distance="${this.distance}" skidding="${this.skidding}" flip shift ?arrow="${!this.withoutArrow}" hover-bridge .anchor="${this.anchor}"> <div part="body" class="body"> <slot></slot> </div> </wa-popup> `}constructor(){super(...arguments),this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.showDelay=150,this.hideDelay=0,this.trigger="hover focus",this.withoutArrow=!1,this.for=null,this.anchor=null,this.eventController=new AbortController,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=t=>{"Escape"===t.key&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),this.showDelay))},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=Boolean(this.anchor?.matches(":hover")),e=this.matches(":hover");if(t||e)return;clearTimeout(this.hoverTimeout),t||e||(this.hoverTimeout=window.setTimeout(()=>{this.hide()},this.hideDelay))}}}};C.css=y.A,C.dependencies={"wa-popup":b.A},k([(0,n.P)("slot:not([name])")],C.prototype,"defaultSlot",2),k([(0,n.P)(".body")],C.prototype,"body",2),k([(0,n.P)("wa-popup")],C.prototype,"popup",2),k([(0,n.MZ)()],C.prototype,"placement",2),k([(0,n.MZ)({type:Boolean,reflect:!0})],C.prototype,"disabled",2),k([(0,n.MZ)({type:Number})],C.prototype,"distance",2),k([(0,n.MZ)({type:Boolean,reflect:!0})],C.prototype,"open",2),k([(0,n.MZ)({type:Number})],C.prototype,"skidding",2),k([(0,n.MZ)({attribute:"show-delay",type:Number})],C.prototype,"showDelay",2),k([(0,n.MZ)({attribute:"hide-delay",type:Number})],C.prototype,"hideDelay",2),k([(0,n.MZ)()],C.prototype,"trigger",2),k([(0,n.MZ)({attribute:"without-arrow",type:Boolean,reflect:!0})],C.prototype,"withoutArrow",2),k([(0,n.MZ)()],C.prototype,"for",2),k([(0,n.wk)()],C.prototype,"anchor",2),k([(0,v.w)("open",{waitUntilFirstUpdate:!0})],C.prototype,"handleOpenChange",1),k([(0,v.w)("for")],C.prototype,"handleForChange",1),k([(0,v.w)(["distance","placement","skidding"])],C.prototype,"handleOptionsChange",1),k([(0,v.w)("disabled")],C.prototype,"handleDisabledChange",1),C=k([(0,n.EM)("wa-tooltip")],C),i()}catch(t){i(t)}})},51920(t,e,o){o.d(e,{A:()=>i});var i=o(96196).AH`:host{--max-width:30ch;display:inline-block;position:absolute;color:var(--wa-tooltip-content-color);font-size:var(--wa-tooltip-font-size);line-height:var(--wa-tooltip-line-height);text-align:start;white-space:normal}.tooltip{--arrow-size:var(--wa-tooltip-arrow-size);--arrow-color:var(--wa-tooltip-background-color)}.tooltip::part(popup){z-index:1000}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.body{display:block;width:max-content;max-width:var(--max-width);border-radius:var(--wa-tooltip-border-radius);background-color:var(--wa-tooltip-background-color);border:var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color);padding:.25em .5em;user-select:none;-webkit-user-select:none}.tooltip::part(arrow){border-bottom:var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color);border-right:var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color)}`},984(t,e,o){function i(t,e){return new Promise(o=>{t.addEventListener(e,function i(r){r.target===t&&(t.removeEventListener(e,i),o())})})}o.d(e,{l:()=>i})},95192(t,e,o){o.d(e,{IU:()=>l,Jt:()=>a,Yd:()=>i,hZ:()=>h,y$:()=>r});o(44114),o(18111),o(7588),o(61701);function i(t){return new Promise((e,o)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>o(t.error)})}function r(t,e){let o;return(r,n)=>(()=>{if(o)return o;const r=indexedDB.open(t);return r.onupgradeneeded=()=>r.result.createObjectStore(e),o=i(r),o.then(t=>{t.onclose=()=>o=void 0},()=>{}),o})().then(t=>n(t.transaction(e,r).objectStore(e)))}let n;function s(){return n||(n=r("keyval-store","keyval")),n}function a(t,e=s()){return e("readonly",e=>i(e.get(t)))}function h(t,e,o=s()){return o("readwrite",o=>(o.put(e,t),i(o.transaction)))}function l(t=s()){return t("readwrite",t=>(t.clear(),i(t.transaction)))}}};
//# sourceMappingURL=37199.4fb80db3061df71d.js.map