3 lines
68 KiB
JavaScript
3 lines
68 KiB
JavaScript
/*! DSFR v1.11.2 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */
|
|
!function(){"use strict";var t=function(){this.modules={}},e={isActive:{configurable:!0},isLegacy:{configurable:!0}};t.prototype.create=function(t){var e=new t;this.modules[e.type]=e},t.prototype.getModule=function(t){return this.modules[t]},t.prototype.add=function(t,e){this.modules[t].add(e)},t.prototype.remove=function(t,e){this.modules[t].remove(e)},e.isActive.get=function(){return this._isActive},e.isActive.set=function(t){var e=this;if(t!==this._isActive){this._isActive=t;var i=Object.keys(this.modules).map((function(t){return e.modules[t]}));if(t)for(var s=0,n=i;s<n.length;s+=1){n[s].activate()}else for(var r=0,o=i;r<o.length;r+=1){o[r].deactivate()}}},e.isLegacy.get=function(){return this._isLegacy},e.isLegacy.set=function(t){t!==this._isLegacy&&(this._isLegacy=t)},Object.defineProperties(t.prototype,e);var i=new t,s="fr",n="dsfr",r="@gouvfr",o="1.11.2",a=function(t,e,i,s){switch(this.level=t,this.light=e,this.dark=i,s){case"warn":this.logger=console.warn;break;case"error":this.logger=console.error;break;default:this.logger=console.log}},c={color:{configurable:!0}};a.prototype.log=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=new h(n),s=0,r=t;s<r.length;s+=1){var o=r[s];i.add(o)}this.print(i)},a.prototype.print=function(t){t.setColor(this.color),this.logger.apply(console,t.getMessage())},c.color.get=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?this.dark:this.light},Object.defineProperties(a.prototype,c);var h=function(t){this.inputs=["%c"],this.styles=["font-family:Marianne","line-height: 1.5"],this.objects=[],t&&this.add(t+" :")};h.prototype.add=function(t){switch(typeof t){case"object":case"function":this.inputs.push("%o "),this.objects.push(t);break;default:this.inputs.push(t+" ")}},h.prototype.setColor=function(t){this.styles.push("color:"+t)},h.prototype.getMessage=function(){return[this.inputs.join(""),this.styles.join(";")].concat(this.objects)};var u={log:new a(0,"#616161","#989898"),debug:new a(1,"#000091","#8B8BFF"),info:new a(2,"#007c3b","#00ed70"),warn:new a(3,"#ba4500","#fa5c00","warn"),error:new a(4,"#D80600","#FF4641","error")},l=function(){var t=this;this.level=2;var e=function(e){var i=u[e];t[e]=function(){for(var e=[],s=arguments.length;s--;)e[s]=arguments[s];t.level<=i.level&&i.log.apply(i,e)},t[e].print=i.print.bind(i)};for(var i in u)e(i)};l.prototype.state=function(){var t=new h;t.add(i),this.log.print(t)},l.prototype.tree=function(){var t=i.getModule("stage");if(t){var e=new h;this._branch(t.root,0,e),this.log.print(e)}},l.prototype._branch=function(t,e,i){var s="";if(e>0){for(var n="",r=0;r<e;r++)n+=" ";s+=n+"└─ "}s+="["+t.id+"] "+t.html,i.add(s),i.add({"@":t}),i.add("\n");for(var o=0,a=t.children;o<a.length;o+=1){var c=a[o];s+=this._branch(c,e+1,i)}};var p=new l,d=function(t){"loading"!==document.readyState?window.requestAnimationFrame(t):document.addEventListener("DOMContentLoaded",t)},f={AUTO:"auto",MANUAL:"manual",RUNTIME:"runtime",LOADED:"loaded",VUE:"vue",ANGULAR:"angular",REACT:"react"},g=function(){this._mode=f.AUTO,this.isStarted=!1,this.starting=this.start.bind(this),this.preventManipulation=!1},y={mode:{configurable:!0}};g.prototype.configure=function(t,e,i){void 0===t&&(t={}),this.startCallback=e;var s=t.production&&(!i||"false"!==i.production);switch(!0){case i&&!isNaN(i.level):p.level=Number(i.level);break;case i&&i.verbose&&("true"===i.verbose||1===i.verbose):p.level=0;break;case s:p.level=999;break;case t.verbose:p.level=0}p.info("version "+o),this.mode=t.mode||f.AUTO},y.mode.set=function(t){switch(t){case f.AUTO:this.preventManipulation=!1,e=this.starting,d(e);break;case f.LOADED:this.preventManipulation=!1,d(this.starting);break;case f.RUNTIME:this.preventManipulation=!1,this.start();break;case f.MANUAL:this.preventManipulation=!1;break;case f.VUE:case f.ANGULAR:case f.REACT:this.preventManipulation=!0;break;default:return void p.error("Illegal mode")}var e;this._mode=t,p.info("mode set to "+t)},y.mode.get=function(){return this._mode},g.prototype.start=function(){p.info("start"),this.startCallback()},Object.defineProperties(g.prototype,y);var m=new g,v=function(){this._collection=[]},_={length:{configurable:!0},collection:{configurable:!0}};v.prototype.forEach=function(t){this._collection.forEach(t)},v.prototype.map=function(t){return this._collection.map(t)},_.length.get=function(){return this._collection.length},v.prototype.add=function(t){return!(this._collection.indexOf(t)>-1)&&(this._collection.push(t),this.onAdd&&this.onAdd(),this.onPopulate&&1===this._collection.length&&this.onPopulate(),!0)},v.prototype.remove=function(t){var e=this._collection.indexOf(t);if(-1===e)return!1;this._collection.splice(e,1),this.onRemove&&this.onRemove(),this.onEmpty&&0===this._collection.length&&this.onEmpty()},v.prototype.execute=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=0,s=this._collection;i<s.length;i+=1){var n=s[i];n&&n.apply(null,t)}},v.prototype.clear=function(){this._collection.length=0},v.prototype.clone=function(){var t=new v;return t._collection=this._collection.slice(),t},_.collection.get=function(){return this._collection},Object.defineProperties(v.prototype,_);var b=function(t){function e(e){t.call(this),this.type=e,this.isActive=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(v),E=function(t){return s+"-"+t};E.selector=function(t,e){return void 0===e&&(e="."),""+e+E(t)},(E.attr=function(t){return"data-"+E(t)}).selector=function(t,e){var i=E.attr(t);return void 0!==e&&(i+='="'+e+'"'),"["+i+"]"},E.event=function(t){return n+"."+t},E.emission=function(t,e){return"emission:"+t+"."+e};var w=function(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))},C=function(t,e){var i=t.parentElement;return i.matches(e)?i:i===document.documentElement?null:C(i,e)},O=function(t,e,i){this.selector=t,this.InstanceClass=e,this.creator=i,this.instances=new v,this.isIntroduced=!1,this._instanceClassName=this.InstanceClass.instanceClassName,this._instanceClassNames=this.getInstanceClassNames(this.InstanceClass),this._property=this._instanceClassName.substring(0,1).toLowerCase()+this._instanceClassName.substring(1);var s=this._instanceClassName.replace(/[^a-zA-Z0-9]+/g,"-").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([^0-9])/g,"$1-$2").replace(/([^0-9])([0-9])/g,"$1-$2").toLowerCase();this._attribute=E.attr("js-"+s)},A={instanceClassName:{configurable:!0},instanceClassNames:{configurable:!0},property:{configurable:!0},attribute:{configurable:!0}};O.prototype.getInstanceClassNames=function(t){var e=Object.getPrototypeOf(t);return e&&"Instance"!==e.instanceClassName?this.getInstanceClassNames(e).concat([t.instanceClassName]):[t.instanceClassName]},O.prototype.hasInstanceClassName=function(t){return this._instanceClassNames.indexOf(t)>-1},O.prototype.introduce=function(){this.isIntroduced||(this.isIntroduced=!0,i.getModule("stage").parse(document.documentElement,this))},O.prototype.parse=function(t,e){var i=[];return t.matches&&t.matches(this.selector)&&i.push(t),!e&&t.querySelectorAll&&t.querySelector(this.selector)&&i.push.apply(i,w(t,this.selector)),i},O.prototype.create=function(t){if(t.node.matches(this.selector)){var e=new this.InstanceClass;return this.instances.add(e),e}},O.prototype.remove=function(t){this.instances.remove(t)},O.prototype.dispose=function(){for(var t=this.instances.collection,e=t.length-1;e>-1;e--)t[e]._dispose();this.creator=null},A.instanceClassName.get=function(){return this._instanceClassName},A.instanceClassNames.get=function(){return this._instanceClassNames},A.property.get=function(){return this._property},A.attribute.get=function(){return this._attribute},Object.defineProperties(O.prototype,A);var N=function(t){function e(){t.call(this,"register")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,s){var n=new O(t,e,s);return this.add(n),i.isActive&&n.introduce(),n},e.prototype.activate=function(){for(var t=0,e=this.collection;t<e.length;t+=1){e[t].introduce()}},e.prototype.remove=function(e){e.dispose(),t.prototype.remove.call(this,e)},e}(b),T=0,R=function(t,e){e?this.id=e:(T++,this.id=T),this.node=t,this.attributeNames=[],this.instances=[],this._children=[],this._parent=null,this._projects=[]},D={proxy:{configurable:!0},html:{configurable:!0},parent:{configurable:!0},ascendants:{configurable:!0},children:{configurable:!0},descendants:{configurable:!0}};D.proxy.get=function(){var t=this;if(!this._proxy){this._proxy={id:this.id,get parent(){return t.parent?t.parent.proxy:null},get children(){return t.children.map((function(t){return t.proxy}))}};for(var e=0,i=this.instances;e<i.length;e+=1){var s=i[e];this._proxy[s.registration.property]=s.proxy}}return this._proxy},D.html.get=function(){if(!this.node||!this.node.outerHTML)return"";var t=this.node.outerHTML.indexOf(">");return this.node.outerHTML.substring(0,t+1)},R.prototype.project=function(t){-1===this._projects.indexOf(t)&&this._projects.push(t)},R.prototype.populate=function(){var t=this._projects.slice();this._projects.length=0;for(var e=0,i=t;e<i.length;e+=1){var s=i[e];this.create(s)}},R.prototype.create=function(t){if(!this.hasInstance(t.instanceClassName)){p.debug("create instance of "+t.instanceClassName+" on element ["+this.id+"]");var e=t.create(this);this.instances.push(e),e._config(this,t),this._proxy&&(this._proxy[t.property]=e.proxy)}},R.prototype.remove=function(t){var e=this.instances.indexOf(t);e>-1&&this.instances.splice(e,1),this._proxy&&delete this._proxy[t.registration.property]},D.parent.get=function(){return this._parent},D.ascendants.get=function(){return[this.parent].concat(this.parent.ascendants)},D.children.get=function(){return this._children},D.descendants.get=function(){var t=[].concat(this._children);return this._children.forEach((function(e){return t.push.apply(t,e.descendants)})),t},R.prototype.addChild=function(t,e){return this._children.indexOf(t)>-1?null:(t._parent=this,!isNaN(e)&&e>-1&&e<this._children.length?this._children.splice(e,0,t):this._children.push(t),t)},R.prototype.removeChild=function(t){var e=this._children.indexOf(t);if(-1===e)return null;t._parent=null,this._children.splice(e,1)},R.prototype.emit=function(t,e){for(var s=[],n=0,r=i.getModule("stage").collection;n<r.length;n+=1){var o=r[n];s.push.apply(s,o._emit(t,e))}return s},R.prototype._emit=function(t,e){for(var i=[],s=0,n=this.instances;s<n.length;s+=1){var r=n[s];i.push.apply(i,r._emitter.emit(t,e))}return i},R.prototype.ascend=function(t,e){return this._parent?this._parent._ascend(t,e):[]},R.prototype._ascend=function(t,e){for(var i=[],s=0,n=this.instances;s<n.length;s+=1){var r=n[s];i.push.apply(i,r._ascent.emit(t,e))}return this._parent&&i.push.apply(i,this._parent._ascend(t,e)),i},R.prototype.descend=function(t,e){for(var i=[],s=0,n=this._children;s<n.length;s+=1){var r=n[s];i.push.apply(i,r._descend(t,e))}return i},R.prototype._descend=function(t,e){for(var i=[],s=0,n=this.instances;s<n.length;s+=1){var r=n[s];i.push.apply(i,r._descent.emit(t,e))}for(var o=0,a=this._children;o<a.length;o+=1){var c=a[o];i.push.apply(i,c._descend(t,e))}return i},R.prototype.getInstance=function(t){for(var e=0,i=this.instances;e<i.length;e+=1){var s=i[e];if(s.registration.hasInstanceClassName(t))return s}return null},R.prototype.hasInstance=function(t){return null!==this.getInstance(t)},R.prototype.getDescendantInstances=function(t,e,i){if(!t)return[];for(var s=[],n=0,r=this._children;n<r.length;n+=1){var o=r[n],a=o.getInstance(t);a&&(s.push(a),i)||(e&&o.hasInstance(e)||!o.children.length||s.push.apply(s,o.getDescendantInstances(t,e,i)))}return s},R.prototype.getAscendantInstance=function(t,e){if(!t||!this._parent)return null;var i=this._parent.getInstance(t);return i||(e&&this._parent.hasInstance(e)?null:this._parent.getAscendantInstance(t,e))},R.prototype.dispose=function(){for(var t=this.instances.length-1;t>=0;t--){var e=this.instances[t];e&&e._dispose()}this.instances.length=0,i.remove("stage",this),this.parent.removeChild(this),this._children.length=0,p.debug("remove element ["+this.id+"] "+this.html)},R.prototype.prepare=function(t){-1===this.attributeNames.indexOf(t)&&this.attributeNames.push(t)},R.prototype.examine=function(){var t=this.attributeNames.slice();this.attributeNames.length=0;for(var e=this.instances.length-1;e>-1;e--)this.instances[e].examine(t)},Object.defineProperties(R.prototype,D);var x={CLICK:E.emission("root","click"),KEYDOWN:E.emission("root","keydown"),KEYUP:E.emission("root","keyup")},P={TAB:{id:"tab",value:9},ESCAPE:{id:"escape",value:27},END:{id:"end",value:35},HOME:{id:"home",value:36},LEFT:{id:"left",value:37},UP:{id:"up",value:38},RIGHT:{id:"right",value:39},DOWN:{id:"down",value:40}},L=function(t){return Object.values(P).filter((function(e){return e.value===t}))[0]},S=function(t){function e(){t.call(this,document.documentElement,"root"),this.node.setAttribute(E.attr("js"),!0),this.listen()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.listen=function(){document.documentElement.addEventListener("click",this.click.bind(this),{capture:!0}),document.documentElement.addEventListener("keydown",this.keydown.bind(this),{capture:!0}),document.documentElement.addEventListener("keyup",this.keyup.bind(this),{capture:!0})},e.prototype.click=function(t){this.emit(x.CLICK,t.target)},e.prototype.keydown=function(t){this.emit(x.KEYDOWN,L(t.keyCode))},e.prototype.keyup=function(t){this.emit(x.KEYUP,L(t.keyCode))},e}(R),k=function(t){function e(){t.call(this,"stage"),this.root=new S,t.prototype.add.call(this,this.root),this.observer=new MutationObserver(this.mutate.bind(this)),this.modifications=[],this.willModify=!1,this.modifying=this.modify.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasElement=function(t){for(var e=0,i=this.collection;e<i.length;e+=1){if(i[e].node===t)return!0}return!1},e.prototype.getElement=function(t){for(var e=0,i=this.collection;e<i.length;e+=1){var s=i[e];if(s.node===t)return s}var n=new R(t);return this.add(n),p.debug("add element ["+n.id+"] "+n.html),n},e.prototype.getProxy=function(t){return this.hasElement(t)?this.getElement(t).proxy:null},e.prototype.add=function(e){t.prototype.add.call(this,e),this.put(e,this.root)},e.prototype.put=function(t,e){for(var i=0,s=e.children.length-1;s>-1;s--){var n=e.children[s],r=t.node.compareDocumentPosition(n.node);if(r&Node.DOCUMENT_POSITION_CONTAINS)return void this.put(t,n);if(r&Node.DOCUMENT_POSITION_CONTAINED_BY)e.removeChild(n),t.addChild(n,0);else if(r&Node.DOCUMENT_POSITION_PRECEDING){i=s+1;break}}e.addChild(t,i)},e.prototype.activate=function(){this.observer.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})},e.prototype.deactivate=function(){this.observer.disconnect()},e.prototype.mutate=function(t){var e=this,i=[];t.forEach((function(t){switch(t.type){case"childList":t.removedNodes.forEach((function(t){return e.dispose(t)})),t.addedNodes.forEach((function(t){return e.parse(t)}));break;case"attributes":if(e.hasElement(t.target)){var s=e.getElement(t.target);s.prepare(t.attributeName),-1===i.indexOf(s)&&i.push(s);for(var n=0,r=s.descendants;n<r.length;n+=1){var o=r[n];-1===i.indexOf(o)&&i.push(o)}}-1===e.modifications.indexOf(t.target)&&e.modifications.push(t.target)}})),i.forEach((function(t){return t.examine()})),this.modifications.length&&!this.willModify&&(this.willModify=!0,window.requestAnimationFrame(this.modifying))},e.prototype.modify=function(){this.willModify=!1;var t=this.modifications.slice();this.modifications.length=0;for(var e=0,i=t;e<i.length;e+=1){var s=i[e];document.documentElement.contains(s)&&this.parse(s)}},e.prototype.dispose=function(t){var e=[];this.forEach((function(i){t.contains(i.node)&&e.push(i)}));for(var i=0,s=e;i<s.length;i+=1){var n=s[i];n.dispose(),this.remove(n)}},e.prototype.parse=function(t,e,s){for(var n=[],r=0,o=e?[e]:i.getModule("register").collection;r<o.length;r+=1)for(var a=o[r],c=0,h=a.parse(t,s);c<h.length;c+=1){var u=h[c],l=this.getElement(u);l.project(a),-1===n.indexOf(l)&&n.push(l)}for(var p=0,d=n;p<d.length;p+=1){d[p].populate()}},e}(b),M=function(t){function e(){t.call(this,"render"),this.rendering=this.render.bind(this),this.nexts=new v}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){window.requestAnimationFrame(this.rendering)},e.prototype.request=function(t){this.nexts.add(t)},e.prototype.render=function(){if(i.isActive&&(window.requestAnimationFrame(this.rendering),this.forEach((function(t){return t.render()})),this.nexts.length)){var t=this.nexts.clone();this.nexts.clear(),t.forEach((function(t){return t.next()}))}},e}(b),j=function(t){function e(){t.call(this,"resize"),this.requireResize=!1,this.resizing=this.resize.bind(this);var e=this.request.bind(this);document.fonts&&document.fonts.ready.then(e),window.addEventListener("resize",e),window.addEventListener("orientationchange",e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){this.request()},e.prototype.request=function(){this.requireResize||(this.requireResize=!0,window.requestAnimationFrame(this.resizing))},e.prototype.resize=function(){this.requireResize&&(this.forEach((function(t){return t.resize()})),this.requireResize=!1)},e}(b),I=function(t){function e(){t.call(this,"lock"),this._isLocked=!1,this._scrollY=0,this.onPopulate=this.lock.bind(this),this.onEmpty=this.unlock.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isLocked:{configurable:!0}};return i.isLocked.get=function(){return this._isLocked},e.prototype.lock=function(){if(!this._isLocked){this._isLocked=!0,this._scrollY=window.scrollY;var t=window.innerWidth-document.documentElement.clientWidth;document.documentElement.setAttribute(E.attr("scrolling"),"false"),document.body.style.top=-this._scrollY+"px",this.behavior=getComputedStyle(document.documentElement).getPropertyValue("scroll-behavior"),"smooth"===this.behavior&&(document.documentElement.style.scrollBehavior="auto"),t>0&&document.documentElement.style.setProperty("--scrollbar-width",t+"px")}},e.prototype.unlock=function(){this._isLocked&&(this._isLocked=!1,document.documentElement.removeAttribute(E.attr("scrolling")),document.body.style.top="",window.scrollTo(0,this._scrollY),"smooth"===this.behavior&&document.documentElement.style.removeProperty("scroll-behavior"),document.documentElement.style.removeProperty("--scrollbar-width"))},e.prototype.move=function(t){this._isLocked?(this._scrollY+=t,document.body.style.top=-this._scrollY+"px"):window.scrollTo(0,window.scrollY+t)},Object.defineProperties(e.prototype,i),e}(b),G=function(t){function e(){t.call(this,"load"),this.loading=this.load.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){window.addEventListener("load",this.loading)},e.prototype.load=function(){this.forEach((function(t){return t.load()}))},e}(b),q=["Marianne","Spectral"],U=function(t){function e(){t.call(this,"font-swap"),this.swapping=this.swap.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){document.fonts&&document.fonts.addEventListener("loadingdone",this.swapping)},e.prototype.swap=function(){var t=q.filter((function(t){return document.fonts.check("16px "+t)}));this.forEach((function(e){return e.swapFont(t)}))},e}(b),F=function(t){function e(){t.call(this,"mouse-move"),this.requireMove=!1,this._isMoving=!1,this.moving=this.move.bind(this),this.requesting=this.request.bind(this),this.onPopulate=this.listen.bind(this),this.onEmpty=this.unlisten.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.listen=function(){this._isMoving||(this._isMoving=!0,this.requireMove=!1,document.documentElement.addEventListener("mousemove",this.requesting))},e.prototype.unlisten=function(){this._isMoving&&(this._isMoving=!1,this.requireMove=!1,document.documentElement.removeEventListener("mousemove",this.requesting))},e.prototype.request=function(t){this._isMoving&&(this.point={x:t.clientX,y:t.clientY},this.requireMove||(this.requireMove=!0,window.requestAnimationFrame(this.moving)))},e.prototype.move=function(){var t=this;this.requireMove&&(this.forEach((function(e){return e.mouseMove(t.point)})),this.requireMove=!1)},e}(b),H=function(t){function e(){t.call(this,"hash"),this.handling=this.handle.bind(this),this.getLocationHash()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={hash:{configurable:!0}};return e.prototype.activate=function(){window.addEventListener("hashchange",this.handling)},e.prototype.deactivate=function(){window.removeEventListener("hashchange",this.handling)},e.prototype._sanitize=function(t){return"#"===t.charAt(0)?t.substring(1):t},i.hash.set=function(t){var e=this._sanitize(t);this._hash!==e&&(window.location.hash=e)},i.hash.get=function(){return this._hash},e.prototype.getLocationHash=function(){var t=window.location.hash;this._hash=this._sanitize(t)},e.prototype.handle=function(t){var e=this;this.getLocationHash(),this.forEach((function(i){return i.handleHash(e._hash,t)}))},Object.defineProperties(e.prototype,i),e}(b),z=function(){i.create(N),i.create(k),i.create(M),i.create(j),i.create(I),i.create(G),i.create(U),i.create(F),i.create(H);var t=i.getModule("register");this.register=t.register.bind(t)},B={isActive:{configurable:!0}};B.isActive.get=function(){return i.isActive},z.prototype.start=function(){p.debug("START"),i.isActive=!0},z.prototype.stop=function(){p.debug("STOP"),i.isActive=!1},Object.defineProperties(z.prototype,B);var V=new z,K=function(){};K.prototype.getColor=function(t,e,i,s){void 0===s&&(s={});var n="--"+t+"-"+e+"-"+i+W(s);return getComputedStyle(document.documentElement).getPropertyValue(n).trim()||null};var W=function(t){switch(!0){case t.hover:return"-hover";case t.active:return"-active";default:return""}},Y=new K,$=function(t){return"."===t.charAt(0)?t.substr(1):t},X=function(t){switch(!0){case!t.className:return[];case"string"==typeof t.className:return t.className.split(" ");case"string"==typeof t.className.baseVal:return t.className.baseVal.split(" ")}return[]},Z=function(t,e,i){e=$(e);var s=X(t),n=s.indexOf(e);!0===i?n>-1&&s.splice(n,1):-1===n&&s.push(e),t.className=s.join(" ")},J=function(t,e){return Z(t,e)},Q=function(t,e){return Z(t,e,!0)},tt=function(t,e){return X(t).indexOf($(e))>-1},et=['[tabindex]:not([tabindex="-1"])',"a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details","iframe"].join(),it=function(t){return t.querySelectorAll(et)},st=0,nt=function(t){if(!document.getElementById(t))return t;for(var e=!0,i=t;e;)t=i+"-"+ ++st,e=document.getElementById(t);return t},rt={addClass:J,hasClass:tt,removeClass:Q,queryParentSelector:C,querySelectorAllArray:w,queryActions:it,uniqueId:nt},ot=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this._content=""},at={width:{configurable:!0},height:{configurable:!0},content:{configurable:!0}};at.width.get=function(){return this._width},at.width.set=function(t){this._width=t},at.height.get=function(){return this._height},at.height.set=function(t){this._height=t},at.content.get=function(){return this._content},at.content.set=function(t){this._content=t},ot.prototype.getDataURI=function(t){void 0===t&&(t=!1);var e="<svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 "+this._width+" "+this._height+"' width='"+this._width+"px' height='"+this._height+"px'>"+this._content+"</svg>";return e=e.replace(/#/gi,"%23"),t&&(e=(e=(e=(e=(e=e.replace(/</gi,"%3C")).replace(/>/gi,"%3E")).replace(/"/gi,"'")).replace(/{/gi,"%7B")).replace(/}/gi,"%7D")),"data:image/svg+xml;charset=utf8,"+e},Object.defineProperties(ot.prototype,at);var ct={DataURISVG:ot},ht={supportLocalStorage:function(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}},supportAspectRatio:function(){return!!window.CSS&&CSS.supports("aspect-ratio: 16 / 9")}},ut={TransitionSelector:{NONE:E.selector("transition-none")}},lt=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];return e.forEach((function(e){var i=Object.keys(e).reduce((function(t,i){return t[i]=Object.getOwnPropertyDescriptor(e,i),t}),{});Object.getOwnPropertySymbols(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);s.enumerable&&(i[t]=s)})),Object.defineProperties(t,i)})),t},pt={completeAssign:lt},dt={},ft={};Object.defineProperty(ft,"isLegacy",{get:function(){return i.isLegacy}}),ft.setLegacy=function(){i.isLegacy=!0},dt.legacy=ft,dt.dom=rt,dt.image=ct,dt.support=ht,dt.motion=ut,dt.property=pt,dt.ns=E,dt.register=V.register,dt.state=i,dt.query=function(t){if(t&&t.search){var e=new URLSearchParams(window.location.search).entries();return Object.fromEntries(e)}return null}(window.location),Object.defineProperty(dt,"preventManipulation",{get:function(){return m.preventManipulation}}),Object.defineProperty(dt,"stage",{get:function(){return i.getModule("stage")}});var gt=function(t){return i.getModule("stage").getProxy(t)};gt.version=o,gt.prefix=s,gt.organisation=r,gt.Modes=f,Object.defineProperty(gt,"mode",{set:function(t){m.mode=t},get:function(){return m.mode}}),gt.internals=dt,gt.version=o,gt.start=V.start,gt.stop=V.stop,gt.inspector=p,gt.colors=Y;var yt=window[n];gt.internals.configuration=yt,m.configure(yt,gt.start,gt.internals.query),window[n]=gt;var mt=function(){this.emissions={}};mt.prototype.add=function(t,e){if("function"!=typeof e)throw new Error("closure must be a function");this.emissions[t]||(this.emissions[t]=[]),this.emissions[t].push(e)},mt.prototype.remove=function(t,e){if(this.emissions[t])if(e){var i=this.emissions[t].indexOf(e);i>-1&&this.emissions[t].splice(i)}else delete this.emissions[t]},mt.prototype.emit=function(t,e){if(!this.emissions[t])return[];for(var i=[],s=0,n=this.emissions[t];s<n.length;s+=1){var r=n[s];r&&i.push(r(e))}return i},mt.prototype.dispose=function(){this.emissions=null};var vt=function(t,e){this.id=t,this.minWidth=e};vt.prototype.test=function(){return window.matchMedia("(min-width: "+this.minWidth+"em)").matches};var _t={XS:new vt("xs",0),SM:new vt("sm",36),MD:new vt("md",48),LG:new vt("lg",62),XL:new vt("xl",78)},bt=function(t){void 0===t&&(t=!0),this.jsAttribute=t,this._isRendering=!1,this._isResizing=!1,this._isScrollLocked=!1,this._isLoading=!1,this._isSwappingFont=!1,this._isEnabled=!0,this._isDisposed=!1,this._listeners={},this._handlingClick=this.handleClick.bind(this),this._hashes=[],this._hash="",this._keyListenerTypes=[],this._keys=[],this.handlingKey=this.handleKey.bind(this),this._emitter=new mt,this._ascent=new mt,this._descent=new mt,this._registrations=[],this._nexts=[]},Et={proxy:{configurable:!0},hash:{configurable:!0},isEnabled:{configurable:!0},isRendering:{configurable:!0},isResizing:{configurable:!0},isScrollLocked:{configurable:!0},isLoading:{configurable:!0},isSwappingFont:{configurable:!0},isMouseMoving:{configurable:!0},isDisposed:{configurable:!0},style:{configurable:!0},classNames:{configurable:!0},hasFocus:{configurable:!0},isLegacy:{configurable:!0}},wt={instanceClassName:{configurable:!0}};wt.instanceClassName.get=function(){return"Instance"},bt.prototype._config=function(t,e){this.element=t,this.registration=e,this.node=t.node,this.id=t.node.id,this.jsAttribute&&this.setAttribute(e.attribute,!0),this.init()},bt.prototype.init=function(){},Et.proxy.get=function(){var t=this;return lt({render:function(){return t.render()},resize:function(){return t.resize()}},{get node(){return this.node},get isEnabled(){return t.isEnabled},set isEnabled(e){t.isEnabled=e}})},bt.prototype.log=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.unshift(this.registration.instanceClassName+" #"+this.id+" - "),p.log.apply(p,t)},bt.prototype.debug=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.unshift(this.registration.instanceClassName+" #"+this.id+" - "),p.debug.apply(p,t)},bt.prototype.info=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.unshift(this.registration.instanceClassName+" #"+this.id+" - "),p.info.apply(p,t)},bt.prototype.warn=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.unshift(this.registration.instanceClassName+" #"+this.id+" - "),p.warn.apply(p,t)},bt.prototype.error=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.unshift(this.registration.instanceClassName+" #"+this.id+" - "),p.error.apply(p,t)},bt.prototype.register=function(t,e){var s=i.getModule("register").register(t,e,this);this._registrations.push(s)},bt.prototype.getRegisteredInstances=function(t){for(var e=0,i=this._registrations;e<i.length;e+=1){var s=i[e];if(s.hasInstanceClassName(t))return s.instances.collection}return[]},bt.prototype.dispatch=function(t,e,i,s){var n=new CustomEvent(t,{detail:e,bubble:!0===i,cancelable:!0===s});this.node.dispatchEvent(n)},bt.prototype.listen=function(t,e,i){this._listeners[t]||(this._listeners[t]=[]);var s=this._listeners[t],n=new Ot(this.node,t,e,i);s.push(n),n.listen()},bt.prototype.unlisten=function(t,e,i){var s=this;if(t){var n=this._listeners[t];if(n)if(e){var r=n.filter((function(t){return t.closure===e&&t.matchOptions(i)}));r.forEach((function(t){return t.unlisten()})),this._listeners[t]=n.filter((function(t){return-1===r.indexOf(t)}))}else n.forEach((function(e){return s.unlisten(t,e.closure)}))}else for(var o in this._listeners)this.unlisten(o)},bt.prototype.listenClick=function(t){this.listen("click",this._handlingClick,t)},bt.prototype.unlistenClick=function(t){this.unlisten("click",this._handlingClick,t)},bt.prototype.handleClick=function(t){},Et.hash.set=function(t){i.getModule("hash").hash=t},Et.hash.get=function(){return i.getModule("hash").hash},bt.prototype.listenHash=function(t,e){if(this._hashes){0===this._hashes.length&&i.add("hash",this);var s=new Nt(t,e);this._hashes=this._hashes.filter((function(e){return e.hash!==t})),this._hashes.push(s)}},bt.prototype.unlistenHash=function(t){this._hashes&&(this._hashes=this._hashes.filter((function(e){return e.hash!==t})),0===this._hashes.length&&i.remove("hash",this))},bt.prototype.handleHash=function(t,e){if(this._hashes)for(var i=0,s=this._hashes;i<s.length;i+=1){s[i].handle(t,e)}},bt.prototype.listenKey=function(t,e,i,s,n){void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===n&&(n="down"),-1===this._keyListenerTypes.indexOf(n)&&(this.listen("key"+n,this.handlingKey),this._keyListenerTypes.push(n)),this._keys.push(new Ct(n,t,e,i,s))},bt.prototype.unlistenKey=function(t,e){var i=this;this._keys=this._keys.filter((function(i){return i.code!==t||i.closure!==e})),this._keyListenerTypes.forEach((function(t){i._keys.some((function(e){return e.type===t}))||i.unlisten("key"+t,i.handlingKey)}))},bt.prototype.handleKey=function(t){for(var e=0,i=this._keys;e<i.length;e+=1){i[e].handle(t)}},Et.isEnabled.get=function(){return this._isEnabled},Et.isEnabled.set=function(t){this._isEnabled=t},Et.isRendering.get=function(){return this._isRendering},Et.isRendering.set=function(t){this._isRendering!==t&&(t?i.add("render",this):i.remove("render",this),this._isRendering=t)},bt.prototype.render=function(){},bt.prototype.request=function(t){this._nexts.push(t),i.getModule("render").request(this)},bt.prototype.next=function(){var t=this._nexts.slice();this._nexts.length=0;for(var e=0,i=t;e<i.length;e+=1){var s=i[e];s&&s()}},Et.isResizing.get=function(){return this._isResizing},Et.isResizing.set=function(t){this._isResizing!==t&&(t?(i.add("resize",this),this.resize()):i.remove("resize",this),this._isResizing=t)},bt.prototype.resize=function(){},bt.prototype.isBreakpoint=function(t){return!0==("string"==typeof t)?_t[t.toUpperCase()].test():t.test()},Et.isScrollLocked.get=function(){return this._isScrollLocked},Et.isScrollLocked.set=function(t){this._isScrollLocked!==t&&(t?i.add("lock",this):i.remove("lock",this),this._isScrollLocked=t)},Et.isLoading.get=function(){return this._isLoading},Et.isLoading.set=function(t){this._isLoading!==t&&(t?i.add("load",this):i.remove("load",this),this._isLoading=t)},bt.prototype.load=function(){},Et.isSwappingFont.get=function(){return this._isSwappingFont},Et.isSwappingFont.set=function(t){this._isSwappingFont!==t&&(t?i.add("font-swap",this):i.remove("font-swap",this),this._isSwappingFont=t)},bt.prototype.swapFont=function(){},Et.isMouseMoving.get=function(){return this._isMouseMoving},Et.isMouseMoving.set=function(t){this._isMouseMoving!==t&&(t?i.add("mouse-move",this):i.remove("mouse-move",this),this._isMouseMoving=t)},bt.prototype.mouseMove=function(t){},bt.prototype.examine=function(t){this.node.matches(this.registration.selector)?this.mutate(t):this._dispose()},bt.prototype.mutate=function(t){},bt.prototype.retrieveNodeId=function(t,e){if(t.id)return t.id;var i=nt(this.id+"-"+e);return this.warn("add id '"+i+"' to "+e),t.setAttribute("id",i),i},Et.isDisposed.get=function(){return this._isDisposed},bt.prototype._dispose=function(){this.debug("dispose instance of "+this.registration.instanceClassName+" on element ["+this.element.id+"]"),this.removeAttribute(this.registration.attribute),this.unlisten(),i.remove("hash",this),this._hashes=null,this._keys=null,this.isRendering=!1,this.isResizing=!1,this._nexts=null,i.getModule("render").nexts.remove(this),this.isScrollLocked=!1,this.isLoading=!1,this.isSwappingFont=!1,this.isMouseMoving=!1,this._emitter.dispose(),this._emitter=null,this._ascent.dispose(),this._ascent=null,this._descent.dispose(),this._descent=null,this.element.remove(this);for(var t=0,e=this._registrations;t<e.length;t+=1){var s=e[t];i.remove("register",s)}this._registrations=null,this.registration.remove(this),this._isDisposed=!0,this.dispose()},bt.prototype.dispose=function(){},bt.prototype.emit=function(t,e){return this.element.emit(t,e)},bt.prototype.addEmission=function(t,e){this._emitter.add(t,e)},bt.prototype.removeEmission=function(t,e){this._emitter.remove(t,e)},bt.prototype.ascend=function(t,e){return this.element.ascend(t,e)},bt.prototype.addAscent=function(t,e){this._ascent.add(t,e)},bt.prototype.removeAscent=function(t,e){this._ascent.remove(t,e)},bt.prototype.descend=function(t,e){return this.element.descend(t,e)},bt.prototype.addDescent=function(t,e){this._descent.add(t,e)},bt.prototype.removeDescent=function(t,e){this._descent.remove(t,e)},Et.style.get=function(){return this.node.style},bt.prototype.addClass=function(t){J(this.node,t)},bt.prototype.removeClass=function(t){Q(this.node,t)},bt.prototype.hasClass=function(t){return tt(this.node,t)},Et.classNames.get=function(){return X(this.node)},bt.prototype.remove=function(){this.node.parentNode.removeChild(this.node)},bt.prototype.setAttribute=function(t,e){this.node.setAttribute(t,e)},bt.prototype.getAttribute=function(t){return this.node.getAttribute(t)},bt.prototype.hasAttribute=function(t){return this.node.hasAttribute(t)},bt.prototype.removeAttribute=function(t){this.node.removeAttribute(t)},bt.prototype.setProperty=function(t,e){this.node.style.setProperty(t,e)},bt.prototype.removeProperty=function(t){this.node.style.removeProperty(t)},bt.prototype.focus=function(){this.node.focus()},bt.prototype.blur=function(){this.node.blur()},bt.prototype.focusClosest=function(){var t=this._focusClosest(this.node.parentNode);t&&t.focus()},bt.prototype._focusClosest=function(t){if(!t)return null;var e=[].concat(it(t));if(e.length<=1)return this._focusClosest(t.parentNode);var i=e.indexOf(this.node);return e[i+(i<e.length-1?1:-1)]},Et.hasFocus.get=function(){return this.node===document.activeElement},bt.prototype.scrollIntoView=function(){var t=this.getRect(),e=i.getModule("lock");t.top<0&&e.move(t.top-50),t.bottom>window.innerHeight&&e.move(t.bottom-window.innerHeight+50)},bt.prototype.matches=function(t){return this.node.matches(t)},bt.prototype.querySelector=function(t){return this.node.querySelector(t)},bt.prototype.querySelectorAll=function(t){return w(this.node,t)},bt.prototype.queryParentSelector=function(t){return C(this.node,t)},bt.prototype.getRect=function(){var t=this.node.getBoundingClientRect();return t.center=t.left+.5*t.width,t.middle=t.top+.5*t.height,t},Et.isLegacy.get=function(){return i.isLegacy},Object.defineProperties(bt.prototype,Et),Object.defineProperties(bt,wt);var Ct=function(t,e,i,s,n){this.type=t,this.eventType="key"+t,this.keyCode=e,this.closure=i,this.preventDefault=!0===s,this.stopPropagation=!0===n};Ct.prototype.handle=function(t){t.type===this.eventType&&t.keyCode===this.keyCode.value&&(this.closure(t),this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation())};var Ot=function(t,e,i,s){this._node=t,this._type=e,this._closure=i,this._options=s},At={closure:{configurable:!0}};At.closure.get=function(){return this._closure},Ot.prototype.listen=function(){this._node.addEventListener(this._type,this._closure,this._options)},Ot.prototype.matchOptions=function(t){var e=this;switch(void 0===t&&(t=null),!0){case null===t:case"boolean"==typeof this._options&&"boolean"==typeof t&&this._options===t:return!0;case Object.keys(this._options).length!==Object.keys(t).length:return!1;case Object.keys(t).every((function(i){return e._options[i]===t[i]})):return!0}return!1},Ot.prototype.unlisten=function(){this._node.removeEventListener(this._type,this._closure,this._options)},Object.defineProperties(Ot.prototype,At);var Nt=function(t,e){this.hash=t,this.add=e};Nt.prototype.handle=function(t,e){this.hash===t&&this.add(e)};var Tt={DISCLOSE:E.event("disclose"),CONCEAL:E.event("conceal")},Rt={RESET:E.emission("disclosure","reset"),ADDED:E.emission("disclosure","added"),RETRIEVE:E.emission("disclosure","retrieve"),REMOVED:E.emission("disclosure","removed"),GROUP:E.emission("disclosure","group"),UNGROUP:E.emission("disclosure","ungroup"),SPOTLIGHT:E.emission("disclosure","spotlight")},Dt=function(t){function e(e,i,s,n){t.call(this),this.type=e,this._selector=i,this.DisclosureButtonInstanceClass=s,this.disclosuresGroupInstanceClassName=n,this.modifier=this._selector+"--"+this.type.id,this._isPristine=!0,this._isRetrievingPrimaries=!1,this._hasRetrieved=!1,this._primaryButtons=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isEnabled:{configurable:!0},isPristine:{configurable:!0},proxy:{configurable:!0},buttons:{configurable:!0},group:{configurable:!0},isDisclosed:{configurable:!0},isInitiallyDisclosed:{configurable:!0},buttonHasFocus:{configurable:!0},hasFocus:{configurable:!0},primaryButtons:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Disclosure"},e.prototype.init=function(){this.addDescent(Rt.RESET,this.reset.bind(this)),this.addDescent(Rt.GROUP,this.update.bind(this)),this.addDescent(Rt.UNGROUP,this.update.bind(this)),this.addAscent(Rt.SPOTLIGHT,this.disclose.bind(this)),this.register('[aria-controls="'+this.id+'"]',this.DisclosureButtonInstanceClass),this.ascend(Rt.ADDED),this.listenHash(this.id,this._spotlight.bind(this)),this.update()},i.isEnabled.get=function(){return t.prototype.isEnabled},i.isEnabled.set=function(e){this.isEnabled!==e&&(t.prototype.isEnabled=e,e?this.ascend(Rt.ADDED):this.ascend(Rt.REMOVED))},i.isPristine.get=function(){return this._isPristine},i.proxy.get=function(){var e=this,i=Object.assign.call(this,t.prototype.proxy,{disclose:e.disclose.bind(e),focus:e.focus.bind(e)});return this.type.canConceal&&(i.conceal=e.conceal.bind(e)),lt(i,{get buttons(){return e.buttons.map((function(t){return t.proxy}))},get group(){var t=e.group;return t?t.proxy:null},get isDisclosed(){return e.isDisclosed}})},i.buttons.get=function(){return this.getRegisteredInstances(this.DisclosureButtonInstanceClass.instanceClassName)},e.prototype.update=function(){this.getGroup(),this.retrievePrimaries()},e.prototype.getGroup=function(){if(this.disclosuresGroupInstanceClassName){var t=this.element.getAscendantInstance(this.disclosuresGroupInstanceClassName,this.constructor.instanceClassName);t&&t.validate(this)?this._group=t:this._group=null}else this._group=null},i.group.get=function(){return this._group},e.prototype.disclose=function(t){return!(!0===this.isDisclosed||!this.isEnabled)&&(this._isPristine=!1,this.isDisclosed=!0,!t&&this.group&&(this.group.current=this),!0)},e.prototype.conceal=function(t,e){return void 0===e&&(e=!0),!1!==this.isDisclosed&&(!(!this.type.canConceal&&this.group&&this.group.current===this)&&(this.isDisclosed=!1,!t&&this.group&&this.group.current===this&&(this.group.current=null),e||this.focus(),this._isPristine||this.descend(Rt.RESET),!0))},i.isDisclosed.get=function(){return this._isDisclosed},i.isDisclosed.set=function(t){if(this._isDisclosed!==t&&(this.isEnabled||!0!==t)){this.dispatch(t?Tt.DISCLOSE:Tt.CONCEAL,this.type),this._isDisclosed=t,t?this.addClass(this.modifier):this.removeClass(this.modifier);for(var e=0;e<this.buttons.length;e++)this.buttons[e].apply(t)}},i.isInitiallyDisclosed.get=function(){return this.primaryButtons.some((function(t){return t.isInitiallyDisclosed}))},e.prototype.hasRetrieved=function(){return this._hasRetrieved},e.prototype.reset=function(){},e.prototype.toggle=function(t){if(this.type.canConceal)switch(!0){case!t:case this.isDisclosed:this.conceal(!1,!1);break;default:this.disclose()}else this.disclose()},i.buttonHasFocus.get=function(){return this.buttons.some((function(t){return t.hasFocus}))},i.hasFocus.get=function(){return!!t.prototype.hasFocus||(!!this.buttonHasFocus||this.querySelectorAll(":focus").length>0)},e.prototype.focus=function(){this._primaryButtons.length>0&&this._primaryButtons[0].focus()},i.primaryButtons.get=function(){return this._primaryButtons},e.prototype.retrievePrimaries=function(){this._isRetrievingPrimaries||(this._isRetrievingPrimaries=!0,this.request(this._retrievePrimaries.bind(this)))},e.prototype._retrievePrimaries=function(){if(this._isRetrievingPrimaries=!1,this._primaryButtons=this._electPrimaries(this.buttons),!this._hasRetrieved&&0!==this._primaryButtons.length)if(this.retrieved(),this._hasRetrieved=!0,this.applyAbility(!0),this.group)this.group.retrieve();else if(this._isPristine&&this.isEnabled&&!this.group)switch(!0){case this.hash===this.id:this._spotlight();break;case this.isInitiallyDisclosed:this.disclose()}},e.prototype.retrieved=function(){},e.prototype._spotlight=function(){var t=this;this.disclose(),this.request((function(){t.ascend(Rt.SPOTLIGHT)}))},e.prototype._electPrimaries=function(t){var e=this;return t.filter((function(t){return t.canDisclose&&!e.node.contains(t.node)}))},e.prototype.applyAbility=function(t){void 0===t&&(t=!1);var e=!this._primaryButtons.every((function(t){return t.isDisabled}));this.isEnabled!==e&&(this.isEnabled=e,t||(!this.isEnabled&&this.isDisclosed&&(this.group?this.ascend(Rt.REMOVED):this.type.canConceal&&this.conceal()),this.isEnabled&&(this.group&&this.ascend(Rt.ADDED),this.hash===this.id&&this._spotlight())))},e.prototype.dispose=function(){this._group=null,this._primaryButtons=null,t.prototype.dispose.call(this),this.ascend(Rt.REMOVED)},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt),xt=function(t){function e(e){t.call(this),this.type=e,this.attributeName=e.ariaState?"aria-"+e.id:E.attr(e.id),this._canDisclose=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isPrimary:{configurable:!0},canDisclose:{configurable:!0},isDisabled:{configurable:!0},proxy:{configurable:!0},isDisclosed:{configurable:!0},isInitiallyDisclosed:{configurable:!0},dx:{configurable:!0},dy:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"DisclosureButton"},i.isPrimary.get=function(){return this.registration.creator.primaryButtons.includes(this)},i.canDisclose.get=function(){return this._canDisclose},i.isDisabled.get=function(){return this.type.canDisable&&this.hasAttribute("disabled")},e.prototype.init=function(){this._canDisclose=this.hasAttribute(this.attributeName),this._isInitiallyDisclosed=this.isDisclosed,this._isContained=this.registration.creator.node.contains(this.node),this.controlsId=this.getAttribute("aria-controls"),this.registration.creator.retrievePrimaries(),this.listenClick()},i.proxy.get=function(){return Object.assign.call(this,t.prototype.proxy,{focus:this.focus.bind(this)})},e.prototype.handleClick=function(t){this.registration.creator&&this.registration.creator.toggle(this.canDisclose)},e.prototype.mutate=function(t){this._canDisclose=this.hasAttribute(this.attributeName),this.registration.creator.applyAbility(),!this._isApplying&&this.isPrimary&&t.indexOf(this.attributeName)>-1&&this.registration.creator&&(this.isDisclosed?this.registration.creator.disclose():this.type.canConceal&&this.registration.creator.conceal())},e.prototype.apply=function(t){var e=this;this.canDisclose&&(this._isApplying=!0,this.setAttribute(this.attributeName,t),this.request((function(){e._isApplying=!1})))},i.isDisclosed.get=function(){return"true"===this.getAttribute(this.attributeName)},i.isInitiallyDisclosed.get=function(){return this._isInitiallyDisclosed},e.prototype.focus=function(){t.prototype.focus.call(this),this.scrollIntoView()},e.prototype.measure=function(t){var e=this.rect;this._dx=t.x-e.x,this._dy=t.y-e.y},i.dx.get=function(){return this._dx},i.dy.get=function(){return this._dy},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt),Pt={PREVENT_CONCEAL:E.attr.selector("prevent-conceal"),GROUP:E.attr("group")},Lt=function(t){function e(e,i){t.call(this,i),this.disclosureInstanceClassName=e,this._members=[],this._index=-1,this._isRetrieving=!1,this._hasRetrieved=!1,this._isGrouped=!0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0},members:{configurable:!0},length:{configurable:!0},index:{configurable:!0},current:{configurable:!0},hasFocus:{configurable:!0},isGrouped:{configurable:!0},canUngroup:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"DisclosuresGroup"},e.prototype.init=function(){this.addAscent(Rt.ADDED,this.update.bind(this)),this.addAscent(Rt.RETRIEVE,this.retrieve.bind(this)),this.addAscent(Rt.REMOVED,this.update.bind(this)),this.descend(Rt.GROUP),this._isGrouped="false"!==this.getAttribute(Pt.GROUP),this.update()},i.proxy.get=function(){var e=this,i={set index(t){e.index=t},get index(){return e.index},get length(){return e.length},get current(){var t=e.current;return t?t.proxy:null},get members(){return e.members.map((function(t){return t.proxy}))},get hasFocus(){return e.hasFocus},set isGrouped(t){e.isGrouped=t},get isGrouped(){return e.isGrouped}};return lt.call(this,t.prototype.proxy,i)},e.prototype.validate=function(t){return!0},e.prototype.getMembers=function(){var t=this,e=this.element.getDescendantInstances(this.disclosureInstanceClassName,this.constructor.instanceClassName,!0);this._members=e.filter(this.validate.bind(this)).filter((function(t){return t.isEnabled})),e.filter((function(e){return!t._members.includes(e)})).forEach((function(t){return t.conceal()}))},e.prototype.retrieve=function(t){void 0===t&&(t=!1),this._isRetrieving||this._hasRetrieved&&!t||(this._isRetrieving=!0,this.request(this._retrieve.bind(this)))},e.prototype._retrieve=function(){var t=this;if(this.getMembers(),this._isRetrieving=!1,this._hasRetrieved=!0,this.hash)for(var e=0;e<this.length;e++){var i=this.members[e];if(this.hash===i.id)return this.index=e,this.request((function(){t.ascend(Rt.SPOTLIGHT)})),e}for(var s=0;s<this.length;s++){if(this.members[s].isInitiallyDisclosed)return this.index=s,s}return this.getIndex()},e.prototype.update=function(){this.getMembers(),this._hasRetrieved&&this.getIndex()},i.members.get=function(){return this._members},i.length.get=function(){return this.members?this.members.length:0},e.prototype.getIndex=function(t){void 0===t&&(t=-1),this._index=void 0;for(var e=t,i=0;i<this.length;i++)if(this.members[i].isDisclosed){e=i;break}return this.index=e,e},i.index.get=function(){return this._index},i.index.set=function(t){if(!(t<-1||t>=this.length||t===this._index)){this._index=t;for(var e=0;e<this.length;e++){var i=this.members[e];t===e?i.isDisclosed||i.disclose(!0):!this.isGrouped&&this.canUngroup||!i.isDisclosed||i.conceal(!0)}this.apply()}},i.current.get=function(){return-1===this._index||isNaN(this._index)?null:this._members[this._index]||null},i.current.set=function(t){this.index=this.members.indexOf(t)},i.hasFocus.get=function(){var t=this.current;return!!t&&t.hasFocus},i.isGrouped.set=function(t){var e=!!t;this._isGrouped!==e&&(this._isGrouped=e,this.setAttribute(Pt.GROUP,!!t),this.update())},i.isGrouped.get=function(){return this._isGrouped},i.canUngroup.get=function(){return!1},e.prototype.mutate=function(t){t.includes(Pt.GROUP)&&(this.isGrouped="false"!==this.getAttribute(Pt.GROUP))},e.prototype.apply=function(){},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.descend(Rt.UNGROUP),this._members=null},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt),St={EXPAND:{id:"expanded",ariaState:!0,ariaControls:!0,canConceal:!0,canDisable:!0},SELECT:{id:"selected",ariaState:!0,ariaControls:!0,canConceal:!1,canDisable:!0},OPENED:{id:"opened",ariaState:!1,ariaControls:!0,canConceal:!0,canDisable:!1}},kt=function(t){function e(){t.call(this,St.EXPAND)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"CollapseButton"},Object.defineProperties(e,i),e}(xt),Mt={COLLAPSE:E.selector("collapse"),COLLAPSING:E.selector("collapsing")},jt=function(t){function e(){t.call(this,St.EXPAND,Mt.COLLAPSE,kt,"CollapsesGroup")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Collapse"},e.prototype.init=function(){t.prototype.init.call(this),this.listen("transitionend",this.transitionend.bind(this))},e.prototype.transitionend=function(t){this.removeClass(Mt.COLLAPSING),this.isDisclosed||(this.isLegacy?this.style.maxHeight="":this.style.removeProperty("--collapse-max-height"))},e.prototype.unbound=function(){this.isLegacy?this.style.maxHeight="none":this.style.setProperty("--collapse-max-height","none")},e.prototype.disclose=function(e){var i=this;if(!0===this.isDisclosed||!this.isEnabled)return!1;this.unbound(),this.request((function(){i.addClass(Mt.COLLAPSING),i.adjust(),i.request((function(){t.prototype.disclose.call(i,e)}))}))},e.prototype.conceal=function(e,i){var s=this;if(!1===this.isDisclosed)return!1;this.request((function(){s.addClass(Mt.COLLAPSING),s.adjust(),s.request((function(){t.prototype.conceal.call(s,e,i)}))}))},e.prototype.adjust=function(){this.setProperty("--collapser","none");var t=this.node.offsetHeight;this.setProperty("--collapse",-t+"px"),this.setProperty("--collapser","")},e.prototype.reset=function(){this.isPristine||(this.isDisclosed=!1)},e.prototype._electPrimaries=function(e){var i=this.element.parent.instances.map((function(t){return t.collapsePrimary})).filter((function(t){return void 0!==t&&e.indexOf(t)>-1}));if(1===i.length)return i;if(1===(e=t.prototype._electPrimaries.call(this,e)).length)return e;var s=e.filter((function(t){return t.dy>=0}));if(s.length>0&&(e=s),1===e.length)return e;var n=Math.min.apply(Math,e.map((function(t){return t.dy}))),r=e.filter((function(t){return t.dy===n}));return r.length>0&&(e=r),1===e.length||e.sort((function(t,e){return Math.abs(e.dx)-Math.abs(t.dx)})),e},Object.defineProperties(e,i),e}(Dt),It=function(t){function e(){t.call(this,"Collapse")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={canUngroup:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"CollapsesGroup"},i.canUngroup.get=function(){return!0},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(Lt),Gt={CHANGE:E("equisized")},qt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Equisized"},e.prototype.init=function(){this.ascend(Gt.CHANGE)},e.prototype.measure=function(){return this.isLegacy&&(this.style.width="auto"),this.getRect().width},e.prototype.adjust=function(t){this.isLegacy&&(this.style.width=t+"px")},e.prototype.dispose=function(){this.ascend(Gt.CHANGE)},Object.defineProperties(e,i),e}(bt),Ut=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"EquisizedsGroup"},e.prototype.init=function(){this.isResizing=!0,this.isLoading=!0,this.addAscent(Gt.CHANGE,this.resize.bind(this))},e.prototype.load=function(){this.resize()},e.prototype.resize=function(){var t=this.element.getDescendantInstances("Equisized");this.isLegacy||this.style.setProperty("--equisized-width","auto");var e=Math.max.apply(Math,t.map((function(t){return t.measure()})));this.isLegacy?t.forEach((function(t){return t.adjust(e)})):this.style.setProperty("--equisized-width",e+"px")},Object.defineProperties(e,i),e}(bt),Ft={TOGGLE:E.event("toggle")},Ht=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={pressed:{configurable:!0},proxy:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Toggle"},e.prototype.init=function(){this.pressed="true"===this.pressed,this.listenClick()},e.prototype.handleClick=function(){this.toggle()},e.prototype.toggle=function(){this.pressed="true"!==this.pressed},i.pressed.get=function(){return this.getAttribute("aria-pressed")},i.pressed.set=function(t){this.setAttribute("aria-pressed",t?"true":"false"),this.dispatch(Ft.TOGGLE,t)},i.proxy.get=function(){var e=this,i=Object.assign.call(this,t.prototype.proxy,{toggle:e.toggle.bind(e)});return lt(i,{get pressed(){return e.pressed},set pressed(t){e.pressed=t}})},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt),zt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"InjectSvg"},e.prototype.init=function(){this.node&&(this.img=this.node.querySelector("img")),this.isLegacy||this.replace()},i.proxy.get=function(){var e=this;return Object.assign.call(this,t.prototype.proxy,{replace:e.replace.bind(e),restore:e.restore.bind(e)})},e.prototype.fetch=function(){var t=this;this.img&&(this.imgID=this.img.getAttribute("id"),this.imgClass=this.img.getAttribute("class"),this.imgURL=this.img.getAttribute("src"),fetch(this.imgURL).then((function(t){return t.text()})).then((function(e){var i=(new DOMParser).parseFromString(e,"text/html");t.svg=i.querySelector("svg"),t.svg&&t.replace()})))},e.prototype.replace=function(){if(this.svg){this.imgID&&void 0!==this.imgID&&this.svg.setAttribute("id",this.imgID);var t=this.imgURL.match(/[ \w-]+\./)[0];t&&(t=t.slice(0,-1),["dark","light","system"].includes(t)&&(this.svg.innerHTML=this.svg.innerHTML.replaceAll('id="artwork-','id="'+t+"-artwork-"),this.svg.innerHTML=this.svg.innerHTML.replaceAll('"#artwork-','"#'+t+"-artwork-"))),this.imgClass&&void 0!==this.imgClass&&this.svg.setAttribute("class",this.imgClass),this.svg.hasAttribute("xmlns:a")&&this.svg.removeAttribute("xmlns:a"),this.node.setAttribute("data-fr-inject-svg",!0);var e,i;e=this.svg,i={"aria-hidden":!0,focusable:!1},Object.keys(i).forEach((function(t){return e.setAttribute(t,i[t])})),this.node.replaceChild(this.svg,this.img)}else this.fetch()},e.prototype.restore=function(){this.img&&this.svg&&(this.node.setAttribute("data-fr-inject-svg",!1),this.node.replaceChild(this.img,this.svg))},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt),Bt={INJECT_SVG:"["+E.attr("inject-svg")+"]"},Vt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Artwork"},e.prototype.init=function(){this.isLegacy&&this.replace()},i.proxy.get=function(){return Object.assign.call(this,t.prototype.proxy,{replace:this.replace.bind(this)})},e.prototype.fetch=function(){var t=this;this.xlink=this.node.getAttribute("href");var e=this.xlink.split("#");this.svgUrl=e[0],this.svgName=e[1];var i=new XMLHttpRequest;i.onload=function(){var e=(new DOMParser).parseFromString(i.responseText,"text/html");t.realSvgContent=e.getElementById(t.svgName),t.realSvgContent&&(t.realSvgContent.classList.add(t.node.classList),t.replace())},i.open("GET",this.svgUrl),i.send()},e.prototype.replace=function(){this.realSvgContent?this.node.parentNode.replaceChild(this.realSvgContent,this.node):this.fetch()},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt),Kt={ARTWORK_USE:E.selector("artwork")+" use"},Wt={ASSESS_FILE:""+E.attr.selector("assess-file"),DETAIL:E.attr.selector("assess-file")+' [class$="__detail"], '+E.attr.selector("assess-file")+' [class*="__detail "]'},Yt={UPDATE:E.emission("assess","update"),ADDED:E.emission("assess","added")},$t=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"AssessFile"},e.prototype.init=function(){this.lang=this.getLang(this.node),this.href=this.getAttribute("href"),this.hreflang=this.getAttribute("hreflang"),this.file={},this.gather(),this.addAscent(Yt.ADDED,this.update.bind(this)),this.addDescent(Yt.ADDED,this.update.bind(this))},e.prototype.getFileLength=function(){var t=this;void 0!==this.href?fetch(this.href,{method:"HEAD",mode:"cors"}).then((function(e){t.length=e.headers.get("content-length")||-1,-1===t.length&&p.warn("File size unknown: "+t.href+'\nUnable to get HTTP header: "content-length"'),t.gather()})):this.length=-1},e.prototype.mutate=function(t){-1!==t.indexOf("href")&&(this.href=this.getAttribute("href"),this.getFileLength()),-1!==t.indexOf("hreflang")&&(this.hreflang=this.getAttribute("hreflang"),this.gather())},e.prototype.gather=function(){if(this.isLegacy&&(this.length=-1),this.length){if(this.details=[],this.href){var t=this.parseExtension(this.href);t&&this.details.push(t.toUpperCase())}-1!==this.length&&this.details.push(this.bytesToSize(this.length)),this.hreflang&&this.details.push(this.getLangDisplayName(this.hreflang)),this.update()}else this.getFileLength()},e.prototype.update=function(){this.details&&(this.descend(Yt.UPDATE,this.details),this.ascend(Yt.UPDATE,this.details))},e.prototype.getLang=function(t){return t.lang?t.lang:document.documentElement===t?window.navigator.language:this.getLang(t.parentElement)},e.prototype.parseExtension=function(t){return t.match(/\.(\w{1,9})(?:$|[?#])/)[0].replace(".","")},e.prototype.getLangDisplayName=function(t){if(this.isLegacy)return t;var e=new Intl.DisplayNames([this.lang],{type:"language"}).of(t);return e.charAt(0).toUpperCase()+e.slice(1)},e.prototype.bytesToSize=function(t){if(-1===t)return null;var e=["octets","ko","Mo","Go","To"];"bytes"===this.getAttribute(E.attr("assess-file"))&&(e=["bytes","KB","MB","GB","TB"]);var i=parseInt(Math.floor(Math.log(t)/Math.log(1e3)),10);if(0===i)return t+" "+e[i];var s=t/Math.pow(1e3,i),n=Math.round(100*(s+Number.EPSILON))/100;return String(n).replace(".",",")+" "+e[i]},Object.defineProperties(e,i),e}(bt),Xt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"AssessDetail"},e.prototype.init=function(){this.addDescent(Yt.UPDATE,this.update.bind(this)),this.ascend(Yt.ADDED)},e.prototype.update=function(t){this.node.innerHTML=t.join(" - ")},Object.defineProperties(e,i),e}(bt),Zt=["32x9","16x9","3x2","4x3","1x1","3x4","2x3"],Jt=function(t,e){return e.map((function(e){return E.selector(t+"--"+e)})).join(",")},Qt=E.selector("responsive-img")+", "+Jt("responsive-img",Zt)+", "+E.selector("responsive-vid")+", "+Jt("responsive-vid",["16x9","4x3","1x1"]),te={RATIO:E.selector("ratio")+", "+Jt("ratio",Zt)+", "+Qt},ee=window[n],ie=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Ratio"},e.prototype.init=function(){if(!ee.internals.support.supportAspectRatio()){for(var t in this.ratio=16/9,this.classNames)if(this.registration.selector.indexOf(this.classNames[t])>0){var e=this.classNames[t].split("ratio-");e[1]&&(this.ratio=e[1].split("x")[0]/e[1].split("x")[1])}this.isRendering=!0,this.update()}},e.prototype.render=function(){this.getRect().width!==this.currentWidth&&this.update()},e.prototype.update=function(){this.currentWidth=this.getRect().width,this.style.height=this.currentWidth/this.ratio+"px"},Object.defineProperties(e,i),e}(bt),se={TOP:E.selector("placement--top"),RIGHT:E.selector("placement--right"),BOTTOM:E.selector("placement--bottom"),LEFT:E.selector("placement--left")},ne={START:E.selector("placement--start"),CENTER:E.selector("placement--center"),END:E.selector("placement--end")},re={TOP:"place_top",RIGHT:"place_right",BOTTOM:"place_bottom",LEFT:"place_left"},oe={START:"align_start",CENTER:"align_center",END:"align_end"},ae={AUTO:"placement_auto",MANUAL:"placement_manual"},ce=function(t){function e(e,i,s,n){void 0===e&&(e=ae.AUTO),void 0===i&&(i=[re.BOTTOM,re.TOP,re.LEFT,re.RIGHT]),void 0===s&&(s=[oe.CENTER,oe.START,oe.END]),void 0===n&&(n=16),t.call(this),this._mode=e,this._places=i,this._aligns=s,this._safeAreaMargin=n,this._isShown=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0},mode:{configurable:!0},place:{configurable:!0},align:{configurable:!0},isShown:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Placement"},e.prototype.init=function(){this.isResizing=!0},i.proxy.get=function(){var e=this,i=Object.assign.call(this,t.prototype.proxy,{show:e.show.bind(e),hide:e.hide.bind(e)});return lt(i,{get mode(){return e.mode},set mode(t){e.mode=t},get place(){return e.place},set place(t){e.place=t},get align(){return e.align},set align(t){e.align=t},get isShown(){return e.isShown},set isShown(t){e.isShown=t}})},i.mode.get=function(){return this._mode},i.mode.set=function(t){this._mode=t},i.place.get=function(){return this._place},i.place.set=function(t){if(this._place!==t){switch(this._place){case re.TOP:this.removeClass(se.TOP);break;case re.RIGHT:this.removeClass(se.RIGHT);break;case re.BOTTOM:this.removeClass(se.BOTTOM);break;case re.LEFT:this.removeClass(se.LEFT)}switch(this._place=t,this._place){case re.TOP:this.addClass(se.TOP);break;case re.RIGHT:this.addClass(se.RIGHT);break;case re.BOTTOM:this.addClass(se.BOTTOM);break;case re.LEFT:this.addClass(se.LEFT)}}},i.align.get=function(){return this._align},i.align.set=function(t){if(this._align!==t){switch(this._align){case oe.START:this.removeClass(ne.START);break;case oe.CENTER:this.removeClass(ne.CENTER);break;case oe.END:this.removeClass(ne.END)}switch(this._align=t,this._align){case oe.START:this.addClass(ne.START);break;case oe.CENTER:this.addClass(ne.CENTER);break;case oe.END:this.addClass(ne.END)}}},e.prototype.show=function(){this.isShown=!0},e.prototype.hide=function(){this.isShown=!1},i.isShown.get=function(){return this._isShown},i.isShown.set=function(t){this._isShown!==t&&this.isEnabled&&(this.isRendering=t,this._isShown=t)},e.prototype.setReferent=function(t){this._referent=t},e.prototype.resize=function(){this.safeArea={top:this._safeAreaMargin,right:window.innerWidth-this._safeAreaMargin,bottom:window.innerHeight-this._safeAreaMargin,left:this._safeAreaMargin,center:.5*window.innerWidth,middle:.5*window.innerHeight}},e.prototype.render=function(){if(this._referent){if(this.rect=this.getRect(),this.referentRect=this._referent.getRect(),this.mode===ae.AUTO)switch(this.place=this.getPlace(),this.place){case re.TOP:case re.BOTTOM:this.align=this.getHorizontalAlign();break;case re.LEFT:case re.RIGHT:this.align=this.getVerticalAlign()}var t,e;switch(this.place){case re.TOP:e=this.referentRect.top-this.rect.height;break;case re.RIGHT:t=this.referentRect.right;break;case re.BOTTOM:e=this.referentRect.bottom;break;case re.LEFT:t=this.referentRect.left-this.rect.width}switch(this.place){case re.TOP:case re.BOTTOM:switch(this.align){case oe.CENTER:t=this.referentRect.center-.5*this.rect.width;break;case oe.START:t=this.referentRect.left;break;case oe.END:t=this.referentRect.right-this.rect.width}break;case re.RIGHT:case re.LEFT:switch(this.align){case oe.CENTER:e=this.referentRect.middle-.5*this.rect.height;break;case oe.START:e=this.referentRect.top;break;case oe.END:e=this.referentRect.bottom-this.rect.height}}this._x===t&&this._y===e||(this._x=t+.5|0,this._y=e+.5|0,this.node.style.transform="translate("+this._x+"px,"+this._y+"px)")}},e.prototype.getPlace=function(){for(var t=0,e=this._places;t<e.length;t+=1){switch(e[t]){case re.TOP:if(this.referentRect.top-this.rect.height>this.safeArea.top)return re.TOP;break;case re.RIGHT:if(this.referentRect.right+this.rect.width<this.safeArea.right)return re.RIGHT;break;case re.BOTTOM:if(this.referentRect.bottom+this.rect.height<this.safeArea.bottom)return re.BOTTOM;break;case re.LEFT:if(this.referentRect.left-this.rect.width>this.safeArea.left)return re.LEFT}}return this._places[0]},e.prototype.getHorizontalAlign=function(){for(var t=0,e=this._aligns;t<e.length;t+=1){switch(e[t]){case oe.CENTER:if(this.referentRect.center-.5*this.rect.width>this.safeArea.left&&this.referentRect.center+.5*this.rect.width<this.safeArea.right)return oe.CENTER;break;case oe.START:if(this.referentRect.left+this.rect.width<this.safeArea.right)return oe.START;break;case oe.END:if(this.referentRect.right-this.rect.width>this.safeArea.left)return oe.END}}return this._aligns[0]},e.prototype.getVerticalAlign=function(){for(var t=0,e=this._aligns;t<e.length;t+=1){switch(e[t]){case oe.CENTER:if(this.referentRect.middle-.5*this.rect.height>this.safeArea.top&&this.referentRect.middle+.5*this.rect.height<this.safeArea.bottom)return oe.CENTER;break;case oe.START:if(this.referentRect.top+this.rect.height<this.safeArea.bottom)return oe.START;break;case oe.END:if(this.referentRect.bottom-this.rect.height>this.safeArea.top)return oe.END}}return this._aligns[0]},e.prototype.dispose=function(){this._referent=null,t.prototype.dispose.call(this)},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt),he=function(t){function e(){t.call(this),this._isShown=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={placement:{configurable:!0},isShown:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"PlacementReferent"},e.prototype.init=function(){this.registration.creator.setReferent(this),this._placement=this.registration.creator},i.placement.get=function(){return this._placement},i.isShown.get=function(){return this._isShown},i.isShown.set=function(t){this._isShown!==t&&this.isEnabled&&(this._isShown=t,t?this.registration.creator.show():this.registration.creator.hide())},e.prototype.show=function(){this.isShown=!0},e.prototype.hide=function(){this.isShown=!1},Object.defineProperties(e.prototype,i),Object.defineProperties(e,s),e}(bt);gt.core={Instance:bt,Breakpoints:_t,KeyCodes:P,Disclosure:Dt,DisclosureButton:xt,DisclosuresGroup:Lt,DisclosureType:St,DisclosureEvent:Tt,DisclosureSelector:Pt,DisclosureEmission:Rt,Collapse:jt,CollapseButton:kt,CollapsesGroup:It,CollapseSelector:Mt,RootSelector:{ROOT:":root"},RootEmission:x,Equisized:qt,EquisizedEmission:Gt,Toggle:Ht,EquisizedsGroup:Ut,InjectSvg:zt,InjectSvgSelector:Bt,Artwork:Vt,ArtworkSelector:Kt,AssessFile:$t,AssessDetail:Xt,AssessEmission:Yt,AssessSelector:Wt,Ratio:ie,RatioSelector:te,Placement:ce,PlacementReferent:he,PlacementAlign:oe,PlacementPosition:re,PlacementMode:ae},gt.internals.register(gt.core.CollapseSelector.COLLAPSE,gt.core.Collapse),gt.internals.register(gt.core.InjectSvgSelector.INJECT_SVG,gt.core.InjectSvg),gt.internals.register(gt.core.RatioSelector.RATIO,gt.core.Ratio),gt.internals.register(gt.core.AssessSelector.ASSESS_FILE,gt.core.AssessFile),gt.internals.register(gt.core.AssessSelector.DETAIL,gt.core.AssessDetail),gt.internals.legacy.setLegacy(),gt.internals.register(gt.core.ArtworkSelector.ARTWORK_USE,gt.core.Artwork)}();
|
|
//# sourceMappingURL=core.nomodule.min.js.map
|