@teipublisher/pb-components 1.38.1 → 1.38.4

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,24 @@
1
+ ## [1.38.4](https://github.com/eeditiones/tei-publisher-components/compare/v1.38.3...v1.38.4) (2022-07-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **pb-view:** trigger two column view mode only if there are at least two cb ([0402c50](https://github.com/eeditiones/tei-publisher-components/commit/0402c507b7f4721544707e7214c8bf57233418a7))
7
+
8
+ ## [1.38.3](https://github.com/eeditiones/tei-publisher-components/compare/v1.38.2...v1.38.3) (2022-07-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **pb-leaflet-map:** omit extra slash from CSS path to avoid issues with CDN ([5dde12a](https://github.com/eeditiones/tei-publisher-components/commit/5dde12a38f8765bd198512937e306f07988e5b19))
14
+
15
+ ## [1.38.2](https://github.com/eeditiones/tei-publisher-components/compare/v1.38.1...v1.38.2) (2022-07-19)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **pb-authority-lookup, kbga, gf:** add 'limit' parameter to control how many entries are shown when searching the authority ([213fb91](https://github.com/eeditiones/tei-publisher-components/commit/213fb91d7f7e3797724df8e8d0fd4e3fe82a0bf5))
21
+
1
22
  ## [1.38.1](https://github.com/eeditiones/tei-publisher-components/compare/v1.38.0...v1.38.1) (2022-06-21)
2
23
 
3
24
 
@@ -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.38.1";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.4";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
  }
@@ -1089,7 +1089,7 @@ e({_template:n`
1089
1089
  min-width: inherit;
1090
1090
  max-width: inherit;
1091
1091
  }
1092
- `}}customElements.define("pb-select-feature",Gr);var Xr={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},Kr={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},Qr=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Zr={CSS:{},springs:{}};function Jr(t,e,i){return Math.min(Math.max(t,e),i)}function to(t,e){return t.indexOf(e)>-1}function eo(t,e){return t.apply(null,e)}var io={arr:function(t){return Array.isArray(t)},obj:function(t){return to(Object.prototype.toString.call(t),"Object")},pth:function(t){return io.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||io.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return io.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return io.hex(t)||io.rgb(t)||io.hsl(t)},key:function(t){return!Xr.hasOwnProperty(t)&&!Kr.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function no(t){var e=/\(([^)]+)\)/.exec(t);return e?e[1].split(",").map((function(t){return parseFloat(t)})):[]}function ro(t,e){var i=no(t),n=Jr(io.und(i[0])?1:i[0],.1,100),r=Jr(io.und(i[1])?100:i[1],.1,100),o=Jr(io.und(i[2])?10:i[2],.1,100),s=Jr(io.und(i[3])?0:i[3],.1,100),a=Math.sqrt(r/n),l=o/(2*Math.sqrt(r*n)),c=l<1?a*Math.sqrt(1-l*l):0,h=1,d=l<1?(l*a-s)/c:-s+a;function p(t){var i=e?e*t/1e3:t;return i=l<1?Math.exp(-i*l*a)*(h*Math.cos(c*i)+d*Math.sin(c*i)):(h+d*i)*Math.exp(-i*a),0===t||1===t?t:1-i}function u(){var e=Zr.springs[t];if(e)return e;for(var i=1/6,n=0,r=0;;)if(1===p(n+=i)){if(++r>=16)break}else r=0;var o=n*i*1e3;return Zr.springs[t]=o,o}return e?p:u}function oo(t){return void 0===t&&(t=10),function(e){return Math.ceil(Jr(e,1e-6,1)*t)*(1/t)}}var so,ao,lo=function(){var t=11,e=1/(t-1);function i(t,e){return 1-3*e+3*t}function n(t,e){return 3*e-6*t}function r(t){return 3*t}function o(t,e,o){return((i(e,o)*t+n(e,o))*t+r(e))*t}function s(t,e,o){return 3*i(e,o)*t*t+2*n(e,o)*t+r(e)}function a(t,e,i,n,r){var s,a,l=0;do{(s=o(a=e+(i-e)/2,n,r)-t)>0?i=a:e=a}while(Math.abs(s)>1e-7&&++l<10);return a}function l(t,e,i,n){for(var r=0;r<4;++r){var a=s(e,i,n);if(0===a)return e;e-=(o(e,i,n)-t)/a}return e}function c(i,n,r,c){if(0<=i&&i<=1&&0<=r&&r<=1){var h=new Float32Array(t);if(i!==n||r!==c)for(var d=0;d<t;++d)h[d]=o(d*e,i,r);return function(t){return i===n&&r===c||0===t||1===t?t:o(p(t),n,c)}}function p(n){for(var o=0,c=1,d=t-1;c!==d&&h[c]<=n;++c)o+=e;--c;var p=o+(n-h[c])/(h[c+1]-h[c])*e,u=s(p,i,r);return u>=.001?l(n,p,i,r):0===u?p:a(n,o,o+e,i,r)}}return c}(),co=(so={linear:function(){return function(t){return t}}},ao={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}},Elastic:function(t,e){void 0===t&&(t=1),void 0===e&&(e=.5);var i=Jr(t,1,10),n=Jr(e,.1,2);return function(t){return 0===t||1===t?t:-i*Math.pow(2,10*(t-1))*Math.sin((t-1-n/(2*Math.PI)*Math.asin(1/i))*(2*Math.PI)/n)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach((function(t,e){ao[t]=function(){return function(t){return Math.pow(t,e+2)}}})),Object.keys(ao).forEach((function(t){var e=ao[t];so["easeIn"+t]=e,so["easeOut"+t]=function(t,i){return function(n){return 1-e(t,i)(1-n)}},so["easeInOut"+t]=function(t,i){return function(n){return n<.5?e(t,i)(2*n)/2:1-e(t,i)(-2*n+2)/2}},so["easeOutIn"+t]=function(t,i){return function(n){return n<.5?(1-e(t,i)(1-2*n))/2:(e(t,i)(2*n-1)+1)/2}}})),so);function ho(t,e){if(io.fnc(t))return t;var i=t.split("(")[0],n=co[i],r=no(t);switch(i){case"spring":return ro(t,e);case"cubicBezier":return eo(lo,r);case"steps":return eo(oo,r);default:return eo(n,r)}}function po(t){try{return document.querySelectorAll(t)}catch(t){return}}function uo(t,e){for(var i=t.length,n=arguments.length>=2?arguments[1]:void 0,r=[],o=0;o<i;o++)if(o in t){var s=t[o];e.call(n,s,o,t)&&r.push(s)}return r}function go(t){return t.reduce((function(t,e){return t.concat(io.arr(e)?go(e):e)}),[])}function fo(t){return io.arr(t)?t:(io.str(t)&&(t=po(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function mo(t,e){return t.some((function(t){return t===e}))}function vo(t){var e={};for(var i in t)e[i]=t[i];return e}function bo(t,e){var i=vo(t);for(var n in t)i[n]=e.hasOwnProperty(n)?e[n]:t[n];return i}function yo(t,e){var i=vo(t);for(var n in e)i[n]=io.und(t[n])?e[n]:t[n];return i}function _o(t){var e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t);return e?"rgba("+e[1]+",1)":t}function wo(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=t.replace(e,(function(t,e,i,n){return e+e+i+i+n+n})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}function xo(t){var e,i,n,r=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),o=parseInt(r[1],10)/360,s=parseInt(r[2],10)/100,a=parseInt(r[3],10)/100,l=r[4]||1;function c(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}if(0==s)e=i=n=a;else{var h=a<.5?a*(1+s):a+s-a*s,d=2*a-h;e=c(d,h,o+1/3),i=c(d,h,o),n=c(d,h,o-1/3)}return"rgba("+255*e+","+255*i+","+255*n+","+l+")"}function ko(t){return io.rgb(t)?_o(t):io.hex(t)?wo(t):io.hsl(t)?xo(t):void 0}function Ao(t){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(e)return e[1]}function zo(t){return to(t,"translate")||"perspective"===t?"px":to(t,"rotate")||to(t,"skew")?"deg":void 0}function So(t,e){return io.fnc(t)?t(e.target,e.id,e.total):t}function Co(t,e){return t.getAttribute(e)}function Eo(t,e,i){if(mo([i,"deg","rad","turn"],Ao(e)))return e;var n=Zr.CSS[e+i];if(!io.und(n))return n;var r=100,o=document.createElement(t.tagName),s=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;s.appendChild(o),o.style.position="absolute",o.style.width=r+i;var a=r/o.offsetWidth;s.removeChild(o);var l=a*parseFloat(e);return Zr.CSS[e+i]=l,l}function Mo(t,e,i){if(e in t.style){var n=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=t.style[e]||getComputedStyle(t).getPropertyValue(n)||"0";return i?Eo(t,r,i):r}}function Lo(t,e){return io.dom(t)&&!io.inp(t)&&(!io.nil(Co(t,e))||io.svg(t)&&t[e])?"attribute":io.dom(t)&&mo(Qr,e)?"transform":io.dom(t)&&"transform"!==e&&Mo(t,e)?"css":null!=t[e]?"object":void 0}function To(t){if(io.dom(t)){for(var e,i=t.style.transform||"",n=/(\w+)\(([^)]*)\)/g,r=new Map;e=n.exec(i);)r.set(e[1],e[2]);return r}}function Ho(t,e,i,n){var r=to(e,"scale")?1:0+zo(e),o=To(t).get(e)||r;return i&&(i.transforms.list.set(e,o),i.transforms.last=e),n?Eo(t,o,n):o}function Oo(t,e,i,n){switch(Lo(t,e)){case"transform":return Ho(t,e,n,i);case"css":return Mo(t,e,i);case"attribute":return Co(t,e);default:return t[e]||0}}function $o(t,e){var i=/^(\*=|\+=|-=)/.exec(t);if(!i)return t;var n=Ao(t)||0,r=parseFloat(e),o=parseFloat(t.replace(i[0],""));switch(i[0][0]){case"+":return r+o+n;case"-":return r-o+n;case"*":return r*o+n}}function Vo(t,e){if(io.col(t))return ko(t);if(/\s/g.test(t))return t;var i=Ao(t),n=i?t.substr(0,t.length-i.length):t;return e?n+e:n}function Io(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ro(t){return 2*Math.PI*Co(t,"r")}function Po(t){return 2*Co(t,"width")+2*Co(t,"height")}function Do(t){return Io({x:Co(t,"x1"),y:Co(t,"y1")},{x:Co(t,"x2"),y:Co(t,"y2")})}function No(t){for(var e,i=t.points,n=0,r=0;r<i.numberOfItems;r++){var o=i.getItem(r);r>0&&(n+=Io(e,o)),e=o}return n}function Fo(t){var e=t.points;return No(t)+Io(e.getItem(e.numberOfItems-1),e.getItem(0))}function Bo(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return Ro(t);case"rect":return Po(t);case"line":return Do(t);case"polyline":return No(t);case"polygon":return Fo(t)}}function jo(t){var e=Bo(t);return t.setAttribute("stroke-dasharray",e),e}function qo(t){for(var e=t.parentNode;io.svg(e)&&io.svg(e.parentNode);)e=e.parentNode;return e}function Uo(t,e){var i=e||{},n=i.el||qo(t),r=n.getBoundingClientRect(),o=Co(n,"viewBox"),s=r.width,a=r.height,l=i.viewBox||(o?o.split(" "):[0,0,s,a]);return{el:n,viewBox:l,x:l[0]/1,y:l[1]/1,w:s,h:a,vW:l[2],vH:l[3]}}function Wo(t,e){var i=io.str(t)?po(t)[0]:t,n=e||100;return function(t){return{property:t,el:i,svg:Uo(i),totalLength:Bo(i)*(n/100)}}}function Yo(t,e,i){function n(i){void 0===i&&(i=0);var n=e+i>=1?e+i:0;return t.el.getPointAtLength(n)}var r=Uo(t.el,t.svg),o=n(),s=n(-1),a=n(1),l=i?1:r.w/r.vW,c=i?1:r.h/r.vH;switch(t.property){case"x":return(o.x-r.x)*l;case"y":return(o.y-r.y)*c;case"angle":return 180*Math.atan2(a.y-s.y,a.x-s.x)/Math.PI}}function Go(t,e){var i=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=Vo(io.pth(t)?t.totalLength:t,e)+"";return{original:n,numbers:n.match(i)?n.match(i).map(Number):[0],strings:io.str(t)||e?n.split(i):[]}}function Xo(t){return uo(t?go(io.arr(t)?t.map(fo):fo(t)):[],(function(t,e,i){return i.indexOf(t)===e}))}function Ko(t){var e=Xo(t);return e.map((function(t,i){return{target:t,id:i,total:e.length,transforms:{list:To(t)}}}))}function Qo(t,e){var i=vo(e);if(/^spring/.test(i.easing)&&(i.duration=ro(i.easing)),io.arr(t)){var n=t.length;2===n&&!io.obj(t[0])?t={value:t}:io.fnc(e.duration)||(i.duration=e.duration/n)}var r=io.arr(t)?t:[t];return r.map((function(t,i){var n=io.obj(t)&&!io.pth(t)?t:{value:t};return io.und(n.delay)&&(n.delay=i?0:e.delay),io.und(n.endDelay)&&(n.endDelay=i===r.length-1?e.endDelay:0),n})).map((function(t){return yo(t,i)}))}function Zo(t){for(var e=uo(go(t.map((function(t){return Object.keys(t)}))),(function(t){return io.key(t)})).reduce((function(t,e){return t.indexOf(e)<0&&t.push(e),t}),[]),i={},n=function(n){var r=e[n];i[r]=t.map((function(t){var e={};for(var i in t)io.key(i)?i==r&&(e.value=t[i]):e[i]=t[i];return e}))},r=0;r<e.length;r++)n(r);return i}function Jo(t,e){var i=[],n=e.keyframes;for(var r in n&&(e=yo(Zo(n),e)),e)io.key(r)&&i.push({name:r,tweens:Qo(e[r],t)});return i}function ts(t,e){var i={};for(var n in t){var r=So(t[n],e);io.arr(r)&&1===(r=r.map((function(t){return So(t,e)}))).length&&(r=r[0]),i[n]=r}return i.duration=parseFloat(i.duration),i.delay=parseFloat(i.delay),i}function es(t,e){var i;return t.tweens.map((function(n){var r=ts(n,e),o=r.value,s=io.arr(o)?o[1]:o,a=Ao(s),l=Oo(e.target,t.name,a,e),c=i?i.to.original:l,h=io.arr(o)?o[0]:c,d=Ao(h)||Ao(l),p=a||d;return io.und(s)&&(s=c),r.from=Go(h,p),r.to=Go($o(s,h),p),r.start=i?i.end:0,r.end=r.start+r.delay+r.duration+r.endDelay,r.easing=ho(r.easing,r.duration),r.isPath=io.pth(o),r.isPathTargetInsideSVG=r.isPath&&io.svg(e.target),r.isColor=io.col(r.from.original),r.isColor&&(r.round=1),i=r,r}))}var is={css:function(t,e,i){return t.style[e]=i},attribute:function(t,e,i){return t.setAttribute(e,i)},object:function(t,e,i){return t[e]=i},transform:function(t,e,i,n,r){if(n.list.set(e,i),e===n.last||r){var o="";n.list.forEach((function(t,e){o+=e+"("+t+") "})),t.style.transform=o}}};function ns(t,e){Ko(t).forEach((function(t){for(var i in e){var n=So(e[i],t),r=t.target,o=Ao(n),s=Oo(r,i,o,t),a=$o(Vo(n,o||Ao(s)),s),l=Lo(r,i);is[l](r,i,a,t.transforms,!0)}}))}function rs(t,e){var i=Lo(t.target,e.name);if(i){var n=es(e,t),r=n[n.length-1];return{type:i,property:e.name,animatable:t,tweens:n,duration:r.end,delay:n[0].delay,endDelay:r.endDelay}}}function os(t,e){return uo(go(t.map((function(t){return e.map((function(e){return rs(t,e)}))}))),(function(t){return!io.und(t)}))}function ss(t,e){var i=t.length,n=function(t){return t.timelineOffset?t.timelineOffset:0},r={};return r.duration=i?Math.max.apply(Math,t.map((function(t){return n(t)+t.duration}))):e.duration,r.delay=i?Math.min.apply(Math,t.map((function(t){return n(t)+t.delay}))):e.delay,r.endDelay=i?r.duration-Math.max.apply(Math,t.map((function(t){return n(t)+t.duration-t.endDelay}))):e.endDelay,r}var as=0;function ls(t){var e=bo(Xr,t),i=bo(Kr,t),n=Jo(i,t),r=Ko(t.targets),o=os(r,n),s=ss(o,i),a=as;return as++,yo(e,{id:a,children:[],animatables:r,animations:o,duration:s.duration,delay:s.delay,endDelay:s.endDelay})}var cs=[],hs=function(){var t;function e(){t||ds()&&ps.suspendWhenDocumentHidden||!(cs.length>0)||(t=requestAnimationFrame(i))}function i(e){for(var n=cs.length,r=0;r<n;){var o=cs[r];o.paused?(cs.splice(r,1),n--):(o.tick(e),r++)}t=r>0?requestAnimationFrame(i):void 0}function n(){ps.suspendWhenDocumentHidden&&(ds()?t=cancelAnimationFrame(t):(cs.forEach((function(t){return t._onDocumentVisibility()})),hs()))}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",n),e}();function ds(){return!!document&&document.hidden}function ps(t){void 0===t&&(t={});var e,i=0,n=0,r=0,o=0,s=null;function a(t){var e=window.Promise&&new Promise((function(t){return s=t}));return t.finished=e,e}var l=ls(t);a(l);function c(){var t=l.direction;"alternate"!==t&&(l.direction="normal"!==t?"normal":"reverse"),l.reversed=!l.reversed,e.forEach((function(t){return t.reversed=l.reversed}))}function h(t){return l.reversed?l.duration-t:t}function d(){i=0,n=h(l.currentTime)*(1/ps.speed)}function p(t,e){e&&e.seek(t-e.timelineOffset)}function u(t){if(l.reversePlayback)for(var i=o;i--;)p(t,e[i]);else for(var n=0;n<o;n++)p(t,e[n])}function g(t){for(var e=0,i=l.animations,n=i.length;e<n;){var r=i[e],o=r.animatable,s=r.tweens,a=s.length-1,c=s[a];a&&(c=uo(s,(function(e){return t<e.end}))[0]||c);for(var h=Jr(t-c.start-c.delay,0,c.duration)/c.duration,d=isNaN(h)?1:c.easing(h),p=c.to.strings,u=c.round,g=[],f=c.to.numbers.length,m=void 0,v=0;v<f;v++){var b=void 0,y=c.to.numbers[v],_=c.from.numbers[v]||0;b=c.isPath?Yo(c.value,d*y,c.isPathTargetInsideSVG):_+d*(y-_),u&&(c.isColor&&v>2||(b=Math.round(b*u)/u)),g.push(b)}var w=p.length;if(w){m=p[0];for(var x=0;x<w;x++){p[x];var k=p[x+1],A=g[x];isNaN(A)||(m+=k?A+k:A+" ")}}else m=g[0];is[r.type](o.target,r.property,m,o.transforms),r.currentValue=m,e++}}function f(t){l[t]&&!l.passThrough&&l[t](l)}function m(){l.remaining&&!0!==l.remaining&&l.remaining--}function v(t){var o=l.duration,d=l.delay,p=o-l.endDelay,v=h(t);l.progress=Jr(v/o*100,0,100),l.reversePlayback=v<l.currentTime,e&&u(v),!l.began&&l.currentTime>0&&(l.began=!0,f("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,f("loopBegin")),v<=d&&0!==l.currentTime&&g(0),(v>=p&&l.currentTime!==o||!o)&&g(o),v>d&&v<p?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,f("changeBegin")),f("change"),g(v)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,f("changeComplete")),l.currentTime=Jr(v,0,o),l.began&&f("update"),t>=o&&(n=0,m(),l.remaining?(i=r,f("loopComplete"),l.loopBegan=!1,"alternate"===l.direction&&c()):(l.paused=!0,l.completed||(l.completed=!0,f("loopComplete"),f("complete"),!l.passThrough&&"Promise"in window&&(s(),a(l)))))}return l.reset=function(){var t=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed="reverse"===t,l.remaining=l.loop,e=l.children;for(var i=o=e.length;i--;)l.children[i].reset();(l.reversed&&!0!==l.loop||"alternate"===t&&1===l.loop)&&l.remaining++,g(l.reversed?l.duration:0)},l._onDocumentVisibility=d,l.set=function(t,e){return ns(t,e),l},l.tick=function(t){r=t,i||(i=r),v((r+(n-i))*ps.speed)},l.seek=function(t){v(h(t))},l.pause=function(){l.paused=!0,d()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,cs.push(l),d(),hs())},l.reverse=function(){c(),l.completed=!l.reversed,d()},l.restart=function(){l.reset(),l.play()},l.remove=function(t){gs(Xo(t),l)},l.reset(),l.autoplay&&l.play(),l}function us(t,e){for(var i=e.length;i--;)mo(t,e[i].animatable.target)&&e.splice(i,1)}function gs(t,e){var i=e.animations,n=e.children;us(t,i);for(var r=n.length;r--;){var o=n[r],s=o.animations;us(t,s),s.length||o.children.length||n.splice(r,1)}i.length||n.length||e.pause()}function fs(t){for(var e=Xo(t),i=cs.length;i--;){gs(e,cs[i])}}function ms(t,e){void 0===e&&(e={});var i=e.direction||"normal",n=e.easing?ho(e.easing):null,r=e.grid,o=e.axis,s=e.from||0,a="first"===s,l="center"===s,c="last"===s,h=io.arr(t),d=h?parseFloat(t[0]):parseFloat(t),p=h?parseFloat(t[1]):0,u=Ao(h?t[1]:t)||0,g=e.start||0+(h?d:0),f=[],m=0;return function(t,e,v){if(a&&(s=0),l&&(s=(v-1)/2),c&&(s=v-1),!f.length){for(var b=0;b<v;b++){if(r){var y=l?(r[0]-1)/2:s%r[0],_=l?(r[1]-1)/2:Math.floor(s/r[0]),w=y-b%r[0],x=_-Math.floor(b/r[0]),k=Math.sqrt(w*w+x*x);"x"===o&&(k=-w),"y"===o&&(k=-x),f.push(k)}else f.push(Math.abs(s-b));m=Math.max.apply(Math,f)}n&&(f=f.map((function(t){return n(t/m)*m}))),"reverse"===i&&(f=f.map((function(t){return o?t<0?-1*t:-t:Math.abs(m-t)})))}return g+(h?(p-d)/m:d)*(Math.round(100*f[e])/100)+u}}function vs(t){void 0===t&&(t={});var e=ps(t);return e.duration=0,e.add=function(i,n){var r=cs.indexOf(e),o=e.children;function s(t){t.passThrough=!0}r>-1&&cs.splice(r,1);for(var a=0;a<o.length;a++)s(o[a]);var l=yo(i,bo(Kr,t));l.targets=l.targets||t.targets;var c=e.duration;l.autoplay=!1,l.direction=e.direction,l.timelineOffset=io.und(n)?c:$o(n,c),s(e),e.seek(l.timelineOffset);var h=ps(l);s(h),o.push(h);var d=ss(o,t);return e.delay=d.delay,e.endDelay=d.endDelay,e.duration=d.duration,e.seek(0),e.reset(),e.autoplay&&e.play(),e},e}ps.version="3.2.1",ps.speed=1,ps.suspendWhenDocumentHidden=!0,ps.running=cs,ps.remove=fs,ps.get=Oo,ps.set=ns,ps.convertPx=Eo,ps.path=Wo,ps.setDashoffset=jo,ps.stagger=ms,ps.timeline=vs,ps.easing=ho,ps.penner=co,ps.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t};class bs extends(D(V)){static get properties(){return Object.assign({src:{type:String},odd:{type:String,reflect:!0},view:{type:String,reflect:!0},nodeId:{type:String,reflect:!0,attribute:"node-id"},xmlId:{type:Array,reflect:!0,attribute:"xml-id"},xpath:{type:String,reflect:!0},map:{type:String},onUpdate:{type:Boolean,attribute:"on-update"},notFound:{type:String,attribute:"not-found"},url:{type:String},static:{type:String},appendFootnotes:{type:Boolean,attribute:"append-footnotes"},suppressHighlight:{type:Boolean,attribute:"suppress-highlight",reflect:!0},columnSeparator:{type:String,attribute:"column-separator"},direction:{type:String},loadCss:{type:String,attribute:"load-css"},fixLinks:{type:Boolean,attribute:"fix-links"},useLanguage:{type:Boolean,attribute:"use-language"},animation:{type:Boolean},infiniteScroll:{type:Boolean,attribute:"infinite-scroll"},infiniteScrollMax:{type:Number,attribute:"infinite-scroll-max"},waitFor:{type:String,attribute:"wait-for"},disableHistory:{type:Boolean,attribute:"disable-history"},beforeUpdate:{type:String,attribute:"before-update-event"},noScroll:{type:Boolean,attribute:"no-scroll"},_features:{type:Object},_content:{type:Node,attribute:!1},_column1:{type:Node,attribute:!1},_column2:{type:Node,attribute:!1},_footnotes:{type:Node,attribute:!1},_style:{type:Node,attribute:!1}},super.properties)}constructor(){super(),this.src=null,this.url=null,this.onUpdate=!1,this.appendFootnotes=!1,this.notFound="the server did not return any content",this.animation=!1,this.direction="ltr",this.suppressHighlight=!1,this.highlight=!1,this.infiniteScrollMax=10,this.disableHistory=!1,this.beforeUpdate=null,this.noScroll=!1,this._features={},this._selector=new Map,this._chunks=[],this._scrollTarget=null,this.static=null}attributeChangedCallback(t,e,i){switch(super.attributeChangedCallback(t,e,i),t){case"src":this._updateSource(i,e)}}connectedCallback(){if(super.connectedCallback(),this.infiniteScroll&&(this.columnSeparator=null,this.animation=!1,this._content=document.createElement("div"),this._content.className="infinite-content"),!this.disableHistory){const t=this.getParameter("id");t&&!this.xmlId&&(this.xmlId=t);const e=this.getParameter("action");e&&"search"===e&&(this.highlight=!0);const i=this.getParameter("root");"single"===this.view?this.nodeId=null:i&&!this.nodeId&&(this.nodeId=i)}this.waitFor||(this.waitFor="pb-toggle-feature,pb-select-feature,pb-navigation"),this.subscribeTo("pb-navigate",t=>{t.detail.source&&t.detail.source===this||this.navigate(t.detail.direction)}),this.subscribeTo("pb-refresh",this._refresh.bind(this)),this.subscribeTo("pb-toggle",t=>{this.toggleFeature(t)}),this.subscribeTo("pb-zoom",t=>{this.zoom(t.detail.direction)}),this.subscribeTo("pb-i18n-update",t=>{const e=this._features.language&&this._features.language!==t.detail.language;this._features.language=t.detail.language,this.useLanguage&&e&&this._refresh()},[]),this.signalReady(),this.onUpdate&&this.subscribeTo("pb-update",this._refresh.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this._scrollObserver&&this._scrollObserver.disconnect()}firstUpdated(){super.firstUpdated(),this.enableScrollbar(!0),this.infiniteScroll&&(this._topObserver=this.shadowRoot.getElementById("top-observer"),this._bottomObserver=this.shadowRoot.getElementById("bottom-observer"),this._bottomObserver.style.display="none",this._topObserver.style.display="none",this._scrollObserver=new IntersectionObserver(t=>{this._content&&t.forEach(t=>{if(t.isIntersecting)if("bottom-observer"===t.target.id){const t=this._content.lastElementChild;if(t){const e=t.getAttribute("data-next");e&&!this._content.querySelector(`[data-root="${e}"]`)&&(console.log("<pb-view> Loading next page: %s",e),this._checkChunks("forward"),this._load(e,"forward"))}}else{const t=this._content.firstElementChild;if(t){const e=t.getAttribute("data-previous");e&&!this._content.querySelector(`[data-root="${e}"]`)&&(this._checkChunks("backward"),this._load(e,"backward"))}}})})),this.onUpdate||bs.waitOnce("pb-page-ready",t=>{t&&t.language&&(this._features.language=t.language),this.wait(()=>this._refresh())})}getOdd(){return this.odd||this.getDocument().odd||"teipublisher"}getView(){return this.view||this.getDocument().view||"single"}forceUpdate(){this._load(this.nodeId)}animate(){this.animation&&("forward"===this.lastDirection?ps({targets:this.shadowRoot.getElementById("view"),opacity:[0,1],translateX:[1e3,0],duration:300,easing:"linear"}):ps({targets:this.shadowRoot.getElementById("view"),opacity:[0,1],translateX:[-1e3,0],duration:300,easing:"linear"}))}enableScrollbar(t){t?this.classList.add("noscroll"):this.classList.remove("noscroll")}_refresh(t){if(t&&t.detail){if(t.detail.hash&&!this.noScroll&&!(t.detail.id||t.detail.path||t.detail.odd||t.detail.view||t.detail.position)){this._scrollTarget=t.detail.hash;const e=this.shadowRoot.getElementById(this._scrollTarget);return void(e&&setTimeout(()=>e.scrollIntoView({block:"nearest"})))}if(t.detail.path){this.getDocument().path=t.detail.path}t.detail.id&&(this.xmlId=t.detail.id),this.odd=t.detail.odd||this.odd,void 0!==t.detail.columnSeparator&&(this.columnSeparator=t.detail.columnSeparator),this.view=t.detail.view||this.view,t.detail.xpath&&(this.xpath=t.detail.xpath,this.nodeId=null),null===t.detail.position?this.nodeId=null:this.nodeId=t.detail.position||this.nodeId,this.noScroll||(this._scrollTarget=t.detail.hash)}this._updateStyles(),this.infiniteScroll&&this._clear(),this._load(this.nodeId)}_load(t,e){if(!this.getDocument().path)return void console.log("No path");if(this._loading)return;this._loading=!0;const i=this.getParameters(t);e&&(i._dir=e),this._doLoad(i)}_doLoad(t){this.emitTo("pb-start-update",t),console.log("<pb-view> Loading view with params %o",t),this.infiniteScroll||this._clear(),this._scrollObserver&&(this._bottomObserver&&this._scrollObserver.unobserve(this._bottomObserver),this._topObserver&&this._scrollObserver.unobserve(this._topObserver));const e=this.shadowRoot.getElementById("loadContent");null!==this.static?this._staticUrl(t).then(t=>{e.url=t,e.generateRequest()}):(this.url||(this.minApiVersion("1.0.0")?this.url="api/parts":this.url="modules/lib/components.xql"),this.minApiVersion("1.0.0")?e.url=`${this.getEndpoint()}/${this.url}/${encodeURIComponent(this.getDocument().path)}/json`:e.url=`${this.getEndpoint()}/${this.url}`,e.params=t,e.generateRequest())}async _staticUrl(t){function e(e){const i=[];return e.sort().forEach(e=>{t.hasOwnProperty(e)&&i.push(`${e}=${t[e]}`)}),i.join("&")}const i=await fetch("index.json").then(t=>t.json()),n=["odd","view","xpath","map"];this.querySelectorAll("pb-param").forEach(t=>n.push("user."+t.getAttribute("name")));let r=t.id?e([...n,"id"]):e([...n,"root"]),o=i[r];return o||(r=e(n),o=i[r]),console.log("<pb-view> Static lookup %s: %s",r,o),""+o}_clear(){this.infiniteScroll?(this._content=document.createElement("div"),this._content.className="infinite-content"):this._content=null,this._column1=null,this._column2=null,this._footnotes=null,this._chunks=[]}_handleError(){this._clear();const t=this.shadowRoot.getElementById("loadContent");let e;const{response:i}=t.lastError;e=i?i.description:'<pb-i18n key="dialogs.serverError"></pb-i18n>';const n=`\n <p>${this.notFound}</p>\n <p><pb-i18n key="dialogs.serverError"></pb-i18n>: ${e} </p>\n `;this._replaceContent({content:n}),this.emitTo("pb-end-update")}_handleContent(){const t=this.shadowRoot.getElementById("loadContent"),e=t.lastResponse;if(e){if(e.error)return this.notFound&&(this._content=this.notFound),void this.emitTo("pb-end-update",null);this._replaceContent(e,t.params._dir),this.animate(),this._scrollTarget&&this.updateComplete.then(()=>{const t=this.shadowRoot.getElementById(this._scrollTarget)||this.shadowRoot.querySelector(`[node-id="${this._scrollTarget}"]`);t&&window.requestAnimationFrame(()=>setTimeout(()=>{t.scrollIntoView({block:"nearest"})},400)),this._scrollTarget=null}),this.next=e.next,this.nextId=e.nextId,this.previous=e.previous,this.previousId=e.previousId,this.nodeId=e.root,this.switchView=e.switchView,this.disableHistory||!this.xmlId||this.map||(this.setParameter("id",this.xmlId),this.pushHistory("Navigate to xml:id")),this.xmlId=null,this.updateComplete.then(()=>{const i=this.shadowRoot.getElementById("view");this._applyToggles(i),this._fixLinks(i),rn(i);const n={data:e,root:i,params:t.params,id:this.xmlId,position:this.nodeId};this.emitTo("pb-update",n),this._scroll()}),this.emitTo("pb-end-update",null)}else console.error("<pb-view> No response received")}_replaceContent(t,e){const i=document.createDocumentFragment(),n=document.createElement("div");i.appendChild(n),n.innerHTML=t.content,this.beforeUpdate?this.emitTo(this.beforeUpdate,{data:t,root:n,render:i=>{this._doReplaceContent(i,t,e)}}):this._doReplaceContent(n,t,e)}_doReplaceContent(t,e,i){if(this.columnSeparator)this._replaceColumns(t),this._loading=!1;else if(this.infiniteScroll){let n;switch(t.className="scroll-fragment",t.setAttribute("data-root",e.root),e.next&&t.setAttribute("data-next",e.next),e.previous&&t.setAttribute("data-previous",e.previous),i){case"backward":n=this._content.firstElementChild,this._chunks.unshift(t),this.updateComplete.then(()=>{n.scrollIntoView(!0),this._loading=!1,this._checkVisibility(),this._scrollObserver.observe(this._bottomObserver),this._scrollObserver.observe(this._topObserver)}),this._content.insertBefore(t,n);break;default:this.updateComplete.then(()=>{this._loading=!1,this._checkVisibility(),this._scrollObserver.observe(this._bottomObserver),this._scrollObserver.observe(this._topObserver)}),this._chunks.push(t),this._content.appendChild(t)}}else this._content=t,this._loading=!1;if(this.appendFootnotes){const t=document.createElement("div");e.footnotes&&(t.innerHTML=e.footnotes),this._footnotes=t}return this._initFootnotes(this._footnotes),t}_checkVisibility(){const t=this._chunks[this._chunks.length-1].hasAttribute("data-next");this._bottomObserver.style.display=t?"":"none";const e=this._chunks[0].hasAttribute("data-previous");this._topObserver.style.display=e?"":"none"}_replaceColumns(t){let e;if(this.columnSeparator){const i=t.querySelectorAll(this.columnSeparator);i.length>0&&(e=i[i.length-1])}if(e){const i=this._getFragmentBefore(t,e),n=this._getFragmentAfter(t,e);"ltr"===this.direction?(this._column1=i,this._column2=n):(this._column2=i,this._column1=n)}else this._content=t}_scroll(){if(this.noScroll)return;const{hash:t}=this.getUrl();if(t){const e=this.shadowRoot.getElementById(t.substring(1));console.log("hash target: %o",e),e&&window.requestAnimationFrame(()=>setTimeout(()=>{e.scrollIntoView({block:"nearest"})},400))}}_scrollToElement(t,e){const i=this.shadowRoot.getElementById(e.hash.substring(1));i&&(t.preventDefault(),console.log("<pb-view> Scrolling to element %s",i.id),i.scrollIntoView({block:"center",inline:"nearest"}))}_updateStyles(){const t=[];let e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),null!==this.static?e.setAttribute("href",`${this.static}/css/${this.getOdd()}.css`):e.setAttribute("href",`${this.getEndpoint()}/transform/${this.getOdd()}.css`),t.push(e),this.loadCss&&(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href",this.toAbsoluteURL(this.loadCss)),t.push(e)),this._style=t}_fixLinks(t){if(this.fixLinks){const e=this.getDocument(),i=this.toAbsoluteURL(e.path);t.querySelectorAll("img").forEach(t=>{const e=t.getAttribute("src"),n=new URL(e,i);t.src=n}),t.querySelectorAll("a").forEach(t=>{const e=t.getAttribute("href");if(e===t.hash)t.addEventListener("click",e=>this._scrollToElement(e,t));else{const n=new URL(e,i);t.href=n}})}else t.querySelectorAll("a").forEach(t=>{t.getAttribute("href")===t.hash&&t.addEventListener("click",e=>this._scrollToElement(e,t))})}_initFootnotes(t){t&&t.querySelectorAll(".note, .fn-back").forEach(t=>{t.addEventListener("click",e=>{e.preventDefault();const i=this.shadowRoot.getElementById("content").querySelector(t.hash);i&&i.scrollIntoView()})})}_getParameters(){const t=[];this.querySelectorAll("pb-param").forEach((function(e){t["user."+e.getAttribute("name")]=e.getAttribute("value")}));for(const[e,i]of Object.entries(this._features))t["user."+e]=i;return t}getParameters(t){t=t||this.nodeId;const e=this.getDocument(),i=this._getParameters();return this.minApiVersion("1.0.0")||(i.doc=e.path),i.odd=this.getOdd()+".odd",i.view=this.getView(),t&&(i.root=t),this.xpath&&(i.xpath=this.xpath),this.xmlId&&(i.id=this.xmlId),!this.suppressHighlight&&this.highlight&&(i.highlight="yes"),this.map&&(i.map=this.map),i}_applyToggles(t){0!==this._selector.size&&this._selector.forEach((e,i)=>{t.querySelectorAll(i).forEach(t=>{const i=e.command||"toggle";t.command&&t.command(i,e.state),e.state?t.classList.add(i):t.classList.remove(i)})})}goto(t){this._load(t)}gotoId(t){this.xmlId=t,this._load()}navigate(t){this.lastDirection=t,"backward"===t?this.previous&&(this.disableHistory||this.map||(this.previousId?this.setParameter("id",this.previousId):this.setParameter("root",this.previous),this.pushHistory("Navigate backward")),this._load(this.previous,t)):this.next&&(this.disableHistory||this.map||(this.nextId?this.setParameter("id",this.nextId):this.setParameter("root",this.next),this.pushHistory("Navigate forward")),this._load(this.next,t))}_checkChunks(t){if(this.infiniteScroll&&0!==this.infiniteScrollMax){if(this._chunks.length===this.infiniteScrollMax)switch(t){case"forward":this._content.removeChild(this._chunks.shift());break;default:this._content.removeChild(this._chunks.pop())}this.emitTo("pb-navigate",{direction:t,source:this})}}zoom(t){const e=this.shadowRoot.getElementById("view"),i=window.getComputedStyle(e).getPropertyValue("font-size"),n=parseInt(i.replace(/^(\d+)px/,"$1"));e.style.fontSize="in"===t?n+1+"px":n-1+"px"}toggleFeature(t){const e=()=>{const t=this.shadowRoot.getElementById("view");this._applyToggles(t)},i=t.detail.properties;for(const[t,e]of Object.entries(i))switch(t){case"odd":case"view":case"columnSeparator":case"xpath":case"nodeId":break;default:this._features[t]=e}i&&(i.odd&&(this.odd=i.odd),i.view&&(this.view=i.view,"single"===this.view?this.nodeId=null:this.nodeId=this.switchView),i.xpath&&(this.xpath=i.xpath),i.hasOwnProperty("columnSeparator")&&(this.columnSeparator=i.columnSeparator)),t.detail.selectors&&t.detail.selectors.forEach(t=>{this._selector.set(t.selector,{state:t.state,command:t.command||"toggle"})}),"refresh"===t.detail.action&&(Object.keys(i).length>0?(this._updateStyles(),this._load()):e())}_getFragmentBefore(t,e){const i=document.createRange();return i.setStartBefore(t),i.setEndBefore(e),i.cloneContents()}_getFragmentAfter(t,e){const i=document.createRange();return i.setStartBefore(e),i.setEndAfter(t),i.cloneContents()}_updateSource(t,e){void 0!==e&&t!==e&&(this.xpath=null,this.odd=null,this.xmlId=null,this.nodeId=null)}static get styles(){return P`
1092
+ `}}customElements.define("pb-select-feature",Gr);var Xr={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},Kr={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},Qr=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Zr={CSS:{},springs:{}};function Jr(t,e,i){return Math.min(Math.max(t,e),i)}function to(t,e){return t.indexOf(e)>-1}function eo(t,e){return t.apply(null,e)}var io={arr:function(t){return Array.isArray(t)},obj:function(t){return to(Object.prototype.toString.call(t),"Object")},pth:function(t){return io.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||io.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return io.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return io.hex(t)||io.rgb(t)||io.hsl(t)},key:function(t){return!Xr.hasOwnProperty(t)&&!Kr.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function no(t){var e=/\(([^)]+)\)/.exec(t);return e?e[1].split(",").map((function(t){return parseFloat(t)})):[]}function ro(t,e){var i=no(t),n=Jr(io.und(i[0])?1:i[0],.1,100),r=Jr(io.und(i[1])?100:i[1],.1,100),o=Jr(io.und(i[2])?10:i[2],.1,100),s=Jr(io.und(i[3])?0:i[3],.1,100),a=Math.sqrt(r/n),l=o/(2*Math.sqrt(r*n)),c=l<1?a*Math.sqrt(1-l*l):0,h=1,d=l<1?(l*a-s)/c:-s+a;function p(t){var i=e?e*t/1e3:t;return i=l<1?Math.exp(-i*l*a)*(h*Math.cos(c*i)+d*Math.sin(c*i)):(h+d*i)*Math.exp(-i*a),0===t||1===t?t:1-i}function u(){var e=Zr.springs[t];if(e)return e;for(var i=1/6,n=0,r=0;;)if(1===p(n+=i)){if(++r>=16)break}else r=0;var o=n*i*1e3;return Zr.springs[t]=o,o}return e?p:u}function oo(t){return void 0===t&&(t=10),function(e){return Math.ceil(Jr(e,1e-6,1)*t)*(1/t)}}var so,ao,lo=function(){var t=11,e=1/(t-1);function i(t,e){return 1-3*e+3*t}function n(t,e){return 3*e-6*t}function r(t){return 3*t}function o(t,e,o){return((i(e,o)*t+n(e,o))*t+r(e))*t}function s(t,e,o){return 3*i(e,o)*t*t+2*n(e,o)*t+r(e)}function a(t,e,i,n,r){var s,a,l=0;do{(s=o(a=e+(i-e)/2,n,r)-t)>0?i=a:e=a}while(Math.abs(s)>1e-7&&++l<10);return a}function l(t,e,i,n){for(var r=0;r<4;++r){var a=s(e,i,n);if(0===a)return e;e-=(o(e,i,n)-t)/a}return e}function c(i,n,r,c){if(0<=i&&i<=1&&0<=r&&r<=1){var h=new Float32Array(t);if(i!==n||r!==c)for(var d=0;d<t;++d)h[d]=o(d*e,i,r);return function(t){return i===n&&r===c||0===t||1===t?t:o(p(t),n,c)}}function p(n){for(var o=0,c=1,d=t-1;c!==d&&h[c]<=n;++c)o+=e;--c;var p=o+(n-h[c])/(h[c+1]-h[c])*e,u=s(p,i,r);return u>=.001?l(n,p,i,r):0===u?p:a(n,o,o+e,i,r)}}return c}(),co=(so={linear:function(){return function(t){return t}}},ao={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}},Elastic:function(t,e){void 0===t&&(t=1),void 0===e&&(e=.5);var i=Jr(t,1,10),n=Jr(e,.1,2);return function(t){return 0===t||1===t?t:-i*Math.pow(2,10*(t-1))*Math.sin((t-1-n/(2*Math.PI)*Math.asin(1/i))*(2*Math.PI)/n)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach((function(t,e){ao[t]=function(){return function(t){return Math.pow(t,e+2)}}})),Object.keys(ao).forEach((function(t){var e=ao[t];so["easeIn"+t]=e,so["easeOut"+t]=function(t,i){return function(n){return 1-e(t,i)(1-n)}},so["easeInOut"+t]=function(t,i){return function(n){return n<.5?e(t,i)(2*n)/2:1-e(t,i)(-2*n+2)/2}},so["easeOutIn"+t]=function(t,i){return function(n){return n<.5?(1-e(t,i)(1-2*n))/2:(e(t,i)(2*n-1)+1)/2}}})),so);function ho(t,e){if(io.fnc(t))return t;var i=t.split("(")[0],n=co[i],r=no(t);switch(i){case"spring":return ro(t,e);case"cubicBezier":return eo(lo,r);case"steps":return eo(oo,r);default:return eo(n,r)}}function po(t){try{return document.querySelectorAll(t)}catch(t){return}}function uo(t,e){for(var i=t.length,n=arguments.length>=2?arguments[1]:void 0,r=[],o=0;o<i;o++)if(o in t){var s=t[o];e.call(n,s,o,t)&&r.push(s)}return r}function go(t){return t.reduce((function(t,e){return t.concat(io.arr(e)?go(e):e)}),[])}function fo(t){return io.arr(t)?t:(io.str(t)&&(t=po(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function mo(t,e){return t.some((function(t){return t===e}))}function vo(t){var e={};for(var i in t)e[i]=t[i];return e}function bo(t,e){var i=vo(t);for(var n in t)i[n]=e.hasOwnProperty(n)?e[n]:t[n];return i}function yo(t,e){var i=vo(t);for(var n in e)i[n]=io.und(t[n])?e[n]:t[n];return i}function _o(t){var e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t);return e?"rgba("+e[1]+",1)":t}function wo(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=t.replace(e,(function(t,e,i,n){return e+e+i+i+n+n})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}function xo(t){var e,i,n,r=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),o=parseInt(r[1],10)/360,s=parseInt(r[2],10)/100,a=parseInt(r[3],10)/100,l=r[4]||1;function c(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}if(0==s)e=i=n=a;else{var h=a<.5?a*(1+s):a+s-a*s,d=2*a-h;e=c(d,h,o+1/3),i=c(d,h,o),n=c(d,h,o-1/3)}return"rgba("+255*e+","+255*i+","+255*n+","+l+")"}function ko(t){return io.rgb(t)?_o(t):io.hex(t)?wo(t):io.hsl(t)?xo(t):void 0}function Ao(t){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(e)return e[1]}function zo(t){return to(t,"translate")||"perspective"===t?"px":to(t,"rotate")||to(t,"skew")?"deg":void 0}function So(t,e){return io.fnc(t)?t(e.target,e.id,e.total):t}function Co(t,e){return t.getAttribute(e)}function Eo(t,e,i){if(mo([i,"deg","rad","turn"],Ao(e)))return e;var n=Zr.CSS[e+i];if(!io.und(n))return n;var r=100,o=document.createElement(t.tagName),s=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;s.appendChild(o),o.style.position="absolute",o.style.width=r+i;var a=r/o.offsetWidth;s.removeChild(o);var l=a*parseFloat(e);return Zr.CSS[e+i]=l,l}function Mo(t,e,i){if(e in t.style){var n=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=t.style[e]||getComputedStyle(t).getPropertyValue(n)||"0";return i?Eo(t,r,i):r}}function Lo(t,e){return io.dom(t)&&!io.inp(t)&&(!io.nil(Co(t,e))||io.svg(t)&&t[e])?"attribute":io.dom(t)&&mo(Qr,e)?"transform":io.dom(t)&&"transform"!==e&&Mo(t,e)?"css":null!=t[e]?"object":void 0}function To(t){if(io.dom(t)){for(var e,i=t.style.transform||"",n=/(\w+)\(([^)]*)\)/g,r=new Map;e=n.exec(i);)r.set(e[1],e[2]);return r}}function Ho(t,e,i,n){var r=to(e,"scale")?1:0+zo(e),o=To(t).get(e)||r;return i&&(i.transforms.list.set(e,o),i.transforms.last=e),n?Eo(t,o,n):o}function Oo(t,e,i,n){switch(Lo(t,e)){case"transform":return Ho(t,e,n,i);case"css":return Mo(t,e,i);case"attribute":return Co(t,e);default:return t[e]||0}}function $o(t,e){var i=/^(\*=|\+=|-=)/.exec(t);if(!i)return t;var n=Ao(t)||0,r=parseFloat(e),o=parseFloat(t.replace(i[0],""));switch(i[0][0]){case"+":return r+o+n;case"-":return r-o+n;case"*":return r*o+n}}function Vo(t,e){if(io.col(t))return ko(t);if(/\s/g.test(t))return t;var i=Ao(t),n=i?t.substr(0,t.length-i.length):t;return e?n+e:n}function Io(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ro(t){return 2*Math.PI*Co(t,"r")}function Po(t){return 2*Co(t,"width")+2*Co(t,"height")}function Do(t){return Io({x:Co(t,"x1"),y:Co(t,"y1")},{x:Co(t,"x2"),y:Co(t,"y2")})}function No(t){for(var e,i=t.points,n=0,r=0;r<i.numberOfItems;r++){var o=i.getItem(r);r>0&&(n+=Io(e,o)),e=o}return n}function Fo(t){var e=t.points;return No(t)+Io(e.getItem(e.numberOfItems-1),e.getItem(0))}function Bo(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return Ro(t);case"rect":return Po(t);case"line":return Do(t);case"polyline":return No(t);case"polygon":return Fo(t)}}function jo(t){var e=Bo(t);return t.setAttribute("stroke-dasharray",e),e}function qo(t){for(var e=t.parentNode;io.svg(e)&&io.svg(e.parentNode);)e=e.parentNode;return e}function Uo(t,e){var i=e||{},n=i.el||qo(t),r=n.getBoundingClientRect(),o=Co(n,"viewBox"),s=r.width,a=r.height,l=i.viewBox||(o?o.split(" "):[0,0,s,a]);return{el:n,viewBox:l,x:l[0]/1,y:l[1]/1,w:s,h:a,vW:l[2],vH:l[3]}}function Wo(t,e){var i=io.str(t)?po(t)[0]:t,n=e||100;return function(t){return{property:t,el:i,svg:Uo(i),totalLength:Bo(i)*(n/100)}}}function Yo(t,e,i){function n(i){void 0===i&&(i=0);var n=e+i>=1?e+i:0;return t.el.getPointAtLength(n)}var r=Uo(t.el,t.svg),o=n(),s=n(-1),a=n(1),l=i?1:r.w/r.vW,c=i?1:r.h/r.vH;switch(t.property){case"x":return(o.x-r.x)*l;case"y":return(o.y-r.y)*c;case"angle":return 180*Math.atan2(a.y-s.y,a.x-s.x)/Math.PI}}function Go(t,e){var i=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=Vo(io.pth(t)?t.totalLength:t,e)+"";return{original:n,numbers:n.match(i)?n.match(i).map(Number):[0],strings:io.str(t)||e?n.split(i):[]}}function Xo(t){return uo(t?go(io.arr(t)?t.map(fo):fo(t)):[],(function(t,e,i){return i.indexOf(t)===e}))}function Ko(t){var e=Xo(t);return e.map((function(t,i){return{target:t,id:i,total:e.length,transforms:{list:To(t)}}}))}function Qo(t,e){var i=vo(e);if(/^spring/.test(i.easing)&&(i.duration=ro(i.easing)),io.arr(t)){var n=t.length;2===n&&!io.obj(t[0])?t={value:t}:io.fnc(e.duration)||(i.duration=e.duration/n)}var r=io.arr(t)?t:[t];return r.map((function(t,i){var n=io.obj(t)&&!io.pth(t)?t:{value:t};return io.und(n.delay)&&(n.delay=i?0:e.delay),io.und(n.endDelay)&&(n.endDelay=i===r.length-1?e.endDelay:0),n})).map((function(t){return yo(t,i)}))}function Zo(t){for(var e=uo(go(t.map((function(t){return Object.keys(t)}))),(function(t){return io.key(t)})).reduce((function(t,e){return t.indexOf(e)<0&&t.push(e),t}),[]),i={},n=function(n){var r=e[n];i[r]=t.map((function(t){var e={};for(var i in t)io.key(i)?i==r&&(e.value=t[i]):e[i]=t[i];return e}))},r=0;r<e.length;r++)n(r);return i}function Jo(t,e){var i=[],n=e.keyframes;for(var r in n&&(e=yo(Zo(n),e)),e)io.key(r)&&i.push({name:r,tweens:Qo(e[r],t)});return i}function ts(t,e){var i={};for(var n in t){var r=So(t[n],e);io.arr(r)&&1===(r=r.map((function(t){return So(t,e)}))).length&&(r=r[0]),i[n]=r}return i.duration=parseFloat(i.duration),i.delay=parseFloat(i.delay),i}function es(t,e){var i;return t.tweens.map((function(n){var r=ts(n,e),o=r.value,s=io.arr(o)?o[1]:o,a=Ao(s),l=Oo(e.target,t.name,a,e),c=i?i.to.original:l,h=io.arr(o)?o[0]:c,d=Ao(h)||Ao(l),p=a||d;return io.und(s)&&(s=c),r.from=Go(h,p),r.to=Go($o(s,h),p),r.start=i?i.end:0,r.end=r.start+r.delay+r.duration+r.endDelay,r.easing=ho(r.easing,r.duration),r.isPath=io.pth(o),r.isPathTargetInsideSVG=r.isPath&&io.svg(e.target),r.isColor=io.col(r.from.original),r.isColor&&(r.round=1),i=r,r}))}var is={css:function(t,e,i){return t.style[e]=i},attribute:function(t,e,i){return t.setAttribute(e,i)},object:function(t,e,i){return t[e]=i},transform:function(t,e,i,n,r){if(n.list.set(e,i),e===n.last||r){var o="";n.list.forEach((function(t,e){o+=e+"("+t+") "})),t.style.transform=o}}};function ns(t,e){Ko(t).forEach((function(t){for(var i in e){var n=So(e[i],t),r=t.target,o=Ao(n),s=Oo(r,i,o,t),a=$o(Vo(n,o||Ao(s)),s),l=Lo(r,i);is[l](r,i,a,t.transforms,!0)}}))}function rs(t,e){var i=Lo(t.target,e.name);if(i){var n=es(e,t),r=n[n.length-1];return{type:i,property:e.name,animatable:t,tweens:n,duration:r.end,delay:n[0].delay,endDelay:r.endDelay}}}function os(t,e){return uo(go(t.map((function(t){return e.map((function(e){return rs(t,e)}))}))),(function(t){return!io.und(t)}))}function ss(t,e){var i=t.length,n=function(t){return t.timelineOffset?t.timelineOffset:0},r={};return r.duration=i?Math.max.apply(Math,t.map((function(t){return n(t)+t.duration}))):e.duration,r.delay=i?Math.min.apply(Math,t.map((function(t){return n(t)+t.delay}))):e.delay,r.endDelay=i?r.duration-Math.max.apply(Math,t.map((function(t){return n(t)+t.duration-t.endDelay}))):e.endDelay,r}var as=0;function ls(t){var e=bo(Xr,t),i=bo(Kr,t),n=Jo(i,t),r=Ko(t.targets),o=os(r,n),s=ss(o,i),a=as;return as++,yo(e,{id:a,children:[],animatables:r,animations:o,duration:s.duration,delay:s.delay,endDelay:s.endDelay})}var cs=[],hs=function(){var t;function e(){t||ds()&&ps.suspendWhenDocumentHidden||!(cs.length>0)||(t=requestAnimationFrame(i))}function i(e){for(var n=cs.length,r=0;r<n;){var o=cs[r];o.paused?(cs.splice(r,1),n--):(o.tick(e),r++)}t=r>0?requestAnimationFrame(i):void 0}function n(){ps.suspendWhenDocumentHidden&&(ds()?t=cancelAnimationFrame(t):(cs.forEach((function(t){return t._onDocumentVisibility()})),hs()))}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",n),e}();function ds(){return!!document&&document.hidden}function ps(t){void 0===t&&(t={});var e,i=0,n=0,r=0,o=0,s=null;function a(t){var e=window.Promise&&new Promise((function(t){return s=t}));return t.finished=e,e}var l=ls(t);a(l);function c(){var t=l.direction;"alternate"!==t&&(l.direction="normal"!==t?"normal":"reverse"),l.reversed=!l.reversed,e.forEach((function(t){return t.reversed=l.reversed}))}function h(t){return l.reversed?l.duration-t:t}function d(){i=0,n=h(l.currentTime)*(1/ps.speed)}function p(t,e){e&&e.seek(t-e.timelineOffset)}function u(t){if(l.reversePlayback)for(var i=o;i--;)p(t,e[i]);else for(var n=0;n<o;n++)p(t,e[n])}function g(t){for(var e=0,i=l.animations,n=i.length;e<n;){var r=i[e],o=r.animatable,s=r.tweens,a=s.length-1,c=s[a];a&&(c=uo(s,(function(e){return t<e.end}))[0]||c);for(var h=Jr(t-c.start-c.delay,0,c.duration)/c.duration,d=isNaN(h)?1:c.easing(h),p=c.to.strings,u=c.round,g=[],f=c.to.numbers.length,m=void 0,v=0;v<f;v++){var b=void 0,y=c.to.numbers[v],_=c.from.numbers[v]||0;b=c.isPath?Yo(c.value,d*y,c.isPathTargetInsideSVG):_+d*(y-_),u&&(c.isColor&&v>2||(b=Math.round(b*u)/u)),g.push(b)}var w=p.length;if(w){m=p[0];for(var x=0;x<w;x++){p[x];var k=p[x+1],A=g[x];isNaN(A)||(m+=k?A+k:A+" ")}}else m=g[0];is[r.type](o.target,r.property,m,o.transforms),r.currentValue=m,e++}}function f(t){l[t]&&!l.passThrough&&l[t](l)}function m(){l.remaining&&!0!==l.remaining&&l.remaining--}function v(t){var o=l.duration,d=l.delay,p=o-l.endDelay,v=h(t);l.progress=Jr(v/o*100,0,100),l.reversePlayback=v<l.currentTime,e&&u(v),!l.began&&l.currentTime>0&&(l.began=!0,f("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,f("loopBegin")),v<=d&&0!==l.currentTime&&g(0),(v>=p&&l.currentTime!==o||!o)&&g(o),v>d&&v<p?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,f("changeBegin")),f("change"),g(v)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,f("changeComplete")),l.currentTime=Jr(v,0,o),l.began&&f("update"),t>=o&&(n=0,m(),l.remaining?(i=r,f("loopComplete"),l.loopBegan=!1,"alternate"===l.direction&&c()):(l.paused=!0,l.completed||(l.completed=!0,f("loopComplete"),f("complete"),!l.passThrough&&"Promise"in window&&(s(),a(l)))))}return l.reset=function(){var t=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed="reverse"===t,l.remaining=l.loop,e=l.children;for(var i=o=e.length;i--;)l.children[i].reset();(l.reversed&&!0!==l.loop||"alternate"===t&&1===l.loop)&&l.remaining++,g(l.reversed?l.duration:0)},l._onDocumentVisibility=d,l.set=function(t,e){return ns(t,e),l},l.tick=function(t){r=t,i||(i=r),v((r+(n-i))*ps.speed)},l.seek=function(t){v(h(t))},l.pause=function(){l.paused=!0,d()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,cs.push(l),d(),hs())},l.reverse=function(){c(),l.completed=!l.reversed,d()},l.restart=function(){l.reset(),l.play()},l.remove=function(t){gs(Xo(t),l)},l.reset(),l.autoplay&&l.play(),l}function us(t,e){for(var i=e.length;i--;)mo(t,e[i].animatable.target)&&e.splice(i,1)}function gs(t,e){var i=e.animations,n=e.children;us(t,i);for(var r=n.length;r--;){var o=n[r],s=o.animations;us(t,s),s.length||o.children.length||n.splice(r,1)}i.length||n.length||e.pause()}function fs(t){for(var e=Xo(t),i=cs.length;i--;){gs(e,cs[i])}}function ms(t,e){void 0===e&&(e={});var i=e.direction||"normal",n=e.easing?ho(e.easing):null,r=e.grid,o=e.axis,s=e.from||0,a="first"===s,l="center"===s,c="last"===s,h=io.arr(t),d=h?parseFloat(t[0]):parseFloat(t),p=h?parseFloat(t[1]):0,u=Ao(h?t[1]:t)||0,g=e.start||0+(h?d:0),f=[],m=0;return function(t,e,v){if(a&&(s=0),l&&(s=(v-1)/2),c&&(s=v-1),!f.length){for(var b=0;b<v;b++){if(r){var y=l?(r[0]-1)/2:s%r[0],_=l?(r[1]-1)/2:Math.floor(s/r[0]),w=y-b%r[0],x=_-Math.floor(b/r[0]),k=Math.sqrt(w*w+x*x);"x"===o&&(k=-w),"y"===o&&(k=-x),f.push(k)}else f.push(Math.abs(s-b));m=Math.max.apply(Math,f)}n&&(f=f.map((function(t){return n(t/m)*m}))),"reverse"===i&&(f=f.map((function(t){return o?t<0?-1*t:-t:Math.abs(m-t)})))}return g+(h?(p-d)/m:d)*(Math.round(100*f[e])/100)+u}}function vs(t){void 0===t&&(t={});var e=ps(t);return e.duration=0,e.add=function(i,n){var r=cs.indexOf(e),o=e.children;function s(t){t.passThrough=!0}r>-1&&cs.splice(r,1);for(var a=0;a<o.length;a++)s(o[a]);var l=yo(i,bo(Kr,t));l.targets=l.targets||t.targets;var c=e.duration;l.autoplay=!1,l.direction=e.direction,l.timelineOffset=io.und(n)?c:$o(n,c),s(e),e.seek(l.timelineOffset);var h=ps(l);s(h),o.push(h);var d=ss(o,t);return e.delay=d.delay,e.endDelay=d.endDelay,e.duration=d.duration,e.seek(0),e.reset(),e.autoplay&&e.play(),e},e}ps.version="3.2.1",ps.speed=1,ps.suspendWhenDocumentHidden=!0,ps.running=cs,ps.remove=fs,ps.get=Oo,ps.set=ns,ps.convertPx=Eo,ps.path=Wo,ps.setDashoffset=jo,ps.stagger=ms,ps.timeline=vs,ps.easing=ho,ps.penner=co,ps.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t};class bs extends(D(V)){static get properties(){return Object.assign({src:{type:String},odd:{type:String,reflect:!0},view:{type:String,reflect:!0},nodeId:{type:String,reflect:!0,attribute:"node-id"},xmlId:{type:Array,reflect:!0,attribute:"xml-id"},xpath:{type:String,reflect:!0},map:{type:String},onUpdate:{type:Boolean,attribute:"on-update"},notFound:{type:String,attribute:"not-found"},url:{type:String},static:{type:String},appendFootnotes:{type:Boolean,attribute:"append-footnotes"},suppressHighlight:{type:Boolean,attribute:"suppress-highlight",reflect:!0},columnSeparator:{type:String,attribute:"column-separator"},direction:{type:String},loadCss:{type:String,attribute:"load-css"},fixLinks:{type:Boolean,attribute:"fix-links"},useLanguage:{type:Boolean,attribute:"use-language"},animation:{type:Boolean},infiniteScroll:{type:Boolean,attribute:"infinite-scroll"},infiniteScrollMax:{type:Number,attribute:"infinite-scroll-max"},waitFor:{type:String,attribute:"wait-for"},disableHistory:{type:Boolean,attribute:"disable-history"},beforeUpdate:{type:String,attribute:"before-update-event"},noScroll:{type:Boolean,attribute:"no-scroll"},_features:{type:Object},_content:{type:Node,attribute:!1},_column1:{type:Node,attribute:!1},_column2:{type:Node,attribute:!1},_footnotes:{type:Node,attribute:!1},_style:{type:Node,attribute:!1}},super.properties)}constructor(){super(),this.src=null,this.url=null,this.onUpdate=!1,this.appendFootnotes=!1,this.notFound="the server did not return any content",this.animation=!1,this.direction="ltr",this.suppressHighlight=!1,this.highlight=!1,this.infiniteScrollMax=10,this.disableHistory=!1,this.beforeUpdate=null,this.noScroll=!1,this._features={},this._selector=new Map,this._chunks=[],this._scrollTarget=null,this.static=null}attributeChangedCallback(t,e,i){switch(super.attributeChangedCallback(t,e,i),t){case"src":this._updateSource(i,e)}}connectedCallback(){if(super.connectedCallback(),this.infiniteScroll&&(this.columnSeparator=null,this.animation=!1,this._content=document.createElement("div"),this._content.className="infinite-content"),!this.disableHistory){const t=this.getParameter("id");t&&!this.xmlId&&(this.xmlId=t);const e=this.getParameter("action");e&&"search"===e&&(this.highlight=!0);const i=this.getParameter("root");"single"===this.view?this.nodeId=null:i&&!this.nodeId&&(this.nodeId=i)}this.waitFor||(this.waitFor="pb-toggle-feature,pb-select-feature,pb-navigation"),this.subscribeTo("pb-navigate",t=>{t.detail.source&&t.detail.source===this||this.navigate(t.detail.direction)}),this.subscribeTo("pb-refresh",this._refresh.bind(this)),this.subscribeTo("pb-toggle",t=>{this.toggleFeature(t)}),this.subscribeTo("pb-zoom",t=>{this.zoom(t.detail.direction)}),this.subscribeTo("pb-i18n-update",t=>{const e=this._features.language&&this._features.language!==t.detail.language;this._features.language=t.detail.language,this.useLanguage&&e&&this._refresh()},[]),this.signalReady(),this.onUpdate&&this.subscribeTo("pb-update",this._refresh.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this._scrollObserver&&this._scrollObserver.disconnect()}firstUpdated(){super.firstUpdated(),this.enableScrollbar(!0),this.infiniteScroll&&(this._topObserver=this.shadowRoot.getElementById("top-observer"),this._bottomObserver=this.shadowRoot.getElementById("bottom-observer"),this._bottomObserver.style.display="none",this._topObserver.style.display="none",this._scrollObserver=new IntersectionObserver(t=>{this._content&&t.forEach(t=>{if(t.isIntersecting)if("bottom-observer"===t.target.id){const t=this._content.lastElementChild;if(t){const e=t.getAttribute("data-next");e&&!this._content.querySelector(`[data-root="${e}"]`)&&(console.log("<pb-view> Loading next page: %s",e),this._checkChunks("forward"),this._load(e,"forward"))}}else{const t=this._content.firstElementChild;if(t){const e=t.getAttribute("data-previous");e&&!this._content.querySelector(`[data-root="${e}"]`)&&(this._checkChunks("backward"),this._load(e,"backward"))}}})})),this.onUpdate||bs.waitOnce("pb-page-ready",t=>{t&&t.language&&(this._features.language=t.language),this.wait(()=>this._refresh())})}getOdd(){return this.odd||this.getDocument().odd||"teipublisher"}getView(){return this.view||this.getDocument().view||"single"}forceUpdate(){this._load(this.nodeId)}animate(){this.animation&&("forward"===this.lastDirection?ps({targets:this.shadowRoot.getElementById("view"),opacity:[0,1],translateX:[1e3,0],duration:300,easing:"linear"}):ps({targets:this.shadowRoot.getElementById("view"),opacity:[0,1],translateX:[-1e3,0],duration:300,easing:"linear"}))}enableScrollbar(t){t?this.classList.add("noscroll"):this.classList.remove("noscroll")}_refresh(t){if(t&&t.detail){if(t.detail.hash&&!this.noScroll&&!(t.detail.id||t.detail.path||t.detail.odd||t.detail.view||t.detail.position)){this._scrollTarget=t.detail.hash;const e=this.shadowRoot.getElementById(this._scrollTarget);return void(e&&setTimeout(()=>e.scrollIntoView({block:"nearest"})))}if(t.detail.path){this.getDocument().path=t.detail.path}t.detail.id&&(this.xmlId=t.detail.id),this.odd=t.detail.odd||this.odd,void 0!==t.detail.columnSeparator&&(this.columnSeparator=t.detail.columnSeparator),this.view=t.detail.view||this.view,t.detail.xpath&&(this.xpath=t.detail.xpath,this.nodeId=null),null===t.detail.position?this.nodeId=null:this.nodeId=t.detail.position||this.nodeId,this.noScroll||(this._scrollTarget=t.detail.hash)}this._updateStyles(),this.infiniteScroll&&this._clear(),this._load(this.nodeId)}_load(t,e){if(!this.getDocument().path)return void console.log("No path");if(this._loading)return;this._loading=!0;const i=this.getParameters(t);e&&(i._dir=e),this._doLoad(i)}_doLoad(t){this.emitTo("pb-start-update",t),console.log("<pb-view> Loading view with params %o",t),this.infiniteScroll||this._clear(),this._scrollObserver&&(this._bottomObserver&&this._scrollObserver.unobserve(this._bottomObserver),this._topObserver&&this._scrollObserver.unobserve(this._topObserver));const e=this.shadowRoot.getElementById("loadContent");null!==this.static?this._staticUrl(t).then(t=>{e.url=t,e.generateRequest()}):(this.url||(this.minApiVersion("1.0.0")?this.url="api/parts":this.url="modules/lib/components.xql"),this.minApiVersion("1.0.0")?e.url=`${this.getEndpoint()}/${this.url}/${encodeURIComponent(this.getDocument().path)}/json`:e.url=`${this.getEndpoint()}/${this.url}`,e.params=t,e.generateRequest())}async _staticUrl(t){function e(e){const i=[];return e.sort().forEach(e=>{t.hasOwnProperty(e)&&i.push(`${e}=${t[e]}`)}),i.join("&")}const i=await fetch("index.json").then(t=>t.json()),n=["odd","view","xpath","map"];this.querySelectorAll("pb-param").forEach(t=>n.push("user."+t.getAttribute("name")));let r=t.id?e([...n,"id"]):e([...n,"root"]),o=i[r];return o||(r=e(n),o=i[r]),console.log("<pb-view> Static lookup %s: %s",r,o),""+o}_clear(){this.infiniteScroll?(this._content=document.createElement("div"),this._content.className="infinite-content"):this._content=null,this._column1=null,this._column2=null,this._footnotes=null,this._chunks=[]}_handleError(){this._clear();const t=this.shadowRoot.getElementById("loadContent");let e;const{response:i}=t.lastError;e=i?i.description:'<pb-i18n key="dialogs.serverError"></pb-i18n>';const n=`\n <p>${this.notFound}</p>\n <p><pb-i18n key="dialogs.serverError"></pb-i18n>: ${e} </p>\n `;this._replaceContent({content:n}),this.emitTo("pb-end-update")}_handleContent(){const t=this.shadowRoot.getElementById("loadContent"),e=t.lastResponse;if(e){if(e.error)return this.notFound&&(this._content=this.notFound),void this.emitTo("pb-end-update",null);this._replaceContent(e,t.params._dir),this.animate(),this._scrollTarget&&this.updateComplete.then(()=>{const t=this.shadowRoot.getElementById(this._scrollTarget)||this.shadowRoot.querySelector(`[node-id="${this._scrollTarget}"]`);t&&window.requestAnimationFrame(()=>setTimeout(()=>{t.scrollIntoView({block:"nearest"})},400)),this._scrollTarget=null}),this.next=e.next,this.nextId=e.nextId,this.previous=e.previous,this.previousId=e.previousId,this.nodeId=e.root,this.switchView=e.switchView,this.disableHistory||!this.xmlId||this.map||(this.setParameter("id",this.xmlId),this.pushHistory("Navigate to xml:id")),this.xmlId=null,this.updateComplete.then(()=>{const i=this.shadowRoot.getElementById("view");this._applyToggles(i),this._fixLinks(i),rn(i);const n={data:e,root:i,params:t.params,id:this.xmlId,position:this.nodeId};this.emitTo("pb-update",n),this._scroll()}),this.emitTo("pb-end-update",null)}else console.error("<pb-view> No response received")}_replaceContent(t,e){const i=document.createDocumentFragment(),n=document.createElement("div");i.appendChild(n),n.innerHTML=t.content,this.beforeUpdate?this.emitTo(this.beforeUpdate,{data:t,root:n,render:i=>{this._doReplaceContent(i,t,e)}}):this._doReplaceContent(n,t,e)}_doReplaceContent(t,e,i){if(this.columnSeparator)this._replaceColumns(t),this._loading=!1;else if(this.infiniteScroll){let n;switch(t.className="scroll-fragment",t.setAttribute("data-root",e.root),e.next&&t.setAttribute("data-next",e.next),e.previous&&t.setAttribute("data-previous",e.previous),i){case"backward":n=this._content.firstElementChild,this._chunks.unshift(t),this.updateComplete.then(()=>{n.scrollIntoView(!0),this._loading=!1,this._checkVisibility(),this._scrollObserver.observe(this._bottomObserver),this._scrollObserver.observe(this._topObserver)}),this._content.insertBefore(t,n);break;default:this.updateComplete.then(()=>{this._loading=!1,this._checkVisibility(),this._scrollObserver.observe(this._bottomObserver),this._scrollObserver.observe(this._topObserver)}),this._chunks.push(t),this._content.appendChild(t)}}else this._content=t,this._loading=!1;if(this.appendFootnotes){const t=document.createElement("div");e.footnotes&&(t.innerHTML=e.footnotes),this._footnotes=t}return this._initFootnotes(this._footnotes),t}_checkVisibility(){const t=this._chunks[this._chunks.length-1].hasAttribute("data-next");this._bottomObserver.style.display=t?"":"none";const e=this._chunks[0].hasAttribute("data-previous");this._topObserver.style.display=e?"":"none"}_replaceColumns(t){let e;if(this.columnSeparator){const i=t.querySelectorAll(this.columnSeparator);i.length>1&&(e=i[i.length-1])}if(e){const i=this._getFragmentBefore(t,e),n=this._getFragmentAfter(t,e);"ltr"===this.direction?(this._column1=i,this._column2=n):(this._column2=i,this._column1=n)}else this._content=t}_scroll(){if(this.noScroll)return;const{hash:t}=this.getUrl();if(t){const e=this.shadowRoot.getElementById(t.substring(1));console.log("hash target: %o",e),e&&window.requestAnimationFrame(()=>setTimeout(()=>{e.scrollIntoView({block:"nearest"})},400))}}_scrollToElement(t,e){const i=this.shadowRoot.getElementById(e.hash.substring(1));i&&(t.preventDefault(),console.log("<pb-view> Scrolling to element %s",i.id),i.scrollIntoView({block:"center",inline:"nearest"}))}_updateStyles(){const t=[];let e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),null!==this.static?e.setAttribute("href",`${this.static}/css/${this.getOdd()}.css`):e.setAttribute("href",`${this.getEndpoint()}/transform/${this.getOdd()}.css`),t.push(e),this.loadCss&&(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href",this.toAbsoluteURL(this.loadCss)),t.push(e)),this._style=t}_fixLinks(t){if(this.fixLinks){const e=this.getDocument(),i=this.toAbsoluteURL(e.path);t.querySelectorAll("img").forEach(t=>{const e=t.getAttribute("src"),n=new URL(e,i);t.src=n}),t.querySelectorAll("a").forEach(t=>{const e=t.getAttribute("href");if(e===t.hash)t.addEventListener("click",e=>this._scrollToElement(e,t));else{const n=new URL(e,i);t.href=n}})}else t.querySelectorAll("a").forEach(t=>{t.getAttribute("href")===t.hash&&t.addEventListener("click",e=>this._scrollToElement(e,t))})}_initFootnotes(t){t&&t.querySelectorAll(".note, .fn-back").forEach(t=>{t.addEventListener("click",e=>{e.preventDefault();const i=this.shadowRoot.getElementById("content").querySelector(t.hash);i&&i.scrollIntoView()})})}_getParameters(){const t=[];this.querySelectorAll("pb-param").forEach((function(e){t["user."+e.getAttribute("name")]=e.getAttribute("value")}));for(const[e,i]of Object.entries(this._features))t["user."+e]=i;return t}getParameters(t){t=t||this.nodeId;const e=this.getDocument(),i=this._getParameters();return this.minApiVersion("1.0.0")||(i.doc=e.path),i.odd=this.getOdd()+".odd",i.view=this.getView(),t&&(i.root=t),this.xpath&&(i.xpath=this.xpath),this.xmlId&&(i.id=this.xmlId),!this.suppressHighlight&&this.highlight&&(i.highlight="yes"),this.map&&(i.map=this.map),i}_applyToggles(t){0!==this._selector.size&&this._selector.forEach((e,i)=>{t.querySelectorAll(i).forEach(t=>{const i=e.command||"toggle";t.command&&t.command(i,e.state),e.state?t.classList.add(i):t.classList.remove(i)})})}goto(t){this._load(t)}gotoId(t){this.xmlId=t,this._load()}navigate(t){this.lastDirection=t,"backward"===t?this.previous&&(this.disableHistory||this.map||(this.previousId?this.setParameter("id",this.previousId):this.setParameter("root",this.previous),this.pushHistory("Navigate backward")),this._load(this.previous,t)):this.next&&(this.disableHistory||this.map||(this.nextId?this.setParameter("id",this.nextId):this.setParameter("root",this.next),this.pushHistory("Navigate forward")),this._load(this.next,t))}_checkChunks(t){if(this.infiniteScroll&&0!==this.infiniteScrollMax){if(this._chunks.length===this.infiniteScrollMax)switch(t){case"forward":this._content.removeChild(this._chunks.shift());break;default:this._content.removeChild(this._chunks.pop())}this.emitTo("pb-navigate",{direction:t,source:this})}}zoom(t){const e=this.shadowRoot.getElementById("view"),i=window.getComputedStyle(e).getPropertyValue("font-size"),n=parseInt(i.replace(/^(\d+)px/,"$1"));e.style.fontSize="in"===t?n+1+"px":n-1+"px"}toggleFeature(t){const e=()=>{const t=this.shadowRoot.getElementById("view");this._applyToggles(t)},i=t.detail.properties;for(const[t,e]of Object.entries(i))switch(t){case"odd":case"view":case"columnSeparator":case"xpath":case"nodeId":break;default:this._features[t]=e}i&&(i.odd&&(this.odd=i.odd),i.view&&(this.view=i.view,"single"===this.view?this.nodeId=null:this.nodeId=this.switchView),i.xpath&&(this.xpath=i.xpath),i.hasOwnProperty("columnSeparator")&&(this.columnSeparator=i.columnSeparator)),t.detail.selectors&&t.detail.selectors.forEach(t=>{this._selector.set(t.selector,{state:t.state,command:t.command||"toggle"})}),"refresh"===t.detail.action&&(Object.keys(i).length>0?(this._updateStyles(),this._load()):e())}_getFragmentBefore(t,e){const i=document.createRange();return i.setStartBefore(t),i.setEndBefore(e),i.cloneContents()}_getFragmentAfter(t,e){const i=document.createRange();return i.setStartBefore(e),i.setEndAfter(t),i.cloneContents()}_updateSource(t,e){void 0!==e&&t!==e&&(this.xpath=null,this.odd=null,this.xmlId=null,this.nodeId=null)}static get styles(){return P`
1093
1093
  :host {
1094
1094
  display: block;
1095
1095
  background: transparent;
@@ -4045,7 +4045,7 @@ const Fa=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
4045
4045
  align-items: center;
4046
4046
  padding: 0 16px;
4047
4047
  }
4048
- `}}customElements.define("pb-clipboard",ja);class qa{constructor(t){this._prefix=t.getAttribute("prefix"),this._config={name:t.getAttribute("name"),properties:{}},this._register=this._config.name}get register(){return this._register}get name(){return this._register}set name(t){this._register=t}query(t){throw new Error("Method query not implemented")}info(t,e){return e.innerHTML="not implemented",Promise.resolve()}select(t){}async getRecord(t){return Promise.reject()}}class Ua extends qa{async query(t){const e=t.replace(/[^\w\s]+/g,""),i=[],n="https://api.metagrid.ch/search?query="+encodeURIComponent(e);return new Promise(t=>{fetch(n).then(t=>t.json()).then(e=>{e.resources.forEach(t=>{const e=`${t.metadata.last_name}, ${t.metadata.first_name} `,n={register:this._register,id:`${t.provider.slug}-${t.identifier}`,label:e,details:`${t.metadata.birth_date} - ${t.metadata.death_date}`,link:t.link.uri,provider:t.provider.slug};i.push(n)}),t({totalItems:e.meta.total,items:i})})})}info(t,e){const i=t.indexOf("-"),n=t.substring(0,i);return new Promise(i=>{this.getRecord(t).then(t=>{const r=`\n <h3 class="label">\n <a href="https://${t.link.uri}" target="_blank">\n ${t.metadata.last_name}, ${t.metadata.first_name}\n </a>\n </h3>\n <p>${t.metadata.birth_date} - ${t.metadata.death_date}</p>\n `;e.innerHTML=r,i({id:`${n}-${t.identifier}`,strings:[`${t.metadata.first_name} ${t.metadata.last_name}`]})})})}async getRecord(t){const e=t.indexOf("-"),i=t.substring(0,e),n=t.substring(e+1);return fetch(`https://api.metagrid.ch/search?slug=${i}&query=${n}`).then(t=>t.json()).then(t=>{const e=t.resources[0],i=Object.assign({},e);return i.name=`${e.metadata.first_name} ${e.metadata.last_name}`,i.links=["https://"+e.link.uri],e.metadata.birth_date&&e.metadata.birth_date.length>0&&(i.birth=e.metadata.birth_date),e.metadata.death_date&&e.metadata.death_date.length>0&&(i.death=e.metadata.death_date),i}).catch(t=>Promise.reject(t))}}class Wa extends qa{constructor(t){super(t),this.user=t.getAttribute("user")}async query(t){const e=[];return new Promise(i=>{fetch(`https://secure.geonames.org/searchJSON?formatted=true&q=${encodeURIComponent(t)}&maxRows=100&&username=${this.user}&style=full`).then(t=>t.json()).then(t=>{t.geonames.forEach(t=>{const i={register:this._register,id:this._prefix?`${this._prefix}-${t.geonameId}`:t.geonameId,label:t.toponymName,details:`${t.fcodeName} - ${t.adminName1}, ${t.countryName}`,link:"https://www.geonames.org/"+t.geonameId,strings:[t.toponymName],provider:"geonames.org"};e.push(i)}),i({totalItems:t.totalResultsCount,items:e})})})}info(t,e){return t?new Promise((i,n)=>{this.getRecord(t).then(t=>{if(t.status)return void n(t.status.message);const r=`\n <h3 class="label">\n <a href="${t.link}" target="_blank">${t.name}</a>\n </h3>\n <p class="fcode">${t.note} - ${t.region}, ${t.country}</p>\n `;e.innerHTML=r,i({id:this._prefix?`${this._prefix}-${t.geonameId}`:t.geonameId,strings:[t.name]})}).catch(()=>n())}):Promise.resolve({})}async getRecord(t){const e=this._prefix?t.substring(this._prefix.length+1):t;return fetch(`https://secure.geonames.org/getJSON?geonameId=${encodeURIComponent(e)}&username=${this.user}`).then(t=>t.ok?t.json():Promise.reject(t.status)).then(t=>{const e=Object.assign({},t);return e.name=t.toponymName,e.country=t.countryName,e.region=t.adminName1,e.note=t.fcodeName,e.links=["https://www.geonames.org/"+t.geonameId,"https://"+t.wikipediaURL],e}).catch(()=>Promise.reject())}}function Ya(t="",e){return t.replace(/\${([^}]+)}/g,(t,i)=>{let n;return e[i]&&(n=e[i]),n||""})}function Ga(t,e){const i=t.querySelector(e);if(i instanceof HTMLTemplateElement){const t=document.createElement("div");return t.appendChild(i.content.cloneNode(!0)),t.innerHTML}return""}class Xa extends qa{constructor(t){super(t),this.apiKey=t.getAttribute("api-key"),this.baseKey=t.getAttribute("base"),this.table=t.getAttribute("table"),this.view=t.getAttribute("view"),this.filterExpr=t.getAttribute("filter"),this.labelExpr=t.getAttribute("label");const e=t.getAttribute("fields");this.fields=e?e.split(/\s*,\s*/):["ID"];const i=t.getAttribute("tokenize");this.tokenize=i?i.split(/\s*,\s*/):[this.fields[0]],this.tokenizeChars=t.getAttribute("tokenize-regex")||"\\W",this.infoExpr=Ga(t,".info"),this.detailExpr=Ga(t,".detail"),this._init()}_init(){window.ESGlobalBridge.requestAvailability();const t=R("https://unpkg.com/airtable@0.11.1/build/airtable.browser.js");window.ESGlobalBridge.instance.load("airtable",t),window.addEventListener("es-bridge-airtable-loaded",this._initAirtable.bind(this),{once:!0})}_initAirtable(){const t=require("airtable");this.base=new t({apiKey:this.apiKey}).base(this.baseKey)}async query(t){t=t.toLowerCase();const e=[],i=this.filterExpr?Ya(this.filterExpr,{key:t}):null,n={fields:this.fields,maxRecords:100};return this.view&&(n.view=this.view),i&&(n.filterByFormula=i),new Promise((t,i)=>{this.base(this.table).select(n).firstPage((n,r)=>{if(n)return console.error(n),void i(n);r.forEach(t=>{const i={};this.fields.forEach(e=>{i[e]=t.get(e)});const n={register:this._register,id:t.id,label:Ya(this.labelExpr,i),details:Ya(this.detailExpr,i),provider:"airtable"};e.push(n)}),t({totalItems:3,items:e})})})}info(t,e){return new Promise((i,n)=>{const r={fields:this.fields,filterByFormula:`RECORD_ID()='${t}'`};this.base(this.table).select(r).firstPage((r,o)=>{if(r){switch(r.statusCode){case 404:n(`No record found for ${t} in table ${this.table}`);break;default:n(`${r.statusCode}: ${r.message}`)}return}const s=o[0];if(0===Object.keys(s.fields).length)return void console.warn("Retrieved an empty record for %s from table %s",t,this.table);let a=[];const l={};this.fields.forEach(t=>{const e=s.get(t);e&&(l[t]=e,a.push(e))});const c=new RegExp(this.tokenizeChars);this.tokenize.forEach(t=>{a=a.concat(l[t].split(c))}),a=a.filter(t=>!/^\d+$/.test(t)),a.sort((t,e)=>e.length-t.length),console.log(a),e.innerHTML=Ya(this.infoExpr,l),i({id:s.id,strings:a})})})}}function Ka(t){let e="";t.professionOrOccupation&&t.professionOrOccupation.length>0&&(e=t.professionOrOccupation.map(t=>t.label).join(", ")),t.biographicalOrHistoricalInformation&&(e=`${e}; ${t.biographicalOrHistoricalInformation.join(", ")}`);const i=[];return t.dateOfBirth&&t.dateOfBirth.length>0&&i.push(t.dateOfBirth[0]),t.dateOfDeath&&t.dateOfDeath.length>0&&(i.push(" - "),i.push(t.dateOfDeath[0])),i.length>0?`${i.join("")}${e?"; "+e:""}`:e}class Qa extends qa{query(t){const e=[];let i;switch(this._register){case"place":i="PlaceOrGeographicName";break;case"term":i="SubjectHeading";break;case"organization":i="CorporateBody";break;default:i="Person"}return new Promise(n=>{fetch(`https://lobid.org/gnd/search?q=${encodeURIComponent(t)}&filter=%2B%28type%3A${i}%29&format=json&size=100`).then(t=>t.json()).then(t=>{t.member.forEach(t=>{const i={register:this._register,id:this._prefix?`${this._prefix}-${t.gndIdentifier}`:t.gndIdentifier,label:t.preferredName,link:t.id,details:Ka(t),strings:[t.preferredName].concat(t.variantName),provider:"GND"};e.push(i)}),n({totalItems:t.totalItems,items:e})})})}async getRecord(t){const e=this._prefix?t.substring(this._prefix.length+1):t;return fetch(`https://lobid.org/gnd/${e}.json`).then(t=>t.ok?t.json():Promise.reject()).then(t=>{const e=Object.assign({},t);return e.name=t.preferredName,e.link=t.id,t.dateOfBirth&&t.dateOfBirth.length>0&&(e.birth=t.dateOfBirth[0]),t.dateOfDeath&&t.dateOfDeath.length>0&&(e.death=t.dateOfDeath[0]),t.biographicalOrHistoricalInformation&&(e.note=t.biographicalOrHistoricalInformation.join("; ")),t.professionOrOccupation&&t.professionOrOccupation.length>0&&(e.profession=t.professionOrOccupation.map(t=>t.label)),e}).catch(()=>Promise.reject())}info(t,e){return t?new Promise((i,n)=>{this.getRecord(t).then(t=>{let n;t.type.indexOf("SubjectHeading")>-1?n=this.infoSubject(t):t.type.indexOf("AuthorityResource")>-1&&(n=this.infoPerson(t));const r=`\n <h3 class="label">\n <a href="https://${t.id}" target="_blank"> ${t.preferredName} </a>\n </h3>\n ${n}\n `;e.innerHTML=r,i({id:this._prefix?`${this._prefix}-${t.gndIdentifier}`:t.gndIdentifier,strings:[t.preferredName].concat(t.variantName)})}).catch(()=>n())}):Promise.resolve()}infoPerson(t){const e=t.professionOrOccuption?t.professionOrOccupation.map(t=>t.label):[];return`<p>${t.dateOfBirth} - ${t.dateOfDeath}</p>\n <p>${e.join(" ")}</p>`}infoSubject(t){if(t.broaderTermGeneral){return`<p>${t.broaderTermGeneral.map(t=>t.label).join(", ")}</p>`}return""}}class Za extends qa{constructor(t){super(t),this._api=t.getAttribute("api")}async query(t){const e=[],i=this.getRegister(),n=`https://meta.karl-barth.ch/api/${i}?${"bibls"===i?"biblsearch":"search"}=${encodeURIComponent(t)}`,r=this.getLabelField();return new Promise(t=>{fetch(n).then(t=>t.json()).then(n=>{n.data.forEach(t=>{if("organization"===this._register&&"organisation"!==t.authority_type||"person"===this._register&&"person"!==t.authority_type)return;const n={register:this._register,id:this._prefix?`${this._prefix}:${t["full-id"]}`:t["full-id"],label:"string"==typeof r?t[r]:r(t),details:""+t["full-id"],link:`https://meta.karl-barth.ch/${i}/${t.id}`,strings:["string"==typeof r?t[r]:r(t)],provider:"KBGA"};e.push(n)}),t({totalItems:n.meta.total,items:e})})})}info(t,e){if(!t)return Promise.resolve({});const i=this.getLabelField();return new Promise(n=>{this.getRecord(t).then(t=>{const r=t.data.death?"† "+t.data.death:"",o=t.data.birth?`<p>* ${t.data.birth} ${r}</p>`:"",s=t.data.note_bio?`<p>${t.data.note_bio}</p>`:"",a=`\n <h3 class="label"><a href="https://${t.wikipediaURL}" target="_blank">${"string"==typeof i?t.data[i]:i(t.data)}</a></h3>\n ${o}\n ${s}\n `;e.innerHTML=a,n({id:t.data["full-id"],strings:["string"==typeof i?t.data[i]:i(t.data)]})})})}async getRecord(t){const e=t.replace(/^.*-([^-]+)$/,"$1");return fetch(`https://meta.karl-barth.ch/api/${this.getRegister()}/${e}`).then(t=>t.json()).then(t=>{const e=Object.assign({},t);switch(e.name=t.data[this.getLabelField()],this._register){case"place":e.country=t.data.country,e.location=t.data.location.coordinates,e.links=t.data.links.map(t=>t.url);break;case"person":e.birth=t.data.birth,e.death=t.data.death,e.note=t.data.note_bio,e.links=["https://"+t.wikipediaURL]}return e}).catch(t=>Promise.reject(t))}getLabelField(){let t;switch(this._register){case"place":t="placeName_full";break;case"term":t="fullLabel";break;case"abbreviation":t="label";break;case"bibl":t="asHtml";break;default:t="persName_full"}return t}getRegister(){if(this._api)return this._api;let t;switch(this._register){case"person":case"organization":t="actors";break;case"place":t="places";break;case"term":t="terms";break;case"abbreviation":t="abbreviations";break;case"bibl":t="bibls";break;default:t=this._register}return t}}class Ja extends qa{constructor(t){super(t),this._api=t.getAttribute("api")}async query(t){const e=[],i=this.getRegister(),n=`https://archives.georgfischer.com/api/${i}?search=${encodeURIComponent(t)}`,r=this.getLabelField();return new Promise(t=>{fetch(n).then(t=>t.json()).then(n=>{n.data?(n.data.forEach(t=>{if("organization"===this._register&&"Person"===t.authority_type||"person"===this._register&&"Person"!==t.authority_type)return;const n={register:this._register,id:this._prefix?`${this._prefix}-${t.id}`:t.id,label:t[r],details:""+t.id,link:`https://archives.georgfischer.com/api/${i}/${t.id}`,strings:[t[r]],provider:"GF"};e.push(n)}),t({totalItems:n.meta.total,items:e})):t({totalItems:0,items:[]})}).catch(t=>Promise.reject(t))})}info(t,e){if(!t)return Promise.resolve({});const i=this._prefix?t.substring(this._prefix.length+1):t,n=this.getLabelField();return new Promise(t=>{this.getRecord(i).then(i=>{const r=i.data.death?"† "+i.data.death:"",o=i.data.birth?`<p>* ${i.data.birth} ${r}</p>`:"",s=i.data.note_bio?`<p>${i.data.note_bio}</p>`:"",a=`\n <h3 class="label"><a href="https://${i.wikipediaURL}" target="_blank">${i.data[n]}</a></h3>\n ${o}\n ${s}\n `;e.innerHTML=a,t({id:this._prefix?`${this._prefix}-${i.data.id}`:i.data.id,strings:[i.data[n]]})})})}async getRecord(t){const e=t.replace(/^.*-([^-]+)$/,"$1"),i=`https://archives.georgfischer.com/api/${this.getRegister()}/${e}`;return fetch(i).then(t=>t.json()).then(t=>{const e=Object.assign({},t);switch(e.name=t.data[this.getLabelField()],this._register){case"place":e.country=t.data.country,e.location=t.data.location.coordinates,e.links=t.data.links.map(t=>t.url);break;case"person":e.birth=t.data.birth,e.death=t.data.death,e.note=t.data.note_bio,e.links=["https://"+t.wikipediaURL]}return e}).catch(t=>Promise.reject(t))}getLabelField(){let t;switch(this._register){case"term":t="label";break;default:t="fullname"}return t}getRegister(){if(this._api)return this._api;let t;switch(this._register){case"person":case"organization":t="actors";break;case"place":t="places";break;case"term":t="keywords";break;case"abbreviation":t="abbreviations";break;default:t=this._register}return t}}async function tl(t){const e=await fetch(t);return await e.json()}class el extends qa{constructor(t){super(t),this.endpoint=t.getAttribute("endpoint"),this.debug=t.getAttribute("debug"),tl(this.endpoint).then(t=>{this.ORConfig=t,this.debug&&console.log("OpenReconcile connector for register '%s' at endpoint <%s>. Using config: %o",this._register,this.endpoint,this.ORConfig)})}async query(t){const e=[],i={q1:{query:t}};return new Promise(t=>{fetch(this.endpoint,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:"queries=".concat(JSON.stringify(i))}).then(t=>t.json()).then(i=>{i.q1.result.forEach(t=>{this.ORConfig.view?this.view=this.ORConfig.view.url.replace("{{id}}",t.id):this.view=t.id,t.description?this.description=t.description:t.type?this.description=t.type.map(t=>t.name.toString()).join(", "):this.description="";const i={register:this._register,id:this._prefix?`${this._prefix}-${t.id}`:t.id,label:t.name,link:this.view,details:this.description,provider:"OpenReconcile"};e.push(i)}),this.debug&&console.log("OpenReconcile results: %o",e),t({totalItems:i.q1.result.length,items:e})})})}info(t,e){return t?this.ORConfig.preview?new Promise((i,n)=>{const r=this._prefix?t.substring(this._prefix.length+1):t,o=this.ORConfig.preview.url.replace("{{id}}",encodeURIComponent(r));fetch(o).then(t=>t.text()).then(t=>{e.innerHTML=t,i({id:this._prefix?`${this._prefix}-${r}`:r})}).catch(()=>n())}):(e.innerHTML="no 'preview' information in endpoint's manifest",Promise.resolve()):Promise.resolve({})}}class il extends qa{constructor(t,e){super(e),this._endpoint=t,this._connectors=nl(t,e),this._connectors.forEach(t=>{t.name=this.name}),console.log("custom connector: endpoint: %s; using authorities: %o",this._endpoint,this._connectors)}async query(t){return new Promise(e=>{fetch(`${this._endpoint}/api/register/search/${this._register}?query=${encodeURIComponent(t)}`).then(t=>t.json()).then(async i=>{let n=[];const r=new Set;i.forEach(t=>{n.push({register:this._register,id:t.id,label:t.label,link:t.link,details:t.details,provider:"local"}),r.add(t.id)});let o=i.length;for(const e of this._connectors){const i=await e.query(t);n=n.concat(i.items.filter(t=>!r.has(t.id))),o+=i.totalItems}e({totalItems:o,items:n})})})}info(t,e){if(!t)return Promise.resolve({});const i=t;return new Promise((n,r)=>{fetch(`${this._endpoint}/api/register/${this._register}/${encodeURIComponent(i)}`).then(async i=>{if(i.ok){const t=await i.json();return e.innerHTML=t.details,void n({id:t.id,strings:t.strings})}if(404===i.status)for(const i of this._connectors)try{const r=await i.info(t,e);r&&n(r)}catch(t){}r()})})}async select(t){let e;for(const i of this._connectors)if(e=await i.getRecord(t.id),e)break;return e?fetch(`${this._endpoint}/api/register/${this._register}/${encodeURIComponent(t.id)}`,{method:"POST",mode:"cors",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.json()):Promise.reject("No record found for ID "+t.id)}}function nl(t,e){const i=[];return e.querySelectorAll(":scope > pb-authority").forEach(e=>{let n;switch(e.getAttribute("connector")){case"GND":n=new Qa(e);break;case"GeoNames":n=new Wa(e);break;case"Airtable":n=new Xa(e);break;case"KBGA":n=new Za(e);break;case"GF":n=new Ja(e);break;case"ReconciliationService":n=new el(e);break;case"Custom":n=new il(t,e);break;default:n=new Ua(e)}i.push(n)}),i}class rl extends(D(V)){static get properties(){return Object.assign({query:{type:String,reflect:!0},sortByLabel:{type:Boolean,attribute:"sort-by-label"},stopwords:{type:String},_results:{type:Array}},super.properties)}constructor(){super(),this.query="",this.type=null,this.sortByLabel=!1,this._results=[],this._authorities={}}connectedCallback(){super.connectedCallback(),this._stopwordSet=new Set,this.stopwords&&this.stopwords.split(/\s*,\s*/).forEach(t=>this._stopwordSet.add(t.toLowerCase())),this.subscribeTo("pb-authority-lookup",t=>{this.query=t.detail.query,this.type=t.detail.type,this._results=[],this._query()}),rl.waitOnce("pb-page-ready",()=>{nl(this.getEndpoint(),this).forEach(t=>{this._authorities[t.register]=t})}),console.log("<pb-authority-lookup> Registered authorities: %o",this._authorities)}render(){return I`
4048
+ `}}customElements.define("pb-clipboard",ja);class qa{constructor(t){this._prefix=t.getAttribute("prefix"),this._config={name:t.getAttribute("name"),properties:{}},this._register=this._config.name}get register(){return this._register}get name(){return this._register}set name(t){this._register=t}query(t){throw new Error("Method query not implemented")}info(t,e){return e.innerHTML="not implemented",Promise.resolve()}select(t){}async getRecord(t){return Promise.reject()}}class Ua extends qa{async query(t){const e=t.replace(/[^\w\s]+/g,""),i=[],n="https://api.metagrid.ch/search?query="+encodeURIComponent(e);return new Promise(t=>{fetch(n).then(t=>t.json()).then(e=>{e.resources.forEach(t=>{const e=`${t.metadata.last_name}, ${t.metadata.first_name} `,n={register:this._register,id:`${t.provider.slug}-${t.identifier}`,label:e,details:`${t.metadata.birth_date} - ${t.metadata.death_date}`,link:t.link.uri,provider:t.provider.slug};i.push(n)}),t({totalItems:e.meta.total,items:i})})})}info(t,e){const i=t.indexOf("-"),n=t.substring(0,i);return new Promise(i=>{this.getRecord(t).then(t=>{const r=`\n <h3 class="label">\n <a href="https://${t.link.uri}" target="_blank">\n ${t.metadata.last_name}, ${t.metadata.first_name}\n </a>\n </h3>\n <p>${t.metadata.birth_date} - ${t.metadata.death_date}</p>\n `;e.innerHTML=r,i({id:`${n}-${t.identifier}`,strings:[`${t.metadata.first_name} ${t.metadata.last_name}`]})})})}async getRecord(t){const e=t.indexOf("-"),i=t.substring(0,e),n=t.substring(e+1);return fetch(`https://api.metagrid.ch/search?slug=${i}&query=${n}`).then(t=>t.json()).then(t=>{const e=t.resources[0],i=Object.assign({},e);return i.name=`${e.metadata.first_name} ${e.metadata.last_name}`,i.links=["https://"+e.link.uri],e.metadata.birth_date&&e.metadata.birth_date.length>0&&(i.birth=e.metadata.birth_date),e.metadata.death_date&&e.metadata.death_date.length>0&&(i.death=e.metadata.death_date),i}).catch(t=>Promise.reject(t))}}class Wa extends qa{constructor(t){super(t),this.user=t.getAttribute("user")}async query(t){const e=[];return new Promise(i=>{fetch(`https://secure.geonames.org/searchJSON?formatted=true&q=${encodeURIComponent(t)}&maxRows=100&&username=${this.user}&style=full`).then(t=>t.json()).then(t=>{t.geonames.forEach(t=>{const i={register:this._register,id:this._prefix?`${this._prefix}-${t.geonameId}`:t.geonameId,label:t.toponymName,details:`${t.fcodeName} - ${t.adminName1}, ${t.countryName}`,link:"https://www.geonames.org/"+t.geonameId,strings:[t.toponymName],provider:"geonames.org"};e.push(i)}),i({totalItems:t.totalResultsCount,items:e})})})}info(t,e){return t?new Promise((i,n)=>{this.getRecord(t).then(t=>{if(t.status)return void n(t.status.message);const r=`\n <h3 class="label">\n <a href="${t.link}" target="_blank">${t.name}</a>\n </h3>\n <p class="fcode">${t.note} - ${t.region}, ${t.country}</p>\n `;e.innerHTML=r,i({id:this._prefix?`${this._prefix}-${t.geonameId}`:t.geonameId,strings:[t.name]})}).catch(()=>n())}):Promise.resolve({})}async getRecord(t){const e=this._prefix?t.substring(this._prefix.length+1):t;return fetch(`https://secure.geonames.org/getJSON?geonameId=${encodeURIComponent(e)}&username=${this.user}`).then(t=>t.ok?t.json():Promise.reject(t.status)).then(t=>{const e=Object.assign({},t);return e.name=t.toponymName,e.country=t.countryName,e.region=t.adminName1,e.note=t.fcodeName,e.links=["https://www.geonames.org/"+t.geonameId,"https://"+t.wikipediaURL],e}).catch(()=>Promise.reject())}}function Ya(t="",e){return t.replace(/\${([^}]+)}/g,(t,i)=>{let n;return e[i]&&(n=e[i]),n||""})}function Ga(t,e){const i=t.querySelector(e);if(i instanceof HTMLTemplateElement){const t=document.createElement("div");return t.appendChild(i.content.cloneNode(!0)),t.innerHTML}return""}class Xa extends qa{constructor(t){super(t),this.apiKey=t.getAttribute("api-key"),this.baseKey=t.getAttribute("base"),this.table=t.getAttribute("table"),this.view=t.getAttribute("view"),this.filterExpr=t.getAttribute("filter"),this.labelExpr=t.getAttribute("label");const e=t.getAttribute("fields");this.fields=e?e.split(/\s*,\s*/):["ID"];const i=t.getAttribute("tokenize");this.tokenize=i?i.split(/\s*,\s*/):[this.fields[0]],this.tokenizeChars=t.getAttribute("tokenize-regex")||"\\W",this.infoExpr=Ga(t,".info"),this.detailExpr=Ga(t,".detail"),this._init()}_init(){window.ESGlobalBridge.requestAvailability();const t=R("https://unpkg.com/airtable@0.11.1/build/airtable.browser.js");window.ESGlobalBridge.instance.load("airtable",t),window.addEventListener("es-bridge-airtable-loaded",this._initAirtable.bind(this),{once:!0})}_initAirtable(){const t=require("airtable");this.base=new t({apiKey:this.apiKey}).base(this.baseKey)}async query(t){t=t.toLowerCase();const e=[],i=this.filterExpr?Ya(this.filterExpr,{key:t}):null,n={fields:this.fields,maxRecords:100};return this.view&&(n.view=this.view),i&&(n.filterByFormula=i),new Promise((t,i)=>{this.base(this.table).select(n).firstPage((n,r)=>{if(n)return console.error(n),void i(n);r.forEach(t=>{const i={};this.fields.forEach(e=>{i[e]=t.get(e)});const n={register:this._register,id:t.id,label:Ya(this.labelExpr,i),details:Ya(this.detailExpr,i),provider:"airtable"};e.push(n)}),t({totalItems:3,items:e})})})}info(t,e){return new Promise((i,n)=>{const r={fields:this.fields,filterByFormula:`RECORD_ID()='${t}'`};this.base(this.table).select(r).firstPage((r,o)=>{if(r){switch(r.statusCode){case 404:n(`No record found for ${t} in table ${this.table}`);break;default:n(`${r.statusCode}: ${r.message}`)}return}const s=o[0];if(0===Object.keys(s.fields).length)return void console.warn("Retrieved an empty record for %s from table %s",t,this.table);let a=[];const l={};this.fields.forEach(t=>{const e=s.get(t);e&&(l[t]=e,a.push(e))});const c=new RegExp(this.tokenizeChars);this.tokenize.forEach(t=>{a=a.concat(l[t].split(c))}),a=a.filter(t=>!/^\d+$/.test(t)),a.sort((t,e)=>e.length-t.length),console.log(a),e.innerHTML=Ya(this.infoExpr,l),i({id:s.id,strings:a})})})}}function Ka(t){let e="";t.professionOrOccupation&&t.professionOrOccupation.length>0&&(e=t.professionOrOccupation.map(t=>t.label).join(", ")),t.biographicalOrHistoricalInformation&&(e=`${e}; ${t.biographicalOrHistoricalInformation.join(", ")}`);const i=[];return t.dateOfBirth&&t.dateOfBirth.length>0&&i.push(t.dateOfBirth[0]),t.dateOfDeath&&t.dateOfDeath.length>0&&(i.push(" - "),i.push(t.dateOfDeath[0])),i.length>0?`${i.join("")}${e?"; "+e:""}`:e}class Qa extends qa{query(t){const e=[];let i;switch(this._register){case"place":i="PlaceOrGeographicName";break;case"term":i="SubjectHeading";break;case"organization":i="CorporateBody";break;default:i="Person"}return new Promise(n=>{fetch(`https://lobid.org/gnd/search?q=${encodeURIComponent(t)}&filter=%2B%28type%3A${i}%29&format=json&size=100`).then(t=>t.json()).then(t=>{t.member.forEach(t=>{const i={register:this._register,id:this._prefix?`${this._prefix}-${t.gndIdentifier}`:t.gndIdentifier,label:t.preferredName,link:t.id,details:Ka(t),strings:[t.preferredName].concat(t.variantName),provider:"GND"};e.push(i)}),n({totalItems:t.totalItems,items:e})})})}async getRecord(t){const e=this._prefix?t.substring(this._prefix.length+1):t;return fetch(`https://lobid.org/gnd/${e}.json`).then(t=>t.ok?t.json():Promise.reject()).then(t=>{const e=Object.assign({},t);return e.name=t.preferredName,e.link=t.id,t.dateOfBirth&&t.dateOfBirth.length>0&&(e.birth=t.dateOfBirth[0]),t.dateOfDeath&&t.dateOfDeath.length>0&&(e.death=t.dateOfDeath[0]),t.biographicalOrHistoricalInformation&&(e.note=t.biographicalOrHistoricalInformation.join("; ")),t.professionOrOccupation&&t.professionOrOccupation.length>0&&(e.profession=t.professionOrOccupation.map(t=>t.label)),e}).catch(()=>Promise.reject())}info(t,e){return t?new Promise((i,n)=>{this.getRecord(t).then(t=>{let n;t.type.indexOf("SubjectHeading")>-1?n=this.infoSubject(t):t.type.indexOf("AuthorityResource")>-1&&(n=this.infoPerson(t));const r=`\n <h3 class="label">\n <a href="https://${t.id}" target="_blank"> ${t.preferredName} </a>\n </h3>\n ${n}\n `;e.innerHTML=r,i({id:this._prefix?`${this._prefix}-${t.gndIdentifier}`:t.gndIdentifier,strings:[t.preferredName].concat(t.variantName)})}).catch(()=>n())}):Promise.resolve()}infoPerson(t){const e=t.professionOrOccuption?t.professionOrOccupation.map(t=>t.label):[];return`<p>${t.dateOfBirth} - ${t.dateOfDeath}</p>\n <p>${e.join(" ")}</p>`}infoSubject(t){if(t.broaderTermGeneral){return`<p>${t.broaderTermGeneral.map(t=>t.label).join(", ")}</p>`}return""}}class Za extends qa{constructor(t){super(t),this._api=t.getAttribute("api"),this._limit=t.getAttribute("limit")||999999}async query(t){const e=[],i=this.getRegister(),n=`https://meta.karl-barth.ch/api/${i}?${"bibls"===i?"biblsearch":"search"}=${encodeURIComponent(t)}&perPage=${this._limit}`,r=this.getLabelField();return new Promise(t=>{fetch(n).then(t=>t.json()).then(n=>{n.data.forEach(t=>{if("organization"===this._register&&"organisation"!==t.authority_type||"person"===this._register&&"person"!==t.authority_type)return;const n={register:this._register,id:this._prefix?`${this._prefix}:${t["full-id"]}`:t["full-id"],label:"string"==typeof r?t[r]:r(t),details:""+t["full-id"],link:`https://meta.karl-barth.ch/${i}/${t.id}`,strings:["string"==typeof r?t[r]:r(t)],provider:"KBGA"};e.push(n)}),t({totalItems:n.meta.total,items:e})})})}info(t,e){if(!t)return Promise.resolve({});const i=this.getLabelField();return new Promise(n=>{this.getRecord(t).then(t=>{const r=t.data.death?"† "+t.data.death:"",o=t.data.birth?`<p>* ${t.data.birth} ${r}</p>`:"",s=t.data.note_bio?`<p>${t.data.note_bio}</p>`:"",a=`\n <h3 class="label"><a href="https://${t.wikipediaURL}" target="_blank">${"string"==typeof i?t.data[i]:i(t.data)}</a></h3>\n ${o}\n ${s}\n `;e.innerHTML=a,n({id:t.data["full-id"],strings:["string"==typeof i?t.data[i]:i(t.data)]})})})}async getRecord(t){const e=t.replace(/^.*-([^-]+)$/,"$1");return fetch(`https://meta.karl-barth.ch/api/${this.getRegister()}/${e}`).then(t=>t.json()).then(t=>{const e=Object.assign({},t);switch(e.name=t.data[this.getLabelField()],this._register){case"place":e.country=t.data.country,e.location=t.data.location.coordinates,e.links=t.data.links.map(t=>t.url);break;case"person":e.birth=t.data.birth,e.death=t.data.death,e.note=t.data.note_bio,e.links=["https://"+t.wikipediaURL]}return e}).catch(t=>Promise.reject(t))}getLabelField(){let t;switch(this._register){case"place":t="placeName_full";break;case"term":t="fullLabel";break;case"abbreviation":t="label";break;case"bibl":t="asHtml";break;default:t="persName_full"}return t}getRegister(){if(this._api)return this._api;let t;switch(this._register){case"person":case"organization":t="actors";break;case"place":t="places";break;case"term":t="terms";break;case"abbreviation":t="abbreviations";break;case"bibl":t="bibls";break;default:t=this._register}return t}}class Ja extends qa{constructor(t){super(t),this._api=t.getAttribute("api"),this._limit=t.getAttribute("limit")||999999}async query(t){const e=[],i=this.getRegister(),n=`https://archives.georgfischer.com/api/${i}?search=${encodeURIComponent(t)}&perPage=${this._limit}`,r=this.getLabelField();return new Promise(t=>{fetch(n).then(t=>t.json()).then(n=>{n.data?(n.data.forEach(t=>{if("organization"===this._register&&"Person"===t.authority_type||"person"===this._register&&"Person"!==t.authority_type)return;const n={register:this._register,id:this._prefix?`${this._prefix}-${t.id}`:t.id,label:t[r],details:""+t.id,link:`https://archives.georgfischer.com/api/${i}/${t.id}`,strings:[t[r]],provider:"GF"};e.push(n)}),t({totalItems:n.meta.total,items:e})):t({totalItems:0,items:[]})}).catch(t=>Promise.reject(t))})}info(t,e){if(!t)return Promise.resolve({});const i=this._prefix?t.substring(this._prefix.length+1):t,n=this.getLabelField();return new Promise(t=>{this.getRecord(i).then(i=>{const r=i.data.death?"† "+i.data.death:"",o=i.data.birth?`<p>* ${i.data.birth} ${r}</p>`:"",s=i.data.note_bio?`<p>${i.data.note_bio}</p>`:"",a=`\n <h3 class="label"><a href="https://${i.wikipediaURL}" target="_blank">${i.data[n]}</a></h3>\n ${o}\n ${s}\n `;e.innerHTML=a,t({id:this._prefix?`${this._prefix}-${i.data.id}`:i.data.id,strings:[i.data[n]]})})})}async getRecord(t){const e=t.replace(/^.*-([^-]+)$/,"$1"),i=`https://archives.georgfischer.com/api/${this.getRegister()}/${e}`;return fetch(i).then(t=>t.json()).then(t=>{const e=Object.assign({},t);switch(e.name=t.data[this.getLabelField()],this._register){case"place":e.country=t.data.country,e.location=t.data.location.coordinates,e.links=t.data.links.map(t=>t.url);break;case"person":e.birth=t.data.birth,e.death=t.data.death,e.note=t.data.note_bio,e.links=["https://"+t.wikipediaURL]}return e}).catch(t=>Promise.reject(t))}getLabelField(){let t;switch(this._register){case"term":t="label";break;default:t="fullname"}return t}getRegister(){if(this._api)return this._api;let t;switch(this._register){case"person":case"organization":t="actors";break;case"place":t="places";break;case"term":t="keywords";break;case"abbreviation":t="abbreviations";break;default:t=this._register}return t}}async function tl(t){const e=await fetch(t);return await e.json()}class el extends qa{constructor(t){super(t),this.endpoint=t.getAttribute("endpoint"),this.debug=t.getAttribute("debug"),tl(this.endpoint).then(t=>{this.ORConfig=t,this.debug&&console.log("OpenReconcile connector for register '%s' at endpoint <%s>. Using config: %o",this._register,this.endpoint,this.ORConfig)})}async query(t){const e=[],i={q1:{query:t}};return new Promise(t=>{fetch(this.endpoint,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:"queries=".concat(JSON.stringify(i))}).then(t=>t.json()).then(i=>{i.q1.result.forEach(t=>{this.ORConfig.view?this.view=this.ORConfig.view.url.replace("{{id}}",t.id):this.view=t.id,t.description?this.description=t.description:t.type?this.description=t.type.map(t=>t.name.toString()).join(", "):this.description="";const i={register:this._register,id:this._prefix?`${this._prefix}-${t.id}`:t.id,label:t.name,link:this.view,details:this.description,provider:"OpenReconcile"};e.push(i)}),this.debug&&console.log("OpenReconcile results: %o",e),t({totalItems:i.q1.result.length,items:e})})})}info(t,e){return t?this.ORConfig.preview?new Promise((i,n)=>{const r=this._prefix?t.substring(this._prefix.length+1):t,o=this.ORConfig.preview.url.replace("{{id}}",encodeURIComponent(r));fetch(o).then(t=>t.text()).then(t=>{e.innerHTML=t,i({id:this._prefix?`${this._prefix}-${r}`:r})}).catch(()=>n())}):(e.innerHTML="no 'preview' information in endpoint's manifest",Promise.resolve()):Promise.resolve({})}}class il extends qa{constructor(t,e){super(e),this._endpoint=t,this._connectors=nl(t,e),this._connectors.forEach(t=>{t.name=this.name}),console.log("custom connector: endpoint: %s; using authorities: %o",this._endpoint,this._connectors)}async query(t){return new Promise(e=>{fetch(`${this._endpoint}/api/register/search/${this._register}?query=${encodeURIComponent(t)}`).then(t=>t.json()).then(async i=>{let n=[];const r=new Set;i.forEach(t=>{n.push({register:this._register,id:t.id,label:t.label,link:t.link,details:t.details,provider:"local"}),r.add(t.id)});let o=i.length;for(const e of this._connectors){const i=await e.query(t);n=n.concat(i.items.filter(t=>!r.has(t.id))),o+=i.totalItems}e({totalItems:o,items:n})})})}info(t,e){if(!t)return Promise.resolve({});const i=t;return new Promise((n,r)=>{fetch(`${this._endpoint}/api/register/${this._register}/${encodeURIComponent(i)}`).then(async i=>{if(i.ok){const t=await i.json();return e.innerHTML=t.details,void n({id:t.id,strings:t.strings})}if(404===i.status)for(const i of this._connectors)try{const r=await i.info(t,e);r&&n(r)}catch(t){}r()})})}async select(t){let e;for(const i of this._connectors)if(e=await i.getRecord(t.id),e)break;return e?fetch(`${this._endpoint}/api/register/${this._register}/${encodeURIComponent(t.id)}`,{method:"POST",mode:"cors",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.json()):Promise.reject("No record found for ID "+t.id)}}function nl(t,e){const i=[];return e.querySelectorAll(":scope > pb-authority").forEach(e=>{let n;switch(e.getAttribute("connector")){case"GND":n=new Qa(e);break;case"GeoNames":n=new Wa(e);break;case"Airtable":n=new Xa(e);break;case"KBGA":n=new Za(e);break;case"GF":n=new Ja(e);break;case"ReconciliationService":n=new el(e);break;case"Custom":n=new il(t,e);break;default:n=new Ua(e)}i.push(n)}),i}class rl extends(D(V)){static get properties(){return Object.assign({query:{type:String,reflect:!0},sortByLabel:{type:Boolean,attribute:"sort-by-label"},stopwords:{type:String},_results:{type:Array}},super.properties)}constructor(){super(),this.query="",this.type=null,this.sortByLabel=!1,this._results=[],this._authorities={}}connectedCallback(){super.connectedCallback(),this._stopwordSet=new Set,this.stopwords&&this.stopwords.split(/\s*,\s*/).forEach(t=>this._stopwordSet.add(t.toLowerCase())),this.subscribeTo("pb-authority-lookup",t=>{this.query=t.detail.query,this.type=t.detail.type,this._results=[],this._query()}),rl.waitOnce("pb-page-ready",()=>{nl(this.getEndpoint(),this).forEach(t=>{this._authorities[t.register]=t})}),console.log("<pb-authority-lookup> Registered authorities: %o",this._authorities)}render(){return I`
4049
4049
  <paper-input
4050
4050
  id="query"
4051
4051
  label="${o("Search for")}"
@@ -4799,7 +4799,7 @@
4799
4799
  {
4800
4800
  "name": "css-path",
4801
4801
  "type": "string",
4802
- "default": "\"../css/leaflet/\""
4802
+ "default": "\"../css/leaflet\""
4803
4803
  },
4804
4804
  {
4805
4805
  "name": "toggle",
@@ -4903,7 +4903,7 @@
4903
4903
  "name": "cssPath",
4904
4904
  "attribute": "css-path",
4905
4905
  "type": "string",
4906
- "default": "\"../css/leaflet/\""
4906
+ "default": "\"../css/leaflet\""
4907
4907
  },
4908
4908
  {
4909
4909
  "name": "toggle",
@@ -1,4 +1,4 @@
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`
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teipublisher/pb-components",
3
- "version": "1.38.1",
3
+ "version": "1.38.4",
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
@@ -4799,7 +4799,7 @@
4799
4799
  {
4800
4800
  "name": "css-path",
4801
4801
  "type": "string",
4802
- "default": "\"../css/leaflet/\""
4802
+ "default": "\"../css/leaflet\""
4803
4803
  },
4804
4804
  {
4805
4805
  "name": "toggle",
@@ -4903,7 +4903,7 @@
4903
4903
  "name": "cssPath",
4904
4904
  "attribute": "css-path",
4905
4905
  "type": "string",
4906
- "default": "\"../css/leaflet/\""
4906
+ "default": "\"../css/leaflet\""
4907
4907
  },
4908
4908
  {
4909
4909
  "name": "toggle",
@@ -8,13 +8,14 @@ export class GF extends Registry {
8
8
  constructor(configElem) {
9
9
  super(configElem);
10
10
  this._api = configElem.getAttribute('api');
11
+ this._limit = configElem.getAttribute('limit') || 999999;
11
12
  }
12
13
 
13
14
  async query(key) {
14
15
  const results = [];
15
16
 
16
17
  const register = this.getRegister();
17
- const url = `https://archives.georgfischer.com/api/${register}?search=${encodeURIComponent(key)}`;
18
+ const url = `https://archives.georgfischer.com/api/${register}?search=${encodeURIComponent(key)}&perPage=${this._limit}`;
18
19
  const label = this.getLabelField();
19
20
  return new Promise((resolve) => {
20
21
  fetch(url)
@@ -1,3 +1,4 @@
1
+ import { internalProperty } from "lit-element";
1
2
  import { Registry } from "./registry.js";
2
3
 
3
4
  export class KBGA extends Registry {
@@ -5,6 +6,7 @@ export class KBGA extends Registry {
5
6
  constructor(configElem) {
6
7
  super(configElem);
7
8
  this._api = configElem.getAttribute('api');
9
+ this._limit = configElem.getAttribute('limit') || 999999;
8
10
  }
9
11
 
10
12
  async query(key) {
@@ -12,7 +14,7 @@ export class KBGA extends Registry {
12
14
 
13
15
  const register = this.getRegister();
14
16
  const searchParam = register === 'bibls' ? 'biblsearch' : 'search';
15
- const url = `https://meta.karl-barth.ch/api/${register}?${searchParam}=${encodeURIComponent(key)}`;
17
+ const url = `https://meta.karl-barth.ch/api/${register}?${searchParam}=${encodeURIComponent(key)}&perPage=${this._limit}`;
16
18
  const label = this.getLabelField();
17
19
  return new Promise((resolve) => {
18
20
  fetch(url)
@@ -110,7 +110,7 @@ export class PbLeafletMap extends pbMixin(LitElement) {
110
110
  this.crs = 'EPSG3857';
111
111
  this.accessToken = '';
112
112
  this.imagesPath = '../images/leaflet/';
113
- this.cssPath = '../css/leaflet/';
113
+ this.cssPath = '../css/leaflet';
114
114
  this.toggle = false;
115
115
  this.noScroll = false;
116
116
  this.disabled = true;
package/src/pb-view.js CHANGED
@@ -857,7 +857,7 @@ export class PbView extends pbMixin(LitElement) {
857
857
  if (this.columnSeparator) {
858
858
  const cbs = elem.querySelectorAll(this.columnSeparator);
859
859
  // use last separator only
860
- if (cbs.length > 0) {
860
+ if (cbs.length > 1) {
861
861
  cb = cbs[cbs.length - 1];
862
862
  }
863
863
  }