@teipublisher/pb-components 1.37.0 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.38.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.37.0...v1.38.0) (2022-06-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * **pb-leaflet-map:** allow map marker icons to be configured via nested pb-map-icon elements ([45b6045](https://github.com/eeditiones/tei-publisher-components/commit/45b604514caaf2447d9eaf4172bcd6389cb53bcc))
7
+
1
8
  # [1.37.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.36.3...v1.37.0) (2022-06-10)
2
9
 
3
10
 
@@ -43,6 +43,10 @@
43
43
  <pb-map-layer show base label="HikeBike Map" url="https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}" max-zoom="19"
44
44
  access-token="pk.eyJ1Ijoid29sZmdhbmdtbSIsImEiOiJjam1kMjVpMnUwNm9wM3JwMzdsNGhhcnZ0In0.v65crewF-dkNsPF3o1Q4uw"
45
45
  attribution='&copy; &lt;a href="https://www.mapbox.com/about/maps/"&gt;Mapbox&lt;/a&gt; &copy &lt;a href="http://www.openstreetmap.org/copyright"&gt;OpenStreetMap&lt;/a&gt; &lt;strong&gt;&lt;a href="https://www.mapbox.com/map-feedback/" target="_blank"&gt;Improve this map&lt;/a&gt;&lt;/strong&gt;'></pb-map-layer>
46
+ <pb-map-icon icon-url="leaf-green.png" shadow-url="leaf-shadow.png" icon-size="38, 95" shadow-size="50, 64"
47
+ icon-anchor="22, 94" shadow-anchor="4, 62" popup-anchor="-3, -76"/>
48
+ <pb-map-icon name="active" icon-url="leaf-red.png" shadow-url="leaf-shadow.png" icon-size="38, 95" shadow-size="50, 64"
49
+ icon-anchor="22, 94" shadow-anchor="4, 62" popup-anchor="-3, -76"/>
46
50
  </pb-leaflet-map>
47
51
  </main>
48
52
  </pb-page>
@@ -507,7 +507,7 @@ const G=n`
507
507
  border-color: #999;
508
508
  color: #999;
509
509
  }
510
- `}}customElements.define("pb-demo-snippet",Z);class J{static subscribe(t,e,i,n=!1){e&&!Array.isArray(e)&&(e=[e]);const r=document.addEventListener(t,t=>{(e||t.detail&&t.detail.key)&&!(e&&t.detail&&t.detail.key&&e.indexOf(t.detail.key)>-1)||i&&i(t,r)},{once:n})}static subscribeOnce(t,e=null){return e&&!Array.isArray(e)&&(e=[e]),new Promise(i=>{document.addEventListener(t,t=>{(e||t.detail&&t.detail.key)&&!(e&&t.detail&&t.detail.key&&e.indexOf(t.detail.key)>-1)||i(t)},{once:!0})})}static emit(t,e=null,i=null){const n=i||{};e&&(n.key=e);const r=new CustomEvent(t,{detail:n});document.dispatchEvent(r)}}window.pbEvents||(window.pbEvents=J);const tt="1.37.0";class et extends V{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=tt}connectedCallback(){if(super.connectedCallback(),!this.version){const t=R("../package.json");fetch(t).then(t=>t.json()).then(t=>{this.version=t.version})}}render(){return I`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",et);var it="top",nt="bottom",rt="right",ot="left",st="auto",at=[it,nt,rt,ot],lt="start",ct="end",ht="clippingParents",dt="viewport",pt="popper",ut="reference",gt=at.reduce((function(t,e){return t.concat([e+"-"+lt,e+"-"+ct])}),[]),ft=[].concat(at,[st]).reduce((function(t,e){return t.concat([e,e+"-"+lt,e+"-"+ct])}),[]),mt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function vt(t){return t?(t.nodeName||"").toLowerCase():null}function bt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function yt(t){return t instanceof bt(t).Element||t instanceof Element}function _t(t){return t instanceof bt(t).HTMLElement||t instanceof HTMLElement}function wt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof bt(t).ShadowRoot||t instanceof ShadowRoot)}function xt(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];_t(r)&&vt(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))}function kt(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});_t(n)&&vt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var At={name:"applyStyles",enabled:!0,phase:"write",fn:xt,effect:kt,requires:["computeStyles"]};function zt(t){return t.split("-")[0]}function St(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function Ct(t){var e=St(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Et(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&wt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Mt(t){return bt(t).getComputedStyle(t)}function Lt(t){return["table","td","th"].indexOf(vt(t))>=0}function Tt(t){return((yt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ht(t){return"html"===vt(t)?t:t.assignedSlot||t.parentNode||(wt(t)?t.host:null)||Tt(t)}function Ot(t){return _t(t)&&"fixed"!==Mt(t).position?t.offsetParent:null}function $t(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&_t(t)&&"fixed"===Mt(t).position)return null;for(var i=Ht(t);_t(i)&&["html","body"].indexOf(vt(i))<0;){var n=Mt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function Vt(t){for(var e=bt(t),i=Ot(t);i&&Lt(i)&&"static"===Mt(i).position;)i=Ot(i);return i&&("html"===vt(i)||"body"===vt(i)&&"static"===Mt(i).position)?e:i||$t(t)||e}function It(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Rt=Math.max,Pt=Math.min,Dt=Math.round;function Nt(t,e,i){return Rt(t,Pt(e,i))}function Ft(){return{top:0,right:0,bottom:0,left:0}}function Bt(t){return Object.assign({},Ft(),t)}function jt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var qt=function(t,e){return Bt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:jt(t,at))};function Ut(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=zt(i.placement),l=It(a),c=[ot,rt].indexOf(a)>=0?"height":"width";if(o&&s){var h=qt(r.padding,i),d=Ct(o),p="y"===l?it:ot,u="y"===l?nt:rt,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Vt(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=g/2-f/2,y=h[p],_=v-d[c]-h[u],w=v/2-d[c]/2+b,x=Nt(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function Wt(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Et(e.elements.popper,n)&&(e.elements.arrow=n)}var Yt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gt(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:Dt(Dt(e*n)/n)||0,y:Dt(Dt(i*n)/n)||0}}function Xt(t){var e,i=t.popper,n=t.popperRect,r=t.placement,o=t.offsets,s=t.position,a=t.gpuAcceleration,l=t.adaptive,c=t.roundOffsets,h=!0===c?Gt(o):"function"==typeof c?c(o):o,d=h.x,p=void 0===d?0:d,u=h.y,g=void 0===u?0:u,f=o.hasOwnProperty("x"),m=o.hasOwnProperty("y"),v=ot,b=it,y=window;if(l){var _=Vt(i),w="clientHeight",x="clientWidth";_===bt(i)&&"static"!==Mt(_=Tt(i)).position&&(w="scrollHeight",x="scrollWidth"),_=_,r===it&&(b=nt,g-=_[w]-n.height,g*=a?1:-1),r===ot&&(v=rt,p-=_[x]-n.width,p*=a?1:-1)}var k,A=Object.assign({position:s},l&&Yt);return a?Object.assign({},A,((k={})[b]=m?"0":"",k[v]=f?"0":"",k.transform=(y.devicePixelRatio||1)<2?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",k)):Object.assign({},A,((e={})[b]=m?g+"px":"",e[v]=f?p+"px":"",e.transform="",e))}function Kt(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:zt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Xt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Xt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Qt={passive:!0};function Zt(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,Qt)})),a&&l.addEventListener("resize",i.update,Qt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,Qt)})),a&&l.removeEventListener("resize",i.update,Qt)}}var Jt={left:"right",right:"left",bottom:"top",top:"bottom"};function te(t){return t.replace(/left|right|bottom|top/g,(function(t){return Jt[t]}))}var ee={start:"end",end:"start"};function ie(t){return t.replace(/start|end/g,(function(t){return ee[t]}))}function ne(t){var e=bt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(t){return St(Tt(t)).left+ne(t).scrollLeft}function oe(t){var e=bt(t),i=Tt(t),n=e.visualViewport,r=i.clientWidth,o=i.clientHeight,s=0,a=0;return n&&(r=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,a=n.offsetTop)),{width:r,height:o,x:s+re(t),y:a}}function se(t){var e,i=Tt(t),n=ne(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=Rt(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Rt(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+re(t),l=-n.scrollTop;return"rtl"===Mt(r||i).direction&&(a+=Rt(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function ae(t){var e=Mt(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function le(t){return["html","body","#document"].indexOf(vt(t))>=0?t.ownerDocument.body:_t(t)&&ae(t)?t:le(Ht(t))}function ce(t,e){var i;void 0===e&&(e=[]);var n=le(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=bt(n),s=r?[o].concat(o.visualViewport||[],ae(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(ce(Ht(s)))}function he(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function de(t){var e=St(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function pe(t,e){return e===dt?he(oe(t)):_t(e)?de(e):he(se(Tt(t)))}function ue(t){var e=ce(Ht(t)),i=["absolute","fixed"].indexOf(Mt(t).position)>=0&&_t(t)?Vt(t):t;return yt(i)?e.filter((function(t){return yt(t)&&Et(t,i)&&"body"!==vt(t)})):[]}function ge(t,e,i){var n="clippingParents"===e?ue(t):[].concat(e),r=[].concat(n,[i]),o=r[0],s=r.reduce((function(e,i){var n=pe(t,i);return e.top=Rt(n.top,e.top),e.right=Pt(n.right,e.right),e.bottom=Pt(n.bottom,e.bottom),e.left=Rt(n.left,e.left),e}),pe(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function fe(t){return t.split("-")[1]}function me(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?zt(r):null,s=r?fe(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case it:e={x:a,y:i.y-n.height};break;case nt:e={x:a,y:i.y+i.height};break;case rt:e={x:i.x+i.width,y:l};break;case ot:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?It(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case lt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case ct:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function ve(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=void 0===n?t.placement:n,o=i.boundary,s=void 0===o?ht:o,a=i.rootBoundary,l=void 0===a?dt:a,c=i.elementContext,h=void 0===c?pt:c,d=i.altBoundary,p=void 0!==d&&d,u=i.padding,g=void 0===u?0:u,f=Bt("number"!=typeof g?g:jt(g,at)),m=h===pt?ut:pt,v=t.elements.reference,b=t.rects.popper,y=t.elements[p?m:h],_=ge(yt(y)?y:y.contextElement||Tt(t.elements.popper),s,l),w=St(v),x=me({reference:w,element:b,strategy:"absolute",placement:r}),k=he(Object.assign({},b,x)),A=h===pt?k:w,z={top:_.top-A.top+f.top,bottom:A.bottom-_.bottom+f.bottom,left:_.left-A.left+f.left,right:A.right-_.right+f.right},S=t.modifiersData.offset;if(h===pt&&S){var C=S[r];Object.keys(z).forEach((function(t){var e=[rt,nt].indexOf(t)>=0?1:-1,i=[it,nt].indexOf(t)>=0?"y":"x";z[t]+=C[i]*e}))}return z}function be(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?ft:l,h=fe(n),d=h?a?gt:gt.filter((function(t){return fe(t)===h})):at,p=d.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=d);var u=p.reduce((function(e,i){return e[i]=ve(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[zt(i)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}function ye(t){if(zt(t)===st)return[];var e=te(t);return[ie(t),e,ie(e)]}function _e(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,p=i.altBoundary,u=i.flipVariations,g=void 0===u||u,f=i.allowedAutoPlacements,m=e.options.placement,v=zt(m),b=l||(v===m||!g?[te(m)]:ye(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(zt(i)===st?be(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)}),[]),_=e.rects.reference,w=e.rects.popper,x=new Map,k=!0,A=y[0],z=0;z<y.length;z++){var S=y[z],C=zt(S),E=fe(S)===lt,M=[it,nt].indexOf(C)>=0,L=M?"width":"height",T=ve(e,{placement:S,boundary:h,rootBoundary:d,altBoundary:p,padding:c}),H=M?E?rt:ot:E?nt:it;_[L]>w[L]&&(H=te(H));var O=te(H),$=[];if(o&&$.push(T[C]<=0),a&&$.push(T[H]<=0,T[O]<=0),$.every((function(t){return t}))){A=S,k=!1;break}x.set(S,$)}if(k)for(var V=function(t){var e=y.find((function(e){var i=x.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},I=g?3:1;I>0;I--){if("break"===V(I))break}e.placement!==A&&(e.modifiersData[n]._skip=!0,e.placement=A,e.reset=!0)}}function we(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function xe(t){return[it,rt,nt,ot].some((function(e){return t[e]>=0}))}function ke(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=ve(e,{elementContext:"reference"}),a=ve(e,{altBoundary:!0}),l=we(s,n),c=we(a,r,o),h=xe(l),d=xe(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}function Ae(t,e,i){var n=zt(t),r=[ot,it].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[ot,rt].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function ze(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=ft.reduce((function(t,i){return t[i]=Ae(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}function Se(t){var e=t.state,i=t.name;e.modifiersData[i]=me({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function Ce(t){return"x"===t?"y":"x"}function Ee(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,p=i.tether,u=void 0===p||p,g=i.tetherOffset,f=void 0===g?0:g,m=ve(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),v=zt(e.placement),b=fe(e.placement),y=!b,_=It(v),w=Ce(_),x=e.modifiersData.popperOffsets,k=e.rects.reference,A=e.rects.popper,z="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,S={x:0,y:0};if(x){if(o||a){var C="y"===_?it:ot,E="y"===_?nt:rt,M="y"===_?"height":"width",L=x[_],T=x[_]+m[C],H=x[_]-m[E],O=u?-A[M]/2:0,$=b===lt?k[M]:A[M],V=b===lt?-A[M]:-k[M],I=e.elements.arrow,R=u&&I?Ct(I):{width:0,height:0},P=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ft(),D=P[C],N=P[E],F=Nt(0,k[M],R[M]),B=y?k[M]/2-O-F-D-z:$-F-D-z,j=y?-k[M]/2+O+F+N+z:V+F+N+z,q=e.elements.arrow&&Vt(e.elements.arrow),U=q?"y"===_?q.clientTop||0:q.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][_]:0,Y=x[_]+B-W-U,G=x[_]+j-W;if(o){var X=Nt(u?Pt(T,Y):T,L,u?Rt(H,G):H);x[_]=X,S[_]=X-L}if(a){var K="x"===_?it:ot,Q="x"===_?nt:rt,Z=x[w],J=Z+m[K],tt=Z-m[Q],et=Nt(u?Pt(J,Y):J,Z,u?Rt(tt,G):tt);x[w]=et,S[w]=et-Z}}e.modifiersData[n]=S}}function Me(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Le(t){return t!==bt(t)&&_t(t)?Me(t):ne(t)}function Te(t,e,i){void 0===i&&(i=!1);var n=Tt(e),r=St(t),o=_t(e),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&(("body"!==vt(e)||ae(n))&&(s=Le(e)),_t(e)?((a=St(e)).x+=e.clientLeft,a.y+=e.clientTop):n&&(a.x=re(n))),{x:r.left+s.scrollLeft-a.x,y:r.top+s.scrollTop-a.y,width:r.width,height:r.height}}function He(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}function Oe(t){var e=He(t);return mt.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function $e(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Ve(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Ie={placement:"bottom",modifiers:[],strategy:"absolute"};function Re(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Pe(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?Ie:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ie,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},s=[],a=!1,l={state:r,setOptions:function(i){h(),r.options=Object.assign({},o,r.options,i),r.scrollParents={reference:yt(t)?ce(t):t.contextElement?ce(t.contextElement):[],popper:ce(e)};var s=Oe(Ve([].concat(n,r.options.modifiers)));return r.orderedModifiers=s.filter((function(t){return t.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var t=r.elements,e=t.reference,i=t.popper;if(Re(e,i)){r.rects={reference:Te(e,Vt(i),"fixed"===r.options.strategy),popper:Ct(i)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach((function(t){return r.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<r.orderedModifiers.length;n++)if(!0!==r.reset){var o=r.orderedModifiers[n],s=o.fn,c=o.options,h=void 0===c?{}:c,d=o.name;"function"==typeof s&&(r=s({state:r,options:h,name:d,instance:l})||r)}else r.reset=!1,n=-1}}},update:$e((function(){return new Promise((function(t){l.forceUpdate(),t(r)}))})),destroy:function(){h(),a=!0}};if(!Re(t,e))return l;function c(){r.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,o=t.effect;if("function"==typeof o){var a=o({state:r,name:e,instance:l,options:n}),c=function(){};s.push(a||c)}}))}function h(){s.forEach((function(t){return t()})),s=[]}return l.setOptions(i).then((function(t){!a&&i.onFirstUpdate&&i.onFirstUpdate(t)})),l}}var De=Pe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Zt,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Se,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kt,data:{}},At,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ze},{name:"flip",enabled:!0,phase:"main",fn:_e,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:Ee,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:Ut,effect:Wt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ke}]}),Ne="tippy-box",Fe="tippy-content",Be="tippy-backdrop",je="tippy-arrow",qe="tippy-svg-arrow",Ue={passive:!0,capture:!0};function We(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function Ye(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function Ge(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Xe(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function Ke(t){return t.split(/\s+/).filter(Boolean)}function Qe(t){return[].concat(t)}function Ze(t,e){-1===t.indexOf(e)&&t.push(e)}function Je(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function ti(t){return t.split("-")[0]}function ei(t){return[].slice.call(t)}function ii(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function ni(){return document.createElement("div")}function ri(t){return["Element","Fragment"].some((function(e){return Ye(t,e)}))}function oi(t){return Ye(t,"NodeList")}function si(t){return Ye(t,"MouseEvent")}function ai(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function li(t){return ri(t)?[t]:oi(t)?ei(t):Array.isArray(t)?t:ei(document.querySelectorAll(t))}function ci(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function hi(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function di(t){var e,i=Qe(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function pi(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=ti(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,d="left"===s?a.right.x:0,p=e.top-n+l>o,u=n-e.bottom-c>o,g=e.left-i+h>o,f=i-e.right-d>o;return p||u||g||f}))}function ui(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var gi={isTouch:!1},fi=0;function mi(){gi.isTouch||(gi.isTouch=!0,window.performance&&document.addEventListener("mousemove",vi))}function vi(){var t=performance.now();t-fi<20&&(gi.isTouch=!1,document.removeEventListener("mousemove",vi)),fi=t}function bi(){var t=document.activeElement;if(ai(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function yi(){document.addEventListener("touchstart",mi,Ue),window.addEventListener("blur",bi)}var _i="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",wi=/MSIE |Trident\//.test(_i),xi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ki={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ai=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},xi,{},ki),zi=Object.keys(Ai),Si=function(t){Object.keys(t).forEach((function(e){Ai[e]=t[e]}))};function Ci(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function Ei(t,e){return(e?Object.keys(Ci(Object.assign({},Ai,{plugins:e}))):zi).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}function Mi(t,e){var i=Object.assign({},e,{content:Ge(e.content,[t])},e.ignoreAttributes?{}:Ei(t,e.plugins));return i.aria=Object.assign({},Ai.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}var Li=function(){return"innerHTML"};function Ti(t,e){t[Li()]=e}function Hi(t){var e=ni();return!0===t?e.className=je:(e.className=qe,ri(t)?e.appendChild(t):Ti(e,t)),e}function Oi(t,e){ri(e.content)?(Ti(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ti(t,e.content):t.textContent=e.content)}function $i(t){var e=t.firstElementChild,i=ei(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(Fe)})),arrow:i.find((function(t){return t.classList.contains(je)||t.classList.contains(qe)})),backdrop:i.find((function(t){return t.classList.contains(Be)}))}}function Vi(t){var e=ni(),i=ni();i.className=Ne,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=ni();function r(i,n){var r=$i(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Oi(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Hi(n.arrow))):o.appendChild(Hi(n.arrow)):a&&o.removeChild(a)}return n.className=Fe,n.setAttribute("data-state","hidden"),Oi(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Vi.$$tippy=!0;var Ii=1,Ri=[],Pi=[];function Di(t,e){var i,n,r,o,s,a,l,c=Mi(t,Object.assign({},Ai,{},Ci(ii(e)))),h=!1,d=!1,p=!1,u=!1,g=[],f=Xe(K,c.interactiveDebounce),m=Ii++,v=null,b=Je(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:ni(),popperInstance:v,props:c,state:y,plugins:b,clearDelayTimeouts:lt,setProps:ct,setContent:ht,show:dt,hide:pt,hideWithInteractivity:ut,enable:st,disable:at,unmount:gt,destroy:ft};if(!c.render)return _;var w=c.render(_),x=w.popper,k=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,t._tippy=_,x._tippy=_;var A=b.map((function(t){return t.fn(_)})),z=t.hasAttribute("aria-expanded");return Y(),I(),O(),$("onCreate",[_]),c.showOnCreate&&rt(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(t){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&(L().addEventListener("mousemove",f),f(t))})),_;function S(){var t=_.props.touch;return Array.isArray(t)?t:[t,0]}function C(){return"hold"===S()[0]}function E(){var t;return!!(null==(t=_.props.render)?void 0:t.$$tippy)}function M(){return l||t}function L(){var t=M().parentNode;return t?di(t):document}function T(){return $i(x)}function H(t){return _.state.isMounted&&!_.state.isVisible||gi.isTouch||o&&"focus"===o.type?0:We(_.props.delay,t?0:1,Ai.delay)}function O(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function $(t,e,i){var n;(void 0===i&&(i=!0),A.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=_.props)[t].apply(n,e)}function V(){var e=_.props.aria;if(e.content){var i="aria-"+e.content,n=x.id;Qe(_.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(_.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!z&&_.props.aria.expanded&&Qe(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===M()?"true":"false"):t.removeAttribute("aria-expanded")}))}function R(){L().removeEventListener("mousemove",f),Ri=Ri.filter((function(t){return t!==f}))}function P(t){if(!(gi.isTouch&&(p||"mousedown"===t.type)||_.props.interactive&&x.contains(t.target))){if(M().contains(t.target)){if(gi.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else $("onClickOutside",[_,t]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||B())}}function D(){p=!0}function N(){p=!1}function F(){var t=L();t.addEventListener("mousedown",P,!0),t.addEventListener("touchend",P,Ue),t.addEventListener("touchstart",N,Ue),t.addEventListener("touchmove",D,Ue)}function B(){var t=L();t.removeEventListener("mousedown",P,!0),t.removeEventListener("touchend",P,Ue),t.removeEventListener("touchstart",N,Ue),t.removeEventListener("touchmove",D,Ue)}function j(t,e){U(t,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}function q(t,e){U(t,e)}function U(t,e){var i=T().box;function n(t){t.target===i&&(ui(i,"remove",n),e())}if(0===t)return e();ui(i,"remove",s),ui(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),Qe(_.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),g.push({node:t,eventType:e,handler:i,options:n})}))}function Y(){C()&&(W("touchstart",X,{passive:!0}),W("touchend",Q,{passive:!0})),Ke(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,X),t){case"mouseenter":W("mouseleave",Q);break;case"focus":W(wi?"focusout":"blur",Z);break;case"focusin":W("focusout",Z)}}))}function G(){g.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),g=[]}function X(t){var e,i=!1;if(_.state.isEnabled&&!J(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,I(),!_.state.isVisible&&si(t)&&Ri.forEach((function(e){return e(t)})),"click"===t.type&&(_.props.trigger.indexOf("mouseenter")<0||h)&&!1!==_.props.hideOnClick&&_.state.isVisible?i=!0:rt(t),"click"===t.type&&(h=!i),i&&!n&&ot(t)}}function K(t){var e=t.target,i=M().contains(e)||x.contains(e);"mousemove"===t.type&&i||pi(nt().concat(x).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:c}:null})).filter(Boolean),t)&&(R(),ot(t))}function Q(t){J(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function Z(t){_.props.trigger.indexOf("focusin")<0&&t.target!==M()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function J(t){return!!gi.isTouch&&C()!==t.type.indexOf("touch")>=0}function tt(){et();var e=_.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,l=E()?$i(x).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||M()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(E()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];E()&&l&&h.push({name:"arrow",options:{element:l,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),_.popperInstance=De(c,x,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:h}))}function et(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function it(){var t,e=_.props.appendTo,i=M();(t=_.props.interactive&&e===Ai.appendTo||"parent"===e?i.parentNode:Ge(e,[i])).contains(x)||t.appendChild(x),tt()}function nt(){return ei(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&$("onTrigger",[_,t]),F();var e=H(!0),n=S(),r=n[0],o=n[1];gi.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout((function(){_.show()}),e):_.show()}function ot(t){if(_.clearDelayTimeouts(),$("onUntrigger",[_,t]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&h)){var e=H(!1);e?n=setTimeout((function(){_.state.isVisible&&_.hide()}),e):r=requestAnimationFrame((function(){_.hide()}))}}else B()}function st(){_.state.isEnabled=!0}function at(){_.hide(),_.state.isEnabled=!1}function lt(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(r)}function ct(e){if(!_.state.isDestroyed){$("onBeforeUpdate",[_,e]),G();var i=_.props,n=Mi(t,Object.assign({},_.props,{},e,{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(R(),f=Xe(K,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?Qe(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded"),I(),O(),k&&k(i,n),_.popperInstance&&(tt(),nt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),$("onAfterUpdate",[_,e])}}function ht(t){_.setProps({content:t})}function dt(){var t=_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=gi.isTouch&&!_.props.touch,r=We(_.props.duration,0,Ai.duration);if(!(t||e||i||n||M().hasAttribute("disabled")||($("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),O(),F(),_.state.isMounted||(x.style.transition="none"),E()){var o=T();ci([o.box,o.content],0)}a=function(){var t;if(_.state.isVisible&&!u){if(u=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,E()&&_.props.animation){var e=T(),i=e.box,n=e.content;ci([i,n],r),hi([i,n],"visible")}V(),I(),Ze(Pi,_),null==(t=_.popperInstance)||t.forceUpdate(),_.state.isMounted=!0,$("onMount",[_]),_.props.animation&&E()&&q(r,(function(){_.state.isShown=!0,$("onShown",[_])}))}},it()}}function pt(){var t=!_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=We(_.props.duration,1,Ai.duration);if(!(t||e||i)&&($("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,h=!1,E()&&(x.style.visibility="hidden"),R(),B(),O(),E()){var r=T(),o=r.box,s=r.content;_.props.animation&&(ci([o,s],n),hi([o,s],"hidden"))}V(),I(),_.props.animation?E()&&j(n,_.unmount):_.unmount()}}function ut(t){L().addEventListener("mousemove",f),Ze(Ri,f),f(t)}function gt(){_.state.isVisible&&_.hide(),_.state.isMounted&&(et(),nt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),Pi=Pi.filter((function(t){return t!==_})),_.state.isMounted=!1,$("onHidden",[_]))}function ft(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),G(),delete t._tippy,_.state.isDestroyed=!0,$("onDestroy",[_]))}}function Ni(t,e){void 0===e&&(e={});var i=Ai.plugins.concat(e.plugins||[]);yi();var n=Object.assign({},e,{plugins:i}),r=li(t).reduce((function(t,e){var i=e&&Di(e,n);return i&&t.push(i),t}),[]);return ri(t)?r[0]:r}Ni.defaultProps=Ai,Ni.setDefaultProps=Si,Ni.currentInput=gi;Object.assign({},At,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});function Fi(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}Ni.setDefaultProps({render:Vi});const Bi='\n .tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n }\n\n .tippy-iOS {\n cursor: pointer!important;\n -webkit-tap-highlight-color: transparent\n }\n\n [data-tippy-root] {\n max-width: calc(100vw - 10px)\n }\n\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: var(--pb-popover-font-size, var(--pb-base-font-size, 14px));\n line-height: var(--pb-popover-line-height, var(--pb-base-line-height, 1.4));\n text-align: left;\n font-style: normal;\n font-weight: normal;\n outline: 0;\n transition-property: transform, visibility, opacity\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow {\n bottom: 0\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow:before {\n bottom: -7px;\n left: 0;\n border-width: 8px 8px 0;\n border-top-color: initial;\n transform-origin: center top\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow {\n top: 0\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow:before {\n top: -7px;\n left: 0;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n transform-origin: center bottom\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow {\n right: 0\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow:before {\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n right: -7px;\n transform-origin: center left\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow {\n left: 0\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n transform-origin: center right\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11)\n }\n\n .tippy-arrow {\n width: 16px;\n height: 16px;\n color: #333\n }\n\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-content {\n position: relative;\n padding: 5px 9px;\n z-index: 1;\n overflow: auto;\n max-height: var(--pb-popover-max-height, calc(100vh - 60px));\n min-height: var(--pb-popover-min-height, auto);\n max-width: var(--pb-popover-max-width, auto);\n min-width: var(--pb-popover-min-width, auto);\n color: var(--pb-popover-color);\n }\n',ji='\n .tippy-box[data-theme~=light-border] {\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 8, 16, .15);\n color: #333;\n box-shadow: 0 4px 14px -2px rgba(0, 8, 16, .08)\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after, .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n content: "";\n position: absolute;\n z-index: -1\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after {\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after {\n border-top-color: rgba(0, 8, 16, .2);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg {\n top: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after {\n top: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff;\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after {\n border-bottom-color: rgba(0, 8, 16, .2);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg {\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after {\n bottom: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after {\n border-left-color: rgba(0, 8, 16, .2);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg {\n left: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after {\n left: 12px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff;\n right: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: rgba(0, 8, 16, .2)\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg {\n right: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after {\n right: 12px\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow {\n fill: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);\n background-size: 16px 6px;\n width: 16px;\n height: 6px\n }\n',qi="\n .tippy-box[data-theme~=light] {\n color: #26323d;\n box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-svg-arrow {\n fill: #fff\n }",Ui="\n .tippy-box[data-theme~=material] {\n background-color: #505355;\n font-weight: 600\n }\n\n .tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-backdrop {\n background-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-svg-arrow {\n fill: #505355\n }\n",Wi="\n .tippy-box[data-theme~=translucent] {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-arrow {\n width: 14px;\n height: 14px\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=top]>.tippy-arrow:before {\n border-width: 7px 7px 0;\n border-top-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=bottom]>.tippy-arrow:before {\n border-width: 0 7px 7px;\n border-bottom-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=left]>.tippy-arrow:before {\n border-width: 7px 0 7px 7px;\n border-left-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=right]>.tippy-arrow:before {\n border-width: 7px 7px 7px 0;\n border-right-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-backdrop {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-svg-arrow {\n fill: rgba(0, 0, 0, .7)\n }\n";var Yi=Object.freeze({__proto__:null,camelize:Fi,base:Bi,lightBorder:ji,light:qi,material:Ui,translucent:Wi});function Gi(t,e,i){if(!t.querySelector("#pb-popover-"+e)){const n=t.nodeType===Node.DOCUMENT_NODE?document.head:t;console.log("Loading tippy styles for theme %s into %o",e,n);const r=document.createElement("style");r.type="text/css",r.id="pb-popover-"+e,r.innerHTML=i,n.appendChild(r)}}function Xi(t,e){if(Gi(t,"base",Bi),e&&"none"!==e){const i=Fi(e),n=Yi[i];n&&Gi(t,i,n)}}class Ki extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{for:{type:String},theme:{type:String},placement:{type:String},fallbackPlacement:{type:String,attribute:"fallback-placement"},persistent:{type:Boolean},trigger:{type:String},popupClass:{type:String,attribute:"popup-class"},remote:{type:String}})}constructor(){super(),this.persistent=!1,this.trigger=null,this.for=null,this.theme=null,this.placement=null,this.fallbackPlacement=null,this.popupClass=null,this._tippy=null,this._content=null}render(){return this.for?I`<div class="hidden"><slot></slot></div>`:I`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"><slot name="default"><slot></slot></slot></span><span class="hidden"><slot name="alternate"></slot></span>`}disconnectedCallback(){super.disconnectedCallback(),this._tippy&&this._tippy.destroy(),this._observer&&this._observer.disconnect()}_checkCSSProperties(){this.theme||"none"===this.theme||(this.theme=this._getCSSProperty("--pb-popover-theme","none")),this.placement||(this.placement=this._getCSSProperty("--pb-popover-placement","auto")),this.fallbackPlacement||(this.fallbackPlacement=this._getCSSProperty("--pb-popover-fallback-placement",null)),this.persistent||(this.persistent=this._getCSSProperty("--pb-popover-persistent",!1)),this.trigger||(this.trigger=this._getCSSProperty("--pb-popover-trigger",null))}_getCSSProperty(t,e){const i=getComputedStyle(this).getPropertyValue(t);if(i)try{return JSON.parse(i)}catch(t){return e}return e}_injectStyles(){this._checkCSSProperties(),Xi(this.getRootNode(),this.theme)}_getContent(){if(this._content)return this._content;const t=this._getSlot();if(t){const e=document.createElement("div");return t.assignedNodes().forEach(t=>{e.appendChild(t.content?t.content.cloneNode(!0):t.cloneNode(!0))}),this._content=e,e}return null}_getSlot(){return this.for?this.shadowRoot.querySelector("slot"):this.shadowRoot.querySelector("[name=alternate]")}_registerMutationObserver(){const t=this._getSlot();this._observer=new MutationObserver(()=>{this.alternate=this._getContent(),console.log("alternate changed"),this.emitTo("pb-popover-changed",this.alternate)}),this._observer.observe(this,{subtree:!0,childList:!0,characterData:!0}),t&&t.assignedNodes().forEach(t=>{this._observer.observe(t.content?t.content:t,{subtree:!0,childList:!0,characterData:!0})})}get alternate(){return this._getContent()}set alternate(t){this._content=t,this._tippy&&this._tippy.setContent(this._content)}command(t,e){"disable"===t&&(this.disabled=e,this._tippy&&(e?this._tippy.disable():this._tippy.enable()))}firstUpdated(){super.firstUpdated(),this._injectStyles(),this._registerMutationObserver(),this.trigger||(this.trigger=this.persistent?"click":"mouseenter");const t=this.getRootNode();let e;if(this.for?(e=t.getElementById(this.for),e||console.error("<pb-popover> target element %s not found",this.for)):e=this.shadowRoot.getElementById("link"),e){const i={allowHTML:!0,appendTo:t.nodeType===Node.DOCUMENT_NODE?document.body:t,placement:this.placement,interactive:!0,ignoreAttributes:!0,boundary:"viewport",maxWidth:"none",touch:"hold",hideOnClick:!1,trigger:this.trigger};if(this.persistent&&(i.onClickOutside=(t,e)=>{t.hideWithInteractivity(e)}),this.theme&&"none"!==this.theme&&(i.theme=this.theme),this.fallbackPlacement){const t=this.fallbackPlacement.split(" ");i.popperOptions={modifiers:[{name:"flip",options:{fallbackPlacements:t}}]}}this.popupClass&&(i.onCreate=t=>{t.popper.classList.add(this.popupClass)}),i.onShow=t=>{this.remote?this._loadRemoteContent():t.setContent(this._getContent()),this.emitTo("pb-popover-show",{source:this})},this._tippy=Ni(e,i)}}_loadRemoteContent(){const t=this.toAbsoluteURL(this.remote);fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.text()).then(t=>{this.alternate=t}).catch(t=>{console.error("<pb-popover> Error retrieving remote content: %o",t)})}static get styles(){return[P`
510
+ `}}customElements.define("pb-demo-snippet",Z);class J{static subscribe(t,e,i,n=!1){e&&!Array.isArray(e)&&(e=[e]);const r=document.addEventListener(t,t=>{(e||t.detail&&t.detail.key)&&!(e&&t.detail&&t.detail.key&&e.indexOf(t.detail.key)>-1)||i&&i(t,r)},{once:n})}static subscribeOnce(t,e=null){return e&&!Array.isArray(e)&&(e=[e]),new Promise(i=>{document.addEventListener(t,t=>{(e||t.detail&&t.detail.key)&&!(e&&t.detail&&t.detail.key&&e.indexOf(t.detail.key)>-1)||i(t)},{once:!0})})}static emit(t,e=null,i=null){const n=i||{};e&&(n.key=e);const r=new CustomEvent(t,{detail:n});document.dispatchEvent(r)}}window.pbEvents||(window.pbEvents=J);const tt="1.38.0";class et extends V{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=tt}connectedCallback(){if(super.connectedCallback(),!this.version){const t=R("../package.json");fetch(t).then(t=>t.json()).then(t=>{this.version=t.version})}}render(){return I`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",et);var it="top",nt="bottom",rt="right",ot="left",st="auto",at=[it,nt,rt,ot],lt="start",ct="end",ht="clippingParents",dt="viewport",pt="popper",ut="reference",gt=at.reduce((function(t,e){return t.concat([e+"-"+lt,e+"-"+ct])}),[]),ft=[].concat(at,[st]).reduce((function(t,e){return t.concat([e,e+"-"+lt,e+"-"+ct])}),[]),mt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function vt(t){return t?(t.nodeName||"").toLowerCase():null}function bt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function yt(t){return t instanceof bt(t).Element||t instanceof Element}function _t(t){return t instanceof bt(t).HTMLElement||t instanceof HTMLElement}function wt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof bt(t).ShadowRoot||t instanceof ShadowRoot)}function xt(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];_t(r)&&vt(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))}function kt(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});_t(n)&&vt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var At={name:"applyStyles",enabled:!0,phase:"write",fn:xt,effect:kt,requires:["computeStyles"]};function zt(t){return t.split("-")[0]}function St(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function Ct(t){var e=St(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Et(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&wt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Mt(t){return bt(t).getComputedStyle(t)}function Lt(t){return["table","td","th"].indexOf(vt(t))>=0}function Tt(t){return((yt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ht(t){return"html"===vt(t)?t:t.assignedSlot||t.parentNode||(wt(t)?t.host:null)||Tt(t)}function Ot(t){return _t(t)&&"fixed"!==Mt(t).position?t.offsetParent:null}function $t(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&_t(t)&&"fixed"===Mt(t).position)return null;for(var i=Ht(t);_t(i)&&["html","body"].indexOf(vt(i))<0;){var n=Mt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function Vt(t){for(var e=bt(t),i=Ot(t);i&&Lt(i)&&"static"===Mt(i).position;)i=Ot(i);return i&&("html"===vt(i)||"body"===vt(i)&&"static"===Mt(i).position)?e:i||$t(t)||e}function It(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Rt=Math.max,Pt=Math.min,Dt=Math.round;function Nt(t,e,i){return Rt(t,Pt(e,i))}function Ft(){return{top:0,right:0,bottom:0,left:0}}function Bt(t){return Object.assign({},Ft(),t)}function jt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var qt=function(t,e){return Bt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:jt(t,at))};function Ut(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=zt(i.placement),l=It(a),c=[ot,rt].indexOf(a)>=0?"height":"width";if(o&&s){var h=qt(r.padding,i),d=Ct(o),p="y"===l?it:ot,u="y"===l?nt:rt,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Vt(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=g/2-f/2,y=h[p],_=v-d[c]-h[u],w=v/2-d[c]/2+b,x=Nt(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function Wt(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Et(e.elements.popper,n)&&(e.elements.arrow=n)}var Yt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gt(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:Dt(Dt(e*n)/n)||0,y:Dt(Dt(i*n)/n)||0}}function Xt(t){var e,i=t.popper,n=t.popperRect,r=t.placement,o=t.offsets,s=t.position,a=t.gpuAcceleration,l=t.adaptive,c=t.roundOffsets,h=!0===c?Gt(o):"function"==typeof c?c(o):o,d=h.x,p=void 0===d?0:d,u=h.y,g=void 0===u?0:u,f=o.hasOwnProperty("x"),m=o.hasOwnProperty("y"),v=ot,b=it,y=window;if(l){var _=Vt(i),w="clientHeight",x="clientWidth";_===bt(i)&&"static"!==Mt(_=Tt(i)).position&&(w="scrollHeight",x="scrollWidth"),_=_,r===it&&(b=nt,g-=_[w]-n.height,g*=a?1:-1),r===ot&&(v=rt,p-=_[x]-n.width,p*=a?1:-1)}var k,A=Object.assign({position:s},l&&Yt);return a?Object.assign({},A,((k={})[b]=m?"0":"",k[v]=f?"0":"",k.transform=(y.devicePixelRatio||1)<2?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",k)):Object.assign({},A,((e={})[b]=m?g+"px":"",e[v]=f?p+"px":"",e.transform="",e))}function Kt(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:zt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Xt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Xt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Qt={passive:!0};function Zt(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,Qt)})),a&&l.addEventListener("resize",i.update,Qt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,Qt)})),a&&l.removeEventListener("resize",i.update,Qt)}}var Jt={left:"right",right:"left",bottom:"top",top:"bottom"};function te(t){return t.replace(/left|right|bottom|top/g,(function(t){return Jt[t]}))}var ee={start:"end",end:"start"};function ie(t){return t.replace(/start|end/g,(function(t){return ee[t]}))}function ne(t){var e=bt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(t){return St(Tt(t)).left+ne(t).scrollLeft}function oe(t){var e=bt(t),i=Tt(t),n=e.visualViewport,r=i.clientWidth,o=i.clientHeight,s=0,a=0;return n&&(r=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,a=n.offsetTop)),{width:r,height:o,x:s+re(t),y:a}}function se(t){var e,i=Tt(t),n=ne(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=Rt(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Rt(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+re(t),l=-n.scrollTop;return"rtl"===Mt(r||i).direction&&(a+=Rt(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function ae(t){var e=Mt(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function le(t){return["html","body","#document"].indexOf(vt(t))>=0?t.ownerDocument.body:_t(t)&&ae(t)?t:le(Ht(t))}function ce(t,e){var i;void 0===e&&(e=[]);var n=le(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=bt(n),s=r?[o].concat(o.visualViewport||[],ae(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(ce(Ht(s)))}function he(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function de(t){var e=St(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function pe(t,e){return e===dt?he(oe(t)):_t(e)?de(e):he(se(Tt(t)))}function ue(t){var e=ce(Ht(t)),i=["absolute","fixed"].indexOf(Mt(t).position)>=0&&_t(t)?Vt(t):t;return yt(i)?e.filter((function(t){return yt(t)&&Et(t,i)&&"body"!==vt(t)})):[]}function ge(t,e,i){var n="clippingParents"===e?ue(t):[].concat(e),r=[].concat(n,[i]),o=r[0],s=r.reduce((function(e,i){var n=pe(t,i);return e.top=Rt(n.top,e.top),e.right=Pt(n.right,e.right),e.bottom=Pt(n.bottom,e.bottom),e.left=Rt(n.left,e.left),e}),pe(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function fe(t){return t.split("-")[1]}function me(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?zt(r):null,s=r?fe(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case it:e={x:a,y:i.y-n.height};break;case nt:e={x:a,y:i.y+i.height};break;case rt:e={x:i.x+i.width,y:l};break;case ot:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?It(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case lt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case ct:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function ve(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=void 0===n?t.placement:n,o=i.boundary,s=void 0===o?ht:o,a=i.rootBoundary,l=void 0===a?dt:a,c=i.elementContext,h=void 0===c?pt:c,d=i.altBoundary,p=void 0!==d&&d,u=i.padding,g=void 0===u?0:u,f=Bt("number"!=typeof g?g:jt(g,at)),m=h===pt?ut:pt,v=t.elements.reference,b=t.rects.popper,y=t.elements[p?m:h],_=ge(yt(y)?y:y.contextElement||Tt(t.elements.popper),s,l),w=St(v),x=me({reference:w,element:b,strategy:"absolute",placement:r}),k=he(Object.assign({},b,x)),A=h===pt?k:w,z={top:_.top-A.top+f.top,bottom:A.bottom-_.bottom+f.bottom,left:_.left-A.left+f.left,right:A.right-_.right+f.right},S=t.modifiersData.offset;if(h===pt&&S){var C=S[r];Object.keys(z).forEach((function(t){var e=[rt,nt].indexOf(t)>=0?1:-1,i=[it,nt].indexOf(t)>=0?"y":"x";z[t]+=C[i]*e}))}return z}function be(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?ft:l,h=fe(n),d=h?a?gt:gt.filter((function(t){return fe(t)===h})):at,p=d.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=d);var u=p.reduce((function(e,i){return e[i]=ve(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[zt(i)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}function ye(t){if(zt(t)===st)return[];var e=te(t);return[ie(t),e,ie(e)]}function _e(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,p=i.altBoundary,u=i.flipVariations,g=void 0===u||u,f=i.allowedAutoPlacements,m=e.options.placement,v=zt(m),b=l||(v===m||!g?[te(m)]:ye(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(zt(i)===st?be(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)}),[]),_=e.rects.reference,w=e.rects.popper,x=new Map,k=!0,A=y[0],z=0;z<y.length;z++){var S=y[z],C=zt(S),E=fe(S)===lt,M=[it,nt].indexOf(C)>=0,L=M?"width":"height",T=ve(e,{placement:S,boundary:h,rootBoundary:d,altBoundary:p,padding:c}),H=M?E?rt:ot:E?nt:it;_[L]>w[L]&&(H=te(H));var O=te(H),$=[];if(o&&$.push(T[C]<=0),a&&$.push(T[H]<=0,T[O]<=0),$.every((function(t){return t}))){A=S,k=!1;break}x.set(S,$)}if(k)for(var V=function(t){var e=y.find((function(e){var i=x.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},I=g?3:1;I>0;I--){if("break"===V(I))break}e.placement!==A&&(e.modifiersData[n]._skip=!0,e.placement=A,e.reset=!0)}}function we(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function xe(t){return[it,rt,nt,ot].some((function(e){return t[e]>=0}))}function ke(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=ve(e,{elementContext:"reference"}),a=ve(e,{altBoundary:!0}),l=we(s,n),c=we(a,r,o),h=xe(l),d=xe(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}function Ae(t,e,i){var n=zt(t),r=[ot,it].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[ot,rt].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function ze(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=ft.reduce((function(t,i){return t[i]=Ae(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}function Se(t){var e=t.state,i=t.name;e.modifiersData[i]=me({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function Ce(t){return"x"===t?"y":"x"}function Ee(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,p=i.tether,u=void 0===p||p,g=i.tetherOffset,f=void 0===g?0:g,m=ve(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),v=zt(e.placement),b=fe(e.placement),y=!b,_=It(v),w=Ce(_),x=e.modifiersData.popperOffsets,k=e.rects.reference,A=e.rects.popper,z="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,S={x:0,y:0};if(x){if(o||a){var C="y"===_?it:ot,E="y"===_?nt:rt,M="y"===_?"height":"width",L=x[_],T=x[_]+m[C],H=x[_]-m[E],O=u?-A[M]/2:0,$=b===lt?k[M]:A[M],V=b===lt?-A[M]:-k[M],I=e.elements.arrow,R=u&&I?Ct(I):{width:0,height:0},P=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ft(),D=P[C],N=P[E],F=Nt(0,k[M],R[M]),B=y?k[M]/2-O-F-D-z:$-F-D-z,j=y?-k[M]/2+O+F+N+z:V+F+N+z,q=e.elements.arrow&&Vt(e.elements.arrow),U=q?"y"===_?q.clientTop||0:q.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][_]:0,Y=x[_]+B-W-U,G=x[_]+j-W;if(o){var X=Nt(u?Pt(T,Y):T,L,u?Rt(H,G):H);x[_]=X,S[_]=X-L}if(a){var K="x"===_?it:ot,Q="x"===_?nt:rt,Z=x[w],J=Z+m[K],tt=Z-m[Q],et=Nt(u?Pt(J,Y):J,Z,u?Rt(tt,G):tt);x[w]=et,S[w]=et-Z}}e.modifiersData[n]=S}}function Me(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Le(t){return t!==bt(t)&&_t(t)?Me(t):ne(t)}function Te(t,e,i){void 0===i&&(i=!1);var n=Tt(e),r=St(t),o=_t(e),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&(("body"!==vt(e)||ae(n))&&(s=Le(e)),_t(e)?((a=St(e)).x+=e.clientLeft,a.y+=e.clientTop):n&&(a.x=re(n))),{x:r.left+s.scrollLeft-a.x,y:r.top+s.scrollTop-a.y,width:r.width,height:r.height}}function He(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}function Oe(t){var e=He(t);return mt.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function $e(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Ve(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Ie={placement:"bottom",modifiers:[],strategy:"absolute"};function Re(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Pe(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?Ie:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ie,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},s=[],a=!1,l={state:r,setOptions:function(i){h(),r.options=Object.assign({},o,r.options,i),r.scrollParents={reference:yt(t)?ce(t):t.contextElement?ce(t.contextElement):[],popper:ce(e)};var s=Oe(Ve([].concat(n,r.options.modifiers)));return r.orderedModifiers=s.filter((function(t){return t.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var t=r.elements,e=t.reference,i=t.popper;if(Re(e,i)){r.rects={reference:Te(e,Vt(i),"fixed"===r.options.strategy),popper:Ct(i)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach((function(t){return r.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<r.orderedModifiers.length;n++)if(!0!==r.reset){var o=r.orderedModifiers[n],s=o.fn,c=o.options,h=void 0===c?{}:c,d=o.name;"function"==typeof s&&(r=s({state:r,options:h,name:d,instance:l})||r)}else r.reset=!1,n=-1}}},update:$e((function(){return new Promise((function(t){l.forceUpdate(),t(r)}))})),destroy:function(){h(),a=!0}};if(!Re(t,e))return l;function c(){r.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,o=t.effect;if("function"==typeof o){var a=o({state:r,name:e,instance:l,options:n}),c=function(){};s.push(a||c)}}))}function h(){s.forEach((function(t){return t()})),s=[]}return l.setOptions(i).then((function(t){!a&&i.onFirstUpdate&&i.onFirstUpdate(t)})),l}}var De=Pe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Zt,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Se,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kt,data:{}},At,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ze},{name:"flip",enabled:!0,phase:"main",fn:_e,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:Ee,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:Ut,effect:Wt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ke}]}),Ne="tippy-box",Fe="tippy-content",Be="tippy-backdrop",je="tippy-arrow",qe="tippy-svg-arrow",Ue={passive:!0,capture:!0};function We(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function Ye(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function Ge(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Xe(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function Ke(t){return t.split(/\s+/).filter(Boolean)}function Qe(t){return[].concat(t)}function Ze(t,e){-1===t.indexOf(e)&&t.push(e)}function Je(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function ti(t){return t.split("-")[0]}function ei(t){return[].slice.call(t)}function ii(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function ni(){return document.createElement("div")}function ri(t){return["Element","Fragment"].some((function(e){return Ye(t,e)}))}function oi(t){return Ye(t,"NodeList")}function si(t){return Ye(t,"MouseEvent")}function ai(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function li(t){return ri(t)?[t]:oi(t)?ei(t):Array.isArray(t)?t:ei(document.querySelectorAll(t))}function ci(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function hi(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function di(t){var e,i=Qe(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function pi(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=ti(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,d="left"===s?a.right.x:0,p=e.top-n+l>o,u=n-e.bottom-c>o,g=e.left-i+h>o,f=i-e.right-d>o;return p||u||g||f}))}function ui(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var gi={isTouch:!1},fi=0;function mi(){gi.isTouch||(gi.isTouch=!0,window.performance&&document.addEventListener("mousemove",vi))}function vi(){var t=performance.now();t-fi<20&&(gi.isTouch=!1,document.removeEventListener("mousemove",vi)),fi=t}function bi(){var t=document.activeElement;if(ai(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function yi(){document.addEventListener("touchstart",mi,Ue),window.addEventListener("blur",bi)}var _i="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",wi=/MSIE |Trident\//.test(_i),xi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ki={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ai=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},xi,{},ki),zi=Object.keys(Ai),Si=function(t){Object.keys(t).forEach((function(e){Ai[e]=t[e]}))};function Ci(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function Ei(t,e){return(e?Object.keys(Ci(Object.assign({},Ai,{plugins:e}))):zi).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}function Mi(t,e){var i=Object.assign({},e,{content:Ge(e.content,[t])},e.ignoreAttributes?{}:Ei(t,e.plugins));return i.aria=Object.assign({},Ai.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}var Li=function(){return"innerHTML"};function Ti(t,e){t[Li()]=e}function Hi(t){var e=ni();return!0===t?e.className=je:(e.className=qe,ri(t)?e.appendChild(t):Ti(e,t)),e}function Oi(t,e){ri(e.content)?(Ti(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ti(t,e.content):t.textContent=e.content)}function $i(t){var e=t.firstElementChild,i=ei(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(Fe)})),arrow:i.find((function(t){return t.classList.contains(je)||t.classList.contains(qe)})),backdrop:i.find((function(t){return t.classList.contains(Be)}))}}function Vi(t){var e=ni(),i=ni();i.className=Ne,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=ni();function r(i,n){var r=$i(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Oi(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Hi(n.arrow))):o.appendChild(Hi(n.arrow)):a&&o.removeChild(a)}return n.className=Fe,n.setAttribute("data-state","hidden"),Oi(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Vi.$$tippy=!0;var Ii=1,Ri=[],Pi=[];function Di(t,e){var i,n,r,o,s,a,l,c=Mi(t,Object.assign({},Ai,{},Ci(ii(e)))),h=!1,d=!1,p=!1,u=!1,g=[],f=Xe(K,c.interactiveDebounce),m=Ii++,v=null,b=Je(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:ni(),popperInstance:v,props:c,state:y,plugins:b,clearDelayTimeouts:lt,setProps:ct,setContent:ht,show:dt,hide:pt,hideWithInteractivity:ut,enable:st,disable:at,unmount:gt,destroy:ft};if(!c.render)return _;var w=c.render(_),x=w.popper,k=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,t._tippy=_,x._tippy=_;var A=b.map((function(t){return t.fn(_)})),z=t.hasAttribute("aria-expanded");return Y(),I(),O(),$("onCreate",[_]),c.showOnCreate&&rt(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(t){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&(L().addEventListener("mousemove",f),f(t))})),_;function S(){var t=_.props.touch;return Array.isArray(t)?t:[t,0]}function C(){return"hold"===S()[0]}function E(){var t;return!!(null==(t=_.props.render)?void 0:t.$$tippy)}function M(){return l||t}function L(){var t=M().parentNode;return t?di(t):document}function T(){return $i(x)}function H(t){return _.state.isMounted&&!_.state.isVisible||gi.isTouch||o&&"focus"===o.type?0:We(_.props.delay,t?0:1,Ai.delay)}function O(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function $(t,e,i){var n;(void 0===i&&(i=!0),A.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=_.props)[t].apply(n,e)}function V(){var e=_.props.aria;if(e.content){var i="aria-"+e.content,n=x.id;Qe(_.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(_.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!z&&_.props.aria.expanded&&Qe(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===M()?"true":"false"):t.removeAttribute("aria-expanded")}))}function R(){L().removeEventListener("mousemove",f),Ri=Ri.filter((function(t){return t!==f}))}function P(t){if(!(gi.isTouch&&(p||"mousedown"===t.type)||_.props.interactive&&x.contains(t.target))){if(M().contains(t.target)){if(gi.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else $("onClickOutside",[_,t]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||B())}}function D(){p=!0}function N(){p=!1}function F(){var t=L();t.addEventListener("mousedown",P,!0),t.addEventListener("touchend",P,Ue),t.addEventListener("touchstart",N,Ue),t.addEventListener("touchmove",D,Ue)}function B(){var t=L();t.removeEventListener("mousedown",P,!0),t.removeEventListener("touchend",P,Ue),t.removeEventListener("touchstart",N,Ue),t.removeEventListener("touchmove",D,Ue)}function j(t,e){U(t,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}function q(t,e){U(t,e)}function U(t,e){var i=T().box;function n(t){t.target===i&&(ui(i,"remove",n),e())}if(0===t)return e();ui(i,"remove",s),ui(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),Qe(_.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),g.push({node:t,eventType:e,handler:i,options:n})}))}function Y(){C()&&(W("touchstart",X,{passive:!0}),W("touchend",Q,{passive:!0})),Ke(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,X),t){case"mouseenter":W("mouseleave",Q);break;case"focus":W(wi?"focusout":"blur",Z);break;case"focusin":W("focusout",Z)}}))}function G(){g.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),g=[]}function X(t){var e,i=!1;if(_.state.isEnabled&&!J(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,I(),!_.state.isVisible&&si(t)&&Ri.forEach((function(e){return e(t)})),"click"===t.type&&(_.props.trigger.indexOf("mouseenter")<0||h)&&!1!==_.props.hideOnClick&&_.state.isVisible?i=!0:rt(t),"click"===t.type&&(h=!i),i&&!n&&ot(t)}}function K(t){var e=t.target,i=M().contains(e)||x.contains(e);"mousemove"===t.type&&i||pi(nt().concat(x).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:c}:null})).filter(Boolean),t)&&(R(),ot(t))}function Q(t){J(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function Z(t){_.props.trigger.indexOf("focusin")<0&&t.target!==M()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function J(t){return!!gi.isTouch&&C()!==t.type.indexOf("touch")>=0}function tt(){et();var e=_.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,l=E()?$i(x).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||M()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(E()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];E()&&l&&h.push({name:"arrow",options:{element:l,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),_.popperInstance=De(c,x,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:h}))}function et(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function it(){var t,e=_.props.appendTo,i=M();(t=_.props.interactive&&e===Ai.appendTo||"parent"===e?i.parentNode:Ge(e,[i])).contains(x)||t.appendChild(x),tt()}function nt(){return ei(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&$("onTrigger",[_,t]),F();var e=H(!0),n=S(),r=n[0],o=n[1];gi.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout((function(){_.show()}),e):_.show()}function ot(t){if(_.clearDelayTimeouts(),$("onUntrigger",[_,t]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&h)){var e=H(!1);e?n=setTimeout((function(){_.state.isVisible&&_.hide()}),e):r=requestAnimationFrame((function(){_.hide()}))}}else B()}function st(){_.state.isEnabled=!0}function at(){_.hide(),_.state.isEnabled=!1}function lt(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(r)}function ct(e){if(!_.state.isDestroyed){$("onBeforeUpdate",[_,e]),G();var i=_.props,n=Mi(t,Object.assign({},_.props,{},e,{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(R(),f=Xe(K,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?Qe(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded"),I(),O(),k&&k(i,n),_.popperInstance&&(tt(),nt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),$("onAfterUpdate",[_,e])}}function ht(t){_.setProps({content:t})}function dt(){var t=_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=gi.isTouch&&!_.props.touch,r=We(_.props.duration,0,Ai.duration);if(!(t||e||i||n||M().hasAttribute("disabled")||($("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),O(),F(),_.state.isMounted||(x.style.transition="none"),E()){var o=T();ci([o.box,o.content],0)}a=function(){var t;if(_.state.isVisible&&!u){if(u=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,E()&&_.props.animation){var e=T(),i=e.box,n=e.content;ci([i,n],r),hi([i,n],"visible")}V(),I(),Ze(Pi,_),null==(t=_.popperInstance)||t.forceUpdate(),_.state.isMounted=!0,$("onMount",[_]),_.props.animation&&E()&&q(r,(function(){_.state.isShown=!0,$("onShown",[_])}))}},it()}}function pt(){var t=!_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=We(_.props.duration,1,Ai.duration);if(!(t||e||i)&&($("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,h=!1,E()&&(x.style.visibility="hidden"),R(),B(),O(),E()){var r=T(),o=r.box,s=r.content;_.props.animation&&(ci([o,s],n),hi([o,s],"hidden"))}V(),I(),_.props.animation?E()&&j(n,_.unmount):_.unmount()}}function ut(t){L().addEventListener("mousemove",f),Ze(Ri,f),f(t)}function gt(){_.state.isVisible&&_.hide(),_.state.isMounted&&(et(),nt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),Pi=Pi.filter((function(t){return t!==_})),_.state.isMounted=!1,$("onHidden",[_]))}function ft(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),G(),delete t._tippy,_.state.isDestroyed=!0,$("onDestroy",[_]))}}function Ni(t,e){void 0===e&&(e={});var i=Ai.plugins.concat(e.plugins||[]);yi();var n=Object.assign({},e,{plugins:i}),r=li(t).reduce((function(t,e){var i=e&&Di(e,n);return i&&t.push(i),t}),[]);return ri(t)?r[0]:r}Ni.defaultProps=Ai,Ni.setDefaultProps=Si,Ni.currentInput=gi;Object.assign({},At,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});function Fi(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}Ni.setDefaultProps({render:Vi});const Bi='\n .tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n }\n\n .tippy-iOS {\n cursor: pointer!important;\n -webkit-tap-highlight-color: transparent\n }\n\n [data-tippy-root] {\n max-width: calc(100vw - 10px)\n }\n\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: var(--pb-popover-font-size, var(--pb-base-font-size, 14px));\n line-height: var(--pb-popover-line-height, var(--pb-base-line-height, 1.4));\n text-align: left;\n font-style: normal;\n font-weight: normal;\n outline: 0;\n transition-property: transform, visibility, opacity\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow {\n bottom: 0\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow:before {\n bottom: -7px;\n left: 0;\n border-width: 8px 8px 0;\n border-top-color: initial;\n transform-origin: center top\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow {\n top: 0\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow:before {\n top: -7px;\n left: 0;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n transform-origin: center bottom\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow {\n right: 0\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow:before {\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n right: -7px;\n transform-origin: center left\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow {\n left: 0\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n transform-origin: center right\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11)\n }\n\n .tippy-arrow {\n width: 16px;\n height: 16px;\n color: #333\n }\n\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-content {\n position: relative;\n padding: 5px 9px;\n z-index: 1;\n overflow: auto;\n max-height: var(--pb-popover-max-height, calc(100vh - 60px));\n min-height: var(--pb-popover-min-height, auto);\n max-width: var(--pb-popover-max-width, auto);\n min-width: var(--pb-popover-min-width, auto);\n color: var(--pb-popover-color);\n }\n',ji='\n .tippy-box[data-theme~=light-border] {\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 8, 16, .15);\n color: #333;\n box-shadow: 0 4px 14px -2px rgba(0, 8, 16, .08)\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after, .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n content: "";\n position: absolute;\n z-index: -1\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after {\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after {\n border-top-color: rgba(0, 8, 16, .2);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg {\n top: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after {\n top: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff;\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after {\n border-bottom-color: rgba(0, 8, 16, .2);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg {\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after {\n bottom: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after {\n border-left-color: rgba(0, 8, 16, .2);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg {\n left: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after {\n left: 12px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff;\n right: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: rgba(0, 8, 16, .2)\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg {\n right: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after {\n right: 12px\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow {\n fill: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);\n background-size: 16px 6px;\n width: 16px;\n height: 6px\n }\n',qi="\n .tippy-box[data-theme~=light] {\n color: #26323d;\n box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-svg-arrow {\n fill: #fff\n }",Ui="\n .tippy-box[data-theme~=material] {\n background-color: #505355;\n font-weight: 600\n }\n\n .tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-backdrop {\n background-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-svg-arrow {\n fill: #505355\n }\n",Wi="\n .tippy-box[data-theme~=translucent] {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-arrow {\n width: 14px;\n height: 14px\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=top]>.tippy-arrow:before {\n border-width: 7px 7px 0;\n border-top-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=bottom]>.tippy-arrow:before {\n border-width: 0 7px 7px;\n border-bottom-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=left]>.tippy-arrow:before {\n border-width: 7px 0 7px 7px;\n border-left-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=right]>.tippy-arrow:before {\n border-width: 7px 7px 7px 0;\n border-right-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-backdrop {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-svg-arrow {\n fill: rgba(0, 0, 0, .7)\n }\n";var Yi=Object.freeze({__proto__:null,camelize:Fi,base:Bi,lightBorder:ji,light:qi,material:Ui,translucent:Wi});function Gi(t,e,i){if(!t.querySelector("#pb-popover-"+e)){const n=t.nodeType===Node.DOCUMENT_NODE?document.head:t;console.log("Loading tippy styles for theme %s into %o",e,n);const r=document.createElement("style");r.type="text/css",r.id="pb-popover-"+e,r.innerHTML=i,n.appendChild(r)}}function Xi(t,e){if(Gi(t,"base",Bi),e&&"none"!==e){const i=Fi(e),n=Yi[i];n&&Gi(t,i,n)}}class Ki extends(D(V)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{for:{type:String},theme:{type:String},placement:{type:String},fallbackPlacement:{type:String,attribute:"fallback-placement"},persistent:{type:Boolean},trigger:{type:String},popupClass:{type:String,attribute:"popup-class"},remote:{type:String}})}constructor(){super(),this.persistent=!1,this.trigger=null,this.for=null,this.theme=null,this.placement=null,this.fallbackPlacement=null,this.popupClass=null,this._tippy=null,this._content=null}render(){return this.for?I`<div class="hidden"><slot></slot></div>`:I`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"><slot name="default"><slot></slot></slot></span><span class="hidden"><slot name="alternate"></slot></span>`}disconnectedCallback(){super.disconnectedCallback(),this._tippy&&this._tippy.destroy(),this._observer&&this._observer.disconnect()}_checkCSSProperties(){this.theme||"none"===this.theme||(this.theme=this._getCSSProperty("--pb-popover-theme","none")),this.placement||(this.placement=this._getCSSProperty("--pb-popover-placement","auto")),this.fallbackPlacement||(this.fallbackPlacement=this._getCSSProperty("--pb-popover-fallback-placement",null)),this.persistent||(this.persistent=this._getCSSProperty("--pb-popover-persistent",!1)),this.trigger||(this.trigger=this._getCSSProperty("--pb-popover-trigger",null))}_getCSSProperty(t,e){const i=getComputedStyle(this).getPropertyValue(t);if(i)try{return JSON.parse(i)}catch(t){return e}return e}_injectStyles(){this._checkCSSProperties(),Xi(this.getRootNode(),this.theme)}_getContent(){if(this._content)return this._content;const t=this._getSlot();if(t){const e=document.createElement("div");return t.assignedNodes().forEach(t=>{e.appendChild(t.content?t.content.cloneNode(!0):t.cloneNode(!0))}),this._content=e,e}return null}_getSlot(){return this.for?this.shadowRoot.querySelector("slot"):this.shadowRoot.querySelector("[name=alternate]")}_registerMutationObserver(){const t=this._getSlot();this._observer=new MutationObserver(()=>{this.alternate=this._getContent(),console.log("alternate changed"),this.emitTo("pb-popover-changed",this.alternate)}),this._observer.observe(this,{subtree:!0,childList:!0,characterData:!0}),t&&t.assignedNodes().forEach(t=>{this._observer.observe(t.content?t.content:t,{subtree:!0,childList:!0,characterData:!0})})}get alternate(){return this._getContent()}set alternate(t){this._content=t,this._tippy&&this._tippy.setContent(this._content)}command(t,e){"disable"===t&&(this.disabled=e,this._tippy&&(e?this._tippy.disable():this._tippy.enable()))}firstUpdated(){super.firstUpdated(),this._injectStyles(),this._registerMutationObserver(),this.trigger||(this.trigger=this.persistent?"click":"mouseenter");const t=this.getRootNode();let e;if(this.for?(e=t.getElementById(this.for),e||console.error("<pb-popover> target element %s not found",this.for)):e=this.shadowRoot.getElementById("link"),e){const i={allowHTML:!0,appendTo:t.nodeType===Node.DOCUMENT_NODE?document.body:t,placement:this.placement,interactive:!0,ignoreAttributes:!0,boundary:"viewport",maxWidth:"none",touch:"hold",hideOnClick:!1,trigger:this.trigger};if(this.persistent&&(i.onClickOutside=(t,e)=>{t.hideWithInteractivity(e)}),this.theme&&"none"!==this.theme&&(i.theme=this.theme),this.fallbackPlacement){const t=this.fallbackPlacement.split(" ");i.popperOptions={modifiers:[{name:"flip",options:{fallbackPlacements:t}}]}}this.popupClass&&(i.onCreate=t=>{t.popper.classList.add(this.popupClass)}),i.onShow=t=>{this.remote?this._loadRemoteContent():t.setContent(this._getContent()),this.emitTo("pb-popover-show",{source:this})},this._tippy=Ni(e,i)}}_loadRemoteContent(){const t=this.toAbsoluteURL(this.remote);fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.text()).then(t=>{this.alternate=t}).catch(t=>{console.error("<pb-popover> Error retrieving remote content: %o",t)})}static get styles(){return[P`
511
511
  :host {
512
512
  display: inline;
513
513
  }
@@ -3594,7 +3594,7 @@ e({is:"transform-animation",behaviors:[z],configure:function(t){var e=t.node,i=t
3594
3594
  --paper-listbox-background-color: white;
3595
3595
  width: 100%;
3596
3596
  }
3597
- `}_selected(){const t=this.shadowRoot.getElementById("templates").selected;t!==this.template&&(this.setParameter("template",t),window.location=this.getUrl().toString())}_handleTemplatesResponse(){const t=this.shadowRoot.getElementById("getTemplates");this._templates=t.lastResponse}}customElements.define("pb-select-template",ka);class Aa extends Qi{static get properties(){return Object.assign(Object.assign({},super.properties),{},{longitude:{type:Number},latitude:{type:Number},label:{type:String},event:{type:String},zoom:{type:Number},auto:{type:Boolean}})}constructor(){super(),this.event="mouseover",this.auto=!1,this.zoom=null}connectedCallback(){super.connectedCallback(),this.event&&this.addEventListener(this.event,()=>this.emitTo("pb-geolocation",{coordinates:{latitude:this.latitude,longitude:this.longitude},label:this.label,zoom:this.zoom,popup:this.popup,element:this})),this.auto&&this.waitForChannel(()=>{this.emitTo("pb-geolocation",{coordinates:{latitude:this.latitude,longitude:this.longitude},label:this.label,popup:this.popup,fitBounds:!0,element:this})})}render(){return I`<span id="content"><slot></slot></span>`}get popup(){const t=this.querySelector("template");if(t){const e=document.createElement("div");return e.appendChild(t.content.cloneNode(!0)),e}return null}static get styles(){return P`
3597
+ `}_selected(){const t=this.shadowRoot.getElementById("templates").selected;t!==this.template&&(this.setParameter("template",t),window.location=this.getUrl().toString())}_handleTemplatesResponse(){const t=this.shadowRoot.getElementById("getTemplates");this._templates=t.lastResponse}}customElements.define("pb-select-template",ka);class Aa extends Qi{static get properties(){return Object.assign(Object.assign({},super.properties),{},{longitude:{type:Number},latitude:{type:Number},label:{type:String},event:{type:String},zoom:{type:Number},auto:{type:Boolean}})}constructor(){super(),this.event="mouseover",this.auto=!1,this.zoom=null}connectedCallback(){super.connectedCallback(),this.event&&this.addEventListener(this.event,()=>this.emitTo("pb-geolocation",{coordinates:{latitude:this.latitude,longitude:this.longitude},label:this.label,zoom:this.zoom,popup:this.popup,element:this,event:this.event})),this.auto&&this.waitForChannel(()=>{this.emitTo("pb-geolocation",{coordinates:{latitude:this.latitude,longitude:this.longitude},label:this.label,popup:this.popup,fitBounds:!0,element:this})})}render(){return I`<span id="content"><slot></slot></span>`}get popup(){const t=this.querySelector("template");if(t){const e=document.createElement("div");return e.appendChild(t.content.cloneNode(!0)),e}return null}static get styles(){return P`
3598
3598
  :host {
3599
3599
  display: inline;
3600
3600
  cursor: pointer;
@@ -3958,7 +3958,7 @@
3958
3958
  {
3959
3959
  "name": "pb-geolocation",
3960
3960
  "path": "./src/pb-geolocation.js",
3961
- "description": "Represents a geo location. Extends `pb-highlight`, but sends an additional `pb-geolocation` event\non mouseover.\n\nFor `pb-leaflet-map` to show markers for `pb-geolocation` elements, make sure that map subscribes to the channel\ninto which `pb-geolocation`s emit and that map is loaded before the emitting component, e.g. `pb-view`, by specifying \n`wait-for` property",
3961
+ "description": "Represents a geo location. Extends `pb-highlight`, but sends an additional `pb-geolocation` event\non mouseover.\n\nFor `pb-leaflet-map` to show markers for `pb-geolocation` elements, make sure that map subscribes to the channel\ninto which `pb-geolocation`s emit and that map is loaded before the emitting component, e.g. `pb-view`, by specifying \n`wait-for` property.",
3962
3962
  "attributes": [
3963
3963
  {
3964
3964
  "name": "longitude",
@@ -4764,7 +4764,7 @@
4764
4764
  {
4765
4765
  "name": "pb-leaflet-map",
4766
4766
  "path": "./src/pb-leaflet-map.js",
4767
- "description": "A wrapper component for [leaflet](https://leafletjs.com/) displaying a map.",
4767
+ "description": "A wrapper component for [leaflet](https://leafletjs.com/) displaying a map.\n\nThe map layers displayed can be configured via nested `pb-map-layer` (see docs) elements,\nicons via `pb-map-icon`.",
4768
4768
  "attributes": [
4769
4769
  {
4770
4770
  "name": "latitude",
@@ -5737,6 +5737,114 @@
5737
5737
  }
5738
5738
  ]
5739
5739
  },
5740
+ {
5741
+ "name": "pb-map-icon",
5742
+ "path": "./src/pb-map-icon.js",
5743
+ "description": "Configure a map icon type to be used for markers. \nShould be nested inside `pb-leaflet-map`.",
5744
+ "attributes": [
5745
+ {
5746
+ "name": "icon-size",
5747
+ "description": "Size of the icon as comma-separated string, i.e. 'height, width'.",
5748
+ "type": "array"
5749
+ },
5750
+ {
5751
+ "name": "icon-anchor",
5752
+ "description": "Anchor position of the icon as comma-separated string, i.e. 'height, width'.",
5753
+ "type": "array"
5754
+ },
5755
+ {
5756
+ "name": "shadow-url",
5757
+ "description": "The URL to load the shadow icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5758
+ "type": "string"
5759
+ },
5760
+ {
5761
+ "name": "shadow-size",
5762
+ "description": "Size of the shadow icon as comma-separated string, i.e. 'height, width'.",
5763
+ "type": "array"
5764
+ },
5765
+ {
5766
+ "name": "shadow-anchor",
5767
+ "description": "Anchor position of the shadow icon as comma-separated string, i.e. 'height, width'.",
5768
+ "type": "array"
5769
+ },
5770
+ {
5771
+ "name": "popup-anchor",
5772
+ "description": "Anchor position of the popup as comma-separated string, i.e. 'height, width'.",
5773
+ "type": "array"
5774
+ },
5775
+ {
5776
+ "name": "name",
5777
+ "description": "Name of the icon. Set to 'active' to configure the icon used for\nplaces which were target of a previous `pb-geolocation` event (i.e. are currently 'active').",
5778
+ "type": "string",
5779
+ "default": "\"default\""
5780
+ },
5781
+ {
5782
+ "name": "icon-url",
5783
+ "description": "The URL to load the icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5784
+ "type": "string"
5785
+ }
5786
+ ],
5787
+ "properties": [
5788
+ {
5789
+ "name": "iconSize",
5790
+ "attribute": "icon-size",
5791
+ "description": "Size of the icon as comma-separated string, i.e. 'height, width'.",
5792
+ "type": "array"
5793
+ },
5794
+ {
5795
+ "name": "iconAnchor",
5796
+ "attribute": "icon-anchor",
5797
+ "description": "Anchor position of the icon as comma-separated string, i.e. 'height, width'.",
5798
+ "type": "array"
5799
+ },
5800
+ {
5801
+ "name": "shadowUrl",
5802
+ "attribute": "shadow-url",
5803
+ "description": "The URL to load the shadow icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5804
+ "type": "string"
5805
+ },
5806
+ {
5807
+ "name": "shadowSize",
5808
+ "attribute": "shadow-size",
5809
+ "description": "Size of the shadow icon as comma-separated string, i.e. 'height, width'.",
5810
+ "type": "array"
5811
+ },
5812
+ {
5813
+ "name": "shadowAnchor",
5814
+ "attribute": "shadow-anchor",
5815
+ "description": "Anchor position of the shadow icon as comma-separated string, i.e. 'height, width'.",
5816
+ "type": "array"
5817
+ },
5818
+ {
5819
+ "name": "popupAncor",
5820
+ "attribute": "popup-anchor",
5821
+ "description": "Anchor position of the popup as comma-separated string, i.e. 'height, width'.",
5822
+ "type": "array"
5823
+ },
5824
+ {
5825
+ "name": "options",
5826
+ "type": "object"
5827
+ },
5828
+ {
5829
+ "name": "name",
5830
+ "attribute": "name",
5831
+ "description": "Name of the icon. Set to 'active' to configure the icon used for\nplaces which were target of a previous `pb-geolocation` event (i.e. are currently 'active').",
5832
+ "type": "string",
5833
+ "default": "\"default\""
5834
+ },
5835
+ {
5836
+ "name": "type",
5837
+ "type": "string",
5838
+ "default": "\"image\""
5839
+ },
5840
+ {
5841
+ "name": "iconUrl",
5842
+ "attribute": "icon-url",
5843
+ "description": "The URL to load the icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5844
+ "type": "string"
5845
+ }
5846
+ ]
5847
+ },
5740
5848
  {
5741
5849
  "name": "pb-map-layer",
5742
5850
  "path": "./src/pb-map-layer.js",
@@ -1,8 +1,8 @@
1
- import{L as t,p as e,r as i,h as a,c as s}from"./pb-mixin-ae9e2885.js";import"./es-global-bridge-6abe3a88.js";const o=["type","url","label","base","show"];class r extends t{static get properties(){return{type:{type:String},url:{type:String},base:{type:Boolean},show:{type:Boolean},label:{type:String},attribution:{type:String},minZoom:{type:Number,attribute:"min-zoom"},maxZoom:{type:Number,attribute:"max-zoom"},zoomOffset:{type:Number,attribute:"zoom-offset"},opacity:{type:Number},tileSize:{type:Number},id:{type:String},accessToken:{type:String,attribute:"access-token"}}}constructor(){super(),this.type="tile",this.url=null}get options(){const t={};return Object.keys(r.properties).forEach(e=>{o.indexOf(e)<0&&this[e]&&(t[e]=this[e])}),console.log("<pb-leaflet-map-layer> Options: %o",t),t}async data(){return new Promise(t=>{fetch(this.url).then(t=>t.json()).then(e=>t(e))})}}customElements.define("pb-map-layer",r);class l extends(e(t)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{latitude:{type:Number},longitude:{type:Number},zoom:{type:Number},crs:{type:String},fitMarkers:{type:Boolean,attribute:"fit-markers"},cluster:{type:Boolean},disableClusteringAt:{type:Number,attribute:"disable-clustering-at"},noScroll:{type:Boolean,attribute:"no-scroll"},accessToken:{type:String,attribute:"access-token"},toggle:{type:Boolean},imagesPath:{type:String,attribute:"images-path"},cssPath:{type:String,attribute:"css-path"},_map:{type:Object}})}constructor(){super(),this.latitude=51.505,this.longitude=-.09,this.zoom=15,this.crs="EPSG3857",this.accessToken="",this.imagesPath="../images/leaflet/",this.cssPath="../css/leaflet/",this.toggle=!1,this.noScroll=!1,this.disabled=!0,this.cluster=!1,this.fitMarkers=!1,this.disableClusteringAt=null}connectedCallback(){super.connectedCallback(),this._layers=this.querySelectorAll("pb-map-layer"),this.subscribeTo("pb-update-map",t=>{this._markerLayer.clearLayers(),t.detail.forEach(t=>{const e=L.marker([t.latitude,t.longitude]);t.label&&e.bindTooltip(t.label),e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)}),e.bindTooltip(t.label),this._markerLayer.addLayer(e)}),this._fitBounds()}),this.subscribeTo("pb-update",t=>{this._markerLayer.clearLayers();t.detail.root.querySelectorAll("pb-geolocation").forEach(t=>{const e=L.latLng(t.latitude,t.longitude),i=L.marker(e).addTo(this._markerLayer);t.label&&i.bindTooltip(t.label),t.popup&&i.bindPopup(t.popup),i.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)})}),this._fitBounds()}),this.subscribeTo("pb-geolocation",t=>{if(t.detail.coordinates){if(this.latitude=t.detail.coordinates.latitude,this.longitude=t.detail.coordinates.longitude,this._hasMarker(this.latitude,this.longitude))console.log("<pb-leaflet-map> Marker already added to map");else{const e=L.marker([this.latitude,this.longitude]);e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t.detail.element)}),t.detail.label&&e.bindTooltip(t.detail.label),t.detail.popup&&e.bindPopup(t.detail.popup),e.addTo(this._markerLayer),t.detail.fitBounds&&this._fitBounds(),console.log("<pb-leaflet-map> added marker")}this.toggle&&(this.disabled=!1),this._locationChanged(this.latitude,this.longitude,t.detail.zoom)}})}firstUpdated(){this.toggle||(this.disabled=!1),window.ESGlobalBridge.requestAvailability();const t=i("../lib/leaflet-src.js"),e=i("../lib/leaflet.markercluster-src.js");window.ESGlobalBridge.instance.load("leaflet",t).then(()=>window.ESGlobalBridge.instance.load("plugin",e)),window.addEventListener("es-bridge-plugin-loaded",this._initMap.bind(this),{once:!0})}render(){const t=i(this.cssPath);return a`
1
+ import{L as t,p as e,r as i,h as s,c as a}from"./pb-mixin-ae9e2885.js";import"./es-global-bridge-6abe3a88.js";const o=["type","url","label","base","show"];class r extends t{static get properties(){return{type:{type:String},url:{type:String},base:{type:Boolean},show:{type:Boolean},label:{type:String},attribution:{type:String},minZoom:{type:Number,attribute:"min-zoom"},maxZoom:{type:Number,attribute:"max-zoom"},zoomOffset:{type:Number,attribute:"zoom-offset"},opacity:{type:Number},tileSize:{type:Number},id:{type:String},accessToken:{type:String,attribute:"access-token"}}}constructor(){super(),this.type="tile",this.url=null}get options(){const t={};return Object.keys(r.properties).forEach(e=>{o.indexOf(e)<0&&this[e]&&(t[e]=this[e])}),console.log("<pb-leaflet-map-layer> Options: %o",t),t}async data(){return new Promise(t=>{fetch(this.url).then(t=>t.json()).then(e=>t(e))})}}function l(t,e){try{return t.split(/\s*,\s*/).map(t=>parseInt(t,10))}catch(e){return console.error("<pb-map-icon> Invalid size specified: "+t),null}}customElements.define("pb-map-layer",r);class n extends t{static get properties(){return{name:{type:String},iconUrl:{type:String,attribute:"icon-url"},iconSize:{type:Array,converter:l,attribute:"icon-size"},iconAnchor:{type:Array,converter:l,attribute:"icon-anchor"},shadowUrl:{type:String,attribute:"shadow-url"},shadowSize:{type:Array,converter:l,attribute:"shadow-size"},shadowAnchor:{type:Array,converter:l,attribute:"shadow-anchor"},popupAncor:{type:Array,converter:l,attribute:"popup-anchor"}}}constructor(){super(),this.name="default",this.type="image",this.iconUrl=null}get options(){const t={};return Object.keys(n.properties).forEach(e=>{this[e]&&(t[e]=this[e])}),console.log("<pb-map-icon> Options: %o",t),t}}customElements.define("pb-map-icon",n);class c extends(e(t)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{latitude:{type:Number},longitude:{type:Number},zoom:{type:Number},crs:{type:String},fitMarkers:{type:Boolean,attribute:"fit-markers"},cluster:{type:Boolean},disableClusteringAt:{type:Number,attribute:"disable-clustering-at"},noScroll:{type:Boolean,attribute:"no-scroll"},accessToken:{type:String,attribute:"access-token"},toggle:{type:Boolean},imagesPath:{type:String,attribute:"images-path"},cssPath:{type:String,attribute:"css-path"},_map:{type:Object}})}constructor(){super(),this.latitude=51.505,this.longitude=-.09,this.zoom=15,this.crs="EPSG3857",this.accessToken="",this.imagesPath="../images/leaflet/",this.cssPath="../css/leaflet/",this.toggle=!1,this.noScroll=!1,this.disabled=!0,this.cluster=!1,this.fitMarkers=!1,this.disableClusteringAt=null,this._icons={}}connectedCallback(){super.connectedCallback(),this._layers=this.querySelectorAll("pb-map-layer"),this._markers=this.querySelectorAll("pb-map-icon"),this.subscribeTo("pb-update-map",t=>{this._markerLayer.clearLayers(),t.detail.forEach(t=>{const e=L.marker([t.latitude,t.longitude]);t.label&&e.bindTooltip(t.label),e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)}),e.bindTooltip(t.label),this.setMarkerIcon(e),this._markerLayer.addLayer(e)}),this._fitBounds()}),this.subscribeTo("pb-update",t=>{this._markerLayer.clearLayers();t.detail.root.querySelectorAll("pb-geolocation").forEach(t=>{const e=L.latLng(t.latitude,t.longitude),i=L.marker(e).addTo(this._markerLayer);t.label&&i.bindTooltip(t.label),t.popup&&i.bindPopup(t.popup),i.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)}),this.setMarkerIcon(i)}),this._fitBounds()}),this.subscribeTo("pb-geolocation",t=>{if(t.detail.coordinates){if(this.latitude=t.detail.coordinates.latitude,this.longitude=t.detail.coordinates.longitude,this._hasMarker(this.latitude,this.longitude))console.log("<pb-leaflet-map> Marker already added to map");else{const e=L.marker([this.latitude,this.longitude]);e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t.detail.element)}),t.detail.label&&e.bindTooltip(t.detail.label),t.detail.popup&&e.bindPopup(t.detail.popup),this.setMarkerIcon(e),e.addTo(this._markerLayer),t.detail.fitBounds&&this._fitBounds(),console.log("<pb-leaflet-map> added marker")}this.toggle&&(this.disabled=!1);const e=t.detail.event;this._locationChanged(this.latitude,this.longitude,t.detail.zoom,e)}})}setMarkerIcon(t){this._icons&&this._icons.default&&t.setIcon(this._icons.default)}firstUpdated(){this.toggle||(this.disabled=!1),window.ESGlobalBridge.requestAvailability();const t=i("../lib/leaflet-src.js"),e=i("../lib/leaflet.markercluster-src.js");window.ESGlobalBridge.instance.load("leaflet",t).then(()=>window.ESGlobalBridge.instance.load("plugin",e)),window.addEventListener("es-bridge-plugin-loaded",this._initMap.bind(this),{once:!0})}render(){const t=i(this.cssPath);return s`
2
2
  <link rel="Stylesheet" href="${t}/leaflet.css">
3
3
  <link rel="Stylesheet" href="${t}/MarkerCluster.Default.css">
4
4
  <div id="map" style="height: 100%; width: 100%"></div>
5
- `}static get styles(){return s`
5
+ `}static get styles(){return a`
6
6
  :host {
7
7
  display: block;
8
8
  }
@@ -21,4 +21,4 @@ import{L as t,p as e,r as i,h as a,c as s}from"./pb-mixin-ae9e2885.js";import"./
21
21
  text-decoration: none;
22
22
  cursor: pointer;
23
23
  }
24
- `}_initMap(){if(this._map)return;L.Icon.Default.imagePath=i(this.imagesPath);const t=L.CRS[this.crs]||L.CRS.EPSG3857;if(this._map=L.map(this.shadowRoot.getElementById("map"),{zoom:this.zoom,center:L.latLng(this.latitude,this.longitude),crs:t}),this._configureLayers(),this.cluster){const t={};this.disableClusteringAt&&(t.disableClusteringAtZoom=this.disableClusteringAt),this._markerLayer=L.markerClusterGroup(t)}else this._markerLayer=L.layerGroup();if(this._markerLayer.addTo(this._map),this.signalReady(),L.control.scale().addTo(this._map),this.toggle){let t;L.Control.CloseButton=L.Control.extend({options:{position:"topright"},onAdd:e=>(t=L.DomUtil.create("div"),t.className="close",t.innerHTML="X",L.DomEvent.on(t,"click",this._hide.bind(this)),t),onRemove:e=>{L.DomEvent.off(t,"click",this._hide.bind(this))}}),L.control.closeButton=t=>new L.Control.CloseButton(t),L.control.closeButton({position:"topright"}).addTo(this._map)}}_configureLayers(){if(0===this._layers.length)return void L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}",{attribution:'© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>',maxZoom:18,zoomOffset:-1,tileSize:512,accessToken:this.accessToken}).addTo(this._map);const t=L.control.layers(null,null,{collapsed:!1});this._layers.forEach(e=>{let i;switch(e.type){case"geojson":e.data().then(a=>{i=L.geoJSON([a]),this._addLayer(e,i,t)});break;default:i=L.tileLayer(e.url,e.options),this._addLayer(e,i,t)}}),this._layers.length>1&&t.addTo(this._map),this._layers=null}_addLayer(t,e,i){t.show&&e.addTo(this._map),t.label&&(t.base?i.addBaseLayer(e,t.label):i.addOverlay(e,t.label))}_fitBounds(){if(!this.fitMarkers)return;const t=L.latLngBounds();let e=0;this._markerLayer.eachLayer(i=>{t.extend(i.getLatLng()),e+=1}),0===e?this._map.fitWorld():1===e?this._map.fitBounds(t,{maxZoom:this.zoom}):this._map.fitBounds(t)}_locationChanged(t,e,i){if(this._map){const a=L.latLng([t,e]);this._markerLayer.eachLayer(t=>{t.getLatLng().equals(a)&&(i&&!this.noScroll?(t.openTooltip(),this._map.setView(a,i)):this.cluster?this._markerLayer.zoomToShowLayer(t,()=>t.openTooltip()):(t.openTooltip(),this._map.setView(a,this.zoom)))})}}_hasMarker(t,e){const i=L.latLng([t,e]);let a=!1;return this._markerLayer.eachLayer(t=>{t instanceof L.Marker&&t.getLatLng().equals(i)&&(a=!0)}),a}_hide(){this.disabled=!0}}customElements.define("pb-leaflet-map",l);export{l as PbLeafletMap};
24
+ `}_initMap(){if(this._map)return;L.Icon.Default.imagePath=i(this.imagesPath);const t=L.CRS[this.crs]||L.CRS.EPSG3857;if(this._map=L.map(this.shadowRoot.getElementById("map"),{zoom:this.zoom,center:L.latLng(this.latitude,this.longitude),crs:t}),this._configureLayers(),this._configureMarkers(),this.cluster){const t={};this.disableClusteringAt&&(t.disableClusteringAtZoom=this.disableClusteringAt),this._markerLayer=L.markerClusterGroup(t)}else this._markerLayer=L.layerGroup();if(this._markerLayer.addTo(this._map),this.signalReady(),L.control.scale().addTo(this._map),this.toggle){let t;L.Control.CloseButton=L.Control.extend({options:{position:"topright"},onAdd:e=>(t=L.DomUtil.create("div"),t.className="close",t.innerHTML="X",L.DomEvent.on(t,"click",this._hide.bind(this)),t),onRemove:e=>{L.DomEvent.off(t,"click",this._hide.bind(this))}}),L.control.closeButton=t=>new L.Control.CloseButton(t),L.control.closeButton({position:"topright"}).addTo(this._map)}}_configureMarkers(){0!==this._markers.length&&(this._icons={},this._markers.forEach(t=>{t.iconUrl&&(this._icons[t.name]=L.icon(t.options))}))}_configureLayers(){if(0===this._layers.length)return void L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}",{attribution:'© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>',maxZoom:18,zoomOffset:-1,tileSize:512,accessToken:this.accessToken}).addTo(this._map);const t=L.control.layers(null,null,{collapsed:!1});this._layers.forEach(e=>{let i;switch(e.type){case"geojson":e.data().then(s=>{i=L.geoJSON([s]),this._addLayer(e,i,t)});break;default:i=L.tileLayer(e.url,e.options),this._addLayer(e,i,t)}}),this._layers.length>1&&t.addTo(this._map),this._layers=null}_addLayer(t,e,i){t.show&&e.addTo(this._map),t.label&&(t.base?i.addBaseLayer(e,t.label):i.addOverlay(e,t.label))}_fitBounds(){if(!this.fitMarkers)return;const t=L.latLngBounds();let e=0;this._markerLayer.eachLayer(i=>{t.extend(i.getLatLng()),e+=1}),0===e?this._map.fitWorld():1===e?this._map.fitBounds(t,{maxZoom:this.zoom}):this._map.fitBounds(t)}_locationChanged(t,e,i,s){if(this._map){const a=L.latLng([t,e]);this._markerLayer.eachLayer(t=>{t.getLatLng().equals(a)?(i&&!this.noScroll?(t.openTooltip(),this._map.setView(a,i)):this.cluster?this._markerLayer.zoomToShowLayer(t,()=>t.openTooltip()):(t.openTooltip(),this._map.setView(a,this.zoom)),s&&this._icons&&this._icons.active&&t.setIcon(this._icons.active)):this._icons&&this._icons.default&&t.getIcon()!==this._icons.default&&t.setIcon(this._icons.default)})}}_hasMarker(t,e){const i=L.latLng([t,e]);let s=null;return this._markerLayer.eachLayer(t=>{t instanceof L.Marker&&t.getLatLng().equals(i)&&(s=t)}),s}_hide(){this.disabled=!0}}customElements.define("pb-leaflet-map",c);export{c as PbLeafletMap};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teipublisher/pb-components",
3
- "version": "1.37.0",
3
+ "version": "1.38.0",
4
4
  "description": "Collection of webcomponents underlying TEI Publisher",
5
5
  "repository": "https://github.com/eeditiones/tei-publisher-components.git",
6
6
  "main": "index.html",
package/pb-elements.json CHANGED
@@ -3958,7 +3958,7 @@
3958
3958
  {
3959
3959
  "name": "pb-geolocation",
3960
3960
  "path": "./src/pb-geolocation.js",
3961
- "description": "Represents a geo location. Extends `pb-highlight`, but sends an additional `pb-geolocation` event\non mouseover.\n\nFor `pb-leaflet-map` to show markers for `pb-geolocation` elements, make sure that map subscribes to the channel\ninto which `pb-geolocation`s emit and that map is loaded before the emitting component, e.g. `pb-view`, by specifying \n`wait-for` property",
3961
+ "description": "Represents a geo location. Extends `pb-highlight`, but sends an additional `pb-geolocation` event\non mouseover.\n\nFor `pb-leaflet-map` to show markers for `pb-geolocation` elements, make sure that map subscribes to the channel\ninto which `pb-geolocation`s emit and that map is loaded before the emitting component, e.g. `pb-view`, by specifying \n`wait-for` property.",
3962
3962
  "attributes": [
3963
3963
  {
3964
3964
  "name": "longitude",
@@ -4764,7 +4764,7 @@
4764
4764
  {
4765
4765
  "name": "pb-leaflet-map",
4766
4766
  "path": "./src/pb-leaflet-map.js",
4767
- "description": "A wrapper component for [leaflet](https://leafletjs.com/) displaying a map.",
4767
+ "description": "A wrapper component for [leaflet](https://leafletjs.com/) displaying a map.\n\nThe map layers displayed can be configured via nested `pb-map-layer` (see docs) elements,\nicons via `pb-map-icon`.",
4768
4768
  "attributes": [
4769
4769
  {
4770
4770
  "name": "latitude",
@@ -5737,6 +5737,114 @@
5737
5737
  }
5738
5738
  ]
5739
5739
  },
5740
+ {
5741
+ "name": "pb-map-icon",
5742
+ "path": "./src/pb-map-icon.js",
5743
+ "description": "Configure a map icon type to be used for markers. \nShould be nested inside `pb-leaflet-map`.",
5744
+ "attributes": [
5745
+ {
5746
+ "name": "icon-size",
5747
+ "description": "Size of the icon as comma-separated string, i.e. 'height, width'.",
5748
+ "type": "array"
5749
+ },
5750
+ {
5751
+ "name": "icon-anchor",
5752
+ "description": "Anchor position of the icon as comma-separated string, i.e. 'height, width'.",
5753
+ "type": "array"
5754
+ },
5755
+ {
5756
+ "name": "shadow-url",
5757
+ "description": "The URL to load the shadow icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5758
+ "type": "string"
5759
+ },
5760
+ {
5761
+ "name": "shadow-size",
5762
+ "description": "Size of the shadow icon as comma-separated string, i.e. 'height, width'.",
5763
+ "type": "array"
5764
+ },
5765
+ {
5766
+ "name": "shadow-anchor",
5767
+ "description": "Anchor position of the shadow icon as comma-separated string, i.e. 'height, width'.",
5768
+ "type": "array"
5769
+ },
5770
+ {
5771
+ "name": "popup-anchor",
5772
+ "description": "Anchor position of the popup as comma-separated string, i.e. 'height, width'.",
5773
+ "type": "array"
5774
+ },
5775
+ {
5776
+ "name": "name",
5777
+ "description": "Name of the icon. Set to 'active' to configure the icon used for\nplaces which were target of a previous `pb-geolocation` event (i.e. are currently 'active').",
5778
+ "type": "string",
5779
+ "default": "\"default\""
5780
+ },
5781
+ {
5782
+ "name": "icon-url",
5783
+ "description": "The URL to load the icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5784
+ "type": "string"
5785
+ }
5786
+ ],
5787
+ "properties": [
5788
+ {
5789
+ "name": "iconSize",
5790
+ "attribute": "icon-size",
5791
+ "description": "Size of the icon as comma-separated string, i.e. 'height, width'.",
5792
+ "type": "array"
5793
+ },
5794
+ {
5795
+ "name": "iconAnchor",
5796
+ "attribute": "icon-anchor",
5797
+ "description": "Anchor position of the icon as comma-separated string, i.e. 'height, width'.",
5798
+ "type": "array"
5799
+ },
5800
+ {
5801
+ "name": "shadowUrl",
5802
+ "attribute": "shadow-url",
5803
+ "description": "The URL to load the shadow icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5804
+ "type": "string"
5805
+ },
5806
+ {
5807
+ "name": "shadowSize",
5808
+ "attribute": "shadow-size",
5809
+ "description": "Size of the shadow icon as comma-separated string, i.e. 'height, width'.",
5810
+ "type": "array"
5811
+ },
5812
+ {
5813
+ "name": "shadowAnchor",
5814
+ "attribute": "shadow-anchor",
5815
+ "description": "Anchor position of the shadow icon as comma-separated string, i.e. 'height, width'.",
5816
+ "type": "array"
5817
+ },
5818
+ {
5819
+ "name": "popupAncor",
5820
+ "attribute": "popup-anchor",
5821
+ "description": "Anchor position of the popup as comma-separated string, i.e. 'height, width'.",
5822
+ "type": "array"
5823
+ },
5824
+ {
5825
+ "name": "options",
5826
+ "type": "object"
5827
+ },
5828
+ {
5829
+ "name": "name",
5830
+ "attribute": "name",
5831
+ "description": "Name of the icon. Set to 'active' to configure the icon used for\nplaces which were target of a previous `pb-geolocation` event (i.e. are currently 'active').",
5832
+ "type": "string",
5833
+ "default": "\"default\""
5834
+ },
5835
+ {
5836
+ "name": "type",
5837
+ "type": "string",
5838
+ "default": "\"image\""
5839
+ },
5840
+ {
5841
+ "name": "iconUrl",
5842
+ "attribute": "icon-url",
5843
+ "description": "The URL to load the icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.",
5844
+ "type": "string"
5845
+ }
5846
+ ]
5847
+ },
5740
5848
  {
5741
5849
  "name": "pb-map-layer",
5742
5850
  "path": "./src/pb-map-layer.js",
@@ -8,7 +8,7 @@ import { PbHighlight } from "./pb-highlight.js";
8
8
  *
9
9
  * For `pb-leaflet-map` to show markers for `pb-geolocation` elements, make sure that map subscribes to the channel
10
10
  * into which `pb-geolocation`s emit and that map is loaded before the emitting component, e.g. `pb-view`, by specifying
11
- * `wait-for` property
11
+ * `wait-for` property.
12
12
  *
13
13
  * @slot - default unnamed slot for content. May also contain an option `<template>` element for content to be shown in a popup
14
14
  * @fires pb-geolocation - Sends geocoordinates
@@ -74,7 +74,8 @@ export class PbGeolocation extends PbHighlight {
74
74
  label: this.label,
75
75
  zoom: this.zoom,
76
76
  popup: this.popup,
77
- element: this
77
+ element: this,
78
+ event: this.event
78
79
  })
79
80
  );
80
81
  }
@@ -3,9 +3,13 @@ import "@lrnwebcomponents/es-global-bridge";
3
3
  import { pbMixin } from './pb-mixin.js';
4
4
  import { resolveURL } from './utils.js';
5
5
  import './pb-map-layer.js';
6
+ import './pb-map-icon.js';
6
7
 
7
8
  /**
8
9
  * A wrapper component for [leaflet](https://leafletjs.com/) displaying a map.
10
+ *
11
+ * The map layers displayed can be configured via nested `pb-map-layer` (see docs) elements,
12
+ * icons via `pb-map-icon`.
9
13
  *
10
14
  * @slot - may contain a series of `pb-map-layer` configurations
11
15
  * @fires pb-leaflet-marker-click - Fires event to be processed by the map upon click
@@ -113,12 +117,14 @@ export class PbLeafletMap extends pbMixin(LitElement) {
113
117
  this.cluster = false;
114
118
  this.fitMarkers = false;
115
119
  this.disableClusteringAt = null;
120
+ this._icons = {};
116
121
  }
117
122
 
118
123
  connectedCallback() {
119
124
  super.connectedCallback();
120
125
 
121
126
  this._layers = this.querySelectorAll('pb-map-layer');
127
+ this._markers = this.querySelectorAll('pb-map-icon');
122
128
 
123
129
  /**
124
130
  * Custom event which passes an array of pb-geolocation within event details
@@ -142,6 +148,7 @@ export class PbLeafletMap extends pbMixin(LitElement) {
142
148
  this.emitTo('pb-leaflet-marker-click', loc);
143
149
  });
144
150
  marker.bindTooltip(loc.label);
151
+ this.setMarkerIcon(marker);
145
152
  this._markerLayer.addLayer(marker);
146
153
  });
147
154
  this._fitBounds();
@@ -170,6 +177,7 @@ export class PbLeafletMap extends pbMixin(LitElement) {
170
177
  marker.addEventListener('click', () => {
171
178
  this.emitTo('pb-leaflet-marker-click', loc);
172
179
  });
180
+ this.setMarkerIcon(marker);
173
181
  });
174
182
  this._fitBounds();
175
183
  });
@@ -194,6 +202,7 @@ export class PbLeafletMap extends pbMixin(LitElement) {
194
202
  if (ev.detail.popup) {
195
203
  marker.bindPopup(ev.detail.popup);
196
204
  }
205
+ this.setMarkerIcon(marker);
197
206
  marker.addTo(this._markerLayer);
198
207
 
199
208
  if (ev.detail.fitBounds) {
@@ -204,14 +213,22 @@ export class PbLeafletMap extends pbMixin(LitElement) {
204
213
  } else {
205
214
  console.log('<pb-leaflet-map> Marker already added to map');
206
215
  }
216
+
207
217
  if (this.toggle) {
208
218
  this.disabled = false;
209
219
  }
210
- this._locationChanged(this.latitude, this.longitude, ev.detail.zoom);
220
+ const activateMarker = ev.detail.event;
221
+ this._locationChanged(this.latitude, this.longitude, ev.detail.zoom, activateMarker);
211
222
  }
212
223
  });
213
224
  }
214
225
 
226
+ setMarkerIcon(layer) {
227
+ if (this._icons && this._icons.default) {
228
+ layer.setIcon(this._icons.default);
229
+ }
230
+ }
231
+
215
232
  firstUpdated() {
216
233
  if (!this.toggle) {
217
234
  this.disabled = false;
@@ -274,6 +291,7 @@ export class PbLeafletMap extends pbMixin(LitElement) {
274
291
  crs
275
292
  });
276
293
  this._configureLayers();
294
+ this._configureMarkers();
277
295
 
278
296
  if (this.cluster) {
279
297
  const options = {};
@@ -312,6 +330,19 @@ export class PbLeafletMap extends pbMixin(LitElement) {
312
330
  }
313
331
  }
314
332
 
333
+ _configureMarkers() {
334
+ if (this._markers.length === 0) {
335
+ return;
336
+ }
337
+
338
+ this._icons = {};
339
+ this._markers.forEach(config => {
340
+ if (config.iconUrl) {
341
+ this._icons[config.name] = L.icon(config.options);
342
+ }
343
+ })
344
+ }
345
+
315
346
  _configureLayers() {
316
347
  if (this._layers.length === 0) {
317
348
  // configure a default layer
@@ -379,7 +410,7 @@ export class PbLeafletMap extends pbMixin(LitElement) {
379
410
  }
380
411
  }
381
412
 
382
- _locationChanged(lat, long, zoom) {
413
+ _locationChanged(lat, long, zoom, setActive) {
383
414
  if (this._map) {
384
415
  const coords = L.latLng([lat, long]);
385
416
  this._markerLayer.eachLayer((layer) => {
@@ -395,6 +426,11 @@ export class PbLeafletMap extends pbMixin(LitElement) {
395
426
  layer.openTooltip();
396
427
  this._map.setView(coords, this.zoom);
397
428
  }
429
+ if (setActive && this._icons && this._icons.active) {
430
+ layer.setIcon(this._icons.active);
431
+ }
432
+ } else if (this._icons && this._icons.default && layer.getIcon() !== this._icons.default) {
433
+ layer.setIcon(this._icons.default);
398
434
  }
399
435
  });
400
436
  }
@@ -402,10 +438,10 @@ export class PbLeafletMap extends pbMixin(LitElement) {
402
438
 
403
439
  _hasMarker(lat, long) {
404
440
  const coords = L.latLng([lat, long]);
405
- let found = false;
441
+ let found = null;
406
442
  this._markerLayer.eachLayer((layer) => {
407
443
  if (layer instanceof L.Marker && layer.getLatLng().equals(coords)) {
408
- found = true;
444
+ found = layer;
409
445
  }
410
446
  });
411
447
  return found;
@@ -0,0 +1,101 @@
1
+ import { LitElement } from 'lit-element';
2
+
3
+ function sizeConverter(value, type) {
4
+ try {
5
+ return value.split(/\s*,\s*/).map(s => parseInt(s, 10));
6
+ } catch (e) {
7
+ console.error(`<pb-map-icon> Invalid size specified: ${value}`);
8
+ return null;
9
+ }
10
+ }
11
+ /**
12
+ * Configure a map icon type to be used for markers.
13
+ * Should be nested inside `pb-leaflet-map`.
14
+ *
15
+ */
16
+ export class PbMapIcon extends LitElement {
17
+ static get properties() {
18
+ return {
19
+ /**
20
+ * Name of the icon. Set to 'active' to configure the icon used for
21
+ * places which were target of a previous `pb-geolocation` event (i.e. are currently 'active').
22
+ */
23
+ name: {
24
+ type: String
25
+ },
26
+ /**
27
+ * The URL to load the icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.
28
+ */
29
+ iconUrl: {
30
+ type: String,
31
+ attribute: 'icon-url'
32
+ },
33
+ /**
34
+ * Size of the icon as comma-separated string, i.e. 'height, width'.
35
+ */
36
+ iconSize: {
37
+ type: Array,
38
+ converter: sizeConverter,
39
+ attribute: 'icon-size'
40
+ },
41
+ /**
42
+ * Anchor position of the icon as comma-separated string, i.e. 'height, width'.
43
+ */
44
+ iconAnchor: {
45
+ type: Array,
46
+ converter: sizeConverter,
47
+ attribute: 'icon-anchor'
48
+ },
49
+ /**
50
+ * The URL to load the shadow icon from. Should be relative to the path set via the `imagesPath` property on `pb-leaflet-map`.
51
+ */
52
+ shadowUrl: {
53
+ type: String,
54
+ attribute: 'shadow-url'
55
+ },
56
+ /**
57
+ * Size of the shadow icon as comma-separated string, i.e. 'height, width'.
58
+ */
59
+ shadowSize: {
60
+ type: Array,
61
+ converter: sizeConverter,
62
+ attribute: 'shadow-size'
63
+ },
64
+ /**
65
+ * Anchor position of the shadow icon as comma-separated string, i.e. 'height, width'.
66
+ */
67
+ shadowAnchor: {
68
+ type: Array,
69
+ converter: sizeConverter,
70
+ attribute: 'shadow-anchor'
71
+ },
72
+ /**
73
+ * Anchor position of the popup as comma-separated string, i.e. 'height, width'.
74
+ */
75
+ popupAncor: {
76
+ type: Array,
77
+ converter: sizeConverter,
78
+ attribute: 'popup-anchor'
79
+ }
80
+ };
81
+ }
82
+
83
+ constructor() {
84
+ super();
85
+ this.name = 'default';
86
+ this.type = 'image';
87
+ this.iconUrl = null;
88
+ }
89
+
90
+ get options() {
91
+ const options = {};
92
+ Object.keys(PbMapIcon.properties).forEach(key => {
93
+ if (this[key]) {
94
+ options[key] = this[key];
95
+ }
96
+ });
97
+ console.log('<pb-map-icon> Options: %o', options);
98
+ return options;
99
+ }
100
+ }
101
+ customElements.define('pb-map-icon', PbMapIcon);