@teipublisher/pb-components 1.34.3 → 1.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/demo/demos.json +2 -1
- package/dist/demo/pb-autocomplete.html +2 -0
- package/dist/demo/pb-autocomplete3.html +35 -0
- package/dist/pb-components-bundle.js +24 -24
- package/dist/pb-elements.json +63 -0
- package/package.json +1 -1
- package/pb-elements.json +63 -0
- package/src/pb-autocomplete.js +99 -27
- package/src/pb-search.js +9 -2
- package/src/pb-view.js +25 -3
|
@@ -507,7 +507,7 @@ const Y=n`
|
|
|
507
507
|
border-color: #999;
|
|
508
508
|
color: #999;
|
|
509
509
|
}
|
|
510
|
-
`}}customElements.define("pb-demo-snippet",K);class Q{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=Q);const J="1.34.3";class tt extends O{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=J}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 V`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",tt);var et="top",it="bottom",nt="right",rt="left",ot="auto",st=[et,it,nt,rt],at="start",lt="end",ct="clippingParents",ht="viewport",pt="popper",dt="reference",ut=st.reduce((function(t,e){return t.concat([e+"-"+at,e+"-"+lt])}),[]),gt=[].concat(st,[ot]).reduce((function(t,e){return t.concat([e,e+"-"+at,e+"-"+lt])}),[]),ft=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function mt(t){return t?(t.nodeName||"").toLowerCase():null}function vt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function bt(t){return t instanceof vt(t).Element||t instanceof Element}function yt(t){return t instanceof vt(t).HTMLElement||t instanceof HTMLElement}function _t(t){return"undefined"!=typeof ShadowRoot&&(t instanceof vt(t).ShadowRoot||t instanceof ShadowRoot)}function wt(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];yt(r)&&mt(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 xt(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}),{});yt(n)&&mt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var kt={name:"applyStyles",enabled:!0,phase:"write",fn:wt,effect:xt,requires:["computeStyles"]};function zt(t){return t.split("-")[0]}function At(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 St(t){var e=At(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 Ct(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&_t(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Et(t){return vt(t).getComputedStyle(t)}function Mt(t){return["table","td","th"].indexOf(mt(t))>=0}function Tt(t){return((bt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Lt(t){return"html"===mt(t)?t:t.assignedSlot||t.parentNode||(_t(t)?t.host:null)||Tt(t)}function Ht(t){return yt(t)&&"fixed"!==Et(t).position?t.offsetParent:null}function $t(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&yt(t)&&"fixed"===Et(t).position)return null;for(var i=Lt(t);yt(i)&&["html","body"].indexOf(mt(i))<0;){var n=Et(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 Ot(t){for(var e=vt(t),i=Ht(t);i&&Mt(i)&&"static"===Et(i).position;)i=Ht(i);return i&&("html"===mt(i)||"body"===mt(i)&&"static"===Et(i).position)?e:i||$t(t)||e}function Vt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Rt=Math.max,Pt=Math.min,It=Math.round;function Dt(t,e,i){return Rt(t,Pt(e,i))}function Nt(){return{top:0,right:0,bottom:0,left:0}}function Ft(t){return Object.assign({},Nt(),t)}function Bt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var jt=function(t,e){return Ft("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Bt(t,st))};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=Vt(a),c=[rt,nt].indexOf(a)>=0?"height":"width";if(o&&s){var h=jt(r.padding,i),p=St(o),d="y"===l?et:rt,u="y"===l?it:nt,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Ot(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=g/2-f/2,y=h[d],_=v-p[c]-h[u],w=v/2-p[c]/2+b,x=Dt(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function qt(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)))&&Ct(e.elements.popper,n)&&(e.elements.arrow=n)}var Wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yt(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:It(It(e*n)/n)||0,y:It(It(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?Yt(o):"function"==typeof c?c(o):o,p=h.x,d=void 0===p?0:p,u=h.y,g=void 0===u?0:u,f=o.hasOwnProperty("x"),m=o.hasOwnProperty("y"),v=rt,b=et,y=window;if(l){var _=Ot(i),w="clientHeight",x="clientWidth";_===vt(i)&&"static"!==Et(_=Tt(i)).position&&(w="scrollHeight",x="scrollWidth"),_=_,r===et&&(b=it,g-=_[w]-n.height,g*=a?1:-1),r===rt&&(v=nt,d-=_[x]-n.width,d*=a?1:-1)}var k,z=Object.assign({position:s},l&&Wt);return a?Object.assign({},z,((k={})[b]=m?"0":"",k[v]=f?"0":"",k.transform=(y.devicePixelRatio||1)<2?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",k)):Object.assign({},z,((e={})[b]=m?g+"px":"",e[v]=f?d+"px":"",e.transform="",e))}function Gt(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 Zt={passive:!0};function Kt(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=vt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,Zt)})),a&&l.addEventListener("resize",i.update,Zt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,Zt)})),a&&l.removeEventListener("resize",i.update,Zt)}}var Qt={left:"right",right:"left",bottom:"top",top:"bottom"};function Jt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Qt[t]}))}var te={start:"end",end:"start"};function ee(t){return t.replace(/start|end/g,(function(t){return te[t]}))}function ie(t){var e=vt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ne(t){return At(Tt(t)).left+ie(t).scrollLeft}function re(t){var e=vt(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+ne(t),y:a}}function oe(t){var e,i=Tt(t),n=ie(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+ne(t),l=-n.scrollTop;return"rtl"===Et(r||i).direction&&(a+=Rt(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function se(t){var e=Et(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function ae(t){return["html","body","#document"].indexOf(mt(t))>=0?t.ownerDocument.body:yt(t)&&se(t)?t:ae(Lt(t))}function le(t,e){var i;void 0===e&&(e=[]);var n=ae(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=vt(n),s=r?[o].concat(o.visualViewport||[],se(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(le(Lt(s)))}function ce(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function he(t){var e=At(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===ht?ce(re(t)):yt(e)?he(e):ce(oe(Tt(t)))}function de(t){var e=le(Lt(t)),i=["absolute","fixed"].indexOf(Et(t).position)>=0&&yt(t)?Ot(t):t;return bt(i)?e.filter((function(t){return bt(t)&&Ct(t,i)&&"body"!==mt(t)})):[]}function ue(t,e,i){var n="clippingParents"===e?de(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 ge(t){return t.split("-")[1]}function fe(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?zt(r):null,s=r?ge(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case et:e={x:a,y:i.y-n.height};break;case it:e={x:a,y:i.y+i.height};break;case nt:e={x:i.x+i.width,y:l};break;case rt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?Vt(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case at:e[c]=e[c]-(i[h]/2-n[h]/2);break;case lt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function me(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?ct:o,a=i.rootBoundary,l=void 0===a?ht:a,c=i.elementContext,h=void 0===c?pt:c,p=i.altBoundary,d=void 0!==p&&p,u=i.padding,g=void 0===u?0:u,f=Ft("number"!=typeof g?g:Bt(g,st)),m=h===pt?dt:pt,v=t.elements.reference,b=t.rects.popper,y=t.elements[d?m:h],_=ue(bt(y)?y:y.contextElement||Tt(t.elements.popper),s,l),w=At(v),x=fe({reference:w,element:b,strategy:"absolute",placement:r}),k=ce(Object.assign({},b,x)),z=h===pt?k:w,A={top:_.top-z.top+f.top,bottom:z.bottom-_.bottom+f.bottom,left:_.left-z.left+f.left,right:z.right-_.right+f.right},S=t.modifiersData.offset;if(h===pt&&S){var C=S[r];Object.keys(A).forEach((function(t){var e=[nt,it].indexOf(t)>=0?1:-1,i=[et,it].indexOf(t)>=0?"y":"x";A[t]+=C[i]*e}))}return A}function ve(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?gt:l,h=ge(n),p=h?a?ut:ut.filter((function(t){return ge(t)===h})):st,d=p.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=p);var u=d.reduce((function(e,i){return e[i]=me(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 be(t){if(zt(t)===ot)return[];var e=Jt(t);return[ee(t),e,ee(e)]}function ye(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,p=i.rootBoundary,d=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?[Jt(m)]:be(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(zt(i)===ot?ve(e,{placement:i,boundary:h,rootBoundary:p,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)}),[]),_=e.rects.reference,w=e.rects.popper,x=new Map,k=!0,z=y[0],A=0;A<y.length;A++){var S=y[A],C=zt(S),E=ge(S)===at,M=[et,it].indexOf(C)>=0,T=M?"width":"height",L=me(e,{placement:S,boundary:h,rootBoundary:p,altBoundary:d,padding:c}),H=M?E?nt:rt:E?it:et;_[T]>w[T]&&(H=Jt(H));var $=Jt(H),O=[];if(o&&O.push(L[C]<=0),a&&O.push(L[H]<=0,L[$]<=0),O.every((function(t){return t}))){z=S,k=!1;break}x.set(S,O)}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 z=e,"break"},R=g?3:1;R>0;R--){if("break"===V(R))break}e.placement!==z&&(e.modifiersData[n]._skip=!0,e.placement=z,e.reset=!0)}}function _e(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 we(t){return[et,nt,it,rt].some((function(e){return t[e]>=0}))}function xe(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=me(e,{elementContext:"reference"}),a=me(e,{altBoundary:!0}),l=_e(s,n),c=_e(a,r,o),h=we(l),p=we(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}function ke(t,e,i){var n=zt(t),r=[rt,et].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,[rt,nt].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=gt.reduce((function(t,i){return t[i]=ke(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 Ae(t){var e=t.state,i=t.name;e.modifiersData[i]=fe({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function Se(t){return"x"===t?"y":"x"}function Ce(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,p=i.padding,d=i.tether,u=void 0===d||d,g=i.tetherOffset,f=void 0===g?0:g,m=me(e,{boundary:l,rootBoundary:c,padding:p,altBoundary:h}),v=zt(e.placement),b=ge(e.placement),y=!b,_=Vt(v),w=Se(_),x=e.modifiersData.popperOffsets,k=e.rects.reference,z=e.rects.popper,A="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"===_?et:rt,E="y"===_?it:nt,M="y"===_?"height":"width",T=x[_],L=x[_]+m[C],H=x[_]-m[E],$=u?-z[M]/2:0,O=b===at?k[M]:z[M],V=b===at?-z[M]:-k[M],R=e.elements.arrow,P=u&&R?St(R):{width:0,height:0},I=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Nt(),D=I[C],N=I[E],F=Dt(0,k[M],P[M]),B=y?k[M]/2-$-F-D-A:O-F-D-A,j=y?-k[M]/2+$+F+N+A:V+F+N+A,U=e.elements.arrow&&Ot(e.elements.arrow),q=U?"y"===_?U.clientTop||0:U.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][_]:0,Y=x[_]+B-W-q,X=x[_]+j-W;if(o){var G=Dt(u?Pt(L,Y):L,T,u?Rt(H,X):H);x[_]=G,S[_]=G-T}if(a){var Z="x"===_?et:rt,K="x"===_?it:nt,Q=x[w],J=Q+m[Z],tt=Q-m[K],ot=Dt(u?Pt(J,Y):J,Q,u?Rt(tt,X):tt);x[w]=ot,S[w]=ot-Q}}e.modifiersData[n]=S}}function Ee(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Me(t){return t!==vt(t)&&yt(t)?Ee(t):ie(t)}function Te(t,e,i){void 0===i&&(i=!1);var n=Tt(e),r=At(t),o=yt(e),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&(("body"!==mt(e)||se(n))&&(s=Me(e)),yt(e)?((a=At(e)).x+=e.clientLeft,a.y+=e.clientTop):n&&(a.x=ne(n))),{x:r.left+s.scrollLeft-a.x,y:r.top+s.scrollTop-a.y,width:r.width,height:r.height}}function Le(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 He(t){var e=Le(t);return ft.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 Oe(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 Ve={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?Ve:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ve,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:bt(t)?le(t):t.contextElement?le(t.contextElement):[],popper:le(e)};var s=He(Oe([].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,Ot(i),"fixed"===r.options.strategy),popper:St(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,p=o.name;"function"==typeof s&&(r=s({state:r,options:h,name:p,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 Ie=Pe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Kt,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Ae,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Gt,data:{}},kt,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ze},{name:"flip",enabled:!0,phase:"main",fn:ye,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:Ce,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:Ut,effect:qt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xe}]}),De="tippy-box",Ne="tippy-content",Fe="tippy-backdrop",Be="tippy-arrow",je="tippy-svg-arrow",Ue={passive:!0,capture:!0};function qe(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function We(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function Ye(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 Ge(t){return t.split(/\s+/).filter(Boolean)}function Ze(t){return[].concat(t)}function Ke(t,e){-1===t.indexOf(e)&&t.push(e)}function Qe(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function Je(t){return t.split("-")[0]}function ti(t){return[].slice.call(t)}function ei(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function ii(){return document.createElement("div")}function ni(t){return["Element","Fragment"].some((function(e){return We(t,e)}))}function ri(t){return We(t,"NodeList")}function oi(t){return We(t,"MouseEvent")}function si(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function ai(t){return ni(t)?[t]:ri(t)?ti(t):Array.isArray(t)?t:ti(document.querySelectorAll(t))}function li(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function ci(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function hi(t){var e,i=Ze(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=Je(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,p="left"===s?a.right.x:0,d=e.top-n+l>o,u=n-e.bottom-c>o,g=e.left-i+h>o,f=i-e.right-p>o;return d||u||g||f}))}function di(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var ui={isTouch:!1},gi=0;function fi(){ui.isTouch||(ui.isTouch=!0,window.performance&&document.addEventListener("mousemove",mi))}function mi(){var t=performance.now();t-gi<20&&(ui.isTouch=!1,document.removeEventListener("mousemove",mi)),gi=t}function vi(){var t=document.activeElement;if(si(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function bi(){document.addEventListener("touchstart",fi,Ue),window.addEventListener("blur",vi)}var yi="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",_i=/MSIE |Trident\//.test(yi),wi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},xi={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ki=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},wi,{},xi),zi=Object.keys(ki),Ai=function(t){Object.keys(t).forEach((function(e){ki[e]=t[e]}))};function Si(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 Ci(t,e){return(e?Object.keys(Si(Object.assign({},ki,{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 Ei(t,e){var i=Object.assign({},e,{content:Ye(e.content,[t])},e.ignoreAttributes?{}:Ci(t,e.plugins));return i.aria=Object.assign({},ki.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 Mi=function(){return"innerHTML"};function Ti(t,e){t[Mi()]=e}function Li(t){var e=ii();return!0===t?e.className=Be:(e.className=je,ni(t)?e.appendChild(t):Ti(e,t)),e}function Hi(t,e){ni(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=ti(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(Ne)})),arrow:i.find((function(t){return t.classList.contains(Be)||t.classList.contains(je)})),backdrop:i.find((function(t){return t.classList.contains(Fe)}))}}function Oi(t){var e=ii(),i=ii();i.className=De,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=ii();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||Hi(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Li(n.arrow))):o.appendChild(Li(n.arrow)):a&&o.removeChild(a)}return n.className=Ne,n.setAttribute("data-state","hidden"),Hi(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Oi.$$tippy=!0;var Vi=1,Ri=[],Pi=[];function Ii(t,e){var i,n,r,o,s,a,l,c=Ei(t,Object.assign({},ki,{},Si(ei(e)))),h=!1,p=!1,d=!1,u=!1,g=[],f=Xe(Z,c.interactiveDebounce),m=Vi++,v=null,b=Qe(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:ii(),popperInstance:v,props:c,state:y,plugins:b,clearDelayTimeouts:lt,setProps:ct,setContent:ht,show:pt,hide:dt,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 z=b.map((function(t){return t.fn(_)})),A=t.hasAttribute("aria-expanded");return Y(),R(),$(),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&&(T().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 T(){var t=M().parentNode;return t?hi(t):document}function L(){return $i(x)}function H(t){return _.state.isMounted&&!_.state.isVisible||ui.isTouch||o&&"focus"===o.type?0:qe(_.props.delay,t?0:1,ki.delay)}function $(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function O(t,e,i){var n;(void 0===i&&(i=!0),z.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;Ze(_.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 R(){!A&&_.props.aria.expanded&&Ze(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===M()?"true":"false"):t.removeAttribute("aria-expanded")}))}function P(){T().removeEventListener("mousemove",f),Ri=Ri.filter((function(t){return t!==f}))}function I(t){if(!(ui.isTouch&&(d||"mousedown"===t.type)||_.props.interactive&&x.contains(t.target))){if(M().contains(t.target)){if(ui.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else O("onClickOutside",[_,t]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),p=!0,setTimeout((function(){p=!1})),_.state.isMounted||B())}}function D(){d=!0}function N(){d=!1}function F(){var t=T();t.addEventListener("mousedown",I,!0),t.addEventListener("touchend",I,Ue),t.addEventListener("touchstart",N,Ue),t.addEventListener("touchmove",D,Ue)}function B(){var t=T();t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchend",I,Ue),t.removeEventListener("touchstart",N,Ue),t.removeEventListener("touchmove",D,Ue)}function j(t,e){q(t,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}function U(t,e){q(t,e)}function q(t,e){var i=L().box;function n(t){t.target===i&&(di(i,"remove",n),e())}if(0===t)return e();di(i,"remove",s),di(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),Ze(_.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",G,{passive:!0}),W("touchend",K,{passive:!0})),Ge(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,G),t){case"mouseenter":W("mouseleave",K);break;case"focus":W(_i?"focusout":"blur",Q);break;case"focusin":W("focusout",Q)}}))}function X(){g.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),g=[]}function G(t){var e,i=!1;if(_.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,R(),!_.state.isVisible&&oi(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 Z(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)&&(P(),ot(t))}function K(t){J(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function Q(t){_.props.trigger.indexOf("focusin")<0&&t.target!==M()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function J(t){return!!ui.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=L().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=Ie(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===ki.appendTo||"parent"===e?i.parentNode:Ye(e,[i])).contains(x)||t.appendChild(x),tt()}function nt(){return ti(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&O("onTrigger",[_,t]),F();var e=H(!0),n=S(),r=n[0],o=n[1];ui.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout((function(){_.show()}),e):_.show()}function ot(t){if(_.clearDelayTimeouts(),O("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){O("onBeforeUpdate",[_,e]),X();var i=_.props,n=Ei(t,Object.assign({},_.props,{},e,{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(P(),f=Xe(Z,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?Ze(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded"),R(),$(),k&&k(i,n),_.popperInstance&&(tt(),nt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),O("onAfterUpdate",[_,e])}}function ht(t){_.setProps({content:t})}function pt(){var t=_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=ui.isTouch&&!_.props.touch,r=qe(_.props.duration,0,ki.duration);if(!(t||e||i||n||M().hasAttribute("disabled")||(O("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),$(),F(),_.state.isMounted||(x.style.transition="none"),E()){var o=L();li([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=L(),i=e.box,n=e.content;li([i,n],r),ci([i,n],"visible")}V(),R(),Ke(Pi,_),null==(t=_.popperInstance)||t.forceUpdate(),_.state.isMounted=!0,O("onMount",[_]),_.props.animation&&E()&&U(r,(function(){_.state.isShown=!0,O("onShown",[_])}))}},it()}}function dt(){var t=!_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=qe(_.props.duration,1,ki.duration);if(!(t||e||i)&&(O("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,h=!1,E()&&(x.style.visibility="hidden"),P(),B(),$(),E()){var r=L(),o=r.box,s=r.content;_.props.animation&&(li([o,s],n),ci([o,s],"hidden"))}V(),R(),_.props.animation?E()&&j(n,_.unmount):_.unmount()}}function ut(t){T().addEventListener("mousemove",f),Ke(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,O("onHidden",[_]))}function ft(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),X(),delete t._tippy,_.state.isDestroyed=!0,O("onDestroy",[_]))}}function Di(t,e){void 0===e&&(e={});var i=ki.plugins.concat(e.plugins||[]);bi();var n=Object.assign({},e,{plugins:i}),r=ai(t).reduce((function(t,e){var i=e&&Ii(e,n);return i&&t.push(i),t}),[]);return ni(t)?r[0]:r}Di.defaultProps=ki,Di.setDefaultProps=Ai,Di.currentInput=ui;Object.assign({},kt,{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 Ni(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}Di.setDefaultProps({render:Oi});const Fi='\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',Bi='\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',ji="\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",qi="\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 Wi=Object.freeze({__proto__:null,camelize:Ni,base:Fi,lightBorder:Bi,light:ji,material:Ui,translucent:qi});function Yi(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(Yi(t,"base",Fi),e&&"none"!==e){const i=Ni(e),n=Wi[i];n&&Yi(t,i,n)}}class Gi extends(I(O)){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?V`<div class="hidden"><slot></slot></div>`:V`<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=Di(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",K);class Q{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=Q);const J="1.35.2";class tt extends O{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=J}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 V`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",tt);var et="top",it="bottom",nt="right",rt="left",ot="auto",st=[et,it,nt,rt],at="start",lt="end",ct="clippingParents",ht="viewport",pt="popper",dt="reference",ut=st.reduce((function(t,e){return t.concat([e+"-"+at,e+"-"+lt])}),[]),gt=[].concat(st,[ot]).reduce((function(t,e){return t.concat([e,e+"-"+at,e+"-"+lt])}),[]),ft=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function mt(t){return t?(t.nodeName||"").toLowerCase():null}function vt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function bt(t){return t instanceof vt(t).Element||t instanceof Element}function yt(t){return t instanceof vt(t).HTMLElement||t instanceof HTMLElement}function _t(t){return"undefined"!=typeof ShadowRoot&&(t instanceof vt(t).ShadowRoot||t instanceof ShadowRoot)}function wt(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];yt(r)&&mt(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 xt(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}),{});yt(n)&&mt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}}var kt={name:"applyStyles",enabled:!0,phase:"write",fn:wt,effect:xt,requires:["computeStyles"]};function zt(t){return t.split("-")[0]}function At(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 St(t){var e=At(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 Ct(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&_t(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Et(t){return vt(t).getComputedStyle(t)}function Mt(t){return["table","td","th"].indexOf(mt(t))>=0}function Tt(t){return((bt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Lt(t){return"html"===mt(t)?t:t.assignedSlot||t.parentNode||(_t(t)?t.host:null)||Tt(t)}function Ht(t){return yt(t)&&"fixed"!==Et(t).position?t.offsetParent:null}function $t(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&yt(t)&&"fixed"===Et(t).position)return null;for(var i=Lt(t);yt(i)&&["html","body"].indexOf(mt(i))<0;){var n=Et(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 Ot(t){for(var e=vt(t),i=Ht(t);i&&Mt(i)&&"static"===Et(i).position;)i=Ht(i);return i&&("html"===mt(i)||"body"===mt(i)&&"static"===Et(i).position)?e:i||$t(t)||e}function Vt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Rt=Math.max,Pt=Math.min,It=Math.round;function Dt(t,e,i){return Rt(t,Pt(e,i))}function Nt(){return{top:0,right:0,bottom:0,left:0}}function Ft(t){return Object.assign({},Nt(),t)}function Bt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var jt=function(t,e){return Ft("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Bt(t,st))};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=Vt(a),c=[rt,nt].indexOf(a)>=0?"height":"width";if(o&&s){var h=jt(r.padding,i),p=St(o),d="y"===l?et:rt,u="y"===l?it:nt,g=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],f=s[l]-i.rects.reference[l],m=Ot(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=g/2-f/2,y=h[d],_=v-p[c]-h[u],w=v/2-p[c]/2+b,x=Dt(y,w,_),k=l;i.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-w,e)}}function qt(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)))&&Ct(e.elements.popper,n)&&(e.elements.arrow=n)}var Wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yt(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:It(It(e*n)/n)||0,y:It(It(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?Yt(o):"function"==typeof c?c(o):o,p=h.x,d=void 0===p?0:p,u=h.y,g=void 0===u?0:u,f=o.hasOwnProperty("x"),m=o.hasOwnProperty("y"),v=rt,b=et,y=window;if(l){var _=Ot(i),w="clientHeight",x="clientWidth";_===vt(i)&&"static"!==Et(_=Tt(i)).position&&(w="scrollHeight",x="scrollWidth"),_=_,r===et&&(b=it,g-=_[w]-n.height,g*=a?1:-1),r===rt&&(v=nt,d-=_[x]-n.width,d*=a?1:-1)}var k,z=Object.assign({position:s},l&&Wt);return a?Object.assign({},z,((k={})[b]=m?"0":"",k[v]=f?"0":"",k.transform=(y.devicePixelRatio||1)<2?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",k)):Object.assign({},z,((e={})[b]=m?g+"px":"",e[v]=f?d+"px":"",e.transform="",e))}function Gt(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 Zt={passive:!0};function Kt(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=vt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,Zt)})),a&&l.addEventListener("resize",i.update,Zt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,Zt)})),a&&l.removeEventListener("resize",i.update,Zt)}}var Qt={left:"right",right:"left",bottom:"top",top:"bottom"};function Jt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Qt[t]}))}var te={start:"end",end:"start"};function ee(t){return t.replace(/start|end/g,(function(t){return te[t]}))}function ie(t){var e=vt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ne(t){return At(Tt(t)).left+ie(t).scrollLeft}function re(t){var e=vt(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+ne(t),y:a}}function oe(t){var e,i=Tt(t),n=ie(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+ne(t),l=-n.scrollTop;return"rtl"===Et(r||i).direction&&(a+=Rt(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function se(t){var e=Et(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function ae(t){return["html","body","#document"].indexOf(mt(t))>=0?t.ownerDocument.body:yt(t)&&se(t)?t:ae(Lt(t))}function le(t,e){var i;void 0===e&&(e=[]);var n=ae(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=vt(n),s=r?[o].concat(o.visualViewport||[],se(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(le(Lt(s)))}function ce(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function he(t){var e=At(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===ht?ce(re(t)):yt(e)?he(e):ce(oe(Tt(t)))}function de(t){var e=le(Lt(t)),i=["absolute","fixed"].indexOf(Et(t).position)>=0&&yt(t)?Ot(t):t;return bt(i)?e.filter((function(t){return bt(t)&&Ct(t,i)&&"body"!==mt(t)})):[]}function ue(t,e,i){var n="clippingParents"===e?de(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 ge(t){return t.split("-")[1]}function fe(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?zt(r):null,s=r?ge(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case et:e={x:a,y:i.y-n.height};break;case it:e={x:a,y:i.y+i.height};break;case nt:e={x:i.x+i.width,y:l};break;case rt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?Vt(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case at:e[c]=e[c]-(i[h]/2-n[h]/2);break;case lt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function me(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?ct:o,a=i.rootBoundary,l=void 0===a?ht:a,c=i.elementContext,h=void 0===c?pt:c,p=i.altBoundary,d=void 0!==p&&p,u=i.padding,g=void 0===u?0:u,f=Ft("number"!=typeof g?g:Bt(g,st)),m=h===pt?dt:pt,v=t.elements.reference,b=t.rects.popper,y=t.elements[d?m:h],_=ue(bt(y)?y:y.contextElement||Tt(t.elements.popper),s,l),w=At(v),x=fe({reference:w,element:b,strategy:"absolute",placement:r}),k=ce(Object.assign({},b,x)),z=h===pt?k:w,A={top:_.top-z.top+f.top,bottom:z.bottom-_.bottom+f.bottom,left:_.left-z.left+f.left,right:z.right-_.right+f.right},S=t.modifiersData.offset;if(h===pt&&S){var C=S[r];Object.keys(A).forEach((function(t){var e=[nt,it].indexOf(t)>=0?1:-1,i=[et,it].indexOf(t)>=0?"y":"x";A[t]+=C[i]*e}))}return A}function ve(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?gt:l,h=ge(n),p=h?a?ut:ut.filter((function(t){return ge(t)===h})):st,d=p.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=p);var u=d.reduce((function(e,i){return e[i]=me(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 be(t){if(zt(t)===ot)return[];var e=Jt(t);return[ee(t),e,ee(e)]}function ye(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,p=i.rootBoundary,d=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?[Jt(m)]:be(m)),y=[m].concat(b).reduce((function(t,i){return t.concat(zt(i)===ot?ve(e,{placement:i,boundary:h,rootBoundary:p,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)}),[]),_=e.rects.reference,w=e.rects.popper,x=new Map,k=!0,z=y[0],A=0;A<y.length;A++){var S=y[A],C=zt(S),E=ge(S)===at,M=[et,it].indexOf(C)>=0,T=M?"width":"height",L=me(e,{placement:S,boundary:h,rootBoundary:p,altBoundary:d,padding:c}),H=M?E?nt:rt:E?it:et;_[T]>w[T]&&(H=Jt(H));var $=Jt(H),O=[];if(o&&O.push(L[C]<=0),a&&O.push(L[H]<=0,L[$]<=0),O.every((function(t){return t}))){z=S,k=!1;break}x.set(S,O)}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 z=e,"break"},R=g?3:1;R>0;R--){if("break"===V(R))break}e.placement!==z&&(e.modifiersData[n]._skip=!0,e.placement=z,e.reset=!0)}}function _e(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 we(t){return[et,nt,it,rt].some((function(e){return t[e]>=0}))}function xe(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=me(e,{elementContext:"reference"}),a=me(e,{altBoundary:!0}),l=_e(s,n),c=_e(a,r,o),h=we(l),p=we(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}function ke(t,e,i){var n=zt(t),r=[rt,et].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,[rt,nt].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=gt.reduce((function(t,i){return t[i]=ke(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 Ae(t){var e=t.state,i=t.name;e.modifiersData[i]=fe({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function Se(t){return"x"===t?"y":"x"}function Ce(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,p=i.padding,d=i.tether,u=void 0===d||d,g=i.tetherOffset,f=void 0===g?0:g,m=me(e,{boundary:l,rootBoundary:c,padding:p,altBoundary:h}),v=zt(e.placement),b=ge(e.placement),y=!b,_=Vt(v),w=Se(_),x=e.modifiersData.popperOffsets,k=e.rects.reference,z=e.rects.popper,A="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"===_?et:rt,E="y"===_?it:nt,M="y"===_?"height":"width",T=x[_],L=x[_]+m[C],H=x[_]-m[E],$=u?-z[M]/2:0,O=b===at?k[M]:z[M],V=b===at?-z[M]:-k[M],R=e.elements.arrow,P=u&&R?St(R):{width:0,height:0},I=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Nt(),D=I[C],N=I[E],F=Dt(0,k[M],P[M]),B=y?k[M]/2-$-F-D-A:O-F-D-A,j=y?-k[M]/2+$+F+N+A:V+F+N+A,U=e.elements.arrow&&Ot(e.elements.arrow),q=U?"y"===_?U.clientTop||0:U.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][_]:0,Y=x[_]+B-W-q,X=x[_]+j-W;if(o){var G=Dt(u?Pt(L,Y):L,T,u?Rt(H,X):H);x[_]=G,S[_]=G-T}if(a){var Z="x"===_?et:rt,K="x"===_?it:nt,Q=x[w],J=Q+m[Z],tt=Q-m[K],ot=Dt(u?Pt(J,Y):J,Q,u?Rt(tt,X):tt);x[w]=ot,S[w]=ot-Q}}e.modifiersData[n]=S}}function Ee(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Me(t){return t!==vt(t)&&yt(t)?Ee(t):ie(t)}function Te(t,e,i){void 0===i&&(i=!1);var n=Tt(e),r=At(t),o=yt(e),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&(("body"!==mt(e)||se(n))&&(s=Me(e)),yt(e)?((a=At(e)).x+=e.clientLeft,a.y+=e.clientTop):n&&(a.x=ne(n))),{x:r.left+s.scrollLeft-a.x,y:r.top+s.scrollTop-a.y,width:r.width,height:r.height}}function Le(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 He(t){var e=Le(t);return ft.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 Oe(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 Ve={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?Ve:r;return function(t,e,i){void 0===i&&(i=o);var r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ve,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:bt(t)?le(t):t.contextElement?le(t.contextElement):[],popper:le(e)};var s=He(Oe([].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,Ot(i),"fixed"===r.options.strategy),popper:St(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,p=o.name;"function"==typeof s&&(r=s({state:r,options:h,name:p,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 Ie=Pe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Kt,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Ae,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Gt,data:{}},kt,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ze},{name:"flip",enabled:!0,phase:"main",fn:ye,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:Ce,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:Ut,effect:qt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xe}]}),De="tippy-box",Ne="tippy-content",Fe="tippy-backdrop",Be="tippy-arrow",je="tippy-svg-arrow",Ue={passive:!0,capture:!0};function qe(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function We(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function Ye(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 Ge(t){return t.split(/\s+/).filter(Boolean)}function Ze(t){return[].concat(t)}function Ke(t,e){-1===t.indexOf(e)&&t.push(e)}function Qe(t){return t.filter((function(e,i){return t.indexOf(e)===i}))}function Je(t){return t.split("-")[0]}function ti(t){return[].slice.call(t)}function ei(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function ii(){return document.createElement("div")}function ni(t){return["Element","Fragment"].some((function(e){return We(t,e)}))}function ri(t){return We(t,"NodeList")}function oi(t){return We(t,"MouseEvent")}function si(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function ai(t){return ni(t)?[t]:ri(t)?ti(t):Array.isArray(t)?t:ti(document.querySelectorAll(t))}function li(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function ci(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function hi(t){var e,i=Ze(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=Je(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,p="left"===s?a.right.x:0,d=e.top-n+l>o,u=n-e.bottom-c>o,g=e.left-i+h>o,f=i-e.right-p>o;return d||u||g||f}))}function di(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var ui={isTouch:!1},gi=0;function fi(){ui.isTouch||(ui.isTouch=!0,window.performance&&document.addEventListener("mousemove",mi))}function mi(){var t=performance.now();t-gi<20&&(ui.isTouch=!1,document.removeEventListener("mousemove",mi)),gi=t}function vi(){var t=document.activeElement;if(si(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function bi(){document.addEventListener("touchstart",fi,Ue),window.addEventListener("blur",vi)}var yi="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",_i=/MSIE |Trident\//.test(yi),wi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},xi={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ki=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},wi,{},xi),zi=Object.keys(ki),Ai=function(t){Object.keys(t).forEach((function(e){ki[e]=t[e]}))};function Si(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 Ci(t,e){return(e?Object.keys(Si(Object.assign({},ki,{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 Ei(t,e){var i=Object.assign({},e,{content:Ye(e.content,[t])},e.ignoreAttributes?{}:Ci(t,e.plugins));return i.aria=Object.assign({},ki.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 Mi=function(){return"innerHTML"};function Ti(t,e){t[Mi()]=e}function Li(t){var e=ii();return!0===t?e.className=Be:(e.className=je,ni(t)?e.appendChild(t):Ti(e,t)),e}function Hi(t,e){ni(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=ti(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(Ne)})),arrow:i.find((function(t){return t.classList.contains(Be)||t.classList.contains(je)})),backdrop:i.find((function(t){return t.classList.contains(Fe)}))}}function Oi(t){var e=ii(),i=ii();i.className=De,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=ii();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||Hi(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Li(n.arrow))):o.appendChild(Li(n.arrow)):a&&o.removeChild(a)}return n.className=Ne,n.setAttribute("data-state","hidden"),Hi(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Oi.$$tippy=!0;var Vi=1,Ri=[],Pi=[];function Ii(t,e){var i,n,r,o,s,a,l,c=Ei(t,Object.assign({},ki,{},Si(ei(e)))),h=!1,p=!1,d=!1,u=!1,g=[],f=Xe(Z,c.interactiveDebounce),m=Vi++,v=null,b=Qe(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:t,popper:ii(),popperInstance:v,props:c,state:y,plugins:b,clearDelayTimeouts:lt,setProps:ct,setContent:ht,show:pt,hide:dt,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 z=b.map((function(t){return t.fn(_)})),A=t.hasAttribute("aria-expanded");return Y(),R(),$(),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&&(T().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 T(){var t=M().parentNode;return t?hi(t):document}function L(){return $i(x)}function H(t){return _.state.isMounted&&!_.state.isVisible||ui.isTouch||o&&"focus"===o.type?0:qe(_.props.delay,t?0:1,ki.delay)}function $(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function O(t,e,i){var n;(void 0===i&&(i=!0),z.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;Ze(_.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 R(){!A&&_.props.aria.expanded&&Ze(_.props.triggerTarget||t).forEach((function(t){_.props.interactive?t.setAttribute("aria-expanded",_.state.isVisible&&t===M()?"true":"false"):t.removeAttribute("aria-expanded")}))}function P(){T().removeEventListener("mousemove",f),Ri=Ri.filter((function(t){return t!==f}))}function I(t){if(!(ui.isTouch&&(d||"mousedown"===t.type)||_.props.interactive&&x.contains(t.target))){if(M().contains(t.target)){if(ui.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else O("onClickOutside",[_,t]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),p=!0,setTimeout((function(){p=!1})),_.state.isMounted||B())}}function D(){d=!0}function N(){d=!1}function F(){var t=T();t.addEventListener("mousedown",I,!0),t.addEventListener("touchend",I,Ue),t.addEventListener("touchstart",N,Ue),t.addEventListener("touchmove",D,Ue)}function B(){var t=T();t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchend",I,Ue),t.removeEventListener("touchstart",N,Ue),t.removeEventListener("touchmove",D,Ue)}function j(t,e){q(t,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}function U(t,e){q(t,e)}function q(t,e){var i=L().box;function n(t){t.target===i&&(di(i,"remove",n),e())}if(0===t)return e();di(i,"remove",s),di(i,"add",n),s=n}function W(e,i,n){void 0===n&&(n=!1),Ze(_.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",G,{passive:!0}),W("touchend",K,{passive:!0})),Ge(_.props.trigger).forEach((function(t){if("manual"!==t)switch(W(t,G),t){case"mouseenter":W("mouseleave",K);break;case"focus":W(_i?"focusout":"blur",Q);break;case"focusin":W("focusout",Q)}}))}function X(){g.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),g=[]}function G(t){var e,i=!1;if(_.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,R(),!_.state.isVisible&&oi(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 Z(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)&&(P(),ot(t))}function K(t){J(t)||_.props.trigger.indexOf("click")>=0&&h||(_.props.interactive?_.hideWithInteractivity(t):ot(t))}function Q(t){_.props.trigger.indexOf("focusin")<0&&t.target!==M()||_.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||ot(t)}function J(t){return!!ui.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=L().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=Ie(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===ki.appendTo||"parent"===e?i.parentNode:Ye(e,[i])).contains(x)||t.appendChild(x),tt()}function nt(){return ti(x.querySelectorAll("[data-tippy-root]"))}function rt(t){_.clearDelayTimeouts(),t&&O("onTrigger",[_,t]),F();var e=H(!0),n=S(),r=n[0],o=n[1];ui.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout((function(){_.show()}),e):_.show()}function ot(t){if(_.clearDelayTimeouts(),O("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){O("onBeforeUpdate",[_,e]),X();var i=_.props,n=Ei(t,Object.assign({},_.props,{},e,{ignoreAttributes:!0}));_.props=n,Y(),i.interactiveDebounce!==n.interactiveDebounce&&(P(),f=Xe(Z,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?Ze(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded"),R(),$(),k&&k(i,n),_.popperInstance&&(tt(),nt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),O("onAfterUpdate",[_,e])}}function ht(t){_.setProps({content:t})}function pt(){var t=_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=ui.isTouch&&!_.props.touch,r=qe(_.props.duration,0,ki.duration);if(!(t||e||i||n||M().hasAttribute("disabled")||(O("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,E()&&(x.style.visibility="visible"),$(),F(),_.state.isMounted||(x.style.transition="none"),E()){var o=L();li([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=L(),i=e.box,n=e.content;li([i,n],r),ci([i,n],"visible")}V(),R(),Ke(Pi,_),null==(t=_.popperInstance)||t.forceUpdate(),_.state.isMounted=!0,O("onMount",[_]),_.props.animation&&E()&&U(r,(function(){_.state.isShown=!0,O("onShown",[_])}))}},it()}}function dt(){var t=!_.state.isVisible,e=_.state.isDestroyed,i=!_.state.isEnabled,n=qe(_.props.duration,1,ki.duration);if(!(t||e||i)&&(O("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,h=!1,E()&&(x.style.visibility="hidden"),P(),B(),$(),E()){var r=L(),o=r.box,s=r.content;_.props.animation&&(li([o,s],n),ci([o,s],"hidden"))}V(),R(),_.props.animation?E()&&j(n,_.unmount):_.unmount()}}function ut(t){T().addEventListener("mousemove",f),Ke(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,O("onHidden",[_]))}function ft(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),X(),delete t._tippy,_.state.isDestroyed=!0,O("onDestroy",[_]))}}function Di(t,e){void 0===e&&(e={});var i=ki.plugins.concat(e.plugins||[]);bi();var n=Object.assign({},e,{plugins:i}),r=ai(t).reduce((function(t,e){var i=e&&Ii(e,n);return i&&t.push(i),t}),[]);return ni(t)?r[0]:r}Di.defaultProps=ki,Di.setDefaultProps=Ai,Di.currentInput=ui;Object.assign({},kt,{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 Ni(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,e)=>0==+t?"":0===e?t.toLowerCase():t.toUpperCase()).replace("-","")}Di.setDefaultProps({render:Oi});const Fi='\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',Bi='\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',ji="\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",qi="\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 Wi=Object.freeze({__proto__:null,camelize:Ni,base:Fi,lightBorder:Bi,light:ji,material:Ui,translucent:qi});function Yi(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(Yi(t,"base",Fi),e&&"none"!==e){const i=Ni(e),n=Wi[i];n&&Yi(t,i,n)}}class Gi extends(I(O)){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?V`<div class="hidden"><slot></slot></div>`:V`<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=Di(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
|
}
|
|
@@ -943,7 +943,7 @@ e({_template:n`
|
|
|
943
943
|
paper-progress {
|
|
944
944
|
width: 100%;
|
|
945
945
|
}
|
|
946
|
-
`}_startUpdate(){this._disabled=!1}_endUpdate(){this._disabled=!0}}customElements.define("pb-progress",Ur);class qr extends(I(O)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{action:{type:String},value:{type:String},placeHolder:{type:String,attribute:"place-holder"},redirect:{type:Boolean},currentDoc:{type:String,attribute:"current-doc"},submitOnLoad:{type:Boolean,attribute:"submit-on-load"},subforms:{type:String}})}constructor(){super(),this.value="",this.redirect=!1,this.submitOnLoad=!1,this.placeHolder="search.placeholder"}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-search-resubmit",this._doSearch.bind(this))}firstUpdated(){this.shadowRoot.getElementById("autocomplete").addEventListener("autocomplete-change",this._autocomplete.bind(this))
|
|
946
|
+
`}_startUpdate(){this._disabled=!1}_endUpdate(){this._disabled=!0}}customElements.define("pb-progress",Ur);class qr extends(I(O)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{action:{type:String},value:{type:String},placeHolder:{type:String,attribute:"place-holder"},redirect:{type:Boolean},currentDoc:{type:String,attribute:"current-doc"},submitOnLoad:{type:Boolean,attribute:"submit-on-load"},subforms:{type:String},disableAutocomplete:{type:Boolean,attribute:"disable-autocomplete"}})}constructor(){super(),this.value="",this.redirect=!1,this.submitOnLoad=!1,this.placeHolder="search.placeholder",this.disableAutocomplete=!1}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-search-resubmit",this._doSearch.bind(this))}firstUpdated(){if(!this.disableAutocomplete){this.shadowRoot.getElementById("autocomplete").addEventListener("autocomplete-change",this._autocomplete.bind(this))}if(this.shadowRoot.getElementById("ironform").addEventListener("iron-form-response",t=>t.detail.completes.then(t=>this.emitTo("pb-search",t.parseResponse()))),qr.waitOnce("pb-page-ready",t=>{const e=this.shadowRoot.getElementById("autocompleteLoader");this.minApiVersion("1.0.0")?e.url=t.endpoint+"/api/search/autocomplete":e.url=t.endpoint+"/modules/autocomplete.xql"}),this.submitOnLoad){const t=this.getParameters();this.emitTo("pb-load",{url:this.action,params:t})}this.addEventListener("click",t=>{const e=t.target.closest("[slot]");e&&("searchButton"===e.slot&&this._doSearch(),"resetButton"===e.slot&&this._reset())})}render(){return V`
|
|
947
947
|
<custom-style>
|
|
948
948
|
<style>
|
|
949
949
|
:host {
|
|
@@ -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",Yr);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},Gr={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},Zr=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Kr={CSS:{},springs:{}};function Qr(t,e,i){return Math.min(Math.max(t,e),i)}function Jr(t,e){return t.indexOf(e)>-1}function to(t,e){return t.apply(null,e)}var eo={arr:function(t){return Array.isArray(t)},obj:function(t){return Jr(Object.prototype.toString.call(t),"Object")},pth:function(t){return eo.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||eo.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 eo.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 eo.hex(t)||eo.rgb(t)||eo.hsl(t)},key:function(t){return!Xr.hasOwnProperty(t)&&!Gr.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function io(t){var e=/\(([^)]+)\)/.exec(t);return e?e[1].split(",").map((function(t){return parseFloat(t)})):[]}function no(t,e){var i=io(t),n=Qr(eo.und(i[0])?1:i[0],.1,100),r=Qr(eo.und(i[1])?100:i[1],.1,100),o=Qr(eo.und(i[2])?10:i[2],.1,100),s=Qr(eo.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,p=l<1?(l*a-s)/c:-s+a;function d(t){var i=e?e*t/1e3:t;return i=l<1?Math.exp(-i*l*a)*(h*Math.cos(c*i)+p*Math.sin(c*i)):(h+p*i)*Math.exp(-i*a),0===t||1===t?t:1-i}function u(){var e=Kr.springs[t];if(e)return e;for(var i=1/6,n=0,r=0;;)if(1===d(n+=i)){if(++r>=16)break}else r=0;var o=n*i*1e3;return Kr.springs[t]=o,o}return e?d:u}function ro(t){return void 0===t&&(t=10),function(e){return Math.ceil(Qr(e,1e-6,1)*t)*(1/t)}}var oo,so,ao=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 p=0;p<t;++p)h[p]=o(p*e,i,r);return function(t){return i===n&&r===c||0===t||1===t?t:o(d(t),n,c)}}function d(n){for(var o=0,c=1,p=t-1;c!==p&&h[c]<=n;++c)o+=e;--c;var d=o+(n-h[c])/(h[c+1]-h[c])*e,u=s(d,i,r);return u>=.001?l(n,d,i,r):0===u?d:a(n,o,o+e,i,r)}}return c}(),lo=(oo={linear:function(){return function(t){return t}}},so={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=Qr(t,1,10),n=Qr(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){so[t]=function(){return function(t){return Math.pow(t,e+2)}}})),Object.keys(so).forEach((function(t){var e=so[t];oo["easeIn"+t]=e,oo["easeOut"+t]=function(t,i){return function(n){return 1-e(t,i)(1-n)}},oo["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}},oo["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}}})),oo);function co(t,e){if(eo.fnc(t))return t;var i=t.split("(")[0],n=lo[i],r=io(t);switch(i){case"spring":return no(t,e);case"cubicBezier":return to(ao,r);case"steps":return to(ro,r);default:return to(n,r)}}function ho(t){try{return document.querySelectorAll(t)}catch(t){return}}function po(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 uo(t){return t.reduce((function(t,e){return t.concat(eo.arr(e)?uo(e):e)}),[])}function go(t){return eo.arr(t)?t:(eo.str(t)&&(t=ho(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function fo(t,e){return t.some((function(t){return t===e}))}function mo(t){var e={};for(var i in t)e[i]=t[i];return e}function vo(t,e){var i=mo(t);for(var n in t)i[n]=e.hasOwnProperty(n)?e[n]:t[n];return i}function bo(t,e){var i=mo(t);for(var n in e)i[n]=eo.und(t[n])?e[n]:t[n];return i}function yo(t){var e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t);return e?"rgba("+e[1]+",1)":t}function _o(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 wo(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,p=2*a-h;e=c(p,h,o+1/3),i=c(p,h,o),n=c(p,h,o-1/3)}return"rgba("+255*e+","+255*i+","+255*n+","+l+")"}function xo(t){return eo.rgb(t)?yo(t):eo.hex(t)?_o(t):eo.hsl(t)?wo(t):void 0}function ko(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 Jr(t,"translate")||"perspective"===t?"px":Jr(t,"rotate")||Jr(t,"skew")?"deg":void 0}function Ao(t,e){return eo.fnc(t)?t(e.target,e.id,e.total):t}function So(t,e){return t.getAttribute(e)}function Co(t,e,i){if(fo([i,"deg","rad","turn"],ko(e)))return e;var n=Kr.CSS[e+i];if(!eo.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 Kr.CSS[e+i]=l,l}function Eo(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?Co(t,r,i):r}}function Mo(t,e){return eo.dom(t)&&!eo.inp(t)&&(!eo.nil(So(t,e))||eo.svg(t)&&t[e])?"attribute":eo.dom(t)&&fo(Zr,e)?"transform":eo.dom(t)&&"transform"!==e&&Eo(t,e)?"css":null!=t[e]?"object":void 0}function To(t){if(eo.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 Lo(t,e,i,n){var r=Jr(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?Co(t,o,n):o}function Ho(t,e,i,n){switch(Mo(t,e)){case"transform":return Lo(t,e,n,i);case"css":return Eo(t,e,i);case"attribute":return So(t,e);default:return t[e]||0}}function $o(t,e){var i=/^(\*=|\+=|-=)/.exec(t);if(!i)return t;var n=ko(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 Oo(t,e){if(eo.col(t))return xo(t);if(/\s/g.test(t))return t;var i=ko(t),n=i?t.substr(0,t.length-i.length):t;return e?n+e:n}function Vo(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*So(t,"r")}function Po(t){return 2*So(t,"width")+2*So(t,"height")}function Io(t){return Vo({x:So(t,"x1"),y:So(t,"y1")},{x:So(t,"x2"),y:So(t,"y2")})}function Do(t){for(var e,i=t.points,n=0,r=0;r<i.numberOfItems;r++){var o=i.getItem(r);r>0&&(n+=Vo(e,o)),e=o}return n}function No(t){var e=t.points;return Do(t)+Vo(e.getItem(e.numberOfItems-1),e.getItem(0))}function Fo(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return Ro(t);case"rect":return Po(t);case"line":return Io(t);case"polyline":return Do(t);case"polygon":return No(t)}}function Bo(t){var e=Fo(t);return t.setAttribute("stroke-dasharray",e),e}function jo(t){for(var e=t.parentNode;eo.svg(e)&&eo.svg(e.parentNode);)e=e.parentNode;return e}function Uo(t,e){var i=e||{},n=i.el||jo(t),r=n.getBoundingClientRect(),o=So(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 qo(t,e){var i=eo.str(t)?ho(t)[0]:t,n=e||100;return function(t){return{property:t,el:i,svg:Uo(i),totalLength:Fo(i)*(n/100)}}}function Wo(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 Yo(t,e){var i=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=Oo(eo.pth(t)?t.totalLength:t,e)+"";return{original:n,numbers:n.match(i)?n.match(i).map(Number):[0],strings:eo.str(t)||e?n.split(i):[]}}function Xo(t){return po(t?uo(eo.arr(t)?t.map(go):go(t)):[],(function(t,e,i){return i.indexOf(t)===e}))}function Go(t){var e=Xo(t);return e.map((function(t,i){return{target:t,id:i,total:e.length,transforms:{list:To(t)}}}))}function Zo(t,e){var i=mo(e);if(/^spring/.test(i.easing)&&(i.duration=no(i.easing)),eo.arr(t)){var n=t.length;2===n&&!eo.obj(t[0])?t={value:t}:eo.fnc(e.duration)||(i.duration=e.duration/n)}var r=eo.arr(t)?t:[t];return r.map((function(t,i){var n=eo.obj(t)&&!eo.pth(t)?t:{value:t};return eo.und(n.delay)&&(n.delay=i?0:e.delay),eo.und(n.endDelay)&&(n.endDelay=i===r.length-1?e.endDelay:0),n})).map((function(t){return bo(t,i)}))}function Ko(t){for(var e=po(uo(t.map((function(t){return Object.keys(t)}))),(function(t){return eo.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)eo.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 Qo(t,e){var i=[],n=e.keyframes;for(var r in n&&(e=bo(Ko(n),e)),e)eo.key(r)&&i.push({name:r,tweens:Zo(e[r],t)});return i}function Jo(t,e){var i={};for(var n in t){var r=Ao(t[n],e);eo.arr(r)&&1===(r=r.map((function(t){return Ao(t,e)}))).length&&(r=r[0]),i[n]=r}return i.duration=parseFloat(i.duration),i.delay=parseFloat(i.delay),i}function ts(t,e){var i;return t.tweens.map((function(n){var r=Jo(n,e),o=r.value,s=eo.arr(o)?o[1]:o,a=ko(s),l=Ho(e.target,t.name,a,e),c=i?i.to.original:l,h=eo.arr(o)?o[0]:c,p=ko(h)||ko(l),d=a||p;return eo.und(s)&&(s=c),r.from=Yo(h,d),r.to=Yo($o(s,h),d),r.start=i?i.end:0,r.end=r.start+r.delay+r.duration+r.endDelay,r.easing=co(r.easing,r.duration),r.isPath=eo.pth(o),r.isPathTargetInsideSVG=r.isPath&&eo.svg(e.target),r.isColor=eo.col(r.from.original),r.isColor&&(r.round=1),i=r,r}))}var es={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 is(t,e){Go(t).forEach((function(t){for(var i in e){var n=Ao(e[i],t),r=t.target,o=ko(n),s=Ho(r,i,o,t),a=$o(Oo(n,o||ko(s)),s),l=Mo(r,i);es[l](r,i,a,t.transforms,!0)}}))}function ns(t,e){var i=Mo(t.target,e.name);if(i){var n=ts(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 rs(t,e){return po(uo(t.map((function(t){return e.map((function(e){return ns(t,e)}))}))),(function(t){return!eo.und(t)}))}function os(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 ss=0;function as(t){var e=vo(Xr,t),i=vo(Gr,t),n=Qo(i,t),r=Go(t.targets),o=rs(r,n),s=os(o,i),a=ss;return ss++,bo(e,{id:a,children:[],animatables:r,animations:o,duration:s.duration,delay:s.delay,endDelay:s.endDelay})}var ls=[],cs=function(){var t;function e(){t||hs()&&ps.suspendWhenDocumentHidden||!(ls.length>0)||(t=requestAnimationFrame(i))}function i(e){for(var n=ls.length,r=0;r<n;){var o=ls[r];o.paused?(ls.splice(r,1),n--):(o.tick(e),r++)}t=r>0?requestAnimationFrame(i):void 0}function n(){ps.suspendWhenDocumentHidden&&(hs()?t=cancelAnimationFrame(t):(ls.forEach((function(t){return t._onDocumentVisibility()})),cs()))}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",n),e}();function hs(){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=as(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 p(){i=0,n=h(l.currentTime)*(1/ps.speed)}function d(t,e){e&&e.seek(t-e.timelineOffset)}function u(t){if(l.reversePlayback)for(var i=o;i--;)d(t,e[i]);else for(var n=0;n<o;n++)d(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=po(s,(function(e){return t<e.end}))[0]||c);for(var h=Qr(t-c.start-c.delay,0,c.duration)/c.duration,p=isNaN(h)?1:c.easing(h),d=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?Wo(c.value,p*y,c.isPathTargetInsideSVG):_+p*(y-_),u&&(c.isColor&&v>2||(b=Math.round(b*u)/u)),g.push(b)}var w=d.length;if(w){m=d[0];for(var x=0;x<w;x++){d[x];var k=d[x+1],z=g[x];isNaN(z)||(m+=k?z+k:z+" ")}}else m=g[0];es[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,p=l.delay,d=o-l.endDelay,v=h(t);l.progress=Qr(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<=p&&0!==l.currentTime&&g(0),(v>=d&&l.currentTime!==o||!o)&&g(o),v>p&&v<d?(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=Qr(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=p,l.set=function(t,e){return is(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,p()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,ls.push(l),p(),cs())},l.reverse=function(){c(),l.completed=!l.reversed,p()},l.restart=function(){l.reset(),l.play()},l.remove=function(t){us(Xo(t),l)},l.reset(),l.autoplay&&l.play(),l}function ds(t,e){for(var i=e.length;i--;)fo(t,e[i].animatable.target)&&e.splice(i,1)}function us(t,e){var i=e.animations,n=e.children;ds(t,i);for(var r=n.length;r--;){var o=n[r],s=o.animations;ds(t,s),s.length||o.children.length||n.splice(r,1)}i.length||n.length||e.pause()}function gs(t){for(var e=Xo(t),i=ls.length;i--;){us(e,ls[i])}}function fs(t,e){void 0===e&&(e={});var i=e.direction||"normal",n=e.easing?co(e.easing):null,r=e.grid,o=e.axis,s=e.from||0,a="first"===s,l="center"===s,c="last"===s,h=eo.arr(t),p=h?parseFloat(t[0]):parseFloat(t),d=h?parseFloat(t[1]):0,u=ko(h?t[1]:t)||0,g=e.start||0+(h?p: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?(d-p)/m:p)*(Math.round(100*f[e])/100)+u}}function ms(t){void 0===t&&(t={});var e=ps(t);return e.duration=0,e.add=function(i,n){var r=ls.indexOf(e),o=e.children;function s(t){t.passThrough=!0}r>-1&&ls.splice(r,1);for(var a=0;a<o.length;a++)s(o[a]);var l=bo(i,vo(Gr,t));l.targets=l.targets||t.targets;var c=e.duration;l.autoplay=!1,l.direction=e.direction,l.timelineOffset=eo.und(n)?c:$o(n,c),s(e),e.seek(l.timelineOffset);var h=ps(l);s(h),o.push(h);var p=os(o,t);return e.delay=p.delay,e.endDelay=p.endDelay,e.duration=p.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=ls,ps.remove=gs,ps.get=Ho,ps.set=is,ps.convertPx=Co,ps.path=qo,ps.setDashoffset=Bo,ps.stagger=fs,ps.timeline=ms,ps.easing=co,ps.penner=lo,ps.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t};class vs extends(I(O)){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"},_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._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||vs.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&&!(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,null===t.detail.position?this.nodeId=null:this.nodeId=t.detail.position||this.nodeId,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),nn(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(){const{hash:t}=this.getUrl();if(t){const e=this.shadowRoot.getElementById(t.substring(1));console.log("hash target: %o",e),e&&e.scrollIntoView({block:"center",inline:"nearest"})}}_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",Yr);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},Gr={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},Zr=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Kr={CSS:{},springs:{}};function Qr(t,e,i){return Math.min(Math.max(t,e),i)}function Jr(t,e){return t.indexOf(e)>-1}function to(t,e){return t.apply(null,e)}var eo={arr:function(t){return Array.isArray(t)},obj:function(t){return Jr(Object.prototype.toString.call(t),"Object")},pth:function(t){return eo.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||eo.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 eo.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 eo.hex(t)||eo.rgb(t)||eo.hsl(t)},key:function(t){return!Xr.hasOwnProperty(t)&&!Gr.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function io(t){var e=/\(([^)]+)\)/.exec(t);return e?e[1].split(",").map((function(t){return parseFloat(t)})):[]}function no(t,e){var i=io(t),n=Qr(eo.und(i[0])?1:i[0],.1,100),r=Qr(eo.und(i[1])?100:i[1],.1,100),o=Qr(eo.und(i[2])?10:i[2],.1,100),s=Qr(eo.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,p=l<1?(l*a-s)/c:-s+a;function d(t){var i=e?e*t/1e3:t;return i=l<1?Math.exp(-i*l*a)*(h*Math.cos(c*i)+p*Math.sin(c*i)):(h+p*i)*Math.exp(-i*a),0===t||1===t?t:1-i}function u(){var e=Kr.springs[t];if(e)return e;for(var i=1/6,n=0,r=0;;)if(1===d(n+=i)){if(++r>=16)break}else r=0;var o=n*i*1e3;return Kr.springs[t]=o,o}return e?d:u}function ro(t){return void 0===t&&(t=10),function(e){return Math.ceil(Qr(e,1e-6,1)*t)*(1/t)}}var oo,so,ao=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 p=0;p<t;++p)h[p]=o(p*e,i,r);return function(t){return i===n&&r===c||0===t||1===t?t:o(d(t),n,c)}}function d(n){for(var o=0,c=1,p=t-1;c!==p&&h[c]<=n;++c)o+=e;--c;var d=o+(n-h[c])/(h[c+1]-h[c])*e,u=s(d,i,r);return u>=.001?l(n,d,i,r):0===u?d:a(n,o,o+e,i,r)}}return c}(),lo=(oo={linear:function(){return function(t){return t}}},so={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=Qr(t,1,10),n=Qr(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){so[t]=function(){return function(t){return Math.pow(t,e+2)}}})),Object.keys(so).forEach((function(t){var e=so[t];oo["easeIn"+t]=e,oo["easeOut"+t]=function(t,i){return function(n){return 1-e(t,i)(1-n)}},oo["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}},oo["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}}})),oo);function co(t,e){if(eo.fnc(t))return t;var i=t.split("(")[0],n=lo[i],r=io(t);switch(i){case"spring":return no(t,e);case"cubicBezier":return to(ao,r);case"steps":return to(ro,r);default:return to(n,r)}}function ho(t){try{return document.querySelectorAll(t)}catch(t){return}}function po(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 uo(t){return t.reduce((function(t,e){return t.concat(eo.arr(e)?uo(e):e)}),[])}function go(t){return eo.arr(t)?t:(eo.str(t)&&(t=ho(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function fo(t,e){return t.some((function(t){return t===e}))}function mo(t){var e={};for(var i in t)e[i]=t[i];return e}function vo(t,e){var i=mo(t);for(var n in t)i[n]=e.hasOwnProperty(n)?e[n]:t[n];return i}function bo(t,e){var i=mo(t);for(var n in e)i[n]=eo.und(t[n])?e[n]:t[n];return i}function yo(t){var e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t);return e?"rgba("+e[1]+",1)":t}function _o(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 wo(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,p=2*a-h;e=c(p,h,o+1/3),i=c(p,h,o),n=c(p,h,o-1/3)}return"rgba("+255*e+","+255*i+","+255*n+","+l+")"}function xo(t){return eo.rgb(t)?yo(t):eo.hex(t)?_o(t):eo.hsl(t)?wo(t):void 0}function ko(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 Jr(t,"translate")||"perspective"===t?"px":Jr(t,"rotate")||Jr(t,"skew")?"deg":void 0}function Ao(t,e){return eo.fnc(t)?t(e.target,e.id,e.total):t}function So(t,e){return t.getAttribute(e)}function Co(t,e,i){if(fo([i,"deg","rad","turn"],ko(e)))return e;var n=Kr.CSS[e+i];if(!eo.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 Kr.CSS[e+i]=l,l}function Eo(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?Co(t,r,i):r}}function Mo(t,e){return eo.dom(t)&&!eo.inp(t)&&(!eo.nil(So(t,e))||eo.svg(t)&&t[e])?"attribute":eo.dom(t)&&fo(Zr,e)?"transform":eo.dom(t)&&"transform"!==e&&Eo(t,e)?"css":null!=t[e]?"object":void 0}function To(t){if(eo.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 Lo(t,e,i,n){var r=Jr(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?Co(t,o,n):o}function Ho(t,e,i,n){switch(Mo(t,e)){case"transform":return Lo(t,e,n,i);case"css":return Eo(t,e,i);case"attribute":return So(t,e);default:return t[e]||0}}function $o(t,e){var i=/^(\*=|\+=|-=)/.exec(t);if(!i)return t;var n=ko(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 Oo(t,e){if(eo.col(t))return xo(t);if(/\s/g.test(t))return t;var i=ko(t),n=i?t.substr(0,t.length-i.length):t;return e?n+e:n}function Vo(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*So(t,"r")}function Po(t){return 2*So(t,"width")+2*So(t,"height")}function Io(t){return Vo({x:So(t,"x1"),y:So(t,"y1")},{x:So(t,"x2"),y:So(t,"y2")})}function Do(t){for(var e,i=t.points,n=0,r=0;r<i.numberOfItems;r++){var o=i.getItem(r);r>0&&(n+=Vo(e,o)),e=o}return n}function No(t){var e=t.points;return Do(t)+Vo(e.getItem(e.numberOfItems-1),e.getItem(0))}function Fo(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return Ro(t);case"rect":return Po(t);case"line":return Io(t);case"polyline":return Do(t);case"polygon":return No(t)}}function Bo(t){var e=Fo(t);return t.setAttribute("stroke-dasharray",e),e}function jo(t){for(var e=t.parentNode;eo.svg(e)&&eo.svg(e.parentNode);)e=e.parentNode;return e}function Uo(t,e){var i=e||{},n=i.el||jo(t),r=n.getBoundingClientRect(),o=So(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 qo(t,e){var i=eo.str(t)?ho(t)[0]:t,n=e||100;return function(t){return{property:t,el:i,svg:Uo(i),totalLength:Fo(i)*(n/100)}}}function Wo(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 Yo(t,e){var i=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=Oo(eo.pth(t)?t.totalLength:t,e)+"";return{original:n,numbers:n.match(i)?n.match(i).map(Number):[0],strings:eo.str(t)||e?n.split(i):[]}}function Xo(t){return po(t?uo(eo.arr(t)?t.map(go):go(t)):[],(function(t,e,i){return i.indexOf(t)===e}))}function Go(t){var e=Xo(t);return e.map((function(t,i){return{target:t,id:i,total:e.length,transforms:{list:To(t)}}}))}function Zo(t,e){var i=mo(e);if(/^spring/.test(i.easing)&&(i.duration=no(i.easing)),eo.arr(t)){var n=t.length;2===n&&!eo.obj(t[0])?t={value:t}:eo.fnc(e.duration)||(i.duration=e.duration/n)}var r=eo.arr(t)?t:[t];return r.map((function(t,i){var n=eo.obj(t)&&!eo.pth(t)?t:{value:t};return eo.und(n.delay)&&(n.delay=i?0:e.delay),eo.und(n.endDelay)&&(n.endDelay=i===r.length-1?e.endDelay:0),n})).map((function(t){return bo(t,i)}))}function Ko(t){for(var e=po(uo(t.map((function(t){return Object.keys(t)}))),(function(t){return eo.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)eo.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 Qo(t,e){var i=[],n=e.keyframes;for(var r in n&&(e=bo(Ko(n),e)),e)eo.key(r)&&i.push({name:r,tweens:Zo(e[r],t)});return i}function Jo(t,e){var i={};for(var n in t){var r=Ao(t[n],e);eo.arr(r)&&1===(r=r.map((function(t){return Ao(t,e)}))).length&&(r=r[0]),i[n]=r}return i.duration=parseFloat(i.duration),i.delay=parseFloat(i.delay),i}function ts(t,e){var i;return t.tweens.map((function(n){var r=Jo(n,e),o=r.value,s=eo.arr(o)?o[1]:o,a=ko(s),l=Ho(e.target,t.name,a,e),c=i?i.to.original:l,h=eo.arr(o)?o[0]:c,p=ko(h)||ko(l),d=a||p;return eo.und(s)&&(s=c),r.from=Yo(h,d),r.to=Yo($o(s,h),d),r.start=i?i.end:0,r.end=r.start+r.delay+r.duration+r.endDelay,r.easing=co(r.easing,r.duration),r.isPath=eo.pth(o),r.isPathTargetInsideSVG=r.isPath&&eo.svg(e.target),r.isColor=eo.col(r.from.original),r.isColor&&(r.round=1),i=r,r}))}var es={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 is(t,e){Go(t).forEach((function(t){for(var i in e){var n=Ao(e[i],t),r=t.target,o=ko(n),s=Ho(r,i,o,t),a=$o(Oo(n,o||ko(s)),s),l=Mo(r,i);es[l](r,i,a,t.transforms,!0)}}))}function ns(t,e){var i=Mo(t.target,e.name);if(i){var n=ts(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 rs(t,e){return po(uo(t.map((function(t){return e.map((function(e){return ns(t,e)}))}))),(function(t){return!eo.und(t)}))}function os(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 ss=0;function as(t){var e=vo(Xr,t),i=vo(Gr,t),n=Qo(i,t),r=Go(t.targets),o=rs(r,n),s=os(o,i),a=ss;return ss++,bo(e,{id:a,children:[],animatables:r,animations:o,duration:s.duration,delay:s.delay,endDelay:s.endDelay})}var ls=[],cs=function(){var t;function e(){t||hs()&&ps.suspendWhenDocumentHidden||!(ls.length>0)||(t=requestAnimationFrame(i))}function i(e){for(var n=ls.length,r=0;r<n;){var o=ls[r];o.paused?(ls.splice(r,1),n--):(o.tick(e),r++)}t=r>0?requestAnimationFrame(i):void 0}function n(){ps.suspendWhenDocumentHidden&&(hs()?t=cancelAnimationFrame(t):(ls.forEach((function(t){return t._onDocumentVisibility()})),cs()))}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",n),e}();function hs(){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=as(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 p(){i=0,n=h(l.currentTime)*(1/ps.speed)}function d(t,e){e&&e.seek(t-e.timelineOffset)}function u(t){if(l.reversePlayback)for(var i=o;i--;)d(t,e[i]);else for(var n=0;n<o;n++)d(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=po(s,(function(e){return t<e.end}))[0]||c);for(var h=Qr(t-c.start-c.delay,0,c.duration)/c.duration,p=isNaN(h)?1:c.easing(h),d=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?Wo(c.value,p*y,c.isPathTargetInsideSVG):_+p*(y-_),u&&(c.isColor&&v>2||(b=Math.round(b*u)/u)),g.push(b)}var w=d.length;if(w){m=d[0];for(var x=0;x<w;x++){d[x];var k=d[x+1],z=g[x];isNaN(z)||(m+=k?z+k:z+" ")}}else m=g[0];es[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,p=l.delay,d=o-l.endDelay,v=h(t);l.progress=Qr(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<=p&&0!==l.currentTime&&g(0),(v>=d&&l.currentTime!==o||!o)&&g(o),v>p&&v<d?(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=Qr(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=p,l.set=function(t,e){return is(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,p()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,ls.push(l),p(),cs())},l.reverse=function(){c(),l.completed=!l.reversed,p()},l.restart=function(){l.reset(),l.play()},l.remove=function(t){us(Xo(t),l)},l.reset(),l.autoplay&&l.play(),l}function ds(t,e){for(var i=e.length;i--;)fo(t,e[i].animatable.target)&&e.splice(i,1)}function us(t,e){var i=e.animations,n=e.children;ds(t,i);for(var r=n.length;r--;){var o=n[r],s=o.animations;ds(t,s),s.length||o.children.length||n.splice(r,1)}i.length||n.length||e.pause()}function gs(t){for(var e=Xo(t),i=ls.length;i--;){us(e,ls[i])}}function fs(t,e){void 0===e&&(e={});var i=e.direction||"normal",n=e.easing?co(e.easing):null,r=e.grid,o=e.axis,s=e.from||0,a="first"===s,l="center"===s,c="last"===s,h=eo.arr(t),p=h?parseFloat(t[0]):parseFloat(t),d=h?parseFloat(t[1]):0,u=ko(h?t[1]:t)||0,g=e.start||0+(h?p: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?(d-p)/m:p)*(Math.round(100*f[e])/100)+u}}function ms(t){void 0===t&&(t={});var e=ps(t);return e.duration=0,e.add=function(i,n){var r=ls.indexOf(e),o=e.children;function s(t){t.passThrough=!0}r>-1&&ls.splice(r,1);for(var a=0;a<o.length;a++)s(o[a]);var l=bo(i,vo(Gr,t));l.targets=l.targets||t.targets;var c=e.duration;l.autoplay=!1,l.direction=e.direction,l.timelineOffset=eo.und(n)?c:$o(n,c),s(e),e.seek(l.timelineOffset);var h=ps(l);s(h),o.push(h);var p=os(o,t);return e.delay=p.delay,e.endDelay=p.endDelay,e.duration=p.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=ls,ps.remove=gs,ps.get=Ho,ps.set=is,ps.convertPx=Co,ps.path=qo,ps.setDashoffset=Bo,ps.stagger=fs,ps.timeline=ms,ps.easing=co,ps.penner=lo,ps.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t};class vs extends(I(O)){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||vs.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),nn(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`
|
|
1093
1093
|
:host {
|
|
1094
1094
|
display: block;
|
|
1095
1095
|
background: transparent;
|
|
@@ -3925,7 +3925,7 @@ const Va=n`<iron-iconset-svg name="av" size="24">
|
|
|
3925
3925
|
.hidden {
|
|
3926
3926
|
display: none;
|
|
3927
3927
|
}
|
|
3928
|
-
`}}customElements.define("pb-mei",Pa);class
|
|
3928
|
+
`}}function Ia(t,e){const i=[];return t.forEach(t=>{let n,r;if("object"==typeof t?(n=t.text,r=t.value):(n=t.toString(),r=n),n.toLowerCase().indexOf(e)>-1){const t={};t.text=n,t.value=r,i.push(t)}}),i}customElements.define("pb-mei",Pa);class Da extends(I(O)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{name:{type:String},value:{type:String},placeholder:{type:String,attribute:"placeholder"},source:{type:String},preload:{type:Boolean},suggestions:{type:Array},substring:{type:Boolean},icon:{type:String}})}constructor(){super(),this.placeholder="search.placeholder",this.suggestions=[],this.lastSelected=null,this.preload=!1,this.substring=!1,this._hiddenInput=null,this._initialized=!1}connectedCallback(){super.connectedCallback()}firstUpdated(){this.closest("iron-form,pb-search,pb-custom-form")||(this._hiddenInput=document.createElement("input"),this._hiddenInput.type="hidden",this._hiddenInput.name=this.name,this.appendChild(this._hiddenInput));const t=this.shadowRoot.getElementById("autocomplete");if(t.addEventListener("autocomplete-change",this._autocomplete.bind(this)),this.preload&&this.source)this.substring&&(t.queryFn=Ia),Da.waitOnce("pb-page-ready",()=>{this._sendRequest()});else if(this.value)if(this.source)Da.waitOnce("pb-page-ready",()=>{this._sendRequest(this.value)});else{const t=this.shadowRoot.getElementById("search"),e=this.suggestions.find(t=>t.text?t.value===this.value:t===this.value);e&&(t.value=e.text||e,this._hiddenInput&&(this._hiddenInput.value=e.value||e)),this._hiddenInput&&(this._hiddenInput.value=this.value)}}render(){return V`
|
|
3929
3929
|
<custom-style>
|
|
3930
3930
|
<style>
|
|
3931
3931
|
:host {
|
|
@@ -3943,7 +3943,7 @@ const Va=n`<iron-iconset-svg name="av" size="24">
|
|
|
3943
3943
|
always-float-label>
|
|
3944
3944
|
${this.icon?V`<iron-icon icon="${this.icon}" slot="prefix"></iron-icon>`:null}
|
|
3945
3945
|
</paper-input>
|
|
3946
|
-
<paper-autocomplete-suggestions id="autocomplete" for="search" .source="${this.suggestions}" ?remote-source="${this.source}"
|
|
3946
|
+
<paper-autocomplete-suggestions id="autocomplete" for="search" .source="${this.suggestions}" ?remote-source="${!this.preload&&this.source}"
|
|
3947
3947
|
@autocomplete-selected="${this._autocompleteSelected}"></paper-autocomplete-suggestions>
|
|
3948
3948
|
|
|
3949
3949
|
<iron-ajax
|
|
@@ -3969,7 +3969,7 @@ const Va=n`<iron-iconset-svg name="av" size="24">
|
|
|
3969
3969
|
display: block;
|
|
3970
3970
|
margin-left: 10px;
|
|
3971
3971
|
}
|
|
3972
|
-
`}_autocomplete(t){const e=this.shadowRoot.getElementById("search");this._sendRequest(e.value)}_sendRequest(t){const e=this.shadowRoot.getElementById("autocompleteLoader");e.url=this.toAbsoluteURL(this.source);const i=this._getParameters();i.query=t,e.params=i,e.generateRequest()}_updateSuggestions(){const t=this.shadowRoot.getElementById("autocompleteLoader");if(this._initialized){const e=this.shadowRoot.getElementById("autocomplete");t.lastResponse&&(this.suggestions=t.lastResponse,e.suggestions(this.suggestions))}else if(t.lastResponse){
|
|
3972
|
+
`}_autocomplete(t){const e=this.shadowRoot.getElementById("search");this._sendRequest(e.value)}_sendRequest(t){const e=this.shadowRoot.getElementById("autocompleteLoader");e.url=this.toAbsoluteURL(this.source);const i=this._getParameters();i.query=t,e.params=i,e.generateRequest()}_updateSuggestions(){const t=this.shadowRoot.getElementById("autocompleteLoader");if(this._initialized){const e=this.shadowRoot.getElementById("autocomplete");t.lastResponse&&(this.suggestions=t.lastResponse,e.suggestions(this.suggestions))}else if(t.lastResponse){const e=t.lastResponse,i=this.shadowRoot.getElementById("search"),n=e.find(t=>t.text?t.value===this.value:t===this.value);n?(i.value=n.text||n,this._hiddenInput&&(this._hiddenInput.value=n.value||n)):this._hiddenInput&&(this._hiddenInput.value=this.value),this.preload&&(this.suggestions=e)}this._initialized=!0}_getParameters(){const t={};return this.querySelectorAll("[name]").forEach(e=>{t[e.name]=e.value}),t}_autocompleteSelected(t){this.lastSelected=t.detail.text;this.shadowRoot.getElementById("search").value=t.detail.text,this.value=t.detail.value,this._hiddenInput&&(this._hiddenInput.value=this.value),this.emitTo("pb-autocomplete-selected",{text:t.detail.text,value:t.detail.value})}_setInput(t){const e=this.shadowRoot.getElementById("search");if(this.value=e.value,this._hiddenInput&&(this._hiddenInput.value=this.value),13===t.keyCode){const t=this.suggestions.find(t=>t.text?t.value===this.value:t===this.value);if(!t)return;t.value?this.emitTo("pb-autocomplete-selected",{text:t.text,value:t.value}):this.emitTo("pb-autocomplete-selected",{text:t,value:t})}}}customElements.define("pb-autocomplete",Da);
|
|
3973
3973
|
/**
|
|
3974
3974
|
@license
|
|
3975
3975
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -3980,7 +3980,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
3980
3980
|
part of the polymer project is also subject to an additional IP rights grant
|
|
3981
3981
|
found at http://polymer.github.io/PATENTS.txt
|
|
3982
3982
|
*/
|
|
3983
|
-
const
|
|
3983
|
+
const Na=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:String,value:"",reflectToAttribute:!0,observer:"_forChanged"},_forElement:Object},attached:function(){this._forChanged()},ready:function(){this._generateLabelId()},_generateLabelId:function(){if(!this.id){var e="iron-label-"+Na._labelNumber++;t(this).setAttribute("id",e)}},_findTarget:function(){if(this.for){var e=t(this).getOwnerRoot();return t(e).querySelector("#"+this.for)}var i=t(this).querySelector("[iron-label-target]");return i||(i=t(this).firstElementChild),i},_tapHandler:function(e){this._forElement&&(t(e).localTarget!==this._forElement&&(this._forElement.focus(),this._forElement.click()))},_applyLabelledBy:function(){this._forElement&&t(this._forElement).setAttribute("aria-labelledby",this.id)},_forChanged:function(){this._forElement&&t(this._forElement).removeAttribute("aria-labelledby"),this._forElement=this._findTarget(),this._applyLabelledBy()}});Na._labelNumber=0;class Fa extends(I(O)){static get properties(){return Object.assign({label:{type:String},value:{type:String,reflect:!0},values:{type:Array,reflect:!0},name:{type:String},source:{type:String},multi:{type:Boolean},_items:{type:Array},_selected:{type:Array}},super.properties)}constructor(){super(),this.value=null,this.values=[],this._items=[],this._selected=[],this._inIronForm=!1}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-i18n-update",this._refresh.bind(this)),this.multi&&(0===this.values.length&&this.value&&(this.values=[this.value]),this.value=void 0)}firstUpdated(){super.firstUpdated(),this._inIronForm=this.closest("iron-form, pb-search,pb-custom-form");const t=this.shadowRoot.querySelector('[name="subform"]');t&&t.assignedNodes().forEach(t=>{this.name&&t.addEventListener("change",this._loadRemote.bind(this));t.querySelectorAll("[name]").forEach(t=>{t.addEventListener("change",this._loadRemote.bind(this))})}),Fa.waitOnce("pb-page-ready",()=>{this._loadRemote()})}_refresh(){const t=this.shadowRoot.getElementById("list");t&&setTimeout(()=>{const e=t.selected;t.selected=void 0,t.selected=e})}_clear(t){const e=this.shadowRoot.querySelector(t);e&&e.assignedNodes().forEach(t=>{t.parentNode.removeChild(t)})}_loadRemote(){if(this.source){let t=this.toAbsoluteURL(this.source);t=t.indexOf("?")>-1?`${t}&${this._getParameters()}`:`${t}?${this._getParameters()}`,console.log("<pb-select> loading items from %s",t),fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.json()).then(t=>{this._clear("slot:not([name])");const e=[];t.forEach(t=>{e.push({label:t.text,value:t.value})}),console.log("<pb-select> loaded %d items",e.length),this._items=e}).catch(()=>{console.error("<pb-select> request to %s failed",t)})}}_getParameters(){const t=this.shadowRoot.querySelector('[name="subform"]'),e=[];return t&&t.assignedNodes().forEach(t=>{t.querySelectorAll("[name]").forEach(t=>{e.push(`${t.name}=${encodeURIComponent(t.value)}`)})}),e.join("&")}render(){return this.multi?V`
|
|
3984
3984
|
<slot name="subform"></slot>
|
|
3985
3985
|
<iron-label for="list" part="label">${o(this.label)}</iron-label>
|
|
3986
3986
|
${this.multi?V`<paper-listbox id="list" slot="dropdown-content" class="dropdown-content"
|
|
@@ -4023,7 +4023,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4023
4023
|
paper-listbox{
|
|
4024
4024
|
overflow:auto;
|
|
4025
4025
|
}
|
|
4026
|
-
`}}customElements.define("pb-select",
|
|
4026
|
+
`}}customElements.define("pb-select",Fa);class Ba extends(I(O)){static get properties(){return Object.assign({label:{type:String}},super.properties)}constructor(){super(),this.label="clipboard.label"}render(){return V`
|
|
4027
4027
|
<h3>${o(this.label)}</h3>
|
|
4028
4028
|
<div>
|
|
4029
4029
|
<slot></slot>
|
|
@@ -4045,7 +4045,7 @@ const Da=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",Fa);class Ba{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 ja extends Ba{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 Ua extends Ba{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 qa(t="",e){return t.replace(/\${([^}]+)}/g,(t,i)=>{let n;return e[i]&&(n=e[i]),n||""})}function Wa(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 Ya extends Ba{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=Wa(t,".info"),this.detailExpr=Wa(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?qa(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:qa(this.labelExpr,i),details:qa(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=qa(this.infoExpr,l),i({id:s.id,strings:a})})})}}function Xa(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 Ga extends Ba{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:Xa(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 Ba{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}?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:t[r],details:""+t["full-id"],link:`https://meta.karl-barth.ch/${i}/${t.id}`,strings:[t[r]],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">${t.data[i]}</a></h3>\n ${o}\n ${s}\n `;e.innerHTML=a,n({id:t.data["full-id"],strings:[t.data[i]]})})})}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;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;default:t=this._register}return t}}class Ka extends Ba{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 Qa(t){const e=await fetch(t);return await e.json()}class Ja extends Ba{constructor(t){super(t),this.endpoint=t.getAttribute("endpoint"),this.debug=t.getAttribute("debug"),Qa(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 tl extends Ba{constructor(t,e){super(e),this._endpoint=t,this._connectors=el(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 el(t,e){const i=[];return e.querySelectorAll(":scope > pb-authority").forEach(e=>{let n;switch(e.getAttribute("connector")){case"GND":n=new Ga(e);break;case"GeoNames":n=new Ua(e);break;case"Airtable":n=new Ya(e);break;case"KBGA":n=new Za(e);break;case"GF":n=new Ka(e);break;case"ReconciliationService":n=new Ja(e);break;case"Custom":n=new tl(t,e);break;default:n=new ja(e)}i.push(n)}),i}class il extends(I(O)){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()}),il.waitOnce("pb-page-ready",()=>{el(this.getEndpoint(),this).forEach(t=>{this._authorities[t.register]=t})}),console.log("<pb-authority-lookup> Registered authorities: %o",this._authorities)}render(){return V`
|
|
4048
|
+
`}}customElements.define("pb-clipboard",Ba);class ja{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 ja{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 qa extends ja{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 Wa(t="",e){return t.replace(/\${([^}]+)}/g,(t,i)=>{let n;return e[i]&&(n=e[i]),n||""})}function Ya(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 ja{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=Ya(t,".info"),this.detailExpr=Ya(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?Wa(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:Wa(this.labelExpr,i),details:Wa(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=Wa(this.infoExpr,l),i({id:s.id,strings:a})})})}}function Ga(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 Za extends ja{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:Ga(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 Ka extends ja{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}?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:t[r],details:""+t["full-id"],link:`https://meta.karl-barth.ch/${i}/${t.id}`,strings:[t[r]],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">${t.data[i]}</a></h3>\n ${o}\n ${s}\n `;e.innerHTML=a,n({id:t.data["full-id"],strings:[t.data[i]]})})})}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;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;default:t=this._register}return t}}class Qa extends ja{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 Ja(t){const e=await fetch(t);return await e.json()}class tl extends ja{constructor(t){super(t),this.endpoint=t.getAttribute("endpoint"),this.debug=t.getAttribute("debug"),Ja(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 el extends ja{constructor(t,e){super(e),this._endpoint=t,this._connectors=il(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 il(t,e){const i=[];return e.querySelectorAll(":scope > pb-authority").forEach(e=>{let n;switch(e.getAttribute("connector")){case"GND":n=new Za(e);break;case"GeoNames":n=new qa(e);break;case"Airtable":n=new Xa(e);break;case"KBGA":n=new Ka(e);break;case"GF":n=new Qa(e);break;case"ReconciliationService":n=new tl(e);break;case"Custom":n=new el(t,e);break;default:n=new Ua(e)}i.push(n)}),i}class nl extends(I(O)){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()}),nl.waitOnce("pb-page-ready",()=>{il(this.getEndpoint(),this).forEach(t=>{this._authorities[t.register]=t})}),console.log("<pb-authority-lookup> Registered authorities: %o",this._authorities)}render(){return V`
|
|
4049
4049
|
<paper-input
|
|
4050
4050
|
id="query"
|
|
4051
4051
|
label="${o("Search for")}"
|
|
@@ -4120,7 +4120,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4120
4120
|
.occurrences {
|
|
4121
4121
|
background-color: var(--pb-color-focus);
|
|
4122
4122
|
}
|
|
4123
|
-
`}}customElements.define("pb-authority-lookup",
|
|
4123
|
+
`}}customElements.define("pb-authority-lookup",nl);class rl extends(I(O)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{data:{type:Object},documents:{type:Array},doc:{type:String},perPage:{type:Number,attribute:"per-page"},pattern:{type:String},first:{type:Number},sort:{type:String},target:{type:String,attribute:"target"}})}constructor(){super(),this.data={documents:[]},this.documents=[],this.first=1,this.doc=null,this.sort=null}static get styles(){return P`
|
|
4124
4124
|
:host {
|
|
4125
4125
|
display: block;
|
|
4126
4126
|
max-width:100%;
|
|
@@ -4212,7 +4212,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4212
4212
|
`)}
|
|
4213
4213
|
`)}
|
|
4214
4214
|
</table>
|
|
4215
|
-
`}async load(){if(!this.getEndpoint())return;if(!this.pattern)return;let t=`${this.getEndpoint()}/api/blacklab/search?pattern=${this.pattern}&start=${this.first}&per-page=${this.perPage}`;this.doc&&(t+="&doc="+this.doc),this.sort&&(t+="&sort="+this.sort),await fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.json()).then(t=>{this.data=t,localStorage.setItem("pb-kwic-results",JSON.stringify(this.data)),this.emitTo("pb-results-received",{count:t.docs?parseInt(t.docs,10):0,start:t.start,params:t.params,data:t},[])}).catch(t=>{alert("Error retrieving remote content: "+t)})}_animate(){ps({targets:this.shadowRoot.querySelector("table"),opacity:[0,1],duration:200,delay:200,easing:"linear"})}}customElements.define("pb-blacklab-results",
|
|
4215
|
+
`}async load(){if(!this.getEndpoint())return;if(!this.pattern)return;let t=`${this.getEndpoint()}/api/blacklab/search?pattern=${this.pattern}&start=${this.first}&per-page=${this.perPage}`;this.doc&&(t+="&doc="+this.doc),this.sort&&(t+="&sort="+this.sort),await fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(t=>t.json()).then(t=>{this.data=t,localStorage.setItem("pb-kwic-results",JSON.stringify(this.data)),this.emitTo("pb-results-received",{count:t.docs?parseInt(t.docs,10):0,start:t.start,params:t.params,data:t},[])}).catch(t=>{alert("Error retrieving remote content: "+t)})}_animate(){ps({targets:this.shadowRoot.querySelector("table"),opacity:[0,1],duration:200,delay:200,easing:"linear"})}}customElements.define("pb-blacklab-results",rl);class ol extends(I(O)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{current:{type:Number},view:{type:String},pattern:{type:String},match:{type:String},docid:{type:String},hits:{type:Array},kwicData:{type:Object},matchParam:{type:String},pageId:{type:String},perDocument:{type:Number,attribute:"per-document"}})}connectedCallback(){super.connectedCallback(),this.current=1,this.perDocument=100,this.hits=[],this.kwicData={},ol.waitOnce("pb-page-ready",()=>{this.viewElement=document.getElementById(this.view),this.viewElement?this.shadow=this.viewElement.shadowRoot:console.error(`${this}: view element with id ${this.view} does not exist`)}),this.subscribeTo("pb-update",()=>{this._loadDocResults()}),this.subscribeTo("pb-refresh",t=>{this.dynMatch=t.detail.match})}render(){return V`
|
|
4216
4216
|
${0!==this.hits.length?V`
|
|
4217
4217
|
<section class="kwic-display">
|
|
4218
4218
|
<paper-icon-button icon="icons:arrow-back" @click="${this._handlePrev}" ?disabled="${1===this.current}"></paper-icon-button>
|
|
@@ -4227,7 +4227,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4227
4227
|
padding:0 0.5rem;
|
|
4228
4228
|
}
|
|
4229
4229
|
|
|
4230
|
-
`}}function ol(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sl(t,e,i){return e&&ol(t.prototype,e),i&&ol(t,i),t}function al(){return(al=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function ll(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,cl(t,e)}function cl(t,e){return(cl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pl(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function dl(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return pl(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?pl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}customElements.define("pb-blacklab-highlight",rl);var ul,gl,fl,ml,vl,bl,yl={},_l=[],wl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function xl(t,e){for(var i in e)t[i]=e[i];return t}function kl(t){var e=t.parentNode;e&&e.removeChild(t)}function zl(t,e,i){var n,r,o,s=arguments,a={};for(o in e)"key"==o?n=e[o]:"ref"==o?r=e[o]:a[o]=e[o];if(arguments.length>3)for(i=[i],o=3;o<arguments.length;o++)i.push(s[o]);if(null!=i&&(a.children=i),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===a[o]&&(a[o]=t.defaultProps[o]);return Al(t,a,n,r,null)}function Al(t,e,i,n,r){var o={type:t,props:e,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++ul.__v:r};return null!=ul.vnode&&ul.vnode(o),o}function Sl(t){return t.children}function Cl(t,e){this.props=t,this.context=e}function El(t,e){if(null==e)return t.__?El(t.__,t.__.__k.indexOf(t)+1):null;for(var i;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e)return i.__e;return"function"==typeof t.type?El(t):null}function Ml(t){var e,i;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e){t.__e=t.__c.base=i.__e;break}return Ml(t)}}function Tl(t){(!t.__d&&(t.__d=!0)&&fl.push(t)&&!Ll.__r++||vl!==ul.debounceRendering)&&((vl=ul.debounceRendering)||ml)(Ll)}function Ll(){for(var t;Ll.__r=fl.length;)t=fl.sort((function(t,e){return t.__v.__b-e.__v.__b})),fl=[],t.some((function(t){var e,i,n,r,o,s;t.__d&&(o=(r=(e=t).__v).__e,(s=e.__P)&&(i=[],(n=xl({},r)).__v=r.__v+1,Dl(s,r,n,e.__n,void 0!==s.ownerSVGElement,null!=r.__h?[o]:null,i,null==o?El(r):o,r.__h),Nl(i,r),r.__e!=o&&Ml(r)))}))}function Hl(t,e,i,n,r,o,s,a,l,c){var h,p,d,u,g,f,m,v=n&&n.__k||_l,b=v.length;for(i.__k=[],h=0;h<e.length;h++)if(null!=(u=i.__k[h]=null==(u=e[h])||"boolean"==typeof u?null:"string"==typeof u||"number"==typeof u||"bigint"==typeof u?Al(null,u,null,null,u):Array.isArray(u)?Al(Sl,{children:u},null,null,null):u.__b>0?Al(u.type,u.props,u.key,null,u.__v):u)){if(u.__=i,u.__b=i.__b+1,null===(d=v[h])||d&&u.key==d.key&&u.type===d.type)v[h]=void 0;else for(p=0;p<b;p++){if((d=v[p])&&u.key==d.key&&u.type===d.type){v[p]=void 0;break}d=null}Dl(t,u,d=d||yl,r,o,s,a,l,c),g=u.__e,(p=u.ref)&&d.ref!=p&&(m||(m=[]),d.ref&&m.push(d.ref,null,u),m.push(p,u.__c||g,u)),null!=g?(null==f&&(f=g),"function"==typeof u.type&&null!=u.__k&&u.__k===d.__k?u.__d=l=$l(u,l,t):l=Ol(t,u,d,v,g,l),c||"option"!==i.type?"function"==typeof i.type&&(i.__d=l):t.value=""):l&&d.__e==l&&l.parentNode!=t&&(l=El(d))}for(i.__e=f,h=b;h--;)null!=v[h]&&("function"==typeof i.type&&null!=v[h].__e&&v[h].__e==i.__d&&(i.__d=El(n,h+1)),Bl(v[h],v[h]));if(m)for(h=0;h<m.length;h++)Fl(m[h],m[++h],m[++h])}function $l(t,e,i){var n,r;for(n=0;n<t.__k.length;n++)(r=t.__k[n])&&(r.__=t,e="function"==typeof r.type?$l(r,e,i):Ol(i,r,r,t.__k,r.__e,e));return e}function Ol(t,e,i,n,r,o){var s,a,l;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==i||r!=o||null==r.parentNode)t:if(null==o||o.parentNode!==t)t.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<n.length;l+=2)if(a==r)break t;t.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function Vl(t,e,i){"-"===e[0]?t.setProperty(e,i):t[e]=null==i?"":"number"!=typeof i||wl.test(e)?i:i+"px"}function Rl(t,e,i,n,r){var o;t:if("style"===e)if("string"==typeof i)t.style.cssText=i;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)i&&e in i||Vl(t.style,e,"");if(i)for(e in i)n&&i[e]===n[e]||Vl(t.style,e,i[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=i,i?n||t.addEventListener(e,o?Il:Pl,o):t.removeEventListener(e,o?Il:Pl,o);else if("dangerouslySetInnerHTML"!==e){if(r)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==i?"":i;break t}catch(t){}"function"==typeof i||(null!=i&&(!1!==i||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,i):t.removeAttribute(e))}}function Pl(t){this.l[t.type+!1](ul.event?ul.event(t):t)}function Il(t){this.l[t.type+!0](ul.event?ul.event(t):t)}function Dl(t,e,i,n,r,o,s,a,l){var c,h,p,d,u,g,f,m,v,b,y,_=e.type;if(void 0!==e.constructor)return null;null!=i.__h&&(l=i.__h,a=e.__e=i.__e,e.__h=null,o=[a]),(c=ul.__b)&&c(e);try{t:if("function"==typeof _){if(m=e.props,v=(c=_.contextType)&&n[c.__c],b=c?v?v.props.value:c.__:n,i.__c?f=(h=e.__c=i.__c).__=h.__E:("prototype"in _&&_.prototype.render?e.__c=h=new _(m,b):(e.__c=h=new Cl(m,b),h.constructor=_,h.render=jl),v&&v.sub(h),h.props=m,h.state||(h.state={}),h.context=b,h.__n=n,p=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=_.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=xl({},h.__s)),xl(h.__s,_.getDerivedStateFromProps(m,h.__s))),d=h.props,u=h.state,p)null==_.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==_.getDerivedStateFromProps&&m!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,b),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,b)||e.__v===i.__v){h.props=m,h.state=h.__s,e.__v!==i.__v&&(h.__d=!1),h.__v=e,e.__e=i.__e,e.__k=i.__k,e.__k.forEach((function(t){t&&(t.__=e)})),h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,b),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(d,u,g)}))}h.context=b,h.props=m,h.state=h.__s,(c=ul.__r)&&c(e),h.__d=!1,h.__v=e,h.__P=t,c=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(n=xl(xl({},n),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(g=h.getSnapshotBeforeUpdate(d,u)),y=null!=c&&c.type===Sl&&null==c.key?c.props.children:c,Hl(t,Array.isArray(y)?y:[y],e,i,n,r,o,s,a,l),h.base=e.__e,e.__h=null,h.__h.length&&s.push(h),f&&(h.__E=h.__=null),h.__e=!1}else null==o&&e.__v===i.__v?(e.__k=i.__k,e.__e=i.__e):e.__e=function(t,e,i,n,r,o,s,a){var l,c,h,p,d=i.props,u=e.props,g=e.type,f=0;if("svg"===g&&(r=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&(l===t||(g?l.localName==g:3==l.nodeType))){t=l,o[f]=null;break}if(null==t){if(null===g)return document.createTextNode(u);t=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,u.is&&u),o=null,a=!1}if(null===g)d===u||a&&t.data===u||(t.data=u);else{if(o=o&&_l.slice.call(t.childNodes),c=(d=i.props||yl).dangerouslySetInnerHTML,h=u.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},p=0;p<t.attributes.length;p++)d[t.attributes[p].name]=t.attributes[p].value;(h||c)&&(h&&(c&&h.__html==c.__html||h.__html===t.innerHTML)||(t.innerHTML=h&&h.__html||""))}if(function(t,e,i,n,r){var o;for(o in i)"children"===o||"key"===o||o in e||Rl(t,o,null,i[o],n);for(o in e)r&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||i[o]===e[o]||Rl(t,o,e[o],i[o],n)}(t,u,d,r,a),h)e.__k=[];else if(f=e.props.children,Hl(t,Array.isArray(f)?f:[f],e,i,n,r&&"foreignObject"!==g,o,s,t.firstChild,a),null!=o)for(f=o.length;f--;)null!=o[f]&&kl(o[f]);a||("value"in u&&void 0!==(f=u.value)&&(f!==t.value||"progress"===g&&!f)&&Rl(t,"value",f,d.value,!1),"checked"in u&&void 0!==(f=u.checked)&&f!==t.checked&&Rl(t,"checked",f,d.checked,!1))}return t}(i.__e,e,i,n,r,o,s,l);(c=ul.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=o)&&(e.__e=a,e.__h=!!l,o[o.indexOf(a)]=null),ul.__e(t,e,i)}}function Nl(t,e){ul.__c&&ul.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){ul.__e(t,e.__v)}}))}function Fl(t,e,i){try{"function"==typeof t?t(e):t.current=e}catch(t){ul.__e(t,i)}}function Bl(t,e,i){var n,r,o;if(ul.unmount&&ul.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||Fl(n,null,e)),i||"function"==typeof t.type||(i=null!=(r=t.__e)),t.__e=t.__d=void 0,null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){ul.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&Bl(n[o],e,i);null!=r&&kl(r)}function jl(t,e,i){return this.constructor(t,i)}function Ul(t,e,i){var n,r,o;ul.__&&ul.__(t,e),r=(n="function"==typeof i)?null:i&&i.__k||e.__k,o=[],Dl(e,t=(!n&&i||e).__k=zl(Sl,null,[t]),r||yl,yl,void 0!==e.ownerSVGElement,!n&&i?[i]:r?null:e.firstChild?_l.slice.call(e.childNodes):null,o,!n&&i?i:r?r.__e:e.firstChild,n),Nl(o,t)}function ql(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}ul={__e:function(t,e){for(var i,n,r;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&null!=n.getDerivedStateFromError&&(i.setState(n.getDerivedStateFromError(t)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t),r=i.__d),r)return i.__E=i}catch(e){t=e}throw t},__v:0},gl=function(t){return null!=t&&void 0===t.constructor},Cl.prototype.setState=function(t,e){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=xl({},this.state),"function"==typeof t&&(t=t(xl({},i),this.props)),t&&xl(i,t),null!=t&&this.__v&&(e&&this.__h.push(e),Tl(this))},Cl.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Tl(this))},Cl.prototype.render=Sl,fl=[],ml="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ll.__r=0,bl=0;var Wl=function(){function t(t){this._id=void 0,this._id=t||ql()}return sl(t,[{key:"id",get:function(){return this._id}}]),t}(),Yl={search:{placeholder:"Type a keyword..."},sort:{sortAsc:"Sort column ascending",sortDesc:"Sort column descending"},pagination:{previous:"Previous",next:"Next",navigate:function(t,e){return"Page "+t+" of "+e},page:function(t){return"Page "+t},showing:"Showing",of:"of",to:"to",results:"results"},loading:"Loading...",noRecordsFound:"No matching records found",error:"An error happened while fetching the data"},Xl=function(){function t(t){this._language=void 0,this._defaultLanguage=void 0,this._language=t,this._defaultLanguage=Yl}var e=t.prototype;return e.getString=function(t,e){if(!e||!t)return null;var i=t.split("."),n=i[0];if(e[n]){var r=e[n];return"string"==typeof r?function(){return r}:"function"==typeof r?r:this.getString(i.slice(1).join("."),r)}return null},e.translate=function(t){var e;return(e=this.getString(t,this._language)||this.getString(t,this._defaultLanguage))?e.apply(void 0,[].slice.call(arguments,1)):t},t}(),Gl=function(t){function e(e,i){var n,r;return(n=t.call(this,e,i)||this).config=void 0,n._=void 0,n.config=function(t){if(!t)return null;var e=Object.keys(t);return e.length?t[e[0]].props.value:null}(i),n.config&&(n._=(r=n.config.translator,function(t){return r.translate.apply(r,[t].concat([].slice.call(arguments,1)))})),n}return ll(e,t),e}(Cl),Zl=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype.render=function(){return zl(this.props.parentElement,{dangerouslySetInnerHTML:{__html:this.props.content}})},e}(Gl);function Kl(t,e){return zl(Zl,{content:t,parentElement:e})}Zl.defaultProps={parentElement:"span"};var Ql,Jl=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.update(e),i}ll(e,t);var i=e.prototype;return i.cast=function(t){return t instanceof HTMLElement?Kl(t.outerHTML):t},i.update=function(t){return this.data=this.cast(t),this},e}(Wl),tc=function(t){function e(e){var i;return(i=t.call(this)||this)._cells=void 0,i.cells=e||[],i}ll(e,t);var i=e.prototype;return i.cell=function(t){return this._cells[t]},i.toArray=function(){return this.cells.map((function(t){return t.data}))},e.fromCells=function(t){return new e(t.map((function(t){return new Jl(t.data)})))},sl(e,[{key:"cells",get:function(){return this._cells},set:function(t){this._cells=t}},{key:"length",get:function(){return this.cells.length}}]),e}(Wl),ec=function(t){function e(e){var i;return(i=t.call(this)||this)._rows=void 0,i._length=void 0,i.rows=e instanceof Array?e:e instanceof tc?[e]:[],i}return ll(e,t),e.prototype.toArray=function(){return this.rows.map((function(t){return t.toArray()}))},e.fromRows=function(t){return new e(t.map((function(t){return tc.fromCells(t.cells)})))},e.fromArray=function(t){return new e((t=function(t){return!t[0]||t[0]instanceof Array?t:[t]}(t)).map((function(t){return new tc(t.map((function(t){return new Jl(t)})))})))},sl(e,[{key:"rows",get:function(){return this._rows},set:function(t){this._rows=t}},{key:"length",get:function(){return this._length||this.rows.length},set:function(t){this._length=t}}]),e}(Wl),ic=function(){function t(){this.callbacks=void 0}var e=t.prototype;return e.init=function(t){this.callbacks||(this.callbacks={}),t&&!this.callbacks[t]&&(this.callbacks[t]=[])},e.on=function(t,e){return this.init(t),this.callbacks[t].push(e),this},e.off=function(t,e){var i=t;return this.init(),this.callbacks[i]&&0!==this.callbacks[i].length?(this.callbacks[i]=this.callbacks[i].filter((function(t){return t!=e})),this):this},e.emit=function(t){var e=arguments,i=t;return this.init(i),this.callbacks[i].length>0&&(this.callbacks[i].forEach((function(t){return t.apply(void 0,[].slice.call(e,1))})),!0)},t}();!function(t){t[t.Initiator=0]="Initiator",t[t.ServerFilter=1]="ServerFilter",t[t.ServerSort=2]="ServerSort",t[t.ServerLimit=3]="ServerLimit",t[t.Extractor=4]="Extractor",t[t.Transformer=5]="Transformer",t[t.Filter=6]="Filter",t[t.Sort=7]="Sort",t[t.Limit=8]="Limit"}(Ql||(Ql={}));var nc=function(t){function e(e){var i;return(i=t.call(this)||this).id=void 0,i._props=void 0,i._props={},i.id=ql(),e&&i.setProps(e),i}ll(e,t);var i=e.prototype;return i.process=function(){var t=[].slice.call(arguments);this.validateProps instanceof Function&&this.validateProps.apply(this,t),this.emit.apply(this,["beforeProcess"].concat(t));var e=this._process.apply(this,t);return this.emit.apply(this,["afterProcess"].concat(t)),e},i.setProps=function(t){return Object.assign(this._props,t),this.emit("propsUpdated",this),this},sl(e,[{key:"props",get:function(){return this._props}}]),e}(ic),rc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype._process=function(t){return this.props.keyword?(e=String(this.props.keyword).trim(),i=this.props.columns,n=this.props.ignoreHiddenColumns,r=t,o=this.props.selector,e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),new ec(r.rows.filter((function(t,r){return t.cells.some((function(t,s){if(!t)return!1;if(n&&i&&i[s]&&"object"==typeof i[s]&&i[s].hidden)return!1;var a="";if("function"==typeof o)a=o(t.data,r,s);else if("object"==typeof t.data){var l=t.data;l&&l.props&&l.props.content&&(a=l.props.content)}else a=String(t.data);return new RegExp(e,"gi").test(a)}))})))):t;var e,i,n,r,o},sl(e,[{key:"type",get:function(){return Ql.Filter}}]),e}(nc);function oc(){return""+"gridjs"+[].slice.call(arguments).reduce((function(t,e){return t+"-"+e}),"")}function sc(){return[].slice.call(arguments).filter((function(t){return t})).reduce((function(t,e){return(t||"")+" "+e}),"").trim()||null}var ac,lc=function(t){function e(e){var i;return(i=t.call(this)||this)._state=void 0,i.dispatcher=void 0,i.dispatcher=e,i._state=i.getInitialState(),e.register(i._handle.bind(hl(i))),i}ll(e,t);var i=e.prototype;return i._handle=function(t){this.handle(t.type,t.payload)},i.setState=function(t){var e=this._state;this._state=t,this.emit("updated",t,e)},sl(e,[{key:"state",get:function(){return this._state}}]),e}(ic),cc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.getInitialState=function(){return{keyword:null}},i.handle=function(t,e){"SEARCH_KEYWORD"===t&&this.search(e.keyword)},i.search=function(t){this.setState({keyword:t})},e}(lc),hc=function(){function t(t){this.dispatcher=void 0,this.dispatcher=t}return t.prototype.dispatch=function(t,e){this.dispatcher.dispatch({type:t,payload:e})},t}(),pc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype.search=function(t){this.dispatch("SEARCH_KEYWORD",{keyword:t})},e}(hc),dc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype._process=function(t){if(!this.props.keyword)return t;var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.keyword)),this.props.body&&(e.body=this.props.body(t.body,this.props.keyword)),al({},t,e)},sl(e,[{key:"type",get:function(){return Ql.ServerFilter}}]),e}(nc),uc=new(function(){function t(){}var e=t.prototype;return e.format=function(t,e){return"[Grid.js] ["+e.toUpperCase()+"]: "+t},e.error=function(t,e){void 0===e&&(e=!1);var i=this.format(t,"error");if(e)throw Error(i);console.error(i)},e.warn=function(t){console.warn(this.format(t,"warn"))},e.info=function(t){console.info(this.format(t,"info"))},t}()),gc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e}(Gl);!function(t){t[t.Header=0]="Header",t[t.Footer=1]="Footer",t[t.Cell=2]="Cell"}(ac||(ac={}));var fc=function(){function t(){this.plugins=void 0,this.plugins=[]}var e=t.prototype;return e.get=function(t){var e=this.plugins.filter((function(e){return e.id===t}));return e.length>0?e[0]:null},e.add=function(t){return t.id?null!==this.get(t.id)?(uc.error("Duplicate plugin ID: "+t.id),this):(this.plugins.push(t),this):(uc.error("Plugin ID cannot be empty"),this)},e.remove=function(t){return this.plugins.splice(this.plugins.indexOf(this.get(t)),1),this},e.list=function(t){return(null!=t||null!=t?this.plugins.filter((function(e){return e.position===t})):this.plugins).sort((function(t,e){return t.order-e.order}))},t}(),mc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype.render=function(){var t=this;if(this.props.pluginId){var e=this.config.plugin.get(this.props.pluginId);return e?zl(Sl,{},zl(e.component,al({plugin:e},e.props,this.props.props))):null}return void 0!==this.props.position?zl(Sl,{},this.config.plugin.list(this.props.position).map((function(e){return zl(e.component,al({plugin:e},e.props,t.props.props))}))):null},e}(Gl),vc=function(t){function e(e,i){var n;(n=t.call(this,e,i)||this).searchProcessor=void 0,n.actions=void 0,n.store=void 0,n.storeUpdatedFn=void 0,n.actions=new pc(n.config.dispatcher),n.store=new cc(n.config.dispatcher);var r,o=e.keyword;return e.enabled&&(o&&n.actions.search(o),n.storeUpdatedFn=n.storeUpdated.bind(hl(n)),n.store.on("updated",n.storeUpdatedFn),r=e.server?new dc({keyword:e.keyword,url:e.server.url,body:e.server.body}):new rc({keyword:e.keyword,columns:n.config.header&&n.config.header.columns,ignoreHiddenColumns:e.ignoreHiddenColumns||void 0===e.ignoreHiddenColumns,selector:e.selector}),n.searchProcessor=r,n.config.pipeline.register(r)),n}ll(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.searchProcessor),this.store.off("updated",this.storeUpdatedFn)},i.storeUpdated=function(t){this.searchProcessor.setProps({keyword:t.keyword})},i.onChange=function(t){this.actions.search(t.target.value)},i.render=function(){if(!this.props.enabled)return null;var t,e,i,n=this.onChange.bind(this);return this.searchProcessor instanceof dc&&(t=n,e=this.props.debounceTimeout,n=function(){var n=arguments;return new Promise((function(r){i&&clearTimeout(i),i=setTimeout((function(){return r(t.apply(void 0,[].slice.call(n)))}),e)}))}),zl("div",{className:oc(sc("search",this.config.className.search))},zl("input",{type:"search",placeholder:this._("search.placeholder"),"aria-label":this._("search.placeholder"),onInput:n,className:sc(oc("input"),oc("search","input")),value:this.store.state.keyword}))},e}(gc);vc.defaultProps={debounceTimeout:250};var bc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.validateProps=function(){if(isNaN(Number(this.props.limit))||isNaN(Number(this.props.page)))throw Error("Invalid parameters passed")},i._process=function(t){var e=this.props.page;return new ec(t.rows.slice(e*this.props.limit,(e+1)*this.props.limit))},sl(e,[{key:"type",get:function(){return Ql.Limit}}]),e}(nc),yc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.page,this.props.limit)),this.props.body&&(e.body=this.props.body(t.body,this.props.page,this.props.limit)),al({},t,e)},sl(e,[{key:"type",get:function(){return Ql.ServerLimit}}]),e}(nc),_c=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).processor=void 0,n.onUpdateFn=void 0,n.setTotalFromTabularFn=void 0,n.state={limit:e.limit,page:e.page||0,total:0},n}ll(e,t);var i=e.prototype;return i.componentWillMount=function(){var t,e=this;this.props.enabled&&(this.setTotalFromTabularFn=this.setTotalFromTabular.bind(this),this.props.server?(t=new yc({limit:this.state.limit,page:this.state.page,url:this.props.server.url,body:this.props.server.body}),this.config.pipeline.on("afterProcess",this.setTotalFromTabularFn)):(t=new bc({limit:this.state.limit,page:this.state.page})).on("beforeProcess",this.setTotalFromTabularFn),this.processor=t,this.config.pipeline.register(t),this.config.pipeline.on("error",(function(){e.setState({total:0,page:0})})))},i.setTotalFromTabular=function(t){this.setTotal(t.length)},i.onUpdate=function(t){this.props.resetPageOnUpdate&&t!==this.processor&&this.setPage(0)},i.componentDidMount=function(){this.onUpdateFn=this.onUpdate.bind(this),this.config.pipeline.on("updated",this.onUpdateFn)},i.componentWillUnmount=function(){this.config.pipeline.unregister(this.processor),this.config.pipeline.off("updated",this.onUpdateFn)},i.setPage=function(t){if(t>=this.pages||t<0||t===this.state.page)return null;this.setState({page:t}),this.processor.setProps({page:t})},i.setTotal=function(t){this.setState({total:t})},i.renderPages=function(){var t=this;if(this.props.buttonsCount<=0)return null;var e=Math.min(this.pages,this.props.buttonsCount),i=Math.min(this.state.page,Math.floor(e/2));return this.state.page+Math.floor(e/2)>=this.pages&&(i=e-(this.pages-this.state.page)),zl(Sl,null,this.pages>e&&this.state.page-i>0&&zl(Sl,null,zl("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,0),title:this._("pagination.firstPage"),"aria-label":this._("pagination.firstPage"),className:this.config.className.paginationButton},this._("1")),zl("button",{tabIndex:-1,className:sc(oc("spread"),this.config.className.paginationButton)},"...")),Array.from(Array(e).keys()).map((function(e){return t.state.page+(e-i)})).map((function(e){return zl("button",{tabIndex:0,role:"button",onClick:t.setPage.bind(t,e),className:sc(t.state.page===e?sc(oc("currentPage"),t.config.className.paginationButtonCurrent):null,t.config.className.paginationButton),title:t._("pagination.page",e+1),"aria-label":t._("pagination.page",e+1)},t._(""+(e+1)))})),this.pages>e&&this.pages>this.state.page+i+1&&zl(Sl,null,zl("button",{tabIndex:-1,className:sc(oc("spread"),this.config.className.paginationButton)},"..."),zl("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,this.pages-1),title:this._("pagination.page",this.pages),"aria-label":this._("pagination.page",this.pages),className:this.config.className.paginationButton},this._(""+this.pages))))},i.renderSummary=function(){return zl(Sl,null,this.props.summary&&this.state.total>0&&zl("div",{role:"status","aria-live":"polite",className:sc(oc("summary"),this.config.className.paginationSummary),title:this._("pagination.navigate",this.state.page+1,this.pages)},this._("pagination.showing")," ",zl("b",null,this._(""+(this.state.page*this.state.limit+1)))," ",this._("pagination.to")," ",zl("b",null,this._(""+Math.min((this.state.page+1)*this.state.limit,this.state.total)))," ",this._("pagination.of")," ",zl("b",null,this._(""+this.state.total))," ",this._("pagination.results")))},i.render=function(){return this.props.enabled?zl("div",{className:sc(oc("pagination"),this.config.className.pagination)},this.renderSummary(),zl("div",{className:oc("pages")},this.props.prevButton&&zl("button",{tabIndex:0,role:"button",disabled:0===this.state.page,onClick:this.setPage.bind(this,this.state.page-1),title:this._("pagination.previous"),"aria-label":this._("pagination.previous"),className:sc(this.config.className.paginationButton,this.config.className.paginationButtonPrev)},this._("pagination.previous")),this.renderPages(),this.props.nextButton&&zl("button",{tabIndex:0,role:"button",disabled:this.pages===this.state.page+1||0===this.pages,onClick:this.setPage.bind(this,this.state.page+1),title:this._("pagination.next"),"aria-label":this._("pagination.next"),className:sc(this.config.className.paginationButton,this.config.className.paginationButtonNext)},this._("pagination.next")))):null},sl(e,[{key:"pages",get:function(){return Math.ceil(this.state.total/this.state.limit)}}]),e}(gc);function wc(t,e){return"string"==typeof t?t.indexOf("%")>-1?e/100*parseInt(t,10):parseInt(t,10):t}function xc(t){return t?Math.floor(t)+"px":""}_c.defaultProps={summary:!0,nextButton:!0,prevButton:!0,buttonsCount:3,limit:10,resetPageOnUpdate:!0};var kc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).tableElement=void 0,n.tableClassName=void 0,n.tableStyle=void 0,n.tableElement=n.props.tableRef.current.base.cloneNode(!0),n.tableElement.style.position="absolute",n.tableElement.style.width="100%",n.tableElement.style.zIndex="-2147483640",n.tableElement.style.visibility="hidden",n.tableClassName=n.tableElement.className,n.tableStyle=n.tableElement.style.cssText,n}ll(e,t);var i=e.prototype;return i.widths=function(){this.tableElement.className=this.tableClassName+" "+oc("shadowTable"),this.tableElement.style.tableLayout="auto",this.tableElement.style.width="auto",this.tableElement.style.padding="0",this.tableElement.style.margin="0",this.tableElement.style.border="none",this.tableElement.style.outline="none";var t=Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){var i;return e.style.width=e.clientWidth+"px",al(((i={})[e.getAttribute("data-column-id")]={minWidth:e.clientWidth},i),t)}),{});return this.tableElement.className=this.tableClassName,this.tableElement.style.cssText=this.tableStyle,this.tableElement.style.tableLayout="auto",Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){return t[e.getAttribute("data-column-id")].width=e.clientWidth,t}),t)},i.render=function(){var t=this;return this.props.tableRef.current?zl("div",{ref:function(e){e&&e.appendChild(t.tableElement)}}):null},e}(Gl);function zc(t){if(!t)return"";var e=t.split(" ");return 1===e.length&&/([a-z][A-Z])+/g.test(t)?t:e.map((function(t,e){return 0==e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()})).join("")}var Ac=function(t){function e(){var e;return(e=t.call(this)||this)._columns=void 0,e._columns=[],e}ll(e,t);var i=e.prototype;return i.adjustWidth=function(t){var i=t.container,n=t.tableRef,r=t.tempRef,o=t.tempRef||!0;if(!i)return this;var s=i.clientWidth,a={current:null},l={};if(n.current&&o){var c=zl(kc,{tableRef:n});c.ref=a,Ul(c,r.current),l=a.current.widths()}for(var h,p=dl(e.tabularFormat(this.columns).reduce((function(t,e){return t.concat(e)}),[]));!(h=p()).done;){var d=h.value;d.columns&&d.columns.length>0||(!d.width&&o?d.id in l&&(d.width=xc(l[d.id].width),d.minWidth=xc(l[d.id].minWidth)):d.width=xc(wc(d.width,s)))}return n.current&&o&&Ul(null,r.current),this},i.setSort=function(t,e){for(var i,n=dl(e||this.columns||[]);!(i=n()).done;){var r=i.value;r.columns&&r.columns.length>0&&(r.sort={enabled:!1}),void 0===r.sort&&t.sort&&(r.sort={enabled:!0}),r.sort?"object"==typeof r.sort&&(r.sort=al({enabled:!0},r.sort)):r.sort={enabled:!1},r.columns&&this.setSort(t,r.columns)}},i.setFixedHeader=function(t,e){for(var i,n=dl(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.fixedHeader&&(r.fixedHeader=t.fixedHeader),r.columns&&this.setFixedHeader(t,r.columns)}},i.setResizable=function(t,e){for(var i,n=dl(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.resizable&&(r.resizable=t.resizable),r.columns&&this.setResizable(t,r.columns)}},i.setID=function(t){for(var e,i=dl(t||this.columns||[]);!(e=i()).done;){var n=e.value;n.id||"string"!=typeof n.name||(n.id=zc(n.name)),n.id||uc.error('Could not find a valid ID for one of the columns. Make sure a valid "id" is set for all columns.'),n.columns&&this.setID(n.columns)}},i.populatePlugins=function(t,e){for(var i,n=dl(e);!(i=n()).done;){var r=i.value;void 0!==r.plugin&&t.plugin.add(al({id:r.id,props:{}},r.plugin,{position:ac.Cell}))}},e.fromColumns=function(t){for(var i,n=new e,r=dl(t);!(i=r()).done;){var o=i.value;if("string"==typeof o||gl(o))n.columns.push({name:o});else if("object"==typeof o){var s=o;s.columns&&(s.columns=e.fromColumns(s.columns).columns),"object"==typeof s.plugin&&void 0===s.data&&(s.data=null),n.columns.push(o)}}return n},e.fromUserConfig=function(t){var i=new e;return t.from?i.columns=e.fromHTMLTable(t.from).columns:t.columns?i.columns=e.fromColumns(t.columns).columns:!t.data||"object"!=typeof t.data[0]||t.data[0]instanceof Array||(i.columns=Object.keys(t.data[0]).map((function(t){return{name:t}}))),i.columns.length?(i.setID(),i.setSort(t),i.setFixedHeader(t),i.setResizable(t),i.populatePlugins(t,i.columns),i):null},e.fromHTMLTable=function(t){for(var i,n=new e,r=dl(t.querySelector("thead").querySelectorAll("th"));!(i=r()).done;){var o=i.value;n.columns.push({name:o.innerHTML,width:o.width})}return n},e.tabularFormat=function(t){var e=[],i=t||[],n=[];if(i&&i.length){e.push(i);for(var r,o=dl(i);!(r=o()).done;){var s=r.value;s.columns&&s.columns.length&&(n=n.concat(s.columns))}n.length&&(e=e.concat(this.tabularFormat(n)))}return e},e.leafColumns=function(t){var e=[],i=t||[];if(i&&i.length)for(var n,r=dl(i);!(n=r()).done;){var o=n.value;o.columns&&0!==o.columns.length||e.push(o),o.columns&&(e=e.concat(this.leafColumns(o.columns)))}return e},e.maximumDepth=function(t){return this.tabularFormat([t]).length-1},sl(e,[{key:"columns",get:function(){return this._columns},set:function(t){this._columns=t}},{key:"visibleColumns",get:function(){return this._columns.filter((function(t){return!t.hidden}))}}]),e}(Wl),Sc=function(){function t(){this._callbacks=void 0,this._isDispatching=void 0,this._isHandled=void 0,this._isPending=void 0,this._lastID=void 0,this._pendingPayload=void 0,this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var e=t.prototype;return e.register=function(t){var e="ID_"+this._lastID++;return this._callbacks[e]=t,e},e.unregister=function(t){if(!this._callbacks[t])throw Error("Dispatcher.unregister(...): "+t+" does not map to a registered callback.");delete this._callbacks[t]},e.waitFor=function(t){if(!this._isDispatching)throw Error("Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var i=t[e];if(this._isPending[i]){if(!this._isHandled[i])throw Error("Dispatcher.waitFor(...): Circular dependency detected while ' +\n 'waiting for "+i+".")}else{if(!this._callbacks[i])throw Error("Dispatcher.waitFor(...): "+i+" does not map to a registered callback.");this._invokeCallback(i)}}},e.dispatch=function(t){if(this._isDispatching)throw Error("Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.");this._startDispatching(t);try{for(var e in this._callbacks)this._isPending[e]||this._invokeCallback(e)}finally{this._stopDispatching()}},e.isDispatching=function(){return this._isDispatching},e._invokeCallback=function(t){this._isPending[t]=!0,this._callbacks[t](this._pendingPayload),this._isHandled[t]=!0},e._startDispatching=function(t){for(var e in this._callbacks)this._isPending[e]=!1,this._isHandled[e]=!1;this._pendingPayload=t,this._isDispatching=!0},e._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},t}(),Cc=function(){},Ec=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.set(e),i}ll(e,t);var i=e.prototype;return i.get=function(){try{return Promise.resolve(this.data()).then((function(t){return{data:t,total:t.length}}))}catch(t){return Promise.reject(t)}},i.set=function(t){return t instanceof Array?this.data=function(){return t}:t instanceof Function&&(this.data=t),this},e}(Cc),Mc=function(t){function e(e){var i;return(i=t.call(this)||this).options=void 0,i.options=e,i}ll(e,t);var i=e.prototype;return i.handler=function(t){return"function"==typeof this.options.handle?this.options.handle(t):t.ok?t.json():(uc.error("Could not fetch data: "+t.status+" - "+t.statusText,!0),null)},i.get=function(t){var e=al({},this.options,t);return"function"==typeof e.data?e.data(e):fetch(e.url,e).then(this.handler.bind(this)).then((function(t){return{data:e.then(t),total:"function"==typeof e.total?e.total(t):void 0}}))},e}(Cc),Tc=function(){function t(){}return t.createFromUserConfig=function(t){var e=null;return t.data&&(e=new Ec(t.data)),t.from&&(e=new Ec(this.tableElementToArray(t.from)),t.from.style.display="none"),t.server&&(e=new Mc(t.server)),e||uc.error("Could not determine the storage type",!0),e},t.tableElementToArray=function(t){for(var e,i,n=[],r=dl(t.querySelector("tbody").querySelectorAll("tr"));!(e=r()).done;){for(var o,s=[],a=dl(e.value.querySelectorAll("td"));!(o=a()).done;){var l=o.value;1===l.childNodes.length&&l.childNodes[0].nodeType===Node.TEXT_NODE?s.push((i=l.innerHTML,(new DOMParser).parseFromString(i,"text/html").documentElement.textContent)):s.push(Kl(l.innerHTML))}n.push(s)}return n},t}(),Lc="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Hc(t,e,i){if(!t.s){if(i instanceof $c){if(!i.s)return void(i.o=Hc.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then(Hc.bind(null,t,e),Hc.bind(null,t,2));t.s=e,t.v=i;var n=t.o;n&&n(t)}}var $c=function(){function t(){}return t.prototype.then=function(e,i){var n=new t,r=this.s;if(r){var o=1&r?e:i;if(o){try{Hc(n,1,o(this.v))}catch(t){Hc(n,2,t)}return n}return this}return this.o=function(t){try{var r=t.v;1&t.s?Hc(n,1,e?e(r):r):i?Hc(n,1,i(r)):Hc(n,2,r)}catch(t){Hc(n,2,t)}},n},t}();function Oc(t){return t instanceof $c&&1&t.s}var Vc,Rc=function(t){function e(e){var i;return(i=t.call(this)||this)._steps=new Map,i.cache=new Map,i.lastProcessorIndexUpdated=-1,e&&e.forEach((function(t){return i.register(t)})),i}ll(e,t);var i=e.prototype;return i.clearCache=function(){this.cache=new Map,this.lastProcessorIndexUpdated=-1},i.register=function(t,e){if(void 0===e&&(e=null),null===t.type)throw Error("Processor type is not defined");t.on("propsUpdated",this.processorPropsUpdated.bind(this)),this.addProcessorByPriority(t,e),this.afterRegistered(t)},i.unregister=function(t){if(t){var e=this._steps.get(t.type);e&&e.length&&(this._steps.set(t.type,e.filter((function(e){return e!=t}))),this.emit("updated",t))}},i.addProcessorByPriority=function(t,e){var i=this._steps.get(t.type);if(!i){var n=[];this._steps.set(t.type,n),i=n}if(null===e||e<0)i.push(t);else if(i[e]){var r=i.slice(0,e-1),o=i.slice(e+1);this._steps.set(t.type,r.concat(t).concat(o))}else i[e]=t},i.getStepsByType=function(t){return this.steps.filter((function(e){return e.type===t}))},i.getSortedProcessorTypes=function(){return Object.keys(Ql).filter((function(t){return!isNaN(Number(t))})).map((function(t){return Number(t)}))},i.process=function(t){try{var e=this,i=function(t){return e.lastProcessorIndexUpdated=r.length,e.emit("afterProcess",o),o},n=e.lastProcessorIndexUpdated,r=e.steps,o=t,s=function(t,i){try{var s=function(t,e,i){if("function"==typeof t[Lc]){var n,r,o,s=t[Lc]();if(function t(i){try{for(;!(n=s.next()).done;)if((i=e(n.value))&&i.then){if(!Oc(i))return void i.then(t,o||(o=Hc.bind(null,r=new $c,2)));i=i.v}r?Hc(r,1,i):r=i}catch(t){Hc(r||(r=new $c),2,t)}}(),s.return){var a=function(t){try{n.done||s.return()}catch(t){}return t};if(r&&r.then)return r.then(a,(function(t){throw a(t)}));a()}return r}if(!("length"in t))throw new TypeError("Object is not iterable");for(var l=[],c=0;c<t.length;c++)l.push(t[c]);return function(t,e,i){var n,r,o=-1;return function i(s){try{for(;++o<t.length;)if((s=e(o))&&s.then){if(!Oc(s))return void s.then(i,r||(r=Hc.bind(null,n=new $c,2)));s=s.v}n?Hc(n,1,s):n=s}catch(t){Hc(n||(n=new $c),2,t)}}(),n}(l,(function(t){return e(l[t])}))}(r,(function(t){var i=e.findProcessorIndexByID(t.id),r=function(){if(i>=n)return Promise.resolve(t.process(o)).then((function(i){e.cache.set(t.id,o=i)}));o=e.cache.get(t.id)}();if(r&&r.then)return r.then((function(){}))}))}catch(t){return i(t)}return s&&s.then?s.then(void 0,i):s}(0,(function(t){throw uc.error(t),e.emit("error",o),t}));return Promise.resolve(s&&s.then?s.then(i):i())}catch(t){return Promise.reject(t)}},i.findProcessorIndexByID=function(t){return this.steps.findIndex((function(e){return e.id==t}))},i.setLastProcessorIndex=function(t){var e=this.findProcessorIndexByID(t.id);this.lastProcessorIndexUpdated>e&&(this.lastProcessorIndexUpdated=e)},i.processorPropsUpdated=function(t){this.setLastProcessorIndex(t),this.emit("propsUpdated"),this.emit("updated",t)},i.afterRegistered=function(t){this.setLastProcessorIndex(t),this.emit("afterRegister"),this.emit("updated",t)},sl(e,[{key:"steps",get:function(){for(var t,e=[],i=dl(this.getSortedProcessorTypes());!(t=i()).done;){var n=this._steps.get(t.value);n&&n.length&&(e=e.concat(n))}return e.filter((function(t){return t}))}}]),e}(ic),Pc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype._process=function(t){try{return Promise.resolve(this.props.storage.get(t))}catch(t){return Promise.reject(t)}},sl(e,[{key:"type",get:function(){return Ql.Extractor}}]),e}(nc),Ic=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype._process=function(t){var e=ec.fromArray(t.data);return e.length=t.total,e},sl(e,[{key:"type",get:function(){return Ql.Transformer}}]),e}(nc),Dc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype._process=function(){return Object.entries(this.props.serverStorageOptions).filter((function(t){return"function"!=typeof t[1]})).reduce((function(t,e){var i;return al({},t,((i={})[e[0]]=e[1],i))}),{})},sl(e,[{key:"type",get:function(){return Ql.Initiator}}]),e}(nc),Nc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.castData=function(t){if(!t||!t.length)return[];if(!this.props.header||!this.props.header.columns)return t;var e=Ac.leafColumns(this.props.header.columns);return t[0]instanceof Array?t.map((function(t){var i=0;return e.map((function(e,n){return void 0!==e.data?(i++,"function"==typeof e.data?e.data(t):e.data):t[n-i]}))})):"object"!=typeof t[0]||t[0]instanceof Array?[]:t.map((function(t){return e.map((function(e,i){return void 0!==e.data?"function"==typeof e.data?e.data(t):e.data:e.id?t[e.id]:(uc.error("Could not find the correct cell for column at position "+i+".\n Make sure either 'id' or 'selector' is defined for all columns."),null)}))}))},i._process=function(t){return{data:this.castData(t.data),total:t.total}},sl(e,[{key:"type",get:function(){return Ql.Transformer}}]),e}(nc),Fc=function(){function t(){}return t.createFromConfig=function(t){var e=new Rc;return t.storage instanceof Mc&&e.register(new Dc({serverStorageOptions:t.server})),e.register(new Pc({storage:t.storage})),e.register(new Nc({header:t.header})),e.register(new Ic),e},t}(),Bc=function(){function t(e){this._userConfig=void 0,Object.assign(this,al({},t.defaultConfig(),e)),this._userConfig={}}var e=t.prototype;return e.assign=function(t){for(var e=0,i=Object.keys(t);e<i.length;e++){var n=i[e];"_userConfig"!==n&&(this[n]=t[n])}return this},e.update=function(e){return e?(this._userConfig=al({},this._userConfig,e),this.assign(t.fromUserConfig(this._userConfig)),this):this},t.defaultConfig=function(){return{plugin:new fc,dispatcher:new Sc,tableRef:{current:null},tempRef:{current:null},width:"100%",height:"auto",autoWidth:!0,style:{},className:{}}},t.fromUserConfig=function(e){var i=new t(e);return i._userConfig=e,"boolean"==typeof e.sort&&e.sort&&i.assign({sort:{multiColumn:!0}}),i.assign({header:Ac.fromUserConfig(i)}),i.assign({storage:Tc.createFromUserConfig(e)}),i.assign({pipeline:Fc.createFromConfig(i)}),i.assign({translator:new Xl(e.language)}),i.plugin.add({id:"search",position:ac.Header,component:vc,props:al({enabled:!0===e.search||e.search instanceof Object},e.search)}),i.plugin.add({id:"pagination",position:ac.Footer,component:_c,props:al({enabled:!0===e.pagination||e.pagination instanceof Object},e.pagination)}),e.plugins&&e.plugins.forEach((function(t){return i.plugin.add(t)})),i},t}();!function(t){t[t.Init=0]="Init",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Rendered=3]="Rendered",t[t.Error=4]="Error"}(Vc||(Vc={}));var jc,Uc,qc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.content=function(){return this.props.column&&"function"==typeof this.props.column.formatter?this.props.column.formatter(this.props.cell.data,this.props.row,this.props.column):this.props.column&&this.props.column.plugin?zl(mc,{pluginId:this.props.column.id,props:{column:this.props.column,cell:this.props.cell,row:this.props.row}}):this.props.cell.data},i.handleClick=function(t){this.props.messageCell||this.config.eventEmitter.emit("cellClick",t,this.props.cell,this.props.column,this.props.row)},i.getCustomAttributes=function(t){return t?"function"==typeof t.attributes?t.attributes(this.props.cell.data,this.props.row,this.props.column):t.attributes:{}},i.render=function(){return zl("td",al({role:this.props.role,colSpan:this.props.colSpan,"data-column-id":this.props.column&&this.props.column.id,className:sc(oc("td"),this.props.className,this.config.className.td),style:al({},this.props.style,this.config.style.td),onClick:this.handleClick.bind(this)},this.getCustomAttributes(this.props.column)),this.content())},e}(Gl),Wc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.getColumn=function(t){if(this.props.header){var e=Ac.leafColumns(this.props.header.columns);if(e)return e[t]}return null},i.handleClick=function(t){this.props.messageRow||this.config.eventEmitter.emit("rowClick",t,this.props.row)},i.getChildren=function(){var t=this;return this.props.children?this.props.children:zl(Sl,null,this.props.row.cells.map((function(e,i){var n=t.getColumn(i);return n&&n.hidden?null:zl(qc,{key:e.id,cell:e,row:t.props.row,column:n})})))},i.render=function(){return zl("tr",{className:sc(oc("tr"),this.config.className.tr),onClick:this.handleClick.bind(this)},this.getChildren())},e}(Gl),Yc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype.render=function(){return zl(Wc,{messageRow:!0},zl(qc,{role:"alert",colSpan:this.props.colSpan,messageCell:!0,cell:new Jl(this.props.message),className:sc(oc("message"),this.props.className?this.props.className:null)}))},e}(Gl),Xc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.headerLength=function(){return this.props.header?this.props.header.visibleColumns.length:0},i.render=function(){var t=this;return zl("tbody",{className:sc(oc("tbody"),this.config.className.tbody)},this.props.data&&this.props.data.rows.map((function(e){return zl(Wc,{key:e.id,row:e,header:t.props.header})})),this.props.status===Vc.Loading&&(!this.props.data||0===this.props.data.length)&&zl(Yc,{message:this._("loading"),colSpan:this.headerLength(),className:sc(oc("loading"),this.config.className.loading)}),this.props.status===Vc.Rendered&&this.props.data&&0===this.props.data.length&&zl(Yc,{message:this._("noRecordsFound"),colSpan:this.headerLength(),className:sc(oc("notfound"),this.config.className.notfound)}),this.props.status===Vc.Error&&zl(Yc,{message:this._("error"),colSpan:this.headerLength(),className:sc(oc("error"),this.config.className.error)}))},e}(Gl),Gc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.validateProps=function(){for(var t,e=dl(this.props.columns);!(t=e()).done;){var i=t.value;void 0===i.direction&&(i.direction=1),1!==i.direction&&-1!==i.direction&&uc.error("Invalid sort direction "+i.direction)}},i.compare=function(t,e){return t>e?1:t<e?-1:0},i.compareWrapper=function(t,e){for(var i,n=0,r=dl(this.props.columns);!(i=r()).done;){var o=i.value;if(0!==n)break;var s=t.cells[o.index].data,a=e.cells[o.index].data;n|="function"==typeof o.compare?o.compare(s,a)*o.direction:this.compare(s,a)*o.direction}return n},i._process=function(t){var e=[].concat(t.rows);e.sort(this.compareWrapper.bind(this));var i=new ec(e);return i.length=t.length,i},sl(e,[{key:"type",get:function(){return Ql.Sort}}]),e}(nc),Zc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.getInitialState=function(){return[]},i.handle=function(t,e){"SORT_COLUMN"===t?this.sortColumn(e.index,e.direction,e.multi,e.compare):"SORT_COLUMN_TOGGLE"===t&&this.sortToggle(e.index,e.multi,e.compare)},i.sortToggle=function(t,e,i){var n=[].concat(this.state).find((function(e){return e.index===t}));this.sortColumn(t,n&&1===n.direction?-1:1,e,i)},i.sortColumn=function(t,e,i,n){var r=[].concat(this.state),o=r.length,s=r.find((function(e){return e.index===t})),a=!1,l=!1,c=!1,h=!1;if(void 0!==s?i?-1===s.direction?c=!0:h=!0:1===o?h=!0:o>1&&(l=!0,a=!0):0===o?a=!0:o>0&&!i?(a=!0,l=!0):o>0&&i&&(a=!0),l&&(r=[]),a)r.push({index:t,direction:e,compare:n});else if(h){var p=r.indexOf(s);r[p].direction=e}else if(c){var d=r.indexOf(s);r.splice(d,1)}this.setState(r)},e}(lc),Kc=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.sortColumn=function(t,e,i,n){this.dispatch("SORT_COLUMN",{index:t,direction:e,multi:i,compare:n})},i.sortToggle=function(t,e,i){this.dispatch("SORT_COLUMN_TOGGLE",{index:t,multi:e,compare:i})},e}(hc),Qc=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.columns)),this.props.body&&(e.body=this.props.body(t.body,this.props.columns)),al({},t,e)},sl(e,[{key:"type",get:function(){return Ql.ServerSort}}]),e}(nc),Jc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortProcessor=void 0,n.actions=void 0,n.store=void 0,n.updateStateFn=void 0,n.updateSortProcessorFn=void 0,n.actions=new Kc(n.config.dispatcher),n.store=new Zc(n.config.dispatcher),e.enabled&&(n.sortProcessor=n.getOrCreateSortProcessor(),n.updateStateFn=n.updateState.bind(hl(n)),n.store.on("updated",n.updateStateFn),n.state={direction:0}),n}ll(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.sortProcessor),this.store.off("updated",this.updateStateFn),this.updateSortProcessorFn&&this.store.off("updated",this.updateSortProcessorFn)},i.updateState=function(){var t=this,e=this.store.state.find((function(e){return e.index===t.props.index}));this.setState(e?{direction:e.direction}:{direction:0})},i.updateSortProcessor=function(t){this.sortProcessor.setProps({columns:t})},i.getOrCreateSortProcessor=function(){var t=Ql.Sort;this.config.sort&&"object"==typeof this.config.sort.server&&(t=Ql.ServerSort);var e,i=this.config.pipeline.getStepsByType(t);return i.length>0?e=i[0]:(this.updateSortProcessorFn=this.updateSortProcessor.bind(this),this.store.on("updated",this.updateSortProcessorFn),e=t===Ql.ServerSort?new Qc(al({columns:this.store.state},this.config.sort.server)):new Gc({columns:this.store.state}),this.config.pipeline.register(e)),e},i.changeDirection=function(t){t.preventDefault(),t.stopPropagation(),this.actions.sortToggle(this.props.index,!0===t.shiftKey&&this.config.sort.multiColumn,this.props.compare)},i.render=function(){if(!this.props.enabled)return null;var t=this.state.direction,e="neutral";return 1===t?e="asc":-1===t&&(e="desc"),zl("button",{tabIndex:-1,"aria-label":this._("sort.sort"+(1===t?"Desc":"Asc")),title:this._("sort.sort"+(1===t?"Desc":"Asc")),className:sc(oc("sort"),oc("sort",e),this.config.className.sort),onClick:this.changeDirection.bind(this)})},e}(Gl),th=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).moveFn=void 0,e.upFn=void 0,e}ll(e,t);var i=e.prototype;return i.getPageX=function(t){return t instanceof MouseEvent?Math.floor(t.pageX):Math.floor(t.changedTouches[0].pageX)},i.start=function(t){var e,i,n,r,o;t.stopPropagation(),this.setState({offsetStart:parseInt(this.props.thRef.current.style.width,10)-this.getPageX(t)}),this.upFn=this.end.bind(this),this.moveFn=(e=this.move.bind(this),void 0===(i=10)&&(i=100),function(){var t=[].slice.call(arguments);n?(clearTimeout(r),r=setTimeout((function(){Date.now()-o>=i&&(e.apply(void 0,t),o=Date.now())}),Math.max(i-(Date.now()-o),0))):(e.apply(void 0,t),o=Date.now(),n=!0)}),document.addEventListener("mouseup",this.upFn),document.addEventListener("touchend",this.upFn),document.addEventListener("mousemove",this.moveFn),document.addEventListener("touchmove",this.moveFn)},i.move=function(t){t.stopPropagation();var e=this.props.thRef.current;this.state.offsetStart+this.getPageX(t)>=parseInt(e.style.minWidth,10)&&(e.style.width=this.state.offsetStart+this.getPageX(t)+"px")},i.end=function(t){t.stopPropagation(),document.removeEventListener("mouseup",this.upFn),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("touchmove",this.moveFn),document.removeEventListener("touchend",this.upFn)},i.render=function(){return zl("div",{className:sc(oc("th"),oc("resizable")),onMouseDown:this.start.bind(this),onTouchStart:this.start.bind(this),onClick:function(t){return t.stopPropagation()}})},e}(Gl),eh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortRef={current:null},n.thRef={current:null},n.state={style:{}},n}ll(e,t);var i=e.prototype;return i.isSortable=function(){return this.props.column.sort.enabled},i.isResizable=function(){return this.props.column.resizable},i.onClick=function(t){t.stopPropagation(),this.isSortable()&&this.sortRef.current.changeDirection(t)},i.keyDown=function(t){this.isSortable()&&13===t.which&&this.onClick(t)},i.componentDidMount=function(){var t=this;setTimeout((function(){if(t.props.column.fixedHeader&&t.thRef.current){var e=t.thRef.current.offsetTop;"number"==typeof e&&t.setState({style:{top:e}})}}),0)},i.content=function(){return void 0!==this.props.column.name?this.props.column.name:void 0!==this.props.column.plugin?zl(mc,{pluginId:this.props.column.plugin.id,props:{column:this.props.column}}):null},i.getCustomAttributes=function(){var t=this.props.column;return t?"function"==typeof t.attributes?t.attributes(null,null,this.props.column):t.attributes:{}},i.render=function(){var t={};return this.isSortable()&&(t.tabIndex=0),zl("th",al({ref:this.thRef,"data-column-id":this.props.column&&this.props.column.id,className:sc(oc("th"),this.isSortable()?oc("th","sort"):null,this.props.column.fixedHeader?oc("th","fixed"):null,this.config.className.th),onClick:this.onClick.bind(this),style:al({},this.config.style.th,{minWidth:this.props.column.minWidth,width:this.props.column.width},this.state.style,this.props.style),onKeyDown:this.keyDown.bind(this),rowSpan:this.props.rowSpan>1?this.props.rowSpan:void 0,colSpan:this.props.colSpan>1?this.props.colSpan:void 0},this.getCustomAttributes(),t),zl("div",{className:oc("th","content")},this.content()),this.isSortable()&&zl(Jc,al({ref:this.sortRef,index:this.props.index},this.props.column.sort)),this.isResizable()&&this.props.index<this.config.header.visibleColumns.length-1&&zl(th,{column:this.props.column,thRef:this.thRef}))},e}(Gl),ih=function(t){function e(){return t.apply(this,arguments)||this}ll(e,t);var i=e.prototype;return i.renderColumn=function(t,e,i,n){var r=function(t,e,i){var n=Ac.maximumDepth(t),r=i-e;return{rowSpan:Math.floor(r-n-n/r),colSpan:t.columns&&t.columns.length||1}}(t,e,n);return zl(eh,{column:t,index:i,colSpan:r.colSpan,rowSpan:r.rowSpan})},i.renderRow=function(t,e,i){var n=this,r=Ac.leafColumns(this.props.header.columns);return zl(Wc,null,t.map((function(t){return t.hidden?null:n.renderColumn(t,e,r.indexOf(t),i)})))},i.renderRows=function(){var t=this,e=Ac.tabularFormat(this.props.header.columns);return e.map((function(i,n){return t.renderRow(i,n,e.length)}))},i.render=function(){return this.props.header?zl("thead",{key:this.props.header.id,className:sc(oc("thead"),this.config.className.thead)},this.renderRows()):null},e}(Gl),nh=function(t){function e(){return t.apply(this,arguments)||this}return ll(e,t),e.prototype.render=function(){return zl("table",{role:"grid",className:sc(oc("table"),this.config.className.table),style:al({},this.config.style.table,{height:this.props.height})},zl(ih,{header:this.props.header}),zl(Xc,{data:this.props.data,status:this.props.status,header:this.props.header}))},e}(Gl),rh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).headerRef={current:null},n.state={isActive:!0},n}ll(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.headerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?zl("div",{ref:this.headerRef,className:sc(oc("head"),this.config.className.header),style:al({},this.config.style.header)},zl(mc,{position:ac.Header})):null},e}(Gl),oh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).footerRef={current:null},n.state={isActive:!0},n}ll(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.footerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?zl("div",{ref:this.footerRef,className:sc(oc("footer"),this.config.className.footer),style:al({},this.config.style.footer)},zl(mc,{position:ac.Footer})):null},e}(Gl),sh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).configContext=void 0,n.processPipelineFn=void 0,n.configContext=function(t,e){var i={__c:e="__cC"+bl++,__:null,Consumer:function(t,e){return t.children(e)},Provider:function(t){var i,n;return this.getChildContext||(i=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&i.some(Tl)},this.sub=function(t){i.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){i.splice(i.indexOf(t),1),e&&e.call(t)}}),t.children}};return i.Provider.__=i.Consumer.contextType=i}(),n.state={status:Vc.Loading,header:e.header,data:null},n}ll(e,t);var i=e.prototype;return i.processPipeline=function(){try{var t=this;t.props.config.eventEmitter.emit("beforeLoad"),t.setState({status:Vc.Loading});var e=function(e,i){try{var n=Promise.resolve(t.props.pipeline.process()).then((function(e){t.setState({data:e,status:Vc.Loaded}),t.props.config.eventEmitter.emit("load",e)}))}catch(t){return i(t)}return n&&n.then?n.then(void 0,i):n}(0,(function(e){uc.error(e),t.setState({status:Vc.Error,data:null})}));return Promise.resolve(e&&e.then?e.then((function(){})):void 0)}catch(t){return Promise.reject(t)}},i.componentDidMount=function(){try{var t=this,e=t.props.config;return Promise.resolve(t.processPipeline()).then((function(){e.header&&t.state.data&&t.state.data.length&&t.setState({header:e.header.adjustWidth(e)}),t.processPipelineFn=t.processPipeline.bind(t),t.props.pipeline.on("updated",t.processPipelineFn)}))}catch(t){return Promise.reject(t)}},i.componentWillUnmount=function(){this.props.pipeline.off("updated",this.processPipelineFn)},i.componentDidUpdate=function(t,e){e.status!=Vc.Rendered&&this.state.status==Vc.Loaded&&(this.setState({status:Vc.Rendered}),this.props.config.eventEmitter.emit("ready"))},i.render=function(){return zl(this.configContext.Provider,{value:this.props.config},zl("div",{role:"complementary",className:sc("gridjs",oc("container"),this.state.status===Vc.Loading?oc("loading"):null,this.props.config.className.container),style:al({},this.props.config.style.container,{width:this.props.width})},this.state.status===Vc.Loading&&zl("div",{className:oc("loading-bar")}),zl(rh,null),zl("div",{className:oc("wrapper"),style:{height:this.props.height}},zl(nh,{ref:this.props.config.tableRef,data:this.state.data,header:this.state.header,width:this.props.width,height:this.props.height,status:this.state.status})),zl(oh,null),zl("div",{ref:this.props.config.tempRef,id:"gridjs-temp",className:oc("temp")})))},e}(Gl),ah=function(t){function e(e){var i;return(i=t.call(this)||this).config=void 0,i.plugin=void 0,i.config=new Bc({instance:hl(i),eventEmitter:hl(i)}).update(e),i.plugin=i.config.plugin,i}ll(e,t);var i=e.prototype;return i.updateConfig=function(t){return this.config.update(t),this},i.createElement=function(){return zl(sh,{config:this.config,pipeline:this.config.pipeline,header:this.config.header,width:this.config.width,height:this.config.height})},i.forceRender=function(){return this.config&&this.config.container||uc.error("Container is empty. Make sure you call render() before forceRender()",!0),this.config.pipeline.clearCache(),Ul(null,this.config.container),Ul(this.createElement(),this.config.container),this},i.render=function(t){return t||uc.error("Container element cannot be null",!0),t.childNodes.length>0?(uc.error("The container element "+t+" is not empty. Make sure the container is empty and call render() again"),this):(this.config.container=t,Ul(this.createElement(),t),this)},e}(ic),lh=[],ch=ul.__b,hh=ul.__r,ph=ul.diffed,dh=ul.__c,uh=ul.unmount;function gh(){lh.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(mh),t.__H.__h.forEach(vh),t.__H.__h=[]}catch(e){t.__H.__h=[],ul.__e(e,t.__v)}})),lh=[]}ul.__b=function(t){jc=null,ch&&ch(t)},ul.__r=function(t){hh&&hh(t),0;var e=(jc=t.__c).__H;e&&(e.__h.forEach(mh),e.__h.forEach(vh),e.__h=[])},ul.diffed=function(t){ph&&ph(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==lh.push(e)&&Uc===ul.requestAnimationFrame||((Uc=ul.requestAnimationFrame)||function(t){var e,i=function(){clearTimeout(n),fh&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(i,100);fh&&(e=requestAnimationFrame(i))})(gh)),jc=void 0},ul.__c=function(t,e){e.some((function(t){try{t.__h.forEach(mh),t.__h=t.__h.filter((function(t){return!t.__||vh(t)}))}catch(i){e.some((function(t){t.__h&&(t.__h=[])})),e=[],ul.__e(i,t.__v)}})),dh&&dh(t,e)},ul.unmount=function(t){uh&&uh(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(mh)}catch(t){ul.__e(t,e.__v)}};var fh="function"==typeof requestAnimationFrame;function mh(t){var e=jc;"function"==typeof t.__c&&t.__c(),jc=e}function vh(t){var e=jc;t.__c=t.__(),jc=e}class bh extends O{static get properties(){return Object.assign({label:{type:String},property:{type:String},sort:{type:Boolean},width:{type:String}},super.properties)}constructor(){super(),this.label="no-label",this.property=null,this.sort=!1,this.width=null}connectedCallback(){super.connectedCallback()}data(){const t={name:this.label,sort:{enabled:this.sort},formatter:t=>Kl(t)};return this.property&&(t.id=this.property),this.width&&(t.width=this.width),t}}customElements.define("pb-table-column",bh);class yh extends(I(O)){static get properties(){return Object.assign({source:{type:String},cssPath:{type:String,attribute:"css-path"},resizable:{type:Boolean},perPage:{type:Number,attribute:"per-page"},height:{type:String},search:{type:Boolean},_params:{type:Object}},super.properties)}constructor(){super(),this.cssPath="../css/gridjs",this._params={},this.resizable=!1,this.search=!1,this.perPage=10,this.height=null,this.fixedHeader=!1}connectedCallback(){if(super.connectedCallback(),this.subscribeTo("pb-search-resubmit",t=>{this._params=Object.assign({},t.detail.params),this._submit()}),window.addEventListener("popstate",t=>{this._params=t.state,this._submit()}),!this.height){const t=getComputedStyle(this).getPropertyValue("--pb-table-grid-height");this.height=t||"auto"}}firstUpdated(){const t=this.shadowRoot.getElementById("table"),e=this.querySelectorAll("pb-table-column"),i=[];e.forEach(t=>i.push(t.data())),yh.waitOnce("pb-page-ready",()=>{this._params=this.getParameters();const e=this.toAbsoluteURL(this.source),n={height:this.height,fixedHeader:!0,columns:i,resizable:this.resizable,server:{url:e,then:t=>t.results,total:t=>t.count},sort:{multiColumn:!1,enabled:!0,server:{url:(t,e)=>{if(!e.length)return t;const n=e[0];return`${t}${t.indexOf("?")>-1?"&":"?"}order=${i[n.index].id}&dir=${1===n.direction?"asc":"desc"}`}}},pagination:{enabled:!0,limit:this.perPage,server:{url:(t,e,i)=>{const n=this.shadowRoot.getElementById("form");return n&&Object.assign(this._params,n.serializeForm()),this._params.limit=i,this._params.start=e*i+1,this.setParameters(this._params),this.pushHistory("grid",this._params),`${t}${t.indexOf("?")>-1?"&":"?"}${new URLSearchParams(this._params).toString()}`}}}};this.grid=new ah(n),this.grid.on("load",()=>{this.emitTo("pb-results-received",{params:this._params})}),this.grid.render(t)})}_submit(){this.grid.forceRender()}render(){const t=R(this.cssPath);return V`
|
|
4230
|
+
`}}function sl(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function al(t,e,i){return e&&sl(t.prototype,e),i&&sl(t,i),t}function ll(){return(ll=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function cl(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,hl(t,e)}function hl(t,e){return(hl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dl(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function ul(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return dl(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?dl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}customElements.define("pb-blacklab-highlight",ol);var gl,fl,ml,vl,bl,yl,_l={},wl=[],xl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function kl(t,e){for(var i in e)t[i]=e[i];return t}function zl(t){var e=t.parentNode;e&&e.removeChild(t)}function Al(t,e,i){var n,r,o,s=arguments,a={};for(o in e)"key"==o?n=e[o]:"ref"==o?r=e[o]:a[o]=e[o];if(arguments.length>3)for(i=[i],o=3;o<arguments.length;o++)i.push(s[o]);if(null!=i&&(a.children=i),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===a[o]&&(a[o]=t.defaultProps[o]);return Sl(t,a,n,r,null)}function Sl(t,e,i,n,r){var o={type:t,props:e,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++gl.__v:r};return null!=gl.vnode&&gl.vnode(o),o}function Cl(t){return t.children}function El(t,e){this.props=t,this.context=e}function Ml(t,e){if(null==e)return t.__?Ml(t.__,t.__.__k.indexOf(t)+1):null;for(var i;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e)return i.__e;return"function"==typeof t.type?Ml(t):null}function Tl(t){var e,i;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(i=t.__k[e])&&null!=i.__e){t.__e=t.__c.base=i.__e;break}return Tl(t)}}function Ll(t){(!t.__d&&(t.__d=!0)&&ml.push(t)&&!Hl.__r++||bl!==gl.debounceRendering)&&((bl=gl.debounceRendering)||vl)(Hl)}function Hl(){for(var t;Hl.__r=ml.length;)t=ml.sort((function(t,e){return t.__v.__b-e.__v.__b})),ml=[],t.some((function(t){var e,i,n,r,o,s;t.__d&&(o=(r=(e=t).__v).__e,(s=e.__P)&&(i=[],(n=kl({},r)).__v=r.__v+1,Nl(s,r,n,e.__n,void 0!==s.ownerSVGElement,null!=r.__h?[o]:null,i,null==o?Ml(r):o,r.__h),Fl(i,r),r.__e!=o&&Tl(r)))}))}function $l(t,e,i,n,r,o,s,a,l,c){var h,p,d,u,g,f,m,v=n&&n.__k||wl,b=v.length;for(i.__k=[],h=0;h<e.length;h++)if(null!=(u=i.__k[h]=null==(u=e[h])||"boolean"==typeof u?null:"string"==typeof u||"number"==typeof u||"bigint"==typeof u?Sl(null,u,null,null,u):Array.isArray(u)?Sl(Cl,{children:u},null,null,null):u.__b>0?Sl(u.type,u.props,u.key,null,u.__v):u)){if(u.__=i,u.__b=i.__b+1,null===(d=v[h])||d&&u.key==d.key&&u.type===d.type)v[h]=void 0;else for(p=0;p<b;p++){if((d=v[p])&&u.key==d.key&&u.type===d.type){v[p]=void 0;break}d=null}Nl(t,u,d=d||_l,r,o,s,a,l,c),g=u.__e,(p=u.ref)&&d.ref!=p&&(m||(m=[]),d.ref&&m.push(d.ref,null,u),m.push(p,u.__c||g,u)),null!=g?(null==f&&(f=g),"function"==typeof u.type&&null!=u.__k&&u.__k===d.__k?u.__d=l=Ol(u,l,t):l=Vl(t,u,d,v,g,l),c||"option"!==i.type?"function"==typeof i.type&&(i.__d=l):t.value=""):l&&d.__e==l&&l.parentNode!=t&&(l=Ml(d))}for(i.__e=f,h=b;h--;)null!=v[h]&&("function"==typeof i.type&&null!=v[h].__e&&v[h].__e==i.__d&&(i.__d=Ml(n,h+1)),jl(v[h],v[h]));if(m)for(h=0;h<m.length;h++)Bl(m[h],m[++h],m[++h])}function Ol(t,e,i){var n,r;for(n=0;n<t.__k.length;n++)(r=t.__k[n])&&(r.__=t,e="function"==typeof r.type?Ol(r,e,i):Vl(i,r,r,t.__k,r.__e,e));return e}function Vl(t,e,i,n,r,o){var s,a,l;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==i||r!=o||null==r.parentNode)t:if(null==o||o.parentNode!==t)t.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<n.length;l+=2)if(a==r)break t;t.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function Rl(t,e,i){"-"===e[0]?t.setProperty(e,i):t[e]=null==i?"":"number"!=typeof i||xl.test(e)?i:i+"px"}function Pl(t,e,i,n,r){var o;t:if("style"===e)if("string"==typeof i)t.style.cssText=i;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)i&&e in i||Rl(t.style,e,"");if(i)for(e in i)n&&i[e]===n[e]||Rl(t.style,e,i[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=i,i?n||t.addEventListener(e,o?Dl:Il,o):t.removeEventListener(e,o?Dl:Il,o);else if("dangerouslySetInnerHTML"!==e){if(r)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==i?"":i;break t}catch(t){}"function"==typeof i||(null!=i&&(!1!==i||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,i):t.removeAttribute(e))}}function Il(t){this.l[t.type+!1](gl.event?gl.event(t):t)}function Dl(t){this.l[t.type+!0](gl.event?gl.event(t):t)}function Nl(t,e,i,n,r,o,s,a,l){var c,h,p,d,u,g,f,m,v,b,y,_=e.type;if(void 0!==e.constructor)return null;null!=i.__h&&(l=i.__h,a=e.__e=i.__e,e.__h=null,o=[a]),(c=gl.__b)&&c(e);try{t:if("function"==typeof _){if(m=e.props,v=(c=_.contextType)&&n[c.__c],b=c?v?v.props.value:c.__:n,i.__c?f=(h=e.__c=i.__c).__=h.__E:("prototype"in _&&_.prototype.render?e.__c=h=new _(m,b):(e.__c=h=new El(m,b),h.constructor=_,h.render=Ul),v&&v.sub(h),h.props=m,h.state||(h.state={}),h.context=b,h.__n=n,p=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=_.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=kl({},h.__s)),kl(h.__s,_.getDerivedStateFromProps(m,h.__s))),d=h.props,u=h.state,p)null==_.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==_.getDerivedStateFromProps&&m!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,b),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,b)||e.__v===i.__v){h.props=m,h.state=h.__s,e.__v!==i.__v&&(h.__d=!1),h.__v=e,e.__e=i.__e,e.__k=i.__k,e.__k.forEach((function(t){t&&(t.__=e)})),h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,b),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(d,u,g)}))}h.context=b,h.props=m,h.state=h.__s,(c=gl.__r)&&c(e),h.__d=!1,h.__v=e,h.__P=t,c=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(n=kl(kl({},n),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(g=h.getSnapshotBeforeUpdate(d,u)),y=null!=c&&c.type===Cl&&null==c.key?c.props.children:c,$l(t,Array.isArray(y)?y:[y],e,i,n,r,o,s,a,l),h.base=e.__e,e.__h=null,h.__h.length&&s.push(h),f&&(h.__E=h.__=null),h.__e=!1}else null==o&&e.__v===i.__v?(e.__k=i.__k,e.__e=i.__e):e.__e=function(t,e,i,n,r,o,s,a){var l,c,h,p,d=i.props,u=e.props,g=e.type,f=0;if("svg"===g&&(r=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&(l===t||(g?l.localName==g:3==l.nodeType))){t=l,o[f]=null;break}if(null==t){if(null===g)return document.createTextNode(u);t=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,u.is&&u),o=null,a=!1}if(null===g)d===u||a&&t.data===u||(t.data=u);else{if(o=o&&wl.slice.call(t.childNodes),c=(d=i.props||_l).dangerouslySetInnerHTML,h=u.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},p=0;p<t.attributes.length;p++)d[t.attributes[p].name]=t.attributes[p].value;(h||c)&&(h&&(c&&h.__html==c.__html||h.__html===t.innerHTML)||(t.innerHTML=h&&h.__html||""))}if(function(t,e,i,n,r){var o;for(o in i)"children"===o||"key"===o||o in e||Pl(t,o,null,i[o],n);for(o in e)r&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||i[o]===e[o]||Pl(t,o,e[o],i[o],n)}(t,u,d,r,a),h)e.__k=[];else if(f=e.props.children,$l(t,Array.isArray(f)?f:[f],e,i,n,r&&"foreignObject"!==g,o,s,t.firstChild,a),null!=o)for(f=o.length;f--;)null!=o[f]&&zl(o[f]);a||("value"in u&&void 0!==(f=u.value)&&(f!==t.value||"progress"===g&&!f)&&Pl(t,"value",f,d.value,!1),"checked"in u&&void 0!==(f=u.checked)&&f!==t.checked&&Pl(t,"checked",f,d.checked,!1))}return t}(i.__e,e,i,n,r,o,s,l);(c=gl.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=o)&&(e.__e=a,e.__h=!!l,o[o.indexOf(a)]=null),gl.__e(t,e,i)}}function Fl(t,e){gl.__c&&gl.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){gl.__e(t,e.__v)}}))}function Bl(t,e,i){try{"function"==typeof t?t(e):t.current=e}catch(t){gl.__e(t,i)}}function jl(t,e,i){var n,r,o;if(gl.unmount&&gl.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||Bl(n,null,e)),i||"function"==typeof t.type||(i=null!=(r=t.__e)),t.__e=t.__d=void 0,null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){gl.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&jl(n[o],e,i);null!=r&&zl(r)}function Ul(t,e,i){return this.constructor(t,i)}function ql(t,e,i){var n,r,o;gl.__&&gl.__(t,e),r=(n="function"==typeof i)?null:i&&i.__k||e.__k,o=[],Nl(e,t=(!n&&i||e).__k=Al(Cl,null,[t]),r||_l,_l,void 0!==e.ownerSVGElement,!n&&i?[i]:r?null:e.firstChild?wl.slice.call(e.childNodes):null,o,!n&&i?i:r?r.__e:e.firstChild,n),Fl(o,t)}function Wl(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}gl={__e:function(t,e){for(var i,n,r;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&null!=n.getDerivedStateFromError&&(i.setState(n.getDerivedStateFromError(t)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t),r=i.__d),r)return i.__E=i}catch(e){t=e}throw t},__v:0},fl=function(t){return null!=t&&void 0===t.constructor},El.prototype.setState=function(t,e){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=kl({},this.state),"function"==typeof t&&(t=t(kl({},i),this.props)),t&&kl(i,t),null!=t&&this.__v&&(e&&this.__h.push(e),Ll(this))},El.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ll(this))},El.prototype.render=Cl,ml=[],vl="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hl.__r=0,yl=0;var Yl=function(){function t(t){this._id=void 0,this._id=t||Wl()}return al(t,[{key:"id",get:function(){return this._id}}]),t}(),Xl={search:{placeholder:"Type a keyword..."},sort:{sortAsc:"Sort column ascending",sortDesc:"Sort column descending"},pagination:{previous:"Previous",next:"Next",navigate:function(t,e){return"Page "+t+" of "+e},page:function(t){return"Page "+t},showing:"Showing",of:"of",to:"to",results:"results"},loading:"Loading...",noRecordsFound:"No matching records found",error:"An error happened while fetching the data"},Gl=function(){function t(t){this._language=void 0,this._defaultLanguage=void 0,this._language=t,this._defaultLanguage=Xl}var e=t.prototype;return e.getString=function(t,e){if(!e||!t)return null;var i=t.split("."),n=i[0];if(e[n]){var r=e[n];return"string"==typeof r?function(){return r}:"function"==typeof r?r:this.getString(i.slice(1).join("."),r)}return null},e.translate=function(t){var e;return(e=this.getString(t,this._language)||this.getString(t,this._defaultLanguage))?e.apply(void 0,[].slice.call(arguments,1)):t},t}(),Zl=function(t){function e(e,i){var n,r;return(n=t.call(this,e,i)||this).config=void 0,n._=void 0,n.config=function(t){if(!t)return null;var e=Object.keys(t);return e.length?t[e[0]].props.value:null}(i),n.config&&(n._=(r=n.config.translator,function(t){return r.translate.apply(r,[t].concat([].slice.call(arguments,1)))})),n}return cl(e,t),e}(El),Kl=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype.render=function(){return Al(this.props.parentElement,{dangerouslySetInnerHTML:{__html:this.props.content}})},e}(Zl);function Ql(t,e){return Al(Kl,{content:t,parentElement:e})}Kl.defaultProps={parentElement:"span"};var Jl,tc=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.update(e),i}cl(e,t);var i=e.prototype;return i.cast=function(t){return t instanceof HTMLElement?Ql(t.outerHTML):t},i.update=function(t){return this.data=this.cast(t),this},e}(Yl),ec=function(t){function e(e){var i;return(i=t.call(this)||this)._cells=void 0,i.cells=e||[],i}cl(e,t);var i=e.prototype;return i.cell=function(t){return this._cells[t]},i.toArray=function(){return this.cells.map((function(t){return t.data}))},e.fromCells=function(t){return new e(t.map((function(t){return new tc(t.data)})))},al(e,[{key:"cells",get:function(){return this._cells},set:function(t){this._cells=t}},{key:"length",get:function(){return this.cells.length}}]),e}(Yl),ic=function(t){function e(e){var i;return(i=t.call(this)||this)._rows=void 0,i._length=void 0,i.rows=e instanceof Array?e:e instanceof ec?[e]:[],i}return cl(e,t),e.prototype.toArray=function(){return this.rows.map((function(t){return t.toArray()}))},e.fromRows=function(t){return new e(t.map((function(t){return ec.fromCells(t.cells)})))},e.fromArray=function(t){return new e((t=function(t){return!t[0]||t[0]instanceof Array?t:[t]}(t)).map((function(t){return new ec(t.map((function(t){return new tc(t)})))})))},al(e,[{key:"rows",get:function(){return this._rows},set:function(t){this._rows=t}},{key:"length",get:function(){return this._length||this.rows.length},set:function(t){this._length=t}}]),e}(Yl),nc=function(){function t(){this.callbacks=void 0}var e=t.prototype;return e.init=function(t){this.callbacks||(this.callbacks={}),t&&!this.callbacks[t]&&(this.callbacks[t]=[])},e.on=function(t,e){return this.init(t),this.callbacks[t].push(e),this},e.off=function(t,e){var i=t;return this.init(),this.callbacks[i]&&0!==this.callbacks[i].length?(this.callbacks[i]=this.callbacks[i].filter((function(t){return t!=e})),this):this},e.emit=function(t){var e=arguments,i=t;return this.init(i),this.callbacks[i].length>0&&(this.callbacks[i].forEach((function(t){return t.apply(void 0,[].slice.call(e,1))})),!0)},t}();!function(t){t[t.Initiator=0]="Initiator",t[t.ServerFilter=1]="ServerFilter",t[t.ServerSort=2]="ServerSort",t[t.ServerLimit=3]="ServerLimit",t[t.Extractor=4]="Extractor",t[t.Transformer=5]="Transformer",t[t.Filter=6]="Filter",t[t.Sort=7]="Sort",t[t.Limit=8]="Limit"}(Jl||(Jl={}));var rc=function(t){function e(e){var i;return(i=t.call(this)||this).id=void 0,i._props=void 0,i._props={},i.id=Wl(),e&&i.setProps(e),i}cl(e,t);var i=e.prototype;return i.process=function(){var t=[].slice.call(arguments);this.validateProps instanceof Function&&this.validateProps.apply(this,t),this.emit.apply(this,["beforeProcess"].concat(t));var e=this._process.apply(this,t);return this.emit.apply(this,["afterProcess"].concat(t)),e},i.setProps=function(t){return Object.assign(this._props,t),this.emit("propsUpdated",this),this},al(e,[{key:"props",get:function(){return this._props}}]),e}(nc),oc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype._process=function(t){return this.props.keyword?(e=String(this.props.keyword).trim(),i=this.props.columns,n=this.props.ignoreHiddenColumns,r=t,o=this.props.selector,e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),new ic(r.rows.filter((function(t,r){return t.cells.some((function(t,s){if(!t)return!1;if(n&&i&&i[s]&&"object"==typeof i[s]&&i[s].hidden)return!1;var a="";if("function"==typeof o)a=o(t.data,r,s);else if("object"==typeof t.data){var l=t.data;l&&l.props&&l.props.content&&(a=l.props.content)}else a=String(t.data);return new RegExp(e,"gi").test(a)}))})))):t;var e,i,n,r,o},al(e,[{key:"type",get:function(){return Jl.Filter}}]),e}(rc);function sc(){return""+"gridjs"+[].slice.call(arguments).reduce((function(t,e){return t+"-"+e}),"")}function ac(){return[].slice.call(arguments).filter((function(t){return t})).reduce((function(t,e){return(t||"")+" "+e}),"").trim()||null}var lc,cc=function(t){function e(e){var i;return(i=t.call(this)||this)._state=void 0,i.dispatcher=void 0,i.dispatcher=e,i._state=i.getInitialState(),e.register(i._handle.bind(pl(i))),i}cl(e,t);var i=e.prototype;return i._handle=function(t){this.handle(t.type,t.payload)},i.setState=function(t){var e=this._state;this._state=t,this.emit("updated",t,e)},al(e,[{key:"state",get:function(){return this._state}}]),e}(nc),hc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.getInitialState=function(){return{keyword:null}},i.handle=function(t,e){"SEARCH_KEYWORD"===t&&this.search(e.keyword)},i.search=function(t){this.setState({keyword:t})},e}(cc),pc=function(){function t(t){this.dispatcher=void 0,this.dispatcher=t}return t.prototype.dispatch=function(t,e){this.dispatcher.dispatch({type:t,payload:e})},t}(),dc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype.search=function(t){this.dispatch("SEARCH_KEYWORD",{keyword:t})},e}(pc),uc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype._process=function(t){if(!this.props.keyword)return t;var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.keyword)),this.props.body&&(e.body=this.props.body(t.body,this.props.keyword)),ll({},t,e)},al(e,[{key:"type",get:function(){return Jl.ServerFilter}}]),e}(rc),gc=new(function(){function t(){}var e=t.prototype;return e.format=function(t,e){return"[Grid.js] ["+e.toUpperCase()+"]: "+t},e.error=function(t,e){void 0===e&&(e=!1);var i=this.format(t,"error");if(e)throw Error(i);console.error(i)},e.warn=function(t){console.warn(this.format(t,"warn"))},e.info=function(t){console.info(this.format(t,"info"))},t}()),fc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e}(Zl);!function(t){t[t.Header=0]="Header",t[t.Footer=1]="Footer",t[t.Cell=2]="Cell"}(lc||(lc={}));var mc=function(){function t(){this.plugins=void 0,this.plugins=[]}var e=t.prototype;return e.get=function(t){var e=this.plugins.filter((function(e){return e.id===t}));return e.length>0?e[0]:null},e.add=function(t){return t.id?null!==this.get(t.id)?(gc.error("Duplicate plugin ID: "+t.id),this):(this.plugins.push(t),this):(gc.error("Plugin ID cannot be empty"),this)},e.remove=function(t){return this.plugins.splice(this.plugins.indexOf(this.get(t)),1),this},e.list=function(t){return(null!=t||null!=t?this.plugins.filter((function(e){return e.position===t})):this.plugins).sort((function(t,e){return t.order-e.order}))},t}(),vc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype.render=function(){var t=this;if(this.props.pluginId){var e=this.config.plugin.get(this.props.pluginId);return e?Al(Cl,{},Al(e.component,ll({plugin:e},e.props,this.props.props))):null}return void 0!==this.props.position?Al(Cl,{},this.config.plugin.list(this.props.position).map((function(e){return Al(e.component,ll({plugin:e},e.props,t.props.props))}))):null},e}(Zl),bc=function(t){function e(e,i){var n;(n=t.call(this,e,i)||this).searchProcessor=void 0,n.actions=void 0,n.store=void 0,n.storeUpdatedFn=void 0,n.actions=new dc(n.config.dispatcher),n.store=new hc(n.config.dispatcher);var r,o=e.keyword;return e.enabled&&(o&&n.actions.search(o),n.storeUpdatedFn=n.storeUpdated.bind(pl(n)),n.store.on("updated",n.storeUpdatedFn),r=e.server?new uc({keyword:e.keyword,url:e.server.url,body:e.server.body}):new oc({keyword:e.keyword,columns:n.config.header&&n.config.header.columns,ignoreHiddenColumns:e.ignoreHiddenColumns||void 0===e.ignoreHiddenColumns,selector:e.selector}),n.searchProcessor=r,n.config.pipeline.register(r)),n}cl(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.searchProcessor),this.store.off("updated",this.storeUpdatedFn)},i.storeUpdated=function(t){this.searchProcessor.setProps({keyword:t.keyword})},i.onChange=function(t){this.actions.search(t.target.value)},i.render=function(){if(!this.props.enabled)return null;var t,e,i,n=this.onChange.bind(this);return this.searchProcessor instanceof uc&&(t=n,e=this.props.debounceTimeout,n=function(){var n=arguments;return new Promise((function(r){i&&clearTimeout(i),i=setTimeout((function(){return r(t.apply(void 0,[].slice.call(n)))}),e)}))}),Al("div",{className:sc(ac("search",this.config.className.search))},Al("input",{type:"search",placeholder:this._("search.placeholder"),"aria-label":this._("search.placeholder"),onInput:n,className:ac(sc("input"),sc("search","input")),value:this.store.state.keyword}))},e}(fc);bc.defaultProps={debounceTimeout:250};var yc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.validateProps=function(){if(isNaN(Number(this.props.limit))||isNaN(Number(this.props.page)))throw Error("Invalid parameters passed")},i._process=function(t){var e=this.props.page;return new ic(t.rows.slice(e*this.props.limit,(e+1)*this.props.limit))},al(e,[{key:"type",get:function(){return Jl.Limit}}]),e}(rc),_c=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.page,this.props.limit)),this.props.body&&(e.body=this.props.body(t.body,this.props.page,this.props.limit)),ll({},t,e)},al(e,[{key:"type",get:function(){return Jl.ServerLimit}}]),e}(rc),wc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).processor=void 0,n.onUpdateFn=void 0,n.setTotalFromTabularFn=void 0,n.state={limit:e.limit,page:e.page||0,total:0},n}cl(e,t);var i=e.prototype;return i.componentWillMount=function(){var t,e=this;this.props.enabled&&(this.setTotalFromTabularFn=this.setTotalFromTabular.bind(this),this.props.server?(t=new _c({limit:this.state.limit,page:this.state.page,url:this.props.server.url,body:this.props.server.body}),this.config.pipeline.on("afterProcess",this.setTotalFromTabularFn)):(t=new yc({limit:this.state.limit,page:this.state.page})).on("beforeProcess",this.setTotalFromTabularFn),this.processor=t,this.config.pipeline.register(t),this.config.pipeline.on("error",(function(){e.setState({total:0,page:0})})))},i.setTotalFromTabular=function(t){this.setTotal(t.length)},i.onUpdate=function(t){this.props.resetPageOnUpdate&&t!==this.processor&&this.setPage(0)},i.componentDidMount=function(){this.onUpdateFn=this.onUpdate.bind(this),this.config.pipeline.on("updated",this.onUpdateFn)},i.componentWillUnmount=function(){this.config.pipeline.unregister(this.processor),this.config.pipeline.off("updated",this.onUpdateFn)},i.setPage=function(t){if(t>=this.pages||t<0||t===this.state.page)return null;this.setState({page:t}),this.processor.setProps({page:t})},i.setTotal=function(t){this.setState({total:t})},i.renderPages=function(){var t=this;if(this.props.buttonsCount<=0)return null;var e=Math.min(this.pages,this.props.buttonsCount),i=Math.min(this.state.page,Math.floor(e/2));return this.state.page+Math.floor(e/2)>=this.pages&&(i=e-(this.pages-this.state.page)),Al(Cl,null,this.pages>e&&this.state.page-i>0&&Al(Cl,null,Al("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,0),title:this._("pagination.firstPage"),"aria-label":this._("pagination.firstPage"),className:this.config.className.paginationButton},this._("1")),Al("button",{tabIndex:-1,className:ac(sc("spread"),this.config.className.paginationButton)},"...")),Array.from(Array(e).keys()).map((function(e){return t.state.page+(e-i)})).map((function(e){return Al("button",{tabIndex:0,role:"button",onClick:t.setPage.bind(t,e),className:ac(t.state.page===e?ac(sc("currentPage"),t.config.className.paginationButtonCurrent):null,t.config.className.paginationButton),title:t._("pagination.page",e+1),"aria-label":t._("pagination.page",e+1)},t._(""+(e+1)))})),this.pages>e&&this.pages>this.state.page+i+1&&Al(Cl,null,Al("button",{tabIndex:-1,className:ac(sc("spread"),this.config.className.paginationButton)},"..."),Al("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,this.pages-1),title:this._("pagination.page",this.pages),"aria-label":this._("pagination.page",this.pages),className:this.config.className.paginationButton},this._(""+this.pages))))},i.renderSummary=function(){return Al(Cl,null,this.props.summary&&this.state.total>0&&Al("div",{role:"status","aria-live":"polite",className:ac(sc("summary"),this.config.className.paginationSummary),title:this._("pagination.navigate",this.state.page+1,this.pages)},this._("pagination.showing")," ",Al("b",null,this._(""+(this.state.page*this.state.limit+1)))," ",this._("pagination.to")," ",Al("b",null,this._(""+Math.min((this.state.page+1)*this.state.limit,this.state.total)))," ",this._("pagination.of")," ",Al("b",null,this._(""+this.state.total))," ",this._("pagination.results")))},i.render=function(){return this.props.enabled?Al("div",{className:ac(sc("pagination"),this.config.className.pagination)},this.renderSummary(),Al("div",{className:sc("pages")},this.props.prevButton&&Al("button",{tabIndex:0,role:"button",disabled:0===this.state.page,onClick:this.setPage.bind(this,this.state.page-1),title:this._("pagination.previous"),"aria-label":this._("pagination.previous"),className:ac(this.config.className.paginationButton,this.config.className.paginationButtonPrev)},this._("pagination.previous")),this.renderPages(),this.props.nextButton&&Al("button",{tabIndex:0,role:"button",disabled:this.pages===this.state.page+1||0===this.pages,onClick:this.setPage.bind(this,this.state.page+1),title:this._("pagination.next"),"aria-label":this._("pagination.next"),className:ac(this.config.className.paginationButton,this.config.className.paginationButtonNext)},this._("pagination.next")))):null},al(e,[{key:"pages",get:function(){return Math.ceil(this.state.total/this.state.limit)}}]),e}(fc);function xc(t,e){return"string"==typeof t?t.indexOf("%")>-1?e/100*parseInt(t,10):parseInt(t,10):t}function kc(t){return t?Math.floor(t)+"px":""}wc.defaultProps={summary:!0,nextButton:!0,prevButton:!0,buttonsCount:3,limit:10,resetPageOnUpdate:!0};var zc=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).tableElement=void 0,n.tableClassName=void 0,n.tableStyle=void 0,n.tableElement=n.props.tableRef.current.base.cloneNode(!0),n.tableElement.style.position="absolute",n.tableElement.style.width="100%",n.tableElement.style.zIndex="-2147483640",n.tableElement.style.visibility="hidden",n.tableClassName=n.tableElement.className,n.tableStyle=n.tableElement.style.cssText,n}cl(e,t);var i=e.prototype;return i.widths=function(){this.tableElement.className=this.tableClassName+" "+sc("shadowTable"),this.tableElement.style.tableLayout="auto",this.tableElement.style.width="auto",this.tableElement.style.padding="0",this.tableElement.style.margin="0",this.tableElement.style.border="none",this.tableElement.style.outline="none";var t=Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){var i;return e.style.width=e.clientWidth+"px",ll(((i={})[e.getAttribute("data-column-id")]={minWidth:e.clientWidth},i),t)}),{});return this.tableElement.className=this.tableClassName,this.tableElement.style.cssText=this.tableStyle,this.tableElement.style.tableLayout="auto",Array.from(this.base.parentNode.querySelectorAll("thead th")).reduce((function(t,e){return t[e.getAttribute("data-column-id")].width=e.clientWidth,t}),t)},i.render=function(){var t=this;return this.props.tableRef.current?Al("div",{ref:function(e){e&&e.appendChild(t.tableElement)}}):null},e}(Zl);function Ac(t){if(!t)return"";var e=t.split(" ");return 1===e.length&&/([a-z][A-Z])+/g.test(t)?t:e.map((function(t,e){return 0==e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()})).join("")}var Sc=function(t){function e(){var e;return(e=t.call(this)||this)._columns=void 0,e._columns=[],e}cl(e,t);var i=e.prototype;return i.adjustWidth=function(t){var i=t.container,n=t.tableRef,r=t.tempRef,o=t.tempRef||!0;if(!i)return this;var s=i.clientWidth,a={current:null},l={};if(n.current&&o){var c=Al(zc,{tableRef:n});c.ref=a,ql(c,r.current),l=a.current.widths()}for(var h,p=ul(e.tabularFormat(this.columns).reduce((function(t,e){return t.concat(e)}),[]));!(h=p()).done;){var d=h.value;d.columns&&d.columns.length>0||(!d.width&&o?d.id in l&&(d.width=kc(l[d.id].width),d.minWidth=kc(l[d.id].minWidth)):d.width=kc(xc(d.width,s)))}return n.current&&o&&ql(null,r.current),this},i.setSort=function(t,e){for(var i,n=ul(e||this.columns||[]);!(i=n()).done;){var r=i.value;r.columns&&r.columns.length>0&&(r.sort={enabled:!1}),void 0===r.sort&&t.sort&&(r.sort={enabled:!0}),r.sort?"object"==typeof r.sort&&(r.sort=ll({enabled:!0},r.sort)):r.sort={enabled:!1},r.columns&&this.setSort(t,r.columns)}},i.setFixedHeader=function(t,e){for(var i,n=ul(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.fixedHeader&&(r.fixedHeader=t.fixedHeader),r.columns&&this.setFixedHeader(t,r.columns)}},i.setResizable=function(t,e){for(var i,n=ul(e||this.columns||[]);!(i=n()).done;){var r=i.value;void 0===r.resizable&&(r.resizable=t.resizable),r.columns&&this.setResizable(t,r.columns)}},i.setID=function(t){for(var e,i=ul(t||this.columns||[]);!(e=i()).done;){var n=e.value;n.id||"string"!=typeof n.name||(n.id=Ac(n.name)),n.id||gc.error('Could not find a valid ID for one of the columns. Make sure a valid "id" is set for all columns.'),n.columns&&this.setID(n.columns)}},i.populatePlugins=function(t,e){for(var i,n=ul(e);!(i=n()).done;){var r=i.value;void 0!==r.plugin&&t.plugin.add(ll({id:r.id,props:{}},r.plugin,{position:lc.Cell}))}},e.fromColumns=function(t){for(var i,n=new e,r=ul(t);!(i=r()).done;){var o=i.value;if("string"==typeof o||fl(o))n.columns.push({name:o});else if("object"==typeof o){var s=o;s.columns&&(s.columns=e.fromColumns(s.columns).columns),"object"==typeof s.plugin&&void 0===s.data&&(s.data=null),n.columns.push(o)}}return n},e.fromUserConfig=function(t){var i=new e;return t.from?i.columns=e.fromHTMLTable(t.from).columns:t.columns?i.columns=e.fromColumns(t.columns).columns:!t.data||"object"!=typeof t.data[0]||t.data[0]instanceof Array||(i.columns=Object.keys(t.data[0]).map((function(t){return{name:t}}))),i.columns.length?(i.setID(),i.setSort(t),i.setFixedHeader(t),i.setResizable(t),i.populatePlugins(t,i.columns),i):null},e.fromHTMLTable=function(t){for(var i,n=new e,r=ul(t.querySelector("thead").querySelectorAll("th"));!(i=r()).done;){var o=i.value;n.columns.push({name:o.innerHTML,width:o.width})}return n},e.tabularFormat=function(t){var e=[],i=t||[],n=[];if(i&&i.length){e.push(i);for(var r,o=ul(i);!(r=o()).done;){var s=r.value;s.columns&&s.columns.length&&(n=n.concat(s.columns))}n.length&&(e=e.concat(this.tabularFormat(n)))}return e},e.leafColumns=function(t){var e=[],i=t||[];if(i&&i.length)for(var n,r=ul(i);!(n=r()).done;){var o=n.value;o.columns&&0!==o.columns.length||e.push(o),o.columns&&(e=e.concat(this.leafColumns(o.columns)))}return e},e.maximumDepth=function(t){return this.tabularFormat([t]).length-1},al(e,[{key:"columns",get:function(){return this._columns},set:function(t){this._columns=t}},{key:"visibleColumns",get:function(){return this._columns.filter((function(t){return!t.hidden}))}}]),e}(Yl),Cc=function(){function t(){this._callbacks=void 0,this._isDispatching=void 0,this._isHandled=void 0,this._isPending=void 0,this._lastID=void 0,this._pendingPayload=void 0,this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var e=t.prototype;return e.register=function(t){var e="ID_"+this._lastID++;return this._callbacks[e]=t,e},e.unregister=function(t){if(!this._callbacks[t])throw Error("Dispatcher.unregister(...): "+t+" does not map to a registered callback.");delete this._callbacks[t]},e.waitFor=function(t){if(!this._isDispatching)throw Error("Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var i=t[e];if(this._isPending[i]){if(!this._isHandled[i])throw Error("Dispatcher.waitFor(...): Circular dependency detected while ' +\n 'waiting for "+i+".")}else{if(!this._callbacks[i])throw Error("Dispatcher.waitFor(...): "+i+" does not map to a registered callback.");this._invokeCallback(i)}}},e.dispatch=function(t){if(this._isDispatching)throw Error("Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.");this._startDispatching(t);try{for(var e in this._callbacks)this._isPending[e]||this._invokeCallback(e)}finally{this._stopDispatching()}},e.isDispatching=function(){return this._isDispatching},e._invokeCallback=function(t){this._isPending[t]=!0,this._callbacks[t](this._pendingPayload),this._isHandled[t]=!0},e._startDispatching=function(t){for(var e in this._callbacks)this._isPending[e]=!1,this._isHandled[e]=!1;this._pendingPayload=t,this._isDispatching=!0},e._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},t}(),Ec=function(){},Mc=function(t){function e(e){var i;return(i=t.call(this)||this).data=void 0,i.set(e),i}cl(e,t);var i=e.prototype;return i.get=function(){try{return Promise.resolve(this.data()).then((function(t){return{data:t,total:t.length}}))}catch(t){return Promise.reject(t)}},i.set=function(t){return t instanceof Array?this.data=function(){return t}:t instanceof Function&&(this.data=t),this},e}(Ec),Tc=function(t){function e(e){var i;return(i=t.call(this)||this).options=void 0,i.options=e,i}cl(e,t);var i=e.prototype;return i.handler=function(t){return"function"==typeof this.options.handle?this.options.handle(t):t.ok?t.json():(gc.error("Could not fetch data: "+t.status+" - "+t.statusText,!0),null)},i.get=function(t){var e=ll({},this.options,t);return"function"==typeof e.data?e.data(e):fetch(e.url,e).then(this.handler.bind(this)).then((function(t){return{data:e.then(t),total:"function"==typeof e.total?e.total(t):void 0}}))},e}(Ec),Lc=function(){function t(){}return t.createFromUserConfig=function(t){var e=null;return t.data&&(e=new Mc(t.data)),t.from&&(e=new Mc(this.tableElementToArray(t.from)),t.from.style.display="none"),t.server&&(e=new Tc(t.server)),e||gc.error("Could not determine the storage type",!0),e},t.tableElementToArray=function(t){for(var e,i,n=[],r=ul(t.querySelector("tbody").querySelectorAll("tr"));!(e=r()).done;){for(var o,s=[],a=ul(e.value.querySelectorAll("td"));!(o=a()).done;){var l=o.value;1===l.childNodes.length&&l.childNodes[0].nodeType===Node.TEXT_NODE?s.push((i=l.innerHTML,(new DOMParser).parseFromString(i,"text/html").documentElement.textContent)):s.push(Ql(l.innerHTML))}n.push(s)}return n},t}(),Hc="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function $c(t,e,i){if(!t.s){if(i instanceof Oc){if(!i.s)return void(i.o=$c.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then($c.bind(null,t,e),$c.bind(null,t,2));t.s=e,t.v=i;var n=t.o;n&&n(t)}}var Oc=function(){function t(){}return t.prototype.then=function(e,i){var n=new t,r=this.s;if(r){var o=1&r?e:i;if(o){try{$c(n,1,o(this.v))}catch(t){$c(n,2,t)}return n}return this}return this.o=function(t){try{var r=t.v;1&t.s?$c(n,1,e?e(r):r):i?$c(n,1,i(r)):$c(n,2,r)}catch(t){$c(n,2,t)}},n},t}();function Vc(t){return t instanceof Oc&&1&t.s}var Rc,Pc=function(t){function e(e){var i;return(i=t.call(this)||this)._steps=new Map,i.cache=new Map,i.lastProcessorIndexUpdated=-1,e&&e.forEach((function(t){return i.register(t)})),i}cl(e,t);var i=e.prototype;return i.clearCache=function(){this.cache=new Map,this.lastProcessorIndexUpdated=-1},i.register=function(t,e){if(void 0===e&&(e=null),null===t.type)throw Error("Processor type is not defined");t.on("propsUpdated",this.processorPropsUpdated.bind(this)),this.addProcessorByPriority(t,e),this.afterRegistered(t)},i.unregister=function(t){if(t){var e=this._steps.get(t.type);e&&e.length&&(this._steps.set(t.type,e.filter((function(e){return e!=t}))),this.emit("updated",t))}},i.addProcessorByPriority=function(t,e){var i=this._steps.get(t.type);if(!i){var n=[];this._steps.set(t.type,n),i=n}if(null===e||e<0)i.push(t);else if(i[e]){var r=i.slice(0,e-1),o=i.slice(e+1);this._steps.set(t.type,r.concat(t).concat(o))}else i[e]=t},i.getStepsByType=function(t){return this.steps.filter((function(e){return e.type===t}))},i.getSortedProcessorTypes=function(){return Object.keys(Jl).filter((function(t){return!isNaN(Number(t))})).map((function(t){return Number(t)}))},i.process=function(t){try{var e=this,i=function(t){return e.lastProcessorIndexUpdated=r.length,e.emit("afterProcess",o),o},n=e.lastProcessorIndexUpdated,r=e.steps,o=t,s=function(t,i){try{var s=function(t,e,i){if("function"==typeof t[Hc]){var n,r,o,s=t[Hc]();if(function t(i){try{for(;!(n=s.next()).done;)if((i=e(n.value))&&i.then){if(!Vc(i))return void i.then(t,o||(o=$c.bind(null,r=new Oc,2)));i=i.v}r?$c(r,1,i):r=i}catch(t){$c(r||(r=new Oc),2,t)}}(),s.return){var a=function(t){try{n.done||s.return()}catch(t){}return t};if(r&&r.then)return r.then(a,(function(t){throw a(t)}));a()}return r}if(!("length"in t))throw new TypeError("Object is not iterable");for(var l=[],c=0;c<t.length;c++)l.push(t[c]);return function(t,e,i){var n,r,o=-1;return function i(s){try{for(;++o<t.length;)if((s=e(o))&&s.then){if(!Vc(s))return void s.then(i,r||(r=$c.bind(null,n=new Oc,2)));s=s.v}n?$c(n,1,s):n=s}catch(t){$c(n||(n=new Oc),2,t)}}(),n}(l,(function(t){return e(l[t])}))}(r,(function(t){var i=e.findProcessorIndexByID(t.id),r=function(){if(i>=n)return Promise.resolve(t.process(o)).then((function(i){e.cache.set(t.id,o=i)}));o=e.cache.get(t.id)}();if(r&&r.then)return r.then((function(){}))}))}catch(t){return i(t)}return s&&s.then?s.then(void 0,i):s}(0,(function(t){throw gc.error(t),e.emit("error",o),t}));return Promise.resolve(s&&s.then?s.then(i):i())}catch(t){return Promise.reject(t)}},i.findProcessorIndexByID=function(t){return this.steps.findIndex((function(e){return e.id==t}))},i.setLastProcessorIndex=function(t){var e=this.findProcessorIndexByID(t.id);this.lastProcessorIndexUpdated>e&&(this.lastProcessorIndexUpdated=e)},i.processorPropsUpdated=function(t){this.setLastProcessorIndex(t),this.emit("propsUpdated"),this.emit("updated",t)},i.afterRegistered=function(t){this.setLastProcessorIndex(t),this.emit("afterRegister"),this.emit("updated",t)},al(e,[{key:"steps",get:function(){for(var t,e=[],i=ul(this.getSortedProcessorTypes());!(t=i()).done;){var n=this._steps.get(t.value);n&&n.length&&(e=e.concat(n))}return e.filter((function(t){return t}))}}]),e}(nc),Ic=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype._process=function(t){try{return Promise.resolve(this.props.storage.get(t))}catch(t){return Promise.reject(t)}},al(e,[{key:"type",get:function(){return Jl.Extractor}}]),e}(rc),Dc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype._process=function(t){var e=ic.fromArray(t.data);return e.length=t.total,e},al(e,[{key:"type",get:function(){return Jl.Transformer}}]),e}(rc),Nc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype._process=function(){return Object.entries(this.props.serverStorageOptions).filter((function(t){return"function"!=typeof t[1]})).reduce((function(t,e){var i;return ll({},t,((i={})[e[0]]=e[1],i))}),{})},al(e,[{key:"type",get:function(){return Jl.Initiator}}]),e}(rc),Fc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.castData=function(t){if(!t||!t.length)return[];if(!this.props.header||!this.props.header.columns)return t;var e=Sc.leafColumns(this.props.header.columns);return t[0]instanceof Array?t.map((function(t){var i=0;return e.map((function(e,n){return void 0!==e.data?(i++,"function"==typeof e.data?e.data(t):e.data):t[n-i]}))})):"object"!=typeof t[0]||t[0]instanceof Array?[]:t.map((function(t){return e.map((function(e,i){return void 0!==e.data?"function"==typeof e.data?e.data(t):e.data:e.id?t[e.id]:(gc.error("Could not find the correct cell for column at position "+i+".\n Make sure either 'id' or 'selector' is defined for all columns."),null)}))}))},i._process=function(t){return{data:this.castData(t.data),total:t.total}},al(e,[{key:"type",get:function(){return Jl.Transformer}}]),e}(rc),Bc=function(){function t(){}return t.createFromConfig=function(t){var e=new Pc;return t.storage instanceof Tc&&e.register(new Nc({serverStorageOptions:t.server})),e.register(new Ic({storage:t.storage})),e.register(new Fc({header:t.header})),e.register(new Dc),e},t}(),jc=function(){function t(e){this._userConfig=void 0,Object.assign(this,ll({},t.defaultConfig(),e)),this._userConfig={}}var e=t.prototype;return e.assign=function(t){for(var e=0,i=Object.keys(t);e<i.length;e++){var n=i[e];"_userConfig"!==n&&(this[n]=t[n])}return this},e.update=function(e){return e?(this._userConfig=ll({},this._userConfig,e),this.assign(t.fromUserConfig(this._userConfig)),this):this},t.defaultConfig=function(){return{plugin:new mc,dispatcher:new Cc,tableRef:{current:null},tempRef:{current:null},width:"100%",height:"auto",autoWidth:!0,style:{},className:{}}},t.fromUserConfig=function(e){var i=new t(e);return i._userConfig=e,"boolean"==typeof e.sort&&e.sort&&i.assign({sort:{multiColumn:!0}}),i.assign({header:Sc.fromUserConfig(i)}),i.assign({storage:Lc.createFromUserConfig(e)}),i.assign({pipeline:Bc.createFromConfig(i)}),i.assign({translator:new Gl(e.language)}),i.plugin.add({id:"search",position:lc.Header,component:bc,props:ll({enabled:!0===e.search||e.search instanceof Object},e.search)}),i.plugin.add({id:"pagination",position:lc.Footer,component:wc,props:ll({enabled:!0===e.pagination||e.pagination instanceof Object},e.pagination)}),e.plugins&&e.plugins.forEach((function(t){return i.plugin.add(t)})),i},t}();!function(t){t[t.Init=0]="Init",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Rendered=3]="Rendered",t[t.Error=4]="Error"}(Rc||(Rc={}));var Uc,qc,Wc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.content=function(){return this.props.column&&"function"==typeof this.props.column.formatter?this.props.column.formatter(this.props.cell.data,this.props.row,this.props.column):this.props.column&&this.props.column.plugin?Al(vc,{pluginId:this.props.column.id,props:{column:this.props.column,cell:this.props.cell,row:this.props.row}}):this.props.cell.data},i.handleClick=function(t){this.props.messageCell||this.config.eventEmitter.emit("cellClick",t,this.props.cell,this.props.column,this.props.row)},i.getCustomAttributes=function(t){return t?"function"==typeof t.attributes?t.attributes(this.props.cell.data,this.props.row,this.props.column):t.attributes:{}},i.render=function(){return Al("td",ll({role:this.props.role,colSpan:this.props.colSpan,"data-column-id":this.props.column&&this.props.column.id,className:ac(sc("td"),this.props.className,this.config.className.td),style:ll({},this.props.style,this.config.style.td),onClick:this.handleClick.bind(this)},this.getCustomAttributes(this.props.column)),this.content())},e}(Zl),Yc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.getColumn=function(t){if(this.props.header){var e=Sc.leafColumns(this.props.header.columns);if(e)return e[t]}return null},i.handleClick=function(t){this.props.messageRow||this.config.eventEmitter.emit("rowClick",t,this.props.row)},i.getChildren=function(){var t=this;return this.props.children?this.props.children:Al(Cl,null,this.props.row.cells.map((function(e,i){var n=t.getColumn(i);return n&&n.hidden?null:Al(Wc,{key:e.id,cell:e,row:t.props.row,column:n})})))},i.render=function(){return Al("tr",{className:ac(sc("tr"),this.config.className.tr),onClick:this.handleClick.bind(this)},this.getChildren())},e}(Zl),Xc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype.render=function(){return Al(Yc,{messageRow:!0},Al(Wc,{role:"alert",colSpan:this.props.colSpan,messageCell:!0,cell:new tc(this.props.message),className:ac(sc("message"),this.props.className?this.props.className:null)}))},e}(Zl),Gc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.headerLength=function(){return this.props.header?this.props.header.visibleColumns.length:0},i.render=function(){var t=this;return Al("tbody",{className:ac(sc("tbody"),this.config.className.tbody)},this.props.data&&this.props.data.rows.map((function(e){return Al(Yc,{key:e.id,row:e,header:t.props.header})})),this.props.status===Rc.Loading&&(!this.props.data||0===this.props.data.length)&&Al(Xc,{message:this._("loading"),colSpan:this.headerLength(),className:ac(sc("loading"),this.config.className.loading)}),this.props.status===Rc.Rendered&&this.props.data&&0===this.props.data.length&&Al(Xc,{message:this._("noRecordsFound"),colSpan:this.headerLength(),className:ac(sc("notfound"),this.config.className.notfound)}),this.props.status===Rc.Error&&Al(Xc,{message:this._("error"),colSpan:this.headerLength(),className:ac(sc("error"),this.config.className.error)}))},e}(Zl),Zc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.validateProps=function(){for(var t,e=ul(this.props.columns);!(t=e()).done;){var i=t.value;void 0===i.direction&&(i.direction=1),1!==i.direction&&-1!==i.direction&&gc.error("Invalid sort direction "+i.direction)}},i.compare=function(t,e){return t>e?1:t<e?-1:0},i.compareWrapper=function(t,e){for(var i,n=0,r=ul(this.props.columns);!(i=r()).done;){var o=i.value;if(0!==n)break;var s=t.cells[o.index].data,a=e.cells[o.index].data;n|="function"==typeof o.compare?o.compare(s,a)*o.direction:this.compare(s,a)*o.direction}return n},i._process=function(t){var e=[].concat(t.rows);e.sort(this.compareWrapper.bind(this));var i=new ic(e);return i.length=t.length,i},al(e,[{key:"type",get:function(){return Jl.Sort}}]),e}(rc),Kc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.getInitialState=function(){return[]},i.handle=function(t,e){"SORT_COLUMN"===t?this.sortColumn(e.index,e.direction,e.multi,e.compare):"SORT_COLUMN_TOGGLE"===t&&this.sortToggle(e.index,e.multi,e.compare)},i.sortToggle=function(t,e,i){var n=[].concat(this.state).find((function(e){return e.index===t}));this.sortColumn(t,n&&1===n.direction?-1:1,e,i)},i.sortColumn=function(t,e,i,n){var r=[].concat(this.state),o=r.length,s=r.find((function(e){return e.index===t})),a=!1,l=!1,c=!1,h=!1;if(void 0!==s?i?-1===s.direction?c=!0:h=!0:1===o?h=!0:o>1&&(l=!0,a=!0):0===o?a=!0:o>0&&!i?(a=!0,l=!0):o>0&&i&&(a=!0),l&&(r=[]),a)r.push({index:t,direction:e,compare:n});else if(h){var p=r.indexOf(s);r[p].direction=e}else if(c){var d=r.indexOf(s);r.splice(d,1)}this.setState(r)},e}(cc),Qc=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.sortColumn=function(t,e,i,n){this.dispatch("SORT_COLUMN",{index:t,direction:e,multi:i,compare:n})},i.sortToggle=function(t,e,i){this.dispatch("SORT_COLUMN_TOGGLE",{index:t,multi:e,compare:i})},e}(pc),Jc=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.columns)),this.props.body&&(e.body=this.props.body(t.body,this.props.columns)),ll({},t,e)},al(e,[{key:"type",get:function(){return Jl.ServerSort}}]),e}(rc),th=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortProcessor=void 0,n.actions=void 0,n.store=void 0,n.updateStateFn=void 0,n.updateSortProcessorFn=void 0,n.actions=new Qc(n.config.dispatcher),n.store=new Kc(n.config.dispatcher),e.enabled&&(n.sortProcessor=n.getOrCreateSortProcessor(),n.updateStateFn=n.updateState.bind(pl(n)),n.store.on("updated",n.updateStateFn),n.state={direction:0}),n}cl(e,t);var i=e.prototype;return i.componentWillUnmount=function(){this.config.pipeline.unregister(this.sortProcessor),this.store.off("updated",this.updateStateFn),this.updateSortProcessorFn&&this.store.off("updated",this.updateSortProcessorFn)},i.updateState=function(){var t=this,e=this.store.state.find((function(e){return e.index===t.props.index}));this.setState(e?{direction:e.direction}:{direction:0})},i.updateSortProcessor=function(t){this.sortProcessor.setProps({columns:t})},i.getOrCreateSortProcessor=function(){var t=Jl.Sort;this.config.sort&&"object"==typeof this.config.sort.server&&(t=Jl.ServerSort);var e,i=this.config.pipeline.getStepsByType(t);return i.length>0?e=i[0]:(this.updateSortProcessorFn=this.updateSortProcessor.bind(this),this.store.on("updated",this.updateSortProcessorFn),e=t===Jl.ServerSort?new Jc(ll({columns:this.store.state},this.config.sort.server)):new Zc({columns:this.store.state}),this.config.pipeline.register(e)),e},i.changeDirection=function(t){t.preventDefault(),t.stopPropagation(),this.actions.sortToggle(this.props.index,!0===t.shiftKey&&this.config.sort.multiColumn,this.props.compare)},i.render=function(){if(!this.props.enabled)return null;var t=this.state.direction,e="neutral";return 1===t?e="asc":-1===t&&(e="desc"),Al("button",{tabIndex:-1,"aria-label":this._("sort.sort"+(1===t?"Desc":"Asc")),title:this._("sort.sort"+(1===t?"Desc":"Asc")),className:ac(sc("sort"),sc("sort",e),this.config.className.sort),onClick:this.changeDirection.bind(this)})},e}(Zl),eh=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).moveFn=void 0,e.upFn=void 0,e}cl(e,t);var i=e.prototype;return i.getPageX=function(t){return t instanceof MouseEvent?Math.floor(t.pageX):Math.floor(t.changedTouches[0].pageX)},i.start=function(t){var e,i,n,r,o;t.stopPropagation(),this.setState({offsetStart:parseInt(this.props.thRef.current.style.width,10)-this.getPageX(t)}),this.upFn=this.end.bind(this),this.moveFn=(e=this.move.bind(this),void 0===(i=10)&&(i=100),function(){var t=[].slice.call(arguments);n?(clearTimeout(r),r=setTimeout((function(){Date.now()-o>=i&&(e.apply(void 0,t),o=Date.now())}),Math.max(i-(Date.now()-o),0))):(e.apply(void 0,t),o=Date.now(),n=!0)}),document.addEventListener("mouseup",this.upFn),document.addEventListener("touchend",this.upFn),document.addEventListener("mousemove",this.moveFn),document.addEventListener("touchmove",this.moveFn)},i.move=function(t){t.stopPropagation();var e=this.props.thRef.current;this.state.offsetStart+this.getPageX(t)>=parseInt(e.style.minWidth,10)&&(e.style.width=this.state.offsetStart+this.getPageX(t)+"px")},i.end=function(t){t.stopPropagation(),document.removeEventListener("mouseup",this.upFn),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("touchmove",this.moveFn),document.removeEventListener("touchend",this.upFn)},i.render=function(){return Al("div",{className:ac(sc("th"),sc("resizable")),onMouseDown:this.start.bind(this),onTouchStart:this.start.bind(this),onClick:function(t){return t.stopPropagation()}})},e}(Zl),ih=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).sortRef={current:null},n.thRef={current:null},n.state={style:{}},n}cl(e,t);var i=e.prototype;return i.isSortable=function(){return this.props.column.sort.enabled},i.isResizable=function(){return this.props.column.resizable},i.onClick=function(t){t.stopPropagation(),this.isSortable()&&this.sortRef.current.changeDirection(t)},i.keyDown=function(t){this.isSortable()&&13===t.which&&this.onClick(t)},i.componentDidMount=function(){var t=this;setTimeout((function(){if(t.props.column.fixedHeader&&t.thRef.current){var e=t.thRef.current.offsetTop;"number"==typeof e&&t.setState({style:{top:e}})}}),0)},i.content=function(){return void 0!==this.props.column.name?this.props.column.name:void 0!==this.props.column.plugin?Al(vc,{pluginId:this.props.column.plugin.id,props:{column:this.props.column}}):null},i.getCustomAttributes=function(){var t=this.props.column;return t?"function"==typeof t.attributes?t.attributes(null,null,this.props.column):t.attributes:{}},i.render=function(){var t={};return this.isSortable()&&(t.tabIndex=0),Al("th",ll({ref:this.thRef,"data-column-id":this.props.column&&this.props.column.id,className:ac(sc("th"),this.isSortable()?sc("th","sort"):null,this.props.column.fixedHeader?sc("th","fixed"):null,this.config.className.th),onClick:this.onClick.bind(this),style:ll({},this.config.style.th,{minWidth:this.props.column.minWidth,width:this.props.column.width},this.state.style,this.props.style),onKeyDown:this.keyDown.bind(this),rowSpan:this.props.rowSpan>1?this.props.rowSpan:void 0,colSpan:this.props.colSpan>1?this.props.colSpan:void 0},this.getCustomAttributes(),t),Al("div",{className:sc("th","content")},this.content()),this.isSortable()&&Al(th,ll({ref:this.sortRef,index:this.props.index},this.props.column.sort)),this.isResizable()&&this.props.index<this.config.header.visibleColumns.length-1&&Al(eh,{column:this.props.column,thRef:this.thRef}))},e}(Zl),nh=function(t){function e(){return t.apply(this,arguments)||this}cl(e,t);var i=e.prototype;return i.renderColumn=function(t,e,i,n){var r=function(t,e,i){var n=Sc.maximumDepth(t),r=i-e;return{rowSpan:Math.floor(r-n-n/r),colSpan:t.columns&&t.columns.length||1}}(t,e,n);return Al(ih,{column:t,index:i,colSpan:r.colSpan,rowSpan:r.rowSpan})},i.renderRow=function(t,e,i){var n=this,r=Sc.leafColumns(this.props.header.columns);return Al(Yc,null,t.map((function(t){return t.hidden?null:n.renderColumn(t,e,r.indexOf(t),i)})))},i.renderRows=function(){var t=this,e=Sc.tabularFormat(this.props.header.columns);return e.map((function(i,n){return t.renderRow(i,n,e.length)}))},i.render=function(){return this.props.header?Al("thead",{key:this.props.header.id,className:ac(sc("thead"),this.config.className.thead)},this.renderRows()):null},e}(Zl),rh=function(t){function e(){return t.apply(this,arguments)||this}return cl(e,t),e.prototype.render=function(){return Al("table",{role:"grid",className:ac(sc("table"),this.config.className.table),style:ll({},this.config.style.table,{height:this.props.height})},Al(nh,{header:this.props.header}),Al(Gc,{data:this.props.data,status:this.props.status,header:this.props.header}))},e}(Zl),oh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).headerRef={current:null},n.state={isActive:!0},n}cl(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.headerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?Al("div",{ref:this.headerRef,className:ac(sc("head"),this.config.className.header),style:ll({},this.config.style.header)},Al(vc,{position:lc.Header})):null},e}(Zl),sh=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).footerRef={current:null},n.state={isActive:!0},n}cl(e,t);var i=e.prototype;return i.componentDidMount=function(){0===this.footerRef.current.children.length&&this.setState({isActive:!1})},i.render=function(){return this.state.isActive?Al("div",{ref:this.footerRef,className:ac(sc("footer"),this.config.className.footer),style:ll({},this.config.style.footer)},Al(vc,{position:lc.Footer})):null},e}(Zl),ah=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).configContext=void 0,n.processPipelineFn=void 0,n.configContext=function(t,e){var i={__c:e="__cC"+yl++,__:null,Consumer:function(t,e){return t.children(e)},Provider:function(t){var i,n;return this.getChildContext||(i=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&i.some(Ll)},this.sub=function(t){i.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){i.splice(i.indexOf(t),1),e&&e.call(t)}}),t.children}};return i.Provider.__=i.Consumer.contextType=i}(),n.state={status:Rc.Loading,header:e.header,data:null},n}cl(e,t);var i=e.prototype;return i.processPipeline=function(){try{var t=this;t.props.config.eventEmitter.emit("beforeLoad"),t.setState({status:Rc.Loading});var e=function(e,i){try{var n=Promise.resolve(t.props.pipeline.process()).then((function(e){t.setState({data:e,status:Rc.Loaded}),t.props.config.eventEmitter.emit("load",e)}))}catch(t){return i(t)}return n&&n.then?n.then(void 0,i):n}(0,(function(e){gc.error(e),t.setState({status:Rc.Error,data:null})}));return Promise.resolve(e&&e.then?e.then((function(){})):void 0)}catch(t){return Promise.reject(t)}},i.componentDidMount=function(){try{var t=this,e=t.props.config;return Promise.resolve(t.processPipeline()).then((function(){e.header&&t.state.data&&t.state.data.length&&t.setState({header:e.header.adjustWidth(e)}),t.processPipelineFn=t.processPipeline.bind(t),t.props.pipeline.on("updated",t.processPipelineFn)}))}catch(t){return Promise.reject(t)}},i.componentWillUnmount=function(){this.props.pipeline.off("updated",this.processPipelineFn)},i.componentDidUpdate=function(t,e){e.status!=Rc.Rendered&&this.state.status==Rc.Loaded&&(this.setState({status:Rc.Rendered}),this.props.config.eventEmitter.emit("ready"))},i.render=function(){return Al(this.configContext.Provider,{value:this.props.config},Al("div",{role:"complementary",className:ac("gridjs",sc("container"),this.state.status===Rc.Loading?sc("loading"):null,this.props.config.className.container),style:ll({},this.props.config.style.container,{width:this.props.width})},this.state.status===Rc.Loading&&Al("div",{className:sc("loading-bar")}),Al(oh,null),Al("div",{className:sc("wrapper"),style:{height:this.props.height}},Al(rh,{ref:this.props.config.tableRef,data:this.state.data,header:this.state.header,width:this.props.width,height:this.props.height,status:this.state.status})),Al(sh,null),Al("div",{ref:this.props.config.tempRef,id:"gridjs-temp",className:sc("temp")})))},e}(Zl),lh=function(t){function e(e){var i;return(i=t.call(this)||this).config=void 0,i.plugin=void 0,i.config=new jc({instance:pl(i),eventEmitter:pl(i)}).update(e),i.plugin=i.config.plugin,i}cl(e,t);var i=e.prototype;return i.updateConfig=function(t){return this.config.update(t),this},i.createElement=function(){return Al(ah,{config:this.config,pipeline:this.config.pipeline,header:this.config.header,width:this.config.width,height:this.config.height})},i.forceRender=function(){return this.config&&this.config.container||gc.error("Container is empty. Make sure you call render() before forceRender()",!0),this.config.pipeline.clearCache(),ql(null,this.config.container),ql(this.createElement(),this.config.container),this},i.render=function(t){return t||gc.error("Container element cannot be null",!0),t.childNodes.length>0?(gc.error("The container element "+t+" is not empty. Make sure the container is empty and call render() again"),this):(this.config.container=t,ql(this.createElement(),t),this)},e}(nc),ch=[],hh=gl.__b,ph=gl.__r,dh=gl.diffed,uh=gl.__c,gh=gl.unmount;function fh(){ch.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(vh),t.__H.__h.forEach(bh),t.__H.__h=[]}catch(e){t.__H.__h=[],gl.__e(e,t.__v)}})),ch=[]}gl.__b=function(t){Uc=null,hh&&hh(t)},gl.__r=function(t){ph&&ph(t),0;var e=(Uc=t.__c).__H;e&&(e.__h.forEach(vh),e.__h.forEach(bh),e.__h=[])},gl.diffed=function(t){dh&&dh(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==ch.push(e)&&qc===gl.requestAnimationFrame||((qc=gl.requestAnimationFrame)||function(t){var e,i=function(){clearTimeout(n),mh&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(i,100);mh&&(e=requestAnimationFrame(i))})(fh)),Uc=void 0},gl.__c=function(t,e){e.some((function(t){try{t.__h.forEach(vh),t.__h=t.__h.filter((function(t){return!t.__||bh(t)}))}catch(i){e.some((function(t){t.__h&&(t.__h=[])})),e=[],gl.__e(i,t.__v)}})),uh&&uh(t,e)},gl.unmount=function(t){gh&&gh(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(vh)}catch(t){gl.__e(t,e.__v)}};var mh="function"==typeof requestAnimationFrame;function vh(t){var e=Uc;"function"==typeof t.__c&&t.__c(),Uc=e}function bh(t){var e=Uc;t.__c=t.__(),Uc=e}class yh extends O{static get properties(){return Object.assign({label:{type:String},property:{type:String},sort:{type:Boolean},width:{type:String}},super.properties)}constructor(){super(),this.label="no-label",this.property=null,this.sort=!1,this.width=null}connectedCallback(){super.connectedCallback()}data(){const t={name:this.label,sort:{enabled:this.sort},formatter:t=>Ql(t)};return this.property&&(t.id=this.property),this.width&&(t.width=this.width),t}}customElements.define("pb-table-column",yh);class _h extends(I(O)){static get properties(){return Object.assign({source:{type:String},cssPath:{type:String,attribute:"css-path"},resizable:{type:Boolean},perPage:{type:Number,attribute:"per-page"},height:{type:String},search:{type:Boolean},_params:{type:Object}},super.properties)}constructor(){super(),this.cssPath="../css/gridjs",this._params={},this.resizable=!1,this.search=!1,this.perPage=10,this.height=null,this.fixedHeader=!1}connectedCallback(){if(super.connectedCallback(),this.subscribeTo("pb-search-resubmit",t=>{this._params=Object.assign({},t.detail.params),this._submit()}),window.addEventListener("popstate",t=>{this._params=t.state,this._submit()}),!this.height){const t=getComputedStyle(this).getPropertyValue("--pb-table-grid-height");this.height=t||"auto"}}firstUpdated(){const t=this.shadowRoot.getElementById("table"),e=this.querySelectorAll("pb-table-column"),i=[];e.forEach(t=>i.push(t.data())),_h.waitOnce("pb-page-ready",()=>{this._params=this.getParameters();const e=this.toAbsoluteURL(this.source),n={height:this.height,fixedHeader:!0,columns:i,resizable:this.resizable,server:{url:e,then:t=>t.results,total:t=>t.count},sort:{multiColumn:!1,enabled:!0,server:{url:(t,e)=>{if(!e.length)return t;const n=e[0];return`${t}${t.indexOf("?")>-1?"&":"?"}order=${i[n.index].id}&dir=${1===n.direction?"asc":"desc"}`}}},pagination:{enabled:!0,limit:this.perPage,server:{url:(t,e,i)=>{const n=this.shadowRoot.getElementById("form");return n&&Object.assign(this._params,n.serializeForm()),this._params.limit=i,this._params.start=e*i+1,this.setParameters(this._params),this.pushHistory("grid",this._params),`${t}${t.indexOf("?")>-1?"&":"?"}${new URLSearchParams(this._params).toString()}`}}}};this.grid=new lh(n),this.grid.on("load",()=>{this.emitTo("pb-results-received",{params:this._params})}),this.grid.render(t)})}_submit(){this.grid.forceRender()}render(){const t=R(this.cssPath);return V`
|
|
4231
4231
|
<link href="${t}/mermaid.min.css" rel="stylesheet">
|
|
4232
4232
|
${this.search?V`
|
|
4233
4233
|
<iron-form id="form">
|
|
@@ -4246,7 +4246,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4246
4246
|
button {
|
|
4247
4247
|
border: 0;
|
|
4248
4248
|
}
|
|
4249
|
-
`}}customElements.define("pb-table-grid",
|
|
4249
|
+
`}}customElements.define("pb-table-grid",_h);class wh extends(I(O)){static get properties(){return Object.assign({url:{type:String},selected:{type:String},subforms:{type:String},_categories:{type:Array}},super.properties)}constructor(){super(),this._categories=[],this._params={},this.selected=null,this.subforms=null}connectedCallback(){super.connectedCallback(),this.selected=this.getParameter("category",this.selected),window.addEventListener("popstate",t=>{console.log("<pb-split-list> popstate: %o",t),this.selected=t.state.category,this.submit()}),this.subscribeTo("pb-submit",this.load.bind(this))}firstUpdated(){super.firstUpdated(),wh.waitOnce("pb-page-ready",()=>{this.load()})}submit(){this.load()}load(){const t=this._paramsFromSubforms({category:this.selected});this.setParameters(t),this.pushHistory("pb-split-list",t);const e=new URLSearchParams(t),i=`${this.toAbsoluteURL(this.url)}?${e.toString()}`;console.log("<pb-split-list> Fetching from URL: "+i),this.emitTo("pb-start-update"),fetch(i).then(t=>t.ok?t.json():Promise.reject(t.status)).then(t=>{this._categories=t.categories,this.innerHTML=t.items.join(""),this.emitTo("pb-end-update")}).catch(t=>{console.error("<pb-split-list> Error caught: "+t),this.emitTo("pb-end-update")})}_selectCategory(t,e){t.preventDefault(),this.selected=e,this.load()}_paramsFromSubforms(t){return this.subforms&&document.querySelectorAll(this.subforms).forEach(e=>{e.serializeForm&&Object.assign(t,e.serializeForm())}),t}render(){return V`
|
|
4250
4250
|
<header>
|
|
4251
4251
|
${this._categories.map(t=>V`
|
|
4252
4252
|
<a part="${this.selected===t.category?"active-category":"category"}" href="#${t.category}" title="${t.count}" class="${this.selected===t.category?"active":""}"
|
|
@@ -4285,7 +4285,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4285
4285
|
text-decoration: none;
|
|
4286
4286
|
color: var(--pb-highlight-color);
|
|
4287
4287
|
}
|
|
4288
|
-
`}}customElements.define("pb-split-list",_h);class wh{constructor(t={},e=60,i=["D","W","M","Y","5Y","10Y"]){this.data={invalid:{},valid:{}},this.maxInterval=e,this.scopes=i,this._validateJsonData(t)}getMinDateStr(){return Object.keys(this.data.valid).sort()[0]}getMaxDateStr(){let t=Object.keys(this.data.valid);return t.sort()[t.length-1]}getMinDate(){return this._dateStrToUTCDate(this.getMinDateStr())}getMaxDate(){return this._dateStrToUTCDate(this.getMaxDateStr())}getEndOfRangeDate(t,e){return this._UTCDateToDateStr(this._increaseDateBy(t,e))}export(t){if(t=t||this._autoAssignScope(),!this.scopes.includes(t))throw new Error(`invalid scope provided, expected: ["10Y", "5Y", "Y", "M", "W", "D"]. Got: "${t}"`);const e={data:[],scope:t,binTitleRotated:this._binTitleRotatedLookup(t)};if(0===Object.keys(this.data.valid).length)return e;const i=this._classify(this.getMinDateStr(),t),n=this._getFirstDay(i);let r=this._dateStrToUTCDate(n);const o=this.getMaxDate();for(;r<=o;){const i=this._UTCDateToDateStr(r),n=this._classify(i,t);e.data.push(this._buildBinObject(i,n,t)),r=this._increaseDateBy(t,r)}if(Object.keys(this.data.valid).sort().forEach(i=>{const n=this._classify(i,t),r=e.data.find(t=>t.category===n);try{const t=this.data.valid[i];"object"==typeof t?(r.value+=t.count||0,t.info&&(r.info=r.info.concat(t.info))):r.value+=this.data.valid[i]||0}catch(t){console.log(t),console.log("currentCategory"),console.log(n)}}),this.data.invalid){let t=0,i=[];Object.values(this.data.invalid).forEach(e=>{"object"==typeof e?(t+=e.count||0,i=i.concat(e.info)):t+=e}),t>0&&e.data.push({tooltip:a("timeline.unknown"),title:a("timeline.unknown"),category:"?",separator:!0,value:t,info:i})}return e}_autoAssignScope(){for(let t=0;t<this.scopes.length;t++)if(this._computeIntervalSize(this.scopes[t])<=this.maxInterval)return this.scopes[t];throw new Error(`Interval too big! Computed: ${this._computeIntervalSize(this.scopes[i])}. Allowed: ${this.maxInterval}. Try to increase maxInterval.`)}_validateJsonData(t){Object.keys(t).sort().forEach(e=>{this._isValidDateStr(e)?this.data.valid[e]=t[e]:this.data.invalid[e]=t[e]})}_binTitleRotatedLookup(t){return{"10Y":!0,"5Y":!0,Y:!0,M:!1,W:!0,D:!0}[t]}_buildBinObject(t,e,i){const n=t.split("-"),r=n[0],o=n[1],s=n[2],a={dateStr:t,category:e,value:0,info:[]};if("10Y"===i)a.tooltip=`${e} - ${Number(e)+9}`,a.selectionStart=""+e,a.selectionEnd=""+(Number(e)+9),Number(e)%100==0&&(a.title=`${e} - ${Number(e)+99}`,a.binTitle=e,a.seperator=!0);else if("5Y"===i)a.tooltip=`${e} - ${Number(e)+4}`,a.selectionStart=""+e,a.selectionEnd=""+(Number(e)+4),Number(e)%50==0&&(a.title=`${e} - ${Number(e)+49}`,a.binTitle=e,a.seperator=!0);else if("Y"===i)a.tooltip=e,a.selectionStart=e,a.selectionEnd=e,Number(e)%10==0&&(a.title=`${e} - ${Number(e)+9}`,a.binTitle=""+e,a.seperator=!0);else if("M"===i){const t=Number(o),e=this._monthLookup(t);a.binTitle=e[0],a.tooltip=`${e} ${r}`,a.selectionStart=`${e} ${r}`,a.selectionEnd=`${e} ${r}`,1===t&&(a.title=r,a.seperator=!0)}else if("W"===i){const i=e.split("-")[1];a.tooltip=`${r} ${i}`,a.selectionStart=`${r} ${i}`,a.selectionEnd=`${r} ${i}`;let n=this._dateStrToUTCDate(t),o=this._addDays(n,-7);n.getUTCMonth()!==o.getUTCMonth()&&(a.binTitle=i,a.title=this._monthLookup(n.getUTCMonth()+1)),a.seperator="W1"===i}else{if("D"!==i)throw new Error(`invalid scope provided, expected: ["10Y", "5Y", "Y", "M", "W", "D"]. Got: "${i}"`);a.tooltip=t,a.selectionStart=t,a.selectionEnd=t,1===this._dateStrToUTCDate(t).getUTCDay()&&(a.binTitle=`${Number(s)}.${Number(o)}`,a.title=""+this._classify(t,"W").replace("-"," "),a.seperator=!0)}return a}_classify(t,e){if(!t.match(/^\d{4}-\d{2}-\d{2}$/))throw new Error(`invalid dateStr format, expected "YYYY-MM-DD", got: "${t}".`);if(!t||!e)throw new Error(`both inputs must be provided. Got dateStr=${t}, scope=${e}`);switch(e){case"10Y":case"5Y":const i=Number(e.replace("Y",""));return(Math.floor(Number(t.split("-")[0])/i)*i).toString();case"Y":return t.substr(0,4);case"M":return t.substr(0,7);case"W":const n=this._dateStrToUTCDate(t);return this._UTCDateToWeekFormat(n);case"D":return t}}_getFirstDay(t){if(t.match(/^\d{4}-\d{2}-\d{2}$/))return t;if(t.match(/^\d{4}-\d{2}$/))return t+"-01";if(t.match(/^\d{4}$/))return t+"-01-01";if(t.match(/^\d{4}-W([1-9]|[1-4][0-9]|5[0-3])$/)){const e=t.split("-"),i=Number(e[0]),n=Number(e[1].replace("W",""));return this._getDateStrOfISOWeek(i,n)}throw new Error("invalid categoryStr")}_dateStrToUTCDate(t){if(!this._isValidDateStr(t))throw new Error(`invalid dateStr, expected "YYYY-MM-DD" with month[1-12] and day[1-31], got: "${t}".`);const e=t.split("-"),i=Number(e[0]),n=Number(e[1]),r=Number(e[2]);return new Date(Date.UTC(i,n-1,r))}_UTCDateToDateStr(t){return t.toISOString().split("T")[0]}_UTCDateToWeekFormat(t){return`${this._getISOWeekYear(t)}-W${this._getISOWeek(t)}`}_getISOWeek(t){let e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);let i=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)}_getISOWeekYear(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+3-(e.getDay()+6)%7),e.getFullYear()}_getDateStrOfISOWeek(t,e){let i=new Date(Date.UTC(t,0,1+7*(e-1))),n=i.getUTCDay(),r=i;return n<=4?r.setDate(i.getDate()-i.getUTCDay()+1):r.setDate(i.getDate()+8-i.getUTCDay()),r.toISOString().split("T")[0]}getIntervalSizes(){return{D:this._computeIntervalSize("D"),W:this._computeIntervalSize("W"),M:this._computeIntervalSize("M"),Y:this._computeIntervalSize("Y"),"5Y":this._computeIntervalSize("5Y"),"10Y":this._computeIntervalSize("10Y")}}_computeIntervalSize(t){const e=this.getMaxDateStr();if(!e)return 0;const i=this._dateStrToUTCDate(e),n=this._getFirstDay(this._classify(this.getMinDateStr(),t));let r=this._dateStrToUTCDate(n),o=0;for(;r<=i;)o++,r=this._increaseDateBy(t,r);return o}_increaseDateBy(t,e){switch(t){case"D":return this._addDays(e,1);case"W":return this._addDays(e,7);case"M":return this._addMonths(e,1);case"Y":return this._addYears(e,1);case"5Y":return this._addYears(e,5);case"10Y":return this._addYears(e,10)}}_addDays(t,e){let i=new Date(t.valueOf());return i.setUTCDate(i.getUTCDate()+e),i}_addMonths(t,e){let i=new Date(t.valueOf()),n=i.getUTCDate();return i.setUTCMonth(i.getUTCMonth()+ +e),i.getUTCDate()!=n&&i.setUTCDate(0),i}_addYears(t,e){let i=new Date(t.valueOf());return i.setUTCFullYear(i.getUTCFullYear()+e),i}_isValidDateStr(t){if(!t)return!1;let e=t.split("-");if(3!==e.length)return!1;let i=e[0],n=e[1],r=e[2];return"0000"!==i&&"00"!==r&&"00"!==n&&(!(Number(r)<1||Number(r)>31)&&!(Number(n)<1||Number(n)>12))}_monthLookup(t){if(t>12||t<1)throw new Error("invalid 'num' provided, expected 1-12. Got: "+t);return{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}[t.toString()]}}class xh{constructor(){}run(t){this.input=t,this.day="??",this.month="??",this.year="????";const e=this.input.match(this._isoMatchRegex()),i=this.input.match(this._customRegex()),n=this.input.match(this._weekMatchRegex()),r=this.input.match(this._yearAndMonthRegex());if(e){const t=e[1].split(/-|\/|\s/);this.year=t[0],this.month=this._setWithLeadingZero(t[1]),this.day=this._setWithLeadingZero(t[2])}else if(r){const t=r[1].split("-");this.year=t[0],this.month=this._setWithLeadingZero(t[1]),this.day="01"}else if(i){const t=i[0].split(/\.|\s|\/|-/);this.day=this._setWithLeadingZero(t[0]),this.month=this._setWithLeadingZero(t[1]),this.year=t[2]}else{if(n){const t=n[0].split(/\.|\s|\/|-/),e=Number(t[0]),i=Number(t[1].replace("W0","").replace("W",""));return this._getDateStrOfISOWeek(e,i)}this._findYear(),this._findMonth(),this._findDay()}return this._buildResult()}_buildResult(){return"????"!=this.year&&"??"===this.month&&(this.month="01"),"??"!=this.month&&"??"===this.day&&(this.day="01"),`${this.year}-${this.month}-${this.day}`}_isoMatchRegex(){return/(?:\s|^)(\d{4}(-|\s|\/)([0][1-9]|[1-9]|10|11|12)(-|\s|\/)([0][1-9]|[1-2][0-9]|3[01]|[1-9]))(?=\s|$|\.)/}_customRegex(){return/\d{1,2}(\.|\s|\/|-)\d{1,2}(\.|\s|\/|-)\d{4}/}_weekMatchRegex(){return/\d{4}(\.|\s|\/|-)W\d{1,2}(?=\s|$|\.)/}_yearAndMonthRegex(){return/(?:\s|^)(\d{4}-([0][1-9]|[1-9]|10|11|12))(?=\s|$)/}_findYear(){let t=/[1-9]{1}[0-9]{3}/;const e=this.input.match(t);e&&(this.year=e[0],this._removeMatchFromInput(e))}_findMonth(){this._monthDictionaryValues().forEach(t=>{const e=new RegExp(`(?:\\s|^)(${t})(?=\\s|$|\\.)`,"i"),i=this.input.match(e);if(i)return this.month=this._monthDictionary()[i[1].toLowerCase()],this._removeMatchFromInput(i),this.month})}_findDay(){const t=/(?:\s|^)([0][1-9]|[1-2][0-9]|3[01]|[1-9])(?=\s|$|\.|st|nd|rd|th)/,e=this.input.match(t);e&&(this.day=this._setWithLeadingZero(e[1]))}_setWithLeadingZero(t){return 1==(t=t.toString()).length?"0"+t:t}_removeMatchFromInput(t){if(t&&t[0]&&t.index){let e=t[0].length,i=this.input.split("");i.splice(t.index,e),this.input=i.join("")}}_monthDictionaryValues(){return Object.keys(this._monthDictionary())}_monthDictionary(){return{jan:"01",januar:"01",feb:"02",februar:"02","mär":"03","märz":"03",apr:"04",april:"04",mai:"05",mai:"05",jun:"06",juni:"06",jul:"07",juli:"07",aug:"08",august:"08",sep:"09",september:"09",okt:"10",oktober:"10",nov:"11",november:"11",dez:"12",dezember:"12",jan:"01",january:"01",feb:"02",february:"02",mar:"03",march:"03",apr:"04",april:"04",may:"05",may:"05",jun:"06",june:"06",jul:"07",july:"07",aug:"08",august:"08",sep:"09",september:"09",oct:"10",october:"10",nov:"11",november:"11",dec:"12",december:"12",janv:"01",janvier:"01","févr":"02","février'":"02",mars:"03",mars:"03",avr:"04",avril:"04",mai:"05",mai:"05",juin:"06",juin:"06",juil:"07",juillet:"07","août":"08","août":"08",sept:"09",septembre:"09",oct:"10",octobre:"10",nov:"11",novembre:"11","déc":"12","décembre":"12",gen:"01",gennaio:"01",feb:"02",febbraio:"02",mar:"03",marzo:"03",apr:"04",aprile:"04",mag:"05",maggio:"05",giu:"06",giugno:"06",lug:"07",luglio:"07",ago:"08",agosto:"08",set:"09",settembre:"09",ott:"10",ottobre:"10",nov:"11",novembre:"11",dic:"12",dicembre:"12"}}_getDateStrOfISOWeek(t,e){let i=new Date(t,0,1+7*(e-1)),n=i.getDay(),r=i;return n<=4?r.setDate(i.getDate()-i.getDay()+1):r.setDate(i.getDate()+8-i.getDay()),r.getFullYear()>t?t+"-12-31":r.getFullYear()<t?t+"-01-01":this._dateToDateStr(r)}_dateToDateStr(t){let e=new Date(t),i=this._setWithLeadingZero(e.getMonth()+1),n=this._setWithLeadingZero(e.getDate());return`${e.getFullYear()}-${i}-${n}`}}class kh extends(I(O)){static get styles(){return P`
|
|
4288
|
+
`}}customElements.define("pb-split-list",wh);class xh{constructor(t={},e=60,i=["D","W","M","Y","5Y","10Y"]){this.data={invalid:{},valid:{}},this.maxInterval=e,this.scopes=i,this._validateJsonData(t)}getMinDateStr(){return Object.keys(this.data.valid).sort()[0]}getMaxDateStr(){let t=Object.keys(this.data.valid);return t.sort()[t.length-1]}getMinDate(){return this._dateStrToUTCDate(this.getMinDateStr())}getMaxDate(){return this._dateStrToUTCDate(this.getMaxDateStr())}getEndOfRangeDate(t,e){return this._UTCDateToDateStr(this._increaseDateBy(t,e))}export(t){if(t=t||this._autoAssignScope(),!this.scopes.includes(t))throw new Error(`invalid scope provided, expected: ["10Y", "5Y", "Y", "M", "W", "D"]. Got: "${t}"`);const e={data:[],scope:t,binTitleRotated:this._binTitleRotatedLookup(t)};if(0===Object.keys(this.data.valid).length)return e;const i=this._classify(this.getMinDateStr(),t),n=this._getFirstDay(i);let r=this._dateStrToUTCDate(n);const o=this.getMaxDate();for(;r<=o;){const i=this._UTCDateToDateStr(r),n=this._classify(i,t);e.data.push(this._buildBinObject(i,n,t)),r=this._increaseDateBy(t,r)}if(Object.keys(this.data.valid).sort().forEach(i=>{const n=this._classify(i,t),r=e.data.find(t=>t.category===n);try{const t=this.data.valid[i];"object"==typeof t?(r.value+=t.count||0,t.info&&(r.info=r.info.concat(t.info))):r.value+=this.data.valid[i]||0}catch(t){console.log(t),console.log("currentCategory"),console.log(n)}}),this.data.invalid){let t=0,i=[];Object.values(this.data.invalid).forEach(e=>{"object"==typeof e?(t+=e.count||0,i=i.concat(e.info)):t+=e}),t>0&&e.data.push({tooltip:a("timeline.unknown"),title:a("timeline.unknown"),category:"?",separator:!0,value:t,info:i})}return e}_autoAssignScope(){for(let t=0;t<this.scopes.length;t++)if(this._computeIntervalSize(this.scopes[t])<=this.maxInterval)return this.scopes[t];throw new Error(`Interval too big! Computed: ${this._computeIntervalSize(this.scopes[i])}. Allowed: ${this.maxInterval}. Try to increase maxInterval.`)}_validateJsonData(t){Object.keys(t).sort().forEach(e=>{this._isValidDateStr(e)?this.data.valid[e]=t[e]:this.data.invalid[e]=t[e]})}_binTitleRotatedLookup(t){return{"10Y":!0,"5Y":!0,Y:!0,M:!1,W:!0,D:!0}[t]}_buildBinObject(t,e,i){const n=t.split("-"),r=n[0],o=n[1],s=n[2],a={dateStr:t,category:e,value:0,info:[]};if("10Y"===i)a.tooltip=`${e} - ${Number(e)+9}`,a.selectionStart=""+e,a.selectionEnd=""+(Number(e)+9),Number(e)%100==0&&(a.title=`${e} - ${Number(e)+99}`,a.binTitle=e,a.seperator=!0);else if("5Y"===i)a.tooltip=`${e} - ${Number(e)+4}`,a.selectionStart=""+e,a.selectionEnd=""+(Number(e)+4),Number(e)%50==0&&(a.title=`${e} - ${Number(e)+49}`,a.binTitle=e,a.seperator=!0);else if("Y"===i)a.tooltip=e,a.selectionStart=e,a.selectionEnd=e,Number(e)%10==0&&(a.title=`${e} - ${Number(e)+9}`,a.binTitle=""+e,a.seperator=!0);else if("M"===i){const t=Number(o),e=this._monthLookup(t);a.binTitle=e[0],a.tooltip=`${e} ${r}`,a.selectionStart=`${e} ${r}`,a.selectionEnd=`${e} ${r}`,1===t&&(a.title=r,a.seperator=!0)}else if("W"===i){const i=e.split("-")[1];a.tooltip=`${r} ${i}`,a.selectionStart=`${r} ${i}`,a.selectionEnd=`${r} ${i}`;let n=this._dateStrToUTCDate(t),o=this._addDays(n,-7);n.getUTCMonth()!==o.getUTCMonth()&&(a.binTitle=i,a.title=this._monthLookup(n.getUTCMonth()+1)),a.seperator="W1"===i}else{if("D"!==i)throw new Error(`invalid scope provided, expected: ["10Y", "5Y", "Y", "M", "W", "D"]. Got: "${i}"`);a.tooltip=t,a.selectionStart=t,a.selectionEnd=t,1===this._dateStrToUTCDate(t).getUTCDay()&&(a.binTitle=`${Number(s)}.${Number(o)}`,a.title=""+this._classify(t,"W").replace("-"," "),a.seperator=!0)}return a}_classify(t,e){if(!t.match(/^\d{4}-\d{2}-\d{2}$/))throw new Error(`invalid dateStr format, expected "YYYY-MM-DD", got: "${t}".`);if(!t||!e)throw new Error(`both inputs must be provided. Got dateStr=${t}, scope=${e}`);switch(e){case"10Y":case"5Y":const i=Number(e.replace("Y",""));return(Math.floor(Number(t.split("-")[0])/i)*i).toString();case"Y":return t.substr(0,4);case"M":return t.substr(0,7);case"W":const n=this._dateStrToUTCDate(t);return this._UTCDateToWeekFormat(n);case"D":return t}}_getFirstDay(t){if(t.match(/^\d{4}-\d{2}-\d{2}$/))return t;if(t.match(/^\d{4}-\d{2}$/))return t+"-01";if(t.match(/^\d{4}$/))return t+"-01-01";if(t.match(/^\d{4}-W([1-9]|[1-4][0-9]|5[0-3])$/)){const e=t.split("-"),i=Number(e[0]),n=Number(e[1].replace("W",""));return this._getDateStrOfISOWeek(i,n)}throw new Error("invalid categoryStr")}_dateStrToUTCDate(t){if(!this._isValidDateStr(t))throw new Error(`invalid dateStr, expected "YYYY-MM-DD" with month[1-12] and day[1-31], got: "${t}".`);const e=t.split("-"),i=Number(e[0]),n=Number(e[1]),r=Number(e[2]);return new Date(Date.UTC(i,n-1,r))}_UTCDateToDateStr(t){return t.toISOString().split("T")[0]}_UTCDateToWeekFormat(t){return`${this._getISOWeekYear(t)}-W${this._getISOWeek(t)}`}_getISOWeek(t){let e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);let i=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)}_getISOWeekYear(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+3-(e.getDay()+6)%7),e.getFullYear()}_getDateStrOfISOWeek(t,e){let i=new Date(Date.UTC(t,0,1+7*(e-1))),n=i.getUTCDay(),r=i;return n<=4?r.setDate(i.getDate()-i.getUTCDay()+1):r.setDate(i.getDate()+8-i.getUTCDay()),r.toISOString().split("T")[0]}getIntervalSizes(){return{D:this._computeIntervalSize("D"),W:this._computeIntervalSize("W"),M:this._computeIntervalSize("M"),Y:this._computeIntervalSize("Y"),"5Y":this._computeIntervalSize("5Y"),"10Y":this._computeIntervalSize("10Y")}}_computeIntervalSize(t){const e=this.getMaxDateStr();if(!e)return 0;const i=this._dateStrToUTCDate(e),n=this._getFirstDay(this._classify(this.getMinDateStr(),t));let r=this._dateStrToUTCDate(n),o=0;for(;r<=i;)o++,r=this._increaseDateBy(t,r);return o}_increaseDateBy(t,e){switch(t){case"D":return this._addDays(e,1);case"W":return this._addDays(e,7);case"M":return this._addMonths(e,1);case"Y":return this._addYears(e,1);case"5Y":return this._addYears(e,5);case"10Y":return this._addYears(e,10)}}_addDays(t,e){let i=new Date(t.valueOf());return i.setUTCDate(i.getUTCDate()+e),i}_addMonths(t,e){let i=new Date(t.valueOf()),n=i.getUTCDate();return i.setUTCMonth(i.getUTCMonth()+ +e),i.getUTCDate()!=n&&i.setUTCDate(0),i}_addYears(t,e){let i=new Date(t.valueOf());return i.setUTCFullYear(i.getUTCFullYear()+e),i}_isValidDateStr(t){if(!t)return!1;let e=t.split("-");if(3!==e.length)return!1;let i=e[0],n=e[1],r=e[2];return"0000"!==i&&"00"!==r&&"00"!==n&&(!(Number(r)<1||Number(r)>31)&&!(Number(n)<1||Number(n)>12))}_monthLookup(t){if(t>12||t<1)throw new Error("invalid 'num' provided, expected 1-12. Got: "+t);return{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}[t.toString()]}}class kh{constructor(){}run(t){this.input=t,this.day="??",this.month="??",this.year="????";const e=this.input.match(this._isoMatchRegex()),i=this.input.match(this._customRegex()),n=this.input.match(this._weekMatchRegex()),r=this.input.match(this._yearAndMonthRegex());if(e){const t=e[1].split(/-|\/|\s/);this.year=t[0],this.month=this._setWithLeadingZero(t[1]),this.day=this._setWithLeadingZero(t[2])}else if(r){const t=r[1].split("-");this.year=t[0],this.month=this._setWithLeadingZero(t[1]),this.day="01"}else if(i){const t=i[0].split(/\.|\s|\/|-/);this.day=this._setWithLeadingZero(t[0]),this.month=this._setWithLeadingZero(t[1]),this.year=t[2]}else{if(n){const t=n[0].split(/\.|\s|\/|-/),e=Number(t[0]),i=Number(t[1].replace("W0","").replace("W",""));return this._getDateStrOfISOWeek(e,i)}this._findYear(),this._findMonth(),this._findDay()}return this._buildResult()}_buildResult(){return"????"!=this.year&&"??"===this.month&&(this.month="01"),"??"!=this.month&&"??"===this.day&&(this.day="01"),`${this.year}-${this.month}-${this.day}`}_isoMatchRegex(){return/(?:\s|^)(\d{4}(-|\s|\/)([0][1-9]|[1-9]|10|11|12)(-|\s|\/)([0][1-9]|[1-2][0-9]|3[01]|[1-9]))(?=\s|$|\.)/}_customRegex(){return/\d{1,2}(\.|\s|\/|-)\d{1,2}(\.|\s|\/|-)\d{4}/}_weekMatchRegex(){return/\d{4}(\.|\s|\/|-)W\d{1,2}(?=\s|$|\.)/}_yearAndMonthRegex(){return/(?:\s|^)(\d{4}-([0][1-9]|[1-9]|10|11|12))(?=\s|$)/}_findYear(){let t=/[1-9]{1}[0-9]{3}/;const e=this.input.match(t);e&&(this.year=e[0],this._removeMatchFromInput(e))}_findMonth(){this._monthDictionaryValues().forEach(t=>{const e=new RegExp(`(?:\\s|^)(${t})(?=\\s|$|\\.)`,"i"),i=this.input.match(e);if(i)return this.month=this._monthDictionary()[i[1].toLowerCase()],this._removeMatchFromInput(i),this.month})}_findDay(){const t=/(?:\s|^)([0][1-9]|[1-2][0-9]|3[01]|[1-9])(?=\s|$|\.|st|nd|rd|th)/,e=this.input.match(t);e&&(this.day=this._setWithLeadingZero(e[1]))}_setWithLeadingZero(t){return 1==(t=t.toString()).length?"0"+t:t}_removeMatchFromInput(t){if(t&&t[0]&&t.index){let e=t[0].length,i=this.input.split("");i.splice(t.index,e),this.input=i.join("")}}_monthDictionaryValues(){return Object.keys(this._monthDictionary())}_monthDictionary(){return{jan:"01",januar:"01",feb:"02",februar:"02","mär":"03","märz":"03",apr:"04",april:"04",mai:"05",mai:"05",jun:"06",juni:"06",jul:"07",juli:"07",aug:"08",august:"08",sep:"09",september:"09",okt:"10",oktober:"10",nov:"11",november:"11",dez:"12",dezember:"12",jan:"01",january:"01",feb:"02",february:"02",mar:"03",march:"03",apr:"04",april:"04",may:"05",may:"05",jun:"06",june:"06",jul:"07",july:"07",aug:"08",august:"08",sep:"09",september:"09",oct:"10",october:"10",nov:"11",november:"11",dec:"12",december:"12",janv:"01",janvier:"01","févr":"02","février'":"02",mars:"03",mars:"03",avr:"04",avril:"04",mai:"05",mai:"05",juin:"06",juin:"06",juil:"07",juillet:"07","août":"08","août":"08",sept:"09",septembre:"09",oct:"10",octobre:"10",nov:"11",novembre:"11","déc":"12","décembre":"12",gen:"01",gennaio:"01",feb:"02",febbraio:"02",mar:"03",marzo:"03",apr:"04",aprile:"04",mag:"05",maggio:"05",giu:"06",giugno:"06",lug:"07",luglio:"07",ago:"08",agosto:"08",set:"09",settembre:"09",ott:"10",ottobre:"10",nov:"11",novembre:"11",dic:"12",dicembre:"12"}}_getDateStrOfISOWeek(t,e){let i=new Date(t,0,1+7*(e-1)),n=i.getDay(),r=i;return n<=4?r.setDate(i.getDate()-i.getDay()+1):r.setDate(i.getDate()+8-i.getDay()),r.getFullYear()>t?t+"-12-31":r.getFullYear()<t?t+"-01-01":this._dateToDateStr(r)}_dateToDateStr(t){let e=new Date(t),i=this._setWithLeadingZero(e.getMonth()+1),n=this._setWithLeadingZero(e.getDate());return`${e.getFullYear()}-${i}-${n}`}}class zh extends(I(O)){static get styles(){return P`
|
|
4289
4289
|
:host{
|
|
4290
4290
|
display: block;
|
|
4291
4291
|
}
|
|
@@ -4478,7 +4478,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4478
4478
|
.close.rounded::before, .close.rounded::after {
|
|
4479
4479
|
border-radius: 5px;
|
|
4480
4480
|
}
|
|
4481
|
-
`}static get properties(){return Object.assign(Object.assign({},super.properties),{},{startDate:{type:String,reflect:!0,attribute:"start-date"},endDate:{type:String,reflect:!0,attribute:"end-date"},scope:{type:String},scopes:{type:Array},url:{type:String},auto:{type:Boolean},resettable:{type:Boolean},_language:{type:String}})}constructor(){super(),this.maxHeight=80,this.multiplier=.75,this.mousedown=!1,this.startDate="",this.endDate="",this.scope="",this.scopes=["D","W","M","Y","5Y","10Y"],this.url="",this.auto=!1,this.resettable=!1,this._language="en",this._resetSelectionProperty()}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-results-received",()=>{const t=this.shadowRoot.getElementById("loadData"),e=this.toAbsoluteURL(this.url,this.getEndpoint());t.url=e,t.generateRequest()}),this.subscribeTo("pb-i18n-update",t=>{this._language=t.detail.language})}firstUpdated(){this.bins=this.shadowRoot.querySelectorAll(".bin-container"),this.tooltip=this.shadowRoot.getElementById("tooltip"),document.addEventListener("mouseup",()=>{this._mouseUp()}),document.addEventListener("pb-timeline-daterange-changed",t=>{const e=t.detail.startDateStr,i=t.detail.endDateStr;if(this._fullRangeSelected(e,i))return console.log("_fullRangeSelected() is true"),void this.resetSelection();this.select(e,i)}),document.addEventListener("pb-timeline-reset-selection",()=>{this.resetSelection(),this._hideTooltip()})}updated(t){t.has("scope")&&this.searchResult&&(this.scopes.includes(this.scope)?this.setData(this.searchResult.export(this.scope)):console.error("unknown scope ",this.scope))}setData(t){this.dataObj=t,this.maxValue=Math.max(...this.dataObj.data.map(t=>t.value)),this.requestUpdate(),this.updateComplete.then(()=>{this.bins=this.shadowRoot.querySelectorAll(".bin-container"),this.resetSelection(),this._resetTooltip()})}get label(){return this.dataObj&&0!==this.dataObj.data.length?1===this.dataObj.data.length?this.dataObj.data[0].category:`${this.dataObj.data[0].category} – ${this.dataObj.data[this.dataObj.data.length-1].category}`:""}getSelectedStartDateStr(){return this.shadowRoot.querySelectorAll(".bin-container.selected")[0].dataset.selectionstart}getSelectedEndDateStr(){const t=this.shadowRoot.querySelectorAll(".bin-container.selected");return t[t.length-1].dataset.selectionend}getSelectedCategories(){const t=this.shadowRoot.querySelectorAll(".bin-container.selected"),e=[];return t.forEach(t=>e.push(t.dataset.category)),e}getSelectedItemCount(){const t=this.shadowRoot.querySelectorAll(".bin-container.selected");let e=0;return t.forEach(t=>{e+=parseInt(t.dataset.value)}),e}resetSelection(){this.bins.forEach(t=>{t.classList.remove("selected")}),this._resetSelectionProperty(),this._hideTooltip()}select(t,e){this.bins.forEach(i=>{i.dataset.isodatestr>=t&&i.dataset.isodatestr<=e?i.classList.add("selected"):i.classList.remove("selected")}),this._displayTooltip(),this._showtooltipSelection()}_fullRangeSelected(t,e){const i=this.bins[0].dataset.isodatestr,n=e===this.bins[this.bins.length-1].dataset.isodatestr;return i&&n}_mouseDown(t){this.resetSelection(),this.mousedown=!0,this.selection.start=this._getMousePosition(t).x,this._applySelectionToBins()}_mouseUp(){if(this.mousedown){this.mousedown=!1;const t=this.getSelectedStartDateStr(),e=this.getSelectedEndDateStr();if(t){const i=(new
|
|
4481
|
+
`}static get properties(){return Object.assign(Object.assign({},super.properties),{},{startDate:{type:String,reflect:!0,attribute:"start-date"},endDate:{type:String,reflect:!0,attribute:"end-date"},scope:{type:String},scopes:{type:Array},url:{type:String},auto:{type:Boolean},resettable:{type:Boolean},_language:{type:String}})}constructor(){super(),this.maxHeight=80,this.multiplier=.75,this.mousedown=!1,this.startDate="",this.endDate="",this.scope="",this.scopes=["D","W","M","Y","5Y","10Y"],this.url="",this.auto=!1,this.resettable=!1,this._language="en",this._resetSelectionProperty()}connectedCallback(){super.connectedCallback(),this.subscribeTo("pb-results-received",()=>{const t=this.shadowRoot.getElementById("loadData"),e=this.toAbsoluteURL(this.url,this.getEndpoint());t.url=e,t.generateRequest()}),this.subscribeTo("pb-i18n-update",t=>{this._language=t.detail.language})}firstUpdated(){this.bins=this.shadowRoot.querySelectorAll(".bin-container"),this.tooltip=this.shadowRoot.getElementById("tooltip"),document.addEventListener("mouseup",()=>{this._mouseUp()}),document.addEventListener("pb-timeline-daterange-changed",t=>{const e=t.detail.startDateStr,i=t.detail.endDateStr;if(this._fullRangeSelected(e,i))return console.log("_fullRangeSelected() is true"),void this.resetSelection();this.select(e,i)}),document.addEventListener("pb-timeline-reset-selection",()=>{this.resetSelection(),this._hideTooltip()})}updated(t){t.has("scope")&&this.searchResult&&(this.scopes.includes(this.scope)?this.setData(this.searchResult.export(this.scope)):console.error("unknown scope ",this.scope))}setData(t){this.dataObj=t,this.maxValue=Math.max(...this.dataObj.data.map(t=>t.value)),this.requestUpdate(),this.updateComplete.then(()=>{this.bins=this.shadowRoot.querySelectorAll(".bin-container"),this.resetSelection(),this._resetTooltip()})}get label(){return this.dataObj&&0!==this.dataObj.data.length?1===this.dataObj.data.length?this.dataObj.data[0].category:`${this.dataObj.data[0].category} – ${this.dataObj.data[this.dataObj.data.length-1].category}`:""}getSelectedStartDateStr(){return this.shadowRoot.querySelectorAll(".bin-container.selected")[0].dataset.selectionstart}getSelectedEndDateStr(){const t=this.shadowRoot.querySelectorAll(".bin-container.selected");return t[t.length-1].dataset.selectionend}getSelectedCategories(){const t=this.shadowRoot.querySelectorAll(".bin-container.selected"),e=[];return t.forEach(t=>e.push(t.dataset.category)),e}getSelectedItemCount(){const t=this.shadowRoot.querySelectorAll(".bin-container.selected");let e=0;return t.forEach(t=>{e+=parseInt(t.dataset.value)}),e}resetSelection(){this.bins.forEach(t=>{t.classList.remove("selected")}),this._resetSelectionProperty(),this._hideTooltip()}select(t,e){this.bins.forEach(i=>{i.dataset.isodatestr>=t&&i.dataset.isodatestr<=e?i.classList.add("selected"):i.classList.remove("selected")}),this._displayTooltip(),this._showtooltipSelection()}_fullRangeSelected(t,e){const i=this.bins[0].dataset.isodatestr,n=e===this.bins[this.bins.length-1].dataset.isodatestr;return i&&n}_mouseDown(t){this.resetSelection(),this.mousedown=!0,this.selection.start=this._getMousePosition(t).x,this._applySelectionToBins()}_mouseUp(){if(this.mousedown){this.mousedown=!1;const t=this.getSelectedStartDateStr(),e=this.getSelectedEndDateStr();if(t){const i=(new kh).run(t),n=(new kh).run(e),r=this.getSelectedItemCount();this._dispatchTimelineDaterangeChangedEvent(i,n,this.getSelectedCategories(),r)}}}_mouseMove(t){this.mousedown?(this._brushing(t),this._showtooltipSelection()):void 0===this.selection.start&&this._showtooltip(t)}_mouseenter(){this.dataObj&&this._displayTooltip()}_getMousePosition(t){let e=this.shadowRoot.querySelector(".wrapper").getBoundingClientRect();return{x:t.clientX-e.left+1,y:t.clientY-e.top+1}}_brushing(t){this.selection.end=this._getMousePosition(t).x,this._applySelectionToBins()}_dispatchTimelineDaterangeChangedEvent(t,e,i,n){"????-??-??"===t?this.emitTo("pb-timeline-date-changed",{startDateStr:null,endDateStr:null,categories:["?"],count:n}):t===e?"D"!==this.dataObj.scope?this.emitTo("pb-timeline-daterange-changed",{startDateStr:t,endDateStr:this.searchResult.getEndOfRangeDate(this.dataObj.scope,e),scope:this.dataObj.scope,categories:i,count:n}):this.emitTo("pb-timeline-date-changed",{startDateStr:t,endDateStr:null,scope:this.dataObj.scope,categories:i,count:n}):this.emitTo("pb-timeline-daterange-changed",{startDateStr:t,endDateStr:e,categories:i,scope:this.dataObj.scope,count:n})}_dispatchPbTimelineResetSelectionEvent(){this.emitTo("pb-timeline-reset-selection")}_showtooltip(t){const e=this._getElementInterval(t.currentTarget);let i;e[0]<e[2]?(i=Math.round((e[0]+e[1])/2-10),this.tooltip.classList.remove("right")):(i=Math.round((e[0]+e[1])/2-this.tooltip.offsetWidth)+10,this.tooltip.classList.add("right")),this.tooltip.style.left=i+"px";const n=t.currentTarget.dataset.tooltip,r=this._numberWithCommas(t.currentTarget.dataset.value),o=t.currentTarget.querySelector(".info");this.tooltip.querySelector("#tooltip-text").innerHTML=`<div><strong>${n}</strong>: ${r}</div><ul>${o?o.innerHTML:""}</ul>`}_showtooltipSelection(){const t=this._getSelectedBins(),e=[this._getElementInterval(t[0])[0],this._getElementInterval(t[t.length-1])[1]],i=`${t[0].dataset.selectionstart} - ${t[t.length-1].dataset.selectionend}`,n=t.map(t=>Number(t.dataset.value)).reduce((t,e)=>t+e),r=this._numberWithCommas(n);this.tooltip.querySelector("#tooltip-text").innerHTML=`<strong>${i}</strong>: ${r}`,this.tooltip.querySelector("#tooltip-close").classList.remove("hidden"),this.tooltip.classList.add("draggable");const o=Math.round((e[0]+e[1])/2-this.tooltip.offsetWidth/2);this.tooltip.style.left=o+"px"}_resetTooltip(){this._hideTooltip(),this.tooltip.style.left="-1000px",this.tooltip.querySelector("#tooltip-text").innerHTML=""}_hideTooltip(){void 0===this.selection.start&&(this.tooltip.classList.add("hidden"),this.tooltip.classList.remove("draggable"),this.tooltip.querySelector("#tooltip-close").classList.add("hidden"))}_displayTooltip(){this.tooltip.classList.remove("hidden")}_getElementInterval(t){let e=this.shadowRoot.querySelector(".wrapper").getBoundingClientRect(),i=t,n=[i.getBoundingClientRect().x,i.getBoundingClientRect().x+i.getBoundingClientRect().width];return[n[0]-e.left+1,n[1]-e.left+1,e.width/2]}_getSelectionInterval(){return[this.selection.start,this.selection.end].sort((t,e)=>t-e)}_getSelectedBins(){return Array.prototype.slice.call(this.bins).filter(t=>t.classList.contains("selected"))}_resetSelectionProperty(){this.selection={start:void 0,end:void 0}}_applySelectionToBins(){const t=this._getSelectionInterval();this.bins.forEach(e=>{const i=this._getElementInterval(e);this._areOverlapping(i,t)?e.classList.add("selected"):e.classList.remove("selected")})}_numberWithCommas(t){return new Intl.NumberFormat(this._language,{style:"decimal"}).format(t)}_areOverlapping(t,e){return e[0]<t[0]?e[1]>t[0]:e[0]<t[1]}render(){return V`
|
|
4482
4482
|
<div class="label" part="label">
|
|
4483
4483
|
<span class="label"><slot name="label"></slot>${this.label}</span>
|
|
4484
4484
|
${this.resettable?V`
|
|
@@ -4540,7 +4540,7 @@ const Da=e({is:"iron-label",listeners:{tap:"_tapHandler"},properties:{for:{type:
|
|
|
4540
4540
|
<ul class="info">
|
|
4541
4541
|
${t.info.map(t=>V`<li>${M(t)}</li>`)}
|
|
4542
4542
|
</ul>
|
|
4543
|
-
`:null}async _handleResponse(){await this.updateComplete;const t=this.shadowRoot.getElementById("loadData").lastResponse;let e={};this.startDate&&this.endDate?Object.keys(t).filter(t=>t>=this.startDate&&t<this.endDate).forEach(i=>{e[i]=t[i]}):e=t,this.searchResult=new
|
|
4543
|
+
`:null}async _handleResponse(){await this.updateComplete;const t=this.shadowRoot.getElementById("loadData").lastResponse;let e={};this.startDate&&this.endDate?Object.keys(t).filter(t=>t>=this.startDate&&t<this.endDate).forEach(i=>{e[i]=t[i]}):e=t,this.searchResult=new xh(e,60,this.scopes),this.setData(this.searchResult.export(this.scope)),this.dispatchEvent(new CustomEvent("pb-timeline-loaded",{detail:{value:!0},composed:!0,bubbles:!0}))}}customElements.define("pb-timeline",zh);
|
|
4544
4544
|
/**
|
|
4545
4545
|
@license
|
|
4546
4546
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -4551,7 +4551,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
4551
4551
|
part of the polymer project is also subject to an additional IP rights grant
|
|
4552
4552
|
found at http://polymer.github.io/PATENTS.txt
|
|
4553
4553
|
*/
|
|
4554
|
-
const
|
|
4554
|
+
const Ah=n`<iron-iconset-svg name="editor" size="24">
|
|
4555
4555
|
<svg><defs>
|
|
4556
4556
|
<g id="attach-file"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"></path></g>
|
|
4557
4557
|
<g id="attach-money"><path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"></path></g>
|
|
@@ -4622,7 +4622,7 @@ const zh=n`<iron-iconset-svg name="editor" size="24">
|
|
|
4622
4622
|
<g id="vertical-align-top"><path d="M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"></path></g>
|
|
4623
4623
|
<g id="wrap-text"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></g>
|
|
4624
4624
|
</defs></svg>
|
|
4625
|
-
</iron-iconset-svg>`;document.head.appendChild(
|
|
4625
|
+
</iron-iconset-svg>`;document.head.appendChild(Ah.content);
|
|
4626
4626
|
/**
|
|
4627
4627
|
@license
|
|
4628
4628
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -4633,7 +4633,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
4633
4633
|
part of the polymer project is also subject to an additional IP rights grant
|
|
4634
4634
|
found at http://polymer.github.io/PATENTS.txt
|
|
4635
4635
|
*/
|
|
4636
|
-
const
|
|
4636
|
+
const Sh=n`<iron-iconset-svg name="social" size="24">
|
|
4637
4637
|
<svg><defs>
|
|
4638
4638
|
<g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"></path></g>
|
|
4639
4639
|
<g id="domain"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></g>
|
|
@@ -4666,7 +4666,7 @@ const Ah=n`<iron-iconset-svg name="social" size="24">
|
|
|
4666
4666
|
<g id="share"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"></path></g>
|
|
4667
4667
|
<g id="whatshot"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"></path></g>
|
|
4668
4668
|
</defs></svg>
|
|
4669
|
-
</iron-iconset-svg>`;document.head.appendChild(
|
|
4669
|
+
</iron-iconset-svg>`;document.head.appendChild(Sh.content);
|
|
4670
4670
|
/**
|
|
4671
4671
|
@license
|
|
4672
4672
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -4677,7 +4677,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
4677
4677
|
part of the polymer project is also subject to an additional IP rights grant
|
|
4678
4678
|
found at http://polymer.github.io/PATENTS.txt
|
|
4679
4679
|
*/
|
|
4680
|
-
const
|
|
4680
|
+
const Ch=n`<iron-iconset-svg name="maps" size="24">
|
|
4681
4681
|
<svg><defs>
|
|
4682
4682
|
<g id="add-location"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm4 8h-3v3h-2v-3H8V8h3V5h2v3h3v2z"></path></g>
|
|
4683
4683
|
<g id="beenhere"><path d="M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2zm-9 15l-5-5 1.41-1.41L10 13.17l7.59-7.59L19 7l-9 9z"></path></g>
|
|
@@ -4748,7 +4748,7 @@ const Sh=n`<iron-iconset-svg name="maps" size="24">
|
|
|
4748
4748
|
<g id="transfer-within-a-station"><path d="M16.49 15.5v-1.75L14 16.25l2.49 2.5V17H22v-1.5zm3.02 4.25H14v1.5h5.51V23L22 20.5 19.51 18zM9.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5.75 8.9L3 23h2.1l1.75-8L9 17v6h2v-7.55L8.95 13.4l.6-3C10.85 12 12.8 13 15 13v-2c-1.85 0-3.45-1-4.35-2.45l-.95-1.6C9.35 6.35 8.7 6 8 6c-.25 0-.5.05-.75.15L2 8.3V13h2V9.65l1.75-.75"></path></g>
|
|
4749
4749
|
<g id="zoom-out-map"><path d="M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3zm6 12l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6zm12-6l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"></path></g>
|
|
4750
4750
|
</defs></svg>
|
|
4751
|
-
</iron-iconset-svg>`;document.head.appendChild(
|
|
4751
|
+
</iron-iconset-svg>`;document.head.appendChild(Ch.content);
|
|
4752
4752
|
/**
|
|
4753
4753
|
@license
|
|
4754
4754
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -4759,7 +4759,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
4759
4759
|
part of the polymer project is also subject to an additional IP rights grant
|
|
4760
4760
|
found at http://polymer.github.io/PATENTS.txt
|
|
4761
4761
|
*/
|
|
4762
|
-
const
|
|
4762
|
+
const Eh=n`<iron-iconset-svg name="image" size="24">
|
|
4763
4763
|
<svg><defs>
|
|
4764
4764
|
<g id="add-a-photo"><path d="M3 4V1h2v3h3v2H5v3H3V6H0V4h3zm3 6V7h3V4h7l1.83 2H21c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V10h3zm7 9c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-3.2-5c0 1.77 1.43 3.2 3.2 3.2s3.2-1.43 3.2-3.2-1.43-3.2-3.2-3.2-3.2 1.43-3.2 3.2z"></path></g>
|
|
4765
4765
|
<g id="add-to-photos"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"></path></g>
|
|
@@ -4917,7 +4917,7 @@ const Ch=n`<iron-iconset-svg name="image" size="24">
|
|
|
4917
4917
|
<g id="wb-iridescent"><path d="M5 14.5h14v-6H5v6zM11 .55V3.5h2V.55h-2zm8.04 2.5l-1.79 1.79 1.41 1.41 1.8-1.79-1.42-1.41zM13 22.45V19.5h-2v2.95h2zm7.45-3.91l-1.8-1.79-1.41 1.41 1.79 1.8 1.42-1.42zM3.55 4.46l1.79 1.79 1.41-1.41-1.79-1.79-1.41 1.41zm1.41 15.49l1.79-1.8-1.41-1.41-1.79 1.79 1.41 1.42z"></path></g>
|
|
4918
4918
|
<g id="wb-sunny"><path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"></path></g>
|
|
4919
4919
|
</defs></svg>
|
|
4920
|
-
</iron-iconset-svg>`;document.head.appendChild(
|
|
4920
|
+
</iron-iconset-svg>`;document.head.appendChild(Eh.content),
|
|
4921
4921
|
/**
|
|
4922
4922
|
@license
|
|
4923
4923
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|