UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

2 lines 102 kB
/*! DSFR v1.8.5 | 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 n=Object.keys(this.modules).map((function(t){return e.modules[t]}));if(t)for(var i=0,s=n;i<s.length;i+=1){s[i].activate()}else for(var o=0,r=n;o<r.length;o+=1){r[o].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 n=new t,i="fr",s="dsfr",o="1.8.5",r=function(t,e,n,i){switch(this.level=t,this.light=e,this.dark=n,i){case"warn":this.logger=console.warn;break;case"error":this.logger=console.error;break;default:this.logger=console.log}},a={color:{configurable:!0}};r.prototype.log=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var n=new c(s),i=0,o=t;i<o.length;i+=1){var r=o[i];n.add(r)}this.print(n)},r.prototype.print=function(t){t.setColor(this.color),this.logger.apply(console,t.getMessage())},a.color.get=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?this.dark:this.light},Object.defineProperties(r.prototype,a);var c=function(t){this.inputs=["%c"],this.styles=["font-family:Marianne","line-height: 1.5"],this.objects=[],t&&this.add(t+" :")};c.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+" ")}},c.prototype.setColor=function(t){this.styles.push("color:"+t)},c.prototype.getMessage=function(){return[this.inputs.join(""),this.styles.join(";")].concat(this.objects)};var l={trace:new r(0,"#616161","#989898"),debug:new r(1,"#000091","#8B8BFF"),info:new r(2,"#007c3b","#00ed70"),warn:new r(3,"#ba4500","#fa5c00","warn"),error:new r(4,"#D80600","#FF4641","error")},u=function(){var t=this;this.level=2;var e=function(e){var n=l[e];t[e]=function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];t.level<=n.level&&n.log.apply(n,e)},t[e].print=n.print.bind(n)};for(var n in l)e(n)};u.prototype.state=function(){var t=new c;t.add(n),this.trace.print(t)},u.prototype.tree=function(){var t=n.getModule("stage");if(t){var e=new c;this._branch(t.root,0,e),this.trace.print(e)}},u.prototype._branch=function(t,e,n){var i="";if(e>0){for(var s="",o=0;o<e;o++)s+=" ";i+=s+"└─ "}i+="["+t.id+"] "+t.html,n.add(i),n.add({"@":t}),n.add("\n");for(var r=0,a=t.children;r<a.length;r+=1){var c=a[r];i+=this._branch(c,e+1,n)}};var p=new u,h=function(t){"loading"!==document.readyState?window.requestAnimationFrame(t):document.addEventListener("DOMContentLoaded",t)},d={AUTO:"auto",MANUAL:"manual",RUNTIME:"runtime",LOADED:"loaded",VUE:"vue",ANGULAR:"angular",REACT:"react"},f=function(){this._mode=d.AUTO,this.isStarted=!1,this.starting=this.start.bind(this),this.preventManipulation=!1},g={mode:{configurable:!0}};f.prototype.configure=function(t,e){void 0===t&&(t={}),this.startCallback=e,!0===t.verbose&&(p.level=0),this.mode=t.mode||d.AUTO},g.mode.set=function(t){switch(t){case d.AUTO:this.preventManipulation=!1,e=this.starting,h(e);break;case d.LOADED:this.preventManipulation=!1,h(this.starting);break;case d.RUNTIME:this.preventManipulation=!1,this.start();break;case d.MANUAL:this.preventManipulation=!1;break;case d.VUE:case d.ANGULAR:case d.REACT:this.preventManipulation=!0;break;default:return void p.error("Illegal mode")}var e;this._mode=t,p.info("mode set to "+t)},g.mode.get=function(){return this._mode},f.prototype.start=function(){p.info("start"),this.startCallback()},Object.defineProperties(f.prototype,g);var y=new f,m=function(){this._collection=[]},b={length:{configurable:!0},collection:{configurable:!0}};m.prototype.forEach=function(t){this._collection.forEach(t)},m.prototype.map=function(t){return this._collection.map(t)},b.length.get=function(){return this._collection.length},m.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)},m.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()},m.prototype.execute=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var n=0,i=this._collection;n<i.length;n+=1){var s=i[n];s&&s.apply(null,t)}},m.prototype.clear=function(){this._collection.length=0},m.prototype.clone=function(){var t=new m;return t._collection=this._collection.slice(),t},b.collection.get=function(){return this._collection},Object.defineProperties(m.prototype,b);var v=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}(m),_=function(t){return i+"-"+t};_.selector=function(t,e){return void 0===e&&(e="."),""+e+_(t)},(_.attr=function(t){return"data-"+_(t)}).selector=function(t,e){var n=_.attr(t);return void 0!==e&&(n+='="'+e+'"'),"["+n+"]"},_.event=function(t){return s+"."+t},_.emission=function(t,e){return"emission:"+t+"."+e};var E=function(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))},S=function(t,e){var n=t.parentElement;return n.matches(e)?n:n===document.documentElement?null:S(n,e)},L=function(t,e,n){this.selector=t,this.InstanceClass=e,this.creator=n,this.instances=new m,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 i=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=_.attr("js-"+i)},O={instanceClassName:{configurable:!0},instanceClassNames:{configurable:!0},property:{configurable:!0},attribute:{configurable:!0}};L.prototype.getInstanceClassNames=function(t){var e=Object.getPrototypeOf(t);return e&&"Instance"!==e.instanceClassName?this.getInstanceClassNames(e).concat([t.instanceClassName]):[t.instanceClassName]},L.prototype.hasInstanceClassName=function(t){return this._instanceClassNames.indexOf(t)>-1},L.prototype.introduce=function(){this.isIntroduced||(this.isIntroduced=!0,n.getModule("stage").parse(document.documentElement,this))},L.prototype.parse=function(t,e){var n=[];return t.matches&&t.matches(this.selector)&&n.push(t),!e&&t.querySelectorAll&&t.querySelector(this.selector)&&n.push.apply(n,E(t,this.selector)),n},L.prototype.create=function(t){if(t.node.matches(this.selector)){var e=new this.InstanceClass;return this.instances.add(e),e}},L.prototype.remove=function(t){this.instances.remove(t)},L.prototype.dispose=function(){for(var t=this.instances.collection,e=t.length-1;e>-1;e--)t[e]._dispose();this.creator=null},O.instanceClassName.get=function(){return this._instanceClassName},O.instanceClassNames.get=function(){return this._instanceClassNames},O.property.get=function(){return this._property},O.attribute.get=function(){return this._attribute},Object.defineProperties(L.prototype,O);var C=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,i){var s=new L(t,e,i);return this.add(s),n.isActive&&s.introduce(),s},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}(v),A=0,w=function(t,e){e?this.id=e:(A++,this.id=A),this.node=t,this.attributeNames=[],this.instances=[],this._children=[],this._parent=null,this._projects=[]},T={proxy:{configurable:!0},html:{configurable:!0},parent:{configurable:!0},ascendants:{configurable:!0},children:{configurable:!0},descendants:{configurable:!0}};T.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,n=this.instances;e<n.length;e+=1){var i=n[e];this._proxy[i.registration.property]=i.proxy}}return this._proxy},T.html.get=function(){if(!this.node||!this.node.outerHTML)return"";var t=this.node.outerHTML.indexOf(">");return this.node.outerHTML.substring(0,t+1)},w.prototype.project=function(t){-1===this._projects.indexOf(t)&&this._projects.push(t)},w.prototype.populate=function(){var t=this._projects.slice();this._projects.length=0;for(var e=0,n=t;e<n.length;e+=1){var i=n[e];this.create(i)}},w.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)}},w.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]},T.parent.get=function(){return this._parent},T.ascendants.get=function(){return[this.parent].concat(this.parent.ascendants)},T.children.get=function(){return this._children},T.descendants.get=function(){var t=[].concat(this._children);return this._children.forEach((function(e){return t.push.apply(t,e.descendants)})),t},w.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)},w.prototype.removeChild=function(t){var e=this._children.indexOf(t);if(-1===e)return null;t._parent=null,this._children.splice(e,1)},w.prototype.emit=function(t,e){for(var i=[],s=0,o=n.getModule("stage").collection;s<o.length;s+=1){var r=o[s];i.push.apply(i,r._emit(t,e))}return i},w.prototype._emit=function(t,e){for(var n=[],i=0,s=this.instances;i<s.length;i+=1){var o=s[i];n.push.apply(n,o._emitter.emit(t,e))}return n},w.prototype.ascend=function(t,e){return this._parent?this._parent._ascend(t,e):[]},w.prototype._ascend=function(t,e){for(var n=[],i=0,s=this.instances;i<s.length;i+=1){var o=s[i];n.push.apply(n,o._ascent.emit(t,e))}return this._parent&&n.push.apply(n,this._parent._ascend(t,e)),n},w.prototype.descend=function(t,e){for(var n=[],i=0,s=this._children;i<s.length;i+=1){var o=s[i];n.push.apply(n,o._descend(t,e))}return n},w.prototype._descend=function(t,e){for(var n=[],i=0,s=this.instances;i<s.length;i+=1){var o=s[i];n.push.apply(n,o._descent.emit(t,e))}for(var r=0,a=this._children;r<a.length;r+=1){var c=a[r];n.push.apply(n,c._descend(t,e))}return n},w.prototype.getInstance=function(t){for(var e=0,n=this.instances;e<n.length;e+=1){var i=n[e];if(i.registration.hasInstanceClassName(t))return i}return null},w.prototype.hasInstance=function(t){return null!==this.getInstance(t)},w.prototype.getDescendantInstances=function(t,e,n){if(!t)return[];for(var i=[],s=0,o=this._children;s<o.length;s+=1){var r=o[s],a=r.getInstance(t);a&&(i.push(a),n)||(e&&r.hasInstance(e)||!r.children.length||i.push.apply(i,r.getDescendantInstances(t,e,n)))}return i},w.prototype.getAscendantInstance=function(t,e){if(!t||!this._parent)return null;var n=this._parent.getInstance(t);return n||(e&&this._parent.hasInstance(e)?null:this._parent.getAscendantInstance(t,e))},w.prototype.dispose=function(){for(var t=0,e=this.instances;t<e.length;t+=1){e[t]._dispose()}this.instances.length=0,n.remove("stage",this),this.parent.removeChild(this),this._children.length=0,p.debug("remove element ["+this.id+"] "+this.html)},w.prototype.prepare=function(t){-1===this.attributeNames.indexOf(t)&&this.attributeNames.push(t)},w.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(w.prototype,T);var N=function(t){function e(){t.call(this,document.documentElement,"root"),this.node.setAttribute(_.attr("js"),!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(w),P=function(t){function e(){t.call(this,"stage"),this.root=new N,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,n=this.collection;e<n.length;e+=1){if(n[e].node===t)return!0}return!1},e.prototype.getElement=function(t){for(var e=0,n=this.collection;e<n.length;e+=1){var i=n[e];if(i.node===t)return i}var s=new w(t);return this.add(s),p.debug("add element ["+s.id+"] "+s.html),s},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 n=0,i=e.children.length-1;i>-1;i--){var s=e.children[i],o=t.node.compareDocumentPosition(s.node);if(o&Node.DOCUMENT_POSITION_CONTAINS)return void this.put(t,s);if(o&Node.DOCUMENT_POSITION_CONTAINED_BY)e.removeChild(s),t.addChild(s,0);else if(o&Node.DOCUMENT_POSITION_PRECEDING){n=i+1;break}}e.addChild(t,n)},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,n=[];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 i=e.getElement(t.target);i.prepare(t.attributeName),-1===n.indexOf(i)&&n.push(i);for(var s=0,o=i.descendants;s<o.length;s+=1){var r=o[s];-1===n.indexOf(r)&&n.push(r)}}-1===e.modifications.indexOf(t.target)&&e.modifications.push(t.target)}})),n.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,n=t;e<n.length;e+=1){var i=n[e];document.documentElement.contains(i)&&this.parse(i)}},e.prototype.dispose=function(t){var e=[];this.forEach((function(n){t.contains(n.node)&&e.push(n)}));for(var n=0,i=e;n<i.length;n+=1){var s=i[n];s.dispose(),this.remove(s)}},e.prototype.parse=function(t,e,i){for(var s=[],o=0,r=e?[e]:n.getModule("register").collection;o<r.length;o+=1)for(var a=r[o],c=0,l=a.parse(t,i);c<l.length;c+=1){var u=l[c],p=this.getElement(u);p.project(a),-1===s.indexOf(p)&&s.push(p)}for(var h=0,d=s;h<d.length;h+=1){d[h].populate()}},e}(v),I=function(t){function e(){t.call(this,"render"),this.rendering=this.render.bind(this),this.nexts=new m}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(n.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}(v),D=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}(v),j=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 n={isLocked:{configurable:!0}};return n.isLocked.get=function(){return this._isLocked},e.prototype.lock=function(){this._isLocked||(this._isLocked=!0,this._scrollY=window.scrollY,this.isLegacy?document.body.style.top=-1*this._scrollY+"px":document.body.style.setProperty("--scroll-top",-1*this._scrollY+"px"),document.documentElement.setAttribute(_.attr("scrolling"),"false"))},e.prototype.unlock=function(){this._isLocked&&(this._isLocked=!1,document.documentElement.removeAttribute(_.attr("scrolling")),this.isLegacy?document.body.style.top="":document.body.style.removeProperty("--scroll-top"),window.scroll(0,this._scrollY))},Object.defineProperties(e.prototype,n),e}(v),M=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}(v),x=["Marianne","Spectral"],k=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=x.filter((function(t){return document.fonts.check("16px "+t)}));this.forEach((function(e){return e.swapFont(t)}))},e}(v),R=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}(v),H=function(){n.create(C),n.create(P),n.create(I),n.create(D),n.create(j),n.create(M),n.create(k),n.create(R);var t=n.getModule("register");this.register=t.register.bind(t)},G={isActive:{configurable:!0}};G.isActive.get=function(){return n.isActive},H.prototype.start=function(){p.debug("START"),n.isActive=!0},H.prototype.stop=function(){p.debug("STOP"),n.isActive=!1},Object.defineProperties(H.prototype,G);var q=new H,B=function(){};B.prototype.getColor=function(t,e,n,i){void 0===i&&(i={});var s="--"+t+"-"+e+"-"+n+U(i);return getComputedStyle(document.documentElement).getPropertyValue(s).trim()||null};var U=function(t){switch(!0){case t.hover:return"-hover";case t.active:return"-active";default:return""}},F=new B,z=function(t){return"."===t.charAt(0)?t.substr(1):t},W=function(t){return t.className?t.className.split(" "):[]},K=function(t,e,n){e=z(e);var i=W(t),s=i.indexOf(e);!0===n?s>-1&&i.splice(s,1):-1===s&&i.push(e),t.className=i.join(" ")},V=function(t,e){return K(t,e)},Y=function(t,e){return K(t,e,!0)},Q=function(t,e){return W(t).indexOf(z(e))>-1},$=['[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(),X=function(t){return t.querySelectorAll($)},J={};J.addClass=V,J.hasClass=Q,J.removeClass=Y,J.queryParentSelector=S,J.querySelectorAllArray=E,J.queryActions=X;var Z={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")}},tt={NONE:_.selector("transition-none")},et={};et.TransitionSelector=tt;var nt=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.forEach((function(e){var n=Object.keys(e).reduce((function(t,n){return t[n]=Object.getOwnPropertyDescriptor(e,n),t}),{});Object.getOwnPropertySymbols(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);i.enumerable&&(n[t]=i)})),Object.defineProperties(t,n)})),t},it={};it.completeAssign=nt;var st={},ot={};Object.defineProperty(ot,"isLegacy",{get:function(){return n.isLegacy}}),ot.setLegacy=function(){n.isLegacy=!0},st.legacy=ot,st.dom=J,st.support=Z,st.motion=et,st.property=it,st.ns=_,st.register=q.register,st.state=n,Object.defineProperty(st,"preventManipulation",{get:function(){return y.preventManipulation}}),Object.defineProperty(st,"stage",{get:function(){return n.getModule("stage")}}),p.info("version "+o);var rt=function(t){return n.getModule("stage").getProxy(t)};rt.Modes=d,Object.defineProperty(rt,"mode",{set:function(t){y.mode=t},get:function(){return y.mode}}),rt.internals=st,rt.start=q.start,rt.stop=q.stop,rt.inspector=p,rt.colors=F,y.configure(window[s],rt.start),window[s]=rt;var at=function(){this.emissions={}};at.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)},at.prototype.remove=function(t,e){if(this.emissions[t])if(e){var n=this.emissions[t].indexOf(e);n>-1&&this.emissions[t].splice(n)}else delete this.emissions[t]},at.prototype.emit=function(t,e){if(!this.emissions[t])return[];for(var n=[],i=0,s=this.emissions[t];i<s.length;i+=1){var o=s[i];o&&n.push(o(e))}return n},at.prototype.dispose=function(){this.emissions=null};var ct=function(t,e){this.id=t,this.minWidth=e};ct.prototype.test=function(){return window.matchMedia("(min-width: "+this.minWidth+"em)").matches};var lt={XS:new ct("xs",0),SM:new ct("sm",36),MD:new ct("md",48),LG:new ct("lg",62),XL:new ct("xl",78)},ut=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._listeners={},this._keyListenerTypes=[],this._keys=[],this.handlingKey=this.handleKey.bind(this),this._emitter=new at,this._ascent=new at,this._descent=new at,this._registrations=[],this._nexts=[]},pt={proxy:{configurable:!0},isRendering:{configurable:!0},isResizing:{configurable:!0},isScrollLocked:{configurable:!0},isLoading:{configurable:!0},isSwappingFont:{configurable:!0},isMouseMoving:{configurable:!0},style:{configurable:!0},classNames:{configurable:!0},hasFocus:{configurable:!0},isLegacy:{configurable:!0}},ht={instanceClassName:{configurable:!0}};ht.instanceClassName.get=function(){return"Instance"},ut.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()},ut.prototype.init=function(){},pt.proxy.get=function(){var t=this;return{render:function(){return t.render()},resize:function(){return t.resize()}}},ut.prototype.register=function(t,e){var i=n.getModule("register").register(t,e,this);this._registrations.push(i)},ut.prototype.getRegisteredInstances=function(t){for(var e=0,n=this._registrations;e<n.length;e+=1){var i=n[e];if(i.hasInstanceClassName(t))return i.instances.collection}return[]},ut.prototype.dispatch=function(t,e,n,i){var s=new CustomEvent(t,{detail:e,bubble:!0===n,cancelable:!0===i});this.node.dispatchEvent(s)},ut.prototype.listen=function(t,e,n){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].indexOf(e)>-1||(this._listeners[t].push(e),this.node.addEventListener(t,e,n))},ut.prototype.unlisten=function(t,e){if(t)if(e){if(!this._listeners[t])return;var n=this._listeners[t].indexOf(e);n>-1&&this._listeners[t].splice(n,1),this.node.removeEventListener(t,e)}else{if(!this._listeners[t])return;for(var i=0,s=this._listeners[t];i<s.length;i+=1){var o=s[i];this.node.removeEventListener(t,o)}this._listeners[t].length=0}else for(var r in this._listeners)this.unlisten(r)},ut.prototype.listenKey=function(t,e,n,i,s){void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===s&&(s="down"),-1===this._keyListenerTypes.indexOf(s)&&(this.listen("key"+s,this.handlingKey),this._keyListenerTypes.push(s)),this._keys.push(new dt(s,t,e,n,i))},ut.prototype.unlistenKey=function(t,e){var n=this;this._keys=this._keys.filter((function(n){return n.code!==t||n.closure!==e})),this._keyListenerTypes.forEach((function(t){n._keys.some((function(e){return e.type===t}))||n.unlisten("key"+t,n.handlingKey)}))},ut.prototype.handleKey=function(t){for(var e=0,n=this._keys;e<n.length;e+=1){n[e].handle(t)}},pt.isRendering.get=function(){return this._isRendering},pt.isRendering.set=function(t){this._isRendering!==t&&(t?n.add("render",this):n.remove("render",this),this._isRendering=t)},ut.prototype.render=function(){},ut.prototype.request=function(t){this._nexts.push(t),n.getModule("render").request(this)},ut.prototype.next=function(){var t=this._nexts.slice();this._nexts.length=0;for(var e=0,n=t;e<n.length;e+=1){var i=n[e];i&&i()}},pt.isResizing.get=function(){return this._isResizing},pt.isResizing.set=function(t){this._isResizing!==t&&(t?(n.add("resize",this),this.resize()):n.remove("resize",this),this._isResizing=t)},ut.prototype.resize=function(){},ut.prototype.isBreakpoint=function(t){return!0==("string"==typeof t)?lt[t.toUpperCase()].test():t.test()},pt.isScrollLocked.get=function(){return this._isScrollLocked},pt.isScrollLocked.set=function(t){this._isScrollLocked!==t&&(t?n.add("lock",this):n.remove("lock",this),this._isScrollLocked=t)},pt.isLoading.get=function(){return this._isLoading},pt.isLoading.set=function(t){this._isLoading!==t&&(t?n.add("load",this):n.remove("load",this),this._isLoading=t)},ut.prototype.load=function(){},pt.isSwappingFont.get=function(){return this._isSwappingFont},pt.isSwappingFont.set=function(t){this._isSwappingFont!==t&&(t?n.add("font-swap",this):n.remove("font-swap",this),this._isSwappingFont=t)},ut.prototype.swapFont=function(){},pt.isMouseMoving.get=function(){return this._isMouseMoving},pt.isMouseMoving.set=function(t){this._isMouseMoving!==t&&(t?n.add("mouse-move",this):n.remove("mouse-move",this),this._isMouseMoving=t)},ut.prototype.mouseMove=function(t){},ut.prototype.examine=function(t){this.node.matches(this.registration.selector)?this.mutate(t):this._dispose()},ut.prototype.mutate=function(t){},ut.prototype._dispose=function(){p.debug("dispose instance of "+this.registration.instanceClassName+" on element ["+this.element.id+"]"),this.removeAttribute(this.registration.attribute),this.unlisten(),this._keys=null,this.isRendering=!1,this.isResizing=!1,this._nexts=null,n.getModule("render").nexts.remove(this),this.isScrollLocked=!1,this.isLoading=!1,this.isSwappingFont=!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 i=e[t];n.remove("register",i)}this._registrations=null,this.registration.remove(this),this.dispose()},ut.prototype.dispose=function(){},ut.prototype.emit=function(t,e){return this.element.emit(t,e)},ut.prototype.addEmission=function(t,e){this._emitter.add(t,e)},ut.prototype.removeEmission=function(t,e){this._emitter.remove(t,e)},ut.prototype.ascend=function(t,e){return this.element.ascend(t,e)},ut.prototype.addAscent=function(t,e){this._ascent.add(t,e)},ut.prototype.removeAscent=function(t,e){this._ascent.remove(t,e)},ut.prototype.descend=function(t,e){return this.element.descend(t,e)},ut.prototype.addDescent=function(t,e){this._descent.add(t,e)},ut.prototype.removeDescent=function(t,e){this._descent.remove(t,e)},pt.style.get=function(){return this.node.style},ut.prototype.addClass=function(t){V(this.node,t)},ut.prototype.removeClass=function(t){Y(this.node,t)},ut.prototype.hasClass=function(t){return Q(this.node,t)},pt.classNames.get=function(){return W(this.node)},ut.prototype.remove=function(){this.node.parentNode.removeChild(this.node)},ut.prototype.setAttribute=function(t,e){this.node.setAttribute(t,e)},ut.prototype.getAttribute=function(t){return this.node.getAttribute(t)},ut.prototype.hasAttribute=function(t){return this.node.hasAttribute(t)},ut.prototype.removeAttribute=function(t){this.node.removeAttribute(t)},ut.prototype.setProperty=function(t,e){this.node.style.setProperty(t,e)},ut.prototype.removeProperty=function(t){this.node.style.removeProperty(t)},ut.prototype.focus=function(){this.node.focus()},ut.prototype.focusClosest=function(){var t=this._focusClosest(this.node.parentNode);t&&t.focus()},ut.prototype._focusClosest=function(t){if(!t)return null;var e=[].concat(X(t));if(e.length<=1)return this._focusClosest(t.parentNode);var n=e.indexOf(this.node);return e[n+(n<e.length-1?1:-1)]},pt.hasFocus.get=function(){return this.node===document.activeElement},ut.prototype.matches=function(t){return this.node.matches(t)},ut.prototype.querySelector=function(t){return this.node.querySelector(t)},ut.prototype.querySelectorAll=function(t){return E(this.node,t)},ut.prototype.queryParentSelector=function(t){return S(this.node,t)},ut.prototype.getRect=function(){return this.node.getBoundingClientRect()},pt.isLegacy.get=function(){return n.isLegacy},Object.defineProperties(ut.prototype,pt),Object.defineProperties(ut,ht);var dt=function(t,e,n,i,s){this.type=t,this.eventType="key"+t,this.code=e,this.closure=n,this.preventDefault=!0===i,this.stopPropagation=!0===s};dt.prototype.handle=function(t){t.type===this.eventType&&t.keyCode===this.code&&(this.closure(t),this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation())};var ft={DISCLOSE:_.event("disclose"),CONCEAL:_.event("conceal")},gt={RESET:_.emission("disclosure","reset"),ADDED:_.emission("disclosure","added"),REMOVED:_.emission("disclosure","removed"),GROUP:_.emission("disclosure","group"),UNGROUP:_.emission("disclosure","ungroup")},yt=function(t){function e(e,n,i,s){t.call(this),this.type=e,this._selector=n,this.DisclosureButtonInstanceClass=i,this.disclosuresGroupInstanceClassName=s,this.modifier=this._selector+"--"+this.type.id,this.pristine=!0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0},buttons:{configurable:!0},group:{configurable:!0},disclosed:{configurable:!0},buttonHasFocus:{configurable:!0},hasFocus:{configurable:!0}},i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Disclosure"},e.prototype.init=function(){this.addDescent(gt.RESET,this.reset.bind(this)),this.addDescent(gt.GROUP,this.update.bind(this)),this.addDescent(gt.UNGROUP,this.update.bind(this)),this.register('[aria-controls="'+this.id+'"]',this.DisclosureButtonInstanceClass),this.ascend(gt.ADDED),this.update()},n.proxy.get=function(){var e=this,n=Object.assign.call(this,t.prototype.proxy,{disclose:e.disclose.bind(e),focus:e.focus.bind(e)});return this.type.canConceal&&(n.conceal=e.conceal.bind(e)),nt(n,{get buttons(){return e.buttons.map((function(t){return t.proxy}))},get group(){var t=e.group;return t?t.proxy:null}})},n.buttons.get=function(){return this.getRegisteredInstances(this.DisclosureButtonInstanceClass.instanceClassName)},e.prototype.update=function(){this.getGroup()},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},n.group.get=function(){return this._group},e.prototype.disclose=function(t){return!this.disclosed&&(this.pristine=!1,this.disclosed=!0,!t&&this.group&&(this.group.current=this),!0)},e.prototype.conceal=function(t,e){return!!this.disclosed&&(!(!this.type.canConceal&&this.group&&this.group.current===this)&&(this.pristine=!1,this.disclosed=!1,!t&&this.group&&this.group.current===this&&(this.group.current=null),e||this.focus(),this.descend(gt.RESET),!0))},n.disclosed.get=function(){return this._disclosed},n.disclosed.set=function(t){if(this._disclosed!==t){this.dispatch(t?ft.DISCLOSE:ft.CONCEAL,this.type),this._disclosed=t,t?this.addClass(this.modifier):this.removeClass(this.modifier);for(var e=0;e<this.buttons.length;e++)this.buttons[e].apply(t)}},e.prototype.reset=function(){},e.prototype.toggle=function(t){if(this.type.canConceal)switch(!0){case!t:case this.disclosed:this.conceal();break;default:this.disclose()}else this.disclose()},n.buttonHasFocus.get=function(){return!!this.buttons.some((function(t){return t.hasFocus}))},n.hasFocus.get=function(){return!!t.prototype.hasFocus||(!!this.buttonHasFocus||this.querySelectorAll(":focus").length>0)},e.prototype.focus=function(){for(var t=0;t<this.buttons.length;t++){var e=this.buttons[t];if(e.isPrimary)return void e.focus()}},e.prototype.dispose=function(){this._group=null,t.prototype.dispose.call(this),this.ascend(gt.REMOVED)},Object.defineProperties(e.prototype,n),Object.defineProperties(e,i),e}(ut),mt=function(t){function e(e){t.call(this),this.type=e,this.attributeName=e.ariaState?"aria-"+e.id:_.attr(e.id)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0},disclosed:{configurable:!0}},i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"DisclosureButton"},e.prototype.init=function(){this.controlsId=this.getAttribute("aria-controls"),this.isPrimary=this.hasAttribute(this.attributeName),this.isPrimary&&this.disclosed&&this.registration.creator.pristine&&this.registration.creator.disclose(),this.listen("click",this.click.bind(this))},n.proxy.get=function(){return Object.assign.call(this,t.prototype.proxy,{focus:this.focus.bind(this)})},e.prototype.click=function(t){this.registration.creator&&this.registration.creator.toggle(this.isPrimary)},e.prototype.mutate=function(t){this.isPrimary&&t.indexOf(this.attributeName)>-1&&this.registration.creator&&(this.disclosed?this.registration.creator.disclose():this.type.canConceal&&this.registration.creator.conceal())},e.prototype.apply=function(t){this.isPrimary&&this.setAttribute(this.attributeName,t)},n.disclosed.get=function(){return"true"===this.getAttribute(this.attributeName)},Object.defineProperties(e.prototype,n),Object.defineProperties(e,i),e}(ut),bt=function(t){function e(e,n){t.call(this,n),this.disclosureInstanceClassName=e,this._index=-1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0},members:{configurable:!0},length:{configurable:!0},index:{configurable:!0},current:{configurable:!0},hasFocus:{configurable:!0}},i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"DisclosuresGroup"},e.prototype.init=function(){this.addAscent(gt.ADDED,this.update.bind(this)),this.addAscent(gt.REMOVED,this.update.bind(this)),this.descend(gt.GROUP),this.update()},n.proxy.get=function(){var e=this,n={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}};return nt.call(this,t.prototype.proxy,n)},e.prototype.validate=function(t){return!0},e.prototype.getMembers=function(){var t=this.element.getDescendantInstances(this.disclosureInstanceClassName,this.constructor.instanceClassName,!0);this._members=t.filter(this.validate.bind(this))},e.prototype.update=function(){this.getMembers(),this.getIndex()},n.members.get=function(){return this._members},n.length.get=function(){return this.members?this.members.length:0},e.prototype.getIndex=function(){this._index=-1;for(var t=0;t<this.length;t++)this.index>-1?this.members[t].conceal(!0,!0):this.members[t].disclosed&&(this.index=t)},n.index.get=function(){return this._index},n.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 n=this.members[e];t===e?n.disclose(!0):n.conceal(!0,!0)}this.apply()}},n.current.get=function(){return-1===this._index?null:this.members[this._index]},n.current.set=function(t){this.index=this.members.indexOf(t)},n.hasFocus.get=function(){var t=this.current;return!!t&&t.hasFocus},e.prototype.apply=function(){},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.descend(gt.UNGROUP),this._members=null},Object.defineProperties(e.prototype,n),Object.defineProperties(e,i),e}(ut),vt={EXPAND:{id:"expanded",ariaState:!0,ariaControls:!0,canConceal:!0},SELECT:{id:"selected",ariaState:!0,ariaControls:!0,canConceal:!1},OPENED:{id:"opened",ariaState:!1,ariaControls:!0,canConceal:!0}},_t=function(t){function e(){t.call(this,vt.EXPAND)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"CollapseButton"},Object.defineProperties(e,n),e}(mt),Et={COLLAPSE:_.selector("collapse"),COLLAPSING:_.selector("collapsing")},St=function(t){function e(){t.call(this,vt.EXPAND,Et.COLLAPSE,_t,"CollapsesGroup")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.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(Et.COLLAPSING),this.disclosed||(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 n=this;this.disclosed||(this.unbound(),this.request((function(){n.addClass(Et.COLLAPSING),n.adjust(),n.request((function(){t.prototype.disclose.call(n,e)}))})))},e.prototype.conceal=function(e,n){var i=this;this.disclosed&&this.request((function(){i.addClass(Et.COLLAPSING),i.adjust(),i.request((function(){t.prototype.conceal.call(i,e,n)}))}))},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.pristine||(this.disclosed=!1)},Object.defineProperties(e,n),e}(yt),Lt=function(t){function e(){t.call(this,"Collapse")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"CollapsesGroup"},Object.defineProperties(e,n),e}(bt),Ot={CHANGE:_("equisized")},Ct=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Equisized"},e.prototype.init=function(){this.ascend(Ot.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(Ot.CHANGE)},Object.defineProperties(e,n),e}(ut),At=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"EquisizedsGroup"},e.prototype.init=function(){this.isResizing=!0,this.isLoading=!0,this.addAscent(Ot.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,n),e}(ut),wt={TOGGLE:_.event("toggle")},Tt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={pressed:{configurable:!0},proxy:{configurable:!0}},i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Toggle"},e.prototype.init=function(){this.pressed="true"===this.pressed,this.listen("click",this.toggle.bind(this))},e.prototype.toggle=function(){this.pressed="true"!==this.pressed},n.pressed.get=function(){return this.getAttribute("aria-pressed")},n.pressed.set=function(t){this.setAttribute("aria-pressed",t?"true":"false"),this.dispatch(wt.TOGGLE,t)},n.proxy.get=function(){var e=this,n=Object.assign.call(this,t.prototype.proxy,{toggle:e.toggle.bind(e)});return nt(n,{get pressed(){return e.pressed},set pressed(t){e.pressed=t}})},Object.defineProperties(e.prototype,n),Object.defineProperties(e,i),e}(ut),Nt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0}},i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"InjectSvg"},e.prototype.init=function(){this.node&&(this.img=this.node.querySelector("img")),this.isLegacy||this.replace()},n.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 n=(new DOMParser).parseFromString(e,"text/html");t.svg=n.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,n;e=this.svg,n={"aria-hidden":!0,focusable:!1},Object.keys(n).forEach((function(t){return e.setAttribute(t,n[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,n),Object.defineProperties(e,i),e}(ut),Pt={INJECT_SVG:"["+_.attr("inject-svg")+"]"},It=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0}},i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Artwork"},e.prototype.init=function(){this.isLegacy&&this.replace()},n.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("xlink:href");var e=this.xlink.split("#");this.svgUrl=e[0],this.svgName=e[1];var n=new XMLHttpRequest;n.onload=function(){var e=(new DOMParser).parseFromString(n.responseText,"text/html");t.realSvgContent=e.getElementById(t.svgName),t.realSvgContent&&(t.realSvgContent.classList.add(t.node.classList),t.replace())},n.open("GET",this.svgUrl),n.send()},e.prototype.replace=function(){this.realSvgContent?this.node.parentNode.replaceChild(this.realSvgContent,this.node):this.fetch()},Object.defineProperties(e.prototype,n),Object.defineProperties(e,i),e}(ut),Dt={ARTWORK_USE:_.selector("artwork")+" use"},jt=["32x9","16x9","3x2","4x3","1x1","3x4","2x3"],Mt=function(t,e){return e.map((function(e){return _.selector(t+"--"+e)})).join(",")},xt=_.selector("responsive-img")+", "+Mt("responsive-img",jt)+", "+_.selector("responsive-vid")+", "+Mt("responsive-vid",["16x9","4x3","1x1"]),kt={RATIO:_.selector("ratio")+", "+Mt("ratio",jt)+", "+xt},Rt=window[s],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 n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Ratio"},e.prototype.init=function(){if(!Rt.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,n),e}(ut);rt.core={Instance:ut,Breakpoints:lt,KeyCodes:{TAB:9,ESCAPE:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40},Disclosure:yt,DisclosureButton:mt,DisclosuresGroup:bt,DisclosureType:vt,DisclosureEvent:ft,DisclosureEmission:gt,Collapse:St,CollapseButton:_t,CollapsesGroup:Lt,CollapseSelector:Et,RootSelector:{ROOT:":root"},Equisized:Ct,EquisizedEmission:Ot,Toggle:Tt,EquisizedsGroup:At,InjectSvg:Nt,InjectSvgSelector:Pt,Artwork:It,ArtworkSelector:Dt,Ratio:Ht,RatioSelector:kt},rt.internals.register(rt.core.CollapseSelector.COLLAPSE,rt.core.Collapse),rt.internals.register(rt.core.InjectSvgSelector.INJECT_SVG,rt.core.InjectSvg),rt.internals.register(rt.core.RatioSelector.RATIO,rt.core.Ratio);var Gt={SYSTEM:"system",LIGHT:"light",DARK:"dark"},qt={THEME:Rt.internals.ns.attr("theme"),SCHEME:Rt.internals.ns.attr("scheme"),TRANSITION:Rt.internals.ns.attr("transition")},Bt={LIGHT:"light",DARK:"dark"},Ut={SCHEME:Rt.internals.ns.emission("scheme","scheme"),THEME:Rt.internals.ns.emission("scheme","theme"),ASK:Rt.internals.ns.emission("scheme","ask")},Ft={SCHEME:Rt.internals.ns.event("scheme"),THEME:Rt.internals.ns.event("theme")},zt=function(t){function e(){t.call(this,!1)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0},scheme:{configurable:!0},theme:{configurable:!0}},i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Scheme"},e.prototype.init=function(){this.changing=this.change.bind(this),this.hasAttribute(qt.TRANSITION)&&(this.removeAttribute(qt.TRANSITION),this.request(this.restoreTransition.bind(this)));var t=Rt.internals.support.supportLocalStorage()?localStorage.getItem("scheme"):"",e=this.getAttribute(qt.SCHEME);switch(t){case Gt.DARK:case Gt.LIGHT:case Gt.SYSTEM:this.scheme=t;break;default:switch(e){case Gt.DARK:this.scheme=Gt.DARK;break;case Gt.LIGHT:this.scheme=Gt.LIGHT;break;default:this.scheme=Gt.SYSTEM}}this.addAscent(Ut.ASK,this.ask.bind(this)),this.addAscent(Ut.SCHEME,this.apply.bind(this))},n.proxy.get=function(){var e=this,n={get scheme(){return e.scheme},set scheme(t){e.scheme=t}};return Rt.internals.property.completeAssign.call(this,t.prototype.proxy,n)},e.prototype.restoreTransition=function(){this.setAttribute(qt.TRANSITION,"")},e.prototype.ask=function(){this.descend(Ut.SCHEME,this.scheme)},e.prototype.apply=function(t){this.scheme=t},n.scheme.get=function(){return this._scheme},n.scheme.set=function(t){if(this._scheme!==t){switch(this._scheme=t,t){case Gt.SYSTEM:this.listenPreferences();break;case Gt.DARK:this.unlistenPreferences(),this.theme=Bt.DARK;break;case Gt.LIGHT:this.unlistenPreferences(),this.theme=Bt.LIGHT;break;default:return void(this.scheme=Gt.SYSTEM)}this.descend(Ut.SCHEME,t),Rt.internals.support.supportLocalStorage()&&localStorage.setItem("scheme",t),this.setAttribute(qt.SCHEME,t),this.dispatch(Ft.SCHEME,{scheme:this._scheme})}},n.theme.get=function(){return this._theme},n.theme.set=function(t){if(this._theme!==t)switch(t){case Bt.LIGHT:case Bt.DARK:this._theme=t,this.setAttribute(qt.THEME,t),this.descend(Ut.THEME,t),this.dispatch(Ft.THEME,{theme:this._theme})}},e.prototype.listenPreferences=function(){this.isListening||(this.isListening=!0,this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.changing),this.change())},e.prototype.unlistenPreferences=function(){this.isListening&&(this.isListening=!1,this.mediaQuery.removeEventListener("change",this.changing),this.mediaQuery=null)},e.prototype.change=function(){this.isListening&&(this.theme=this.mediaQuery.matches?Bt.DARK:Bt.LIGHT)},e.prototype.mutate=function(t){t.indexOf(qt.SCHEME)>-1&&(this.scheme=this.getAttribute(