TP_JO2024/home/dist/core/core.nomodule.min.js

4 lines
68 KiB
JavaScript
Raw Permalink Normal View History

2024-03-27 17:19:37 +01:00
/*! 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()},Ob
//# sourceMappingURL=core.nomodule.min.js.map