@udixio/theme 1.0.0-beta.12 → 1.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.service.d.ts +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/plugins/tailwind/main.d.ts +1 -1
- package/dist/theme.cjs.development.js +77 -460
- package/dist/theme.cjs.development.js.map +1 -1
- package/dist/theme.cjs.production.min.js +1 -1
- package/dist/theme.cjs.production.min.js.map +1 -1
- package/dist/theme.esm.js +77 -460
- package/dist/theme.esm.js.map +1 -1
- package/package.json +7 -3
- package/src/config/config.service.ts +20 -5
- package/src/main.ts +2 -2
- package/src/plugins/tailwind/main.ts +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("awilix"),e=require("@material/material-color-utilities"),r=require("path"),n=require("tailwindcss/plugin"),o=function(){function t(t){var e=t.colorManagerService;this.colorManagerService=void 0,this.colorManagerService=e}var e=t.prototype;return e.getColors=function(){return this.colorManagerService.getAll()},e.addColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},e.addColors=function(t){var e=this;Array.isArray(t)||(t=[t]),t.forEach((function(t){"function"==typeof t&&(t=t(e)),t.fromPalettes&&(Array.isArray(t.fromPalettes)||(t.fromPalettes=[t.fromPalettes]),t.fromPalettes.map((function(t){e.colorManagerService.addFromPalette(t)}))),t.colors&&Object.keys(t.colors).map((function(r){return e.addColor(r,t.colors[r])}))}))},e.getColor=function(t){return this.colorManagerService.get(t)},e.removeColor=function(t){return this.colorManagerService.remove(t)},e.updateColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},t}();function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)}))}}function c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(null,arguments)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=Object.create((e&&e.prototype instanceof y?e:y).prototype),a=new L(n||[]);return o(i,"_invoke",{value:E(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var g="suspendedStart",p="suspendedYield",d="executing",v="completed",m={};function y(){}function C(){}function b(){}var w={};s(w,a,(function(){return this}));var k=Object.getPrototypeOf,P=k&&k(k(M([])));P&&P!==r&&n.call(P,a)&&(w=P);var x=b.prototype=y.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function r(o,i,a,u){var c=h(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=g;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=O(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===g)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?v:p,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return C.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:C,configurable:!0}),C.displayName=s(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},S(D.prototype),s(D.prototype,u,(function(){return this})),e.AsyncIterator=D,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new D(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,c,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=M,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}var g,p=function(){function t(t,e,r,n){this.low=void 0,this.normal=void 0,this.medium=void 0,this.high=void 0,this.low=t,this.normal=e,this.medium=r,this.high=n}return t.prototype.get=function(t){return t<=-1?this.low:t<0?e.lerp(this.low,this.normal,(t- -1)/1):t<.5?e.lerp(this.normal,this.medium,(t-0)/.5):t<1?e.lerp(this.medium,this.high,(t-.5)/.5):this.high},t}(),d=function(){function t(t,e,r,n,o,i,a,u){if(this.name=void 0,this.palette=void 0,this.tone=void 0,this.isBackground=void 0,this.background=void 0,this.secondBackground=void 0,this.contrastCurve=void 0,this.toneDeltaPair=void 0,this.hctCache=new Map,this.name=t,this.palette=e,this.tone=r,this.isBackground=n,this.background=o,this.secondBackground=i,this.contrastCurve=a,this.toneDeltaPair=u,!o&&i)throw new Error("Color "+t+" has secondBackgrounddefined, but background is not defined.");if(!o&&a)throw new Error("Color "+t+" has contrastCurvedefined, but background is not defined.");if(o&&!a)throw new Error("Color "+t+" has backgrounddefined, but contrastCurve is not defined.")}t.fromPalette=function(e){var r,n;return new t(null!=(r=e.name)?r:"",e.palette,e.tone,null!=(n=e.isBackground)&&n,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)},t.foregroundTone=function(r,n){var o=e.Contrast.lighterUnsafe(r,n),i=e.Contrast.darkerUnsafe(r,n),a=e.Contrast.ratioOfTones(o,r),u=e.Contrast.ratioOfTones(i,r);if(t.tonePrefersLightForeground(r)){var c=Math.abs(a-u)<.1&&a<n&&u<n;return a>=n||a>=u||c?o:i}return u>=n||u>=a?i:o},t.tonePrefersLightForeground=function(t){return Math.round(t)<60},t.toneAllowsLightForeground=function(t){return Math.round(t)<=49},t.enableLightForeground=function(e){return t.tonePrefersLightForeground(e)&&!t.toneAllowsLightForeground(e)?49:e};var r=t.prototype;return r.getArgb=function(t){return this.getHct(t).toInt()},r.getHct=function(t){var e=this.hctCache.get(t);if(null!=e)return e;var r=this.getTone(t),n=this.palette(t).getHct(r);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n},r.getTone=function(r){var n=r.contrastLevel<0;if(this.toneDeltaPair){var o=this.toneDeltaPair(r),i=o.roleA,a=o.roleB,u=o.delta,c=o.polarity,s=o.stayTogether,l=this.background(r).getTone(r),f="nearer"===c||"lighter"===c&&!r.isDark||"darker"===c&&r.isDark,h=f?i:a,g=f?a:i,p=this.name===h.name,d=r.isDark?1:-1,v=h.contrastCurve.get(r.contrastLevel),m=g.contrastCurve.get(r.contrastLevel),y=h.tone(r),C=e.Contrast.ratioOfTones(l,y)>=v?y:t.foregroundTone(l,v),b=g.tone(r),w=e.Contrast.ratioOfTones(l,b)>=m?b:t.foregroundTone(l,m);return n&&(C=t.foregroundTone(l,v),w=t.foregroundTone(l,m)),(w-C)*d>=u||((w=e.clampDouble(0,100,C+u*d))-C)*d>=u||(C=e.clampDouble(0,100,w-u*d)),50<=C&&C<60?d>0?(C=60,w=Math.max(w,C+u*d)):(C=49,w=Math.min(w,C+u*d)):50<=w&&w<60&&(s?d>0?(C=60,w=Math.max(w,C+u*d)):(C=49,w=Math.min(w,C+u*d)):w=d>0?60:49),p?C:w}var k=this.tone(r);if(null==this.background)return k;var P=this.background(r).getTone(r),x=this.contrastCurve.get(r.contrastLevel);if(e.Contrast.ratioOfTones(P,k)>=x||(k=t.foregroundTone(P,x)),n&&(k=t.foregroundTone(P,x)),this.isBackground&&50<=k&&k<60&&(k=e.Contrast.ratioOfTones(49,P)>=x?49:60),this.secondBackground){var S=[this.background,this.secondBackground],D=S[1],E=[(0,S[0])(r).getTone(r),D(r).getTone(r)],O=E[0],T=E[1],A=[Math.max(O,T),Math.min(O,T)],L=A[0],M=A[1];if(e.Contrast.ratioOfTones(L,k)>=x&&e.Contrast.ratioOfTones(M,k)>=x)return k;var H=e.Contrast.lighter(L,x),B=e.Contrast.darker(M,x),j=[];return-1!==H&&j.push(H),-1!==B&&j.push(B),t.tonePrefersLightForeground(O)||t.tonePrefersLightForeground(T)?H<0?100:H:1===j.length?j[0]:B<0?0:B}return k},t}(),v=function(t,e,r,n,o){this.roleA=void 0,this.roleB=void 0,this.delta=void 0,this.polarity=void 0,this.stayTogether=void 0,this.roleA=t,this.roleB=e,this.delta=r,this.polarity=n,this.stayTogether=o},m=function(){function t(t,e,r){this.option=void 0,this.schemeService=void 0,this.colorService=void 0,this.dynamicColor=null,this.option=t,this.schemeService=e,this.colorService=r}var r=t.prototype;return r.update=function(t){this.dynamicColor=null,this.option=s({},this.option,t)},r.getHex=function(){return e.hexFromArgb(this.getArgb())},r.getArgb=function(){return this.getDynamicColor().getArgb(this.schemeService.get())},r.getRgb=function(){return{r:(t=this.getArgb())>>16&255,g:t>>8&255,b:255&t};var t},r.getName=function(){return this.option.name.replace(/([A-Z])/g,"_$1").toLowerCase()},r.getDynamicColor=function(){return this.dynamicColor||(this.dynamicColor=d.fromPalette(s({},this.option,{name:this.getName()}))),this.dynamicColor},t}(),y=function(t,e){return e instanceof o?t.isDark?e.getColor("surfaceBright").getDynamicColor():e.getColor("surfaceDim").getDynamicColor():t.isDark?e.get("surfaceBright").getDynamicColor():e.get("surfaceDim").getDynamicColor()},C=function(){function t(t){var e=t.schemeService;this.colorMap=new Map,this.schemeService=void 0,this.schemeService=e}var e=t.prototype;return e.createOrUpdate=function(t,e){var r=this.colorMap.get(t);if(r)r.update(s({},e,{name:t})),this.colorMap.set(t,r);else{var n=e.palette,o=e.tone;if(!n||!o)throw new Error("Palette "+t+" does not exist");r=new m(s({},e,{palette:n,tone:o,name:t}),this.schemeService,this),this.colorMap.set(t,r)}return r},e.remove=function(t){return this.colorMap.delete(t)},e.get=function(t){var e=this.colorMap.get(t);if(e)return e;throw new Error("Color "+t+" does not exist")},e.getAll=function(){return this.colorMap},e.addFromPalette=function(t){var e,r=this,n=t,o=(e=t).charAt(0).toUpperCase()+e.slice(1),i="on"+o,a=n+"Container",u="on"+o+"Container",c="inverse"+o,s=n+"Fixed",l=n+"FixedDim",f="on"+o+"Fixed",h="on"+o+"FixedVariant";this.createOrUpdate(n,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(t){return y(t,r)},contrastCurve:new p(3,4.5,7,11),toneDeltaPair:function(t){return new v(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),15,"nearer",!1)}}),this.createOrUpdate(i,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?20:100},background:function(t){return r.get(n).getDynamicColor()},contrastCurve:new p(4.5,7,11,21)}),this.createOrUpdate(a,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(t){return y(t,r)},contrastCurve:new p(1,1,3,7),toneDeltaPair:function(t){return new v(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),15,"nearer",!1)}}),this.createOrUpdate(u,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?90:10},background:function(t){return r.get(a).getDynamicColor()},contrastCurve:new p(4.5,7,11,21)}),this.createOrUpdate(c,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?40:80},background:function(t){return r.get("inverseSurface").getDynamicColor()},contrastCurve:new p(3,4.5,7,11)}),this.createOrUpdate(s,{palette:function(e){return e.getPalette(t)},tone:function(t){return 90},isBackground:!0,background:function(t){return y(t,r)},contrastCurve:new p(1,1,3,7),toneDeltaPair:function(t){return new v(r.get(s).getDynamicColor(),r.get(l).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(l,{palette:function(e){return e.getPalette(t)},tone:function(t){return 80},isBackground:!0,background:function(t){return y(t,r)},contrastCurve:new p(1,1,3,7),toneDeltaPair:function(t){return new v(r.get(s).getDynamicColor(),r.get(l).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(f,{palette:function(e){return e.getPalette(t)},tone:function(t){return 10},background:function(t){return r.get(l).getDynamicColor()},secondBackground:function(t){return r.get(s).getDynamicColor()},contrastCurve:new p(4.5,7,11,21)}),this.createOrUpdate(h,{palette:function(e){return e.getPalette(t)},tone:function(t){return 30},background:function(t){return r.get(l).getDynamicColor()},secondBackground:function(t){return r.get(s).getDynamicColor()},contrastCurve:new p(3,4.5,7,11)})},t}(),b={colorManagerService:t.asClass(C).singleton(),colorService:t.asClass(o).singleton()},w=function(){function t(t){this.options=void 0,this.options=t}var r,n;return t.prototype.getPalette=function(t){if(!this.options)throw new Error("Scheme options is not set");var e=this.options.palettes.get(t);if(!e)throw new Error("Palette "+t+" not found");return e},r=t,(n=[{key:"contrastLevel",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.contrastLevel}},{key:"isDark",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.isDark}},{key:"sourceColorHct",get:function(){if(!this.options)throw new Error("Scheme options is not set");return e.Hct.fromInt(this.options.sourceColorArgb)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(),k=function(){function t(){this.schemeEntity=void 0,this.options=void 0}var r=t.prototype;return r.createOrUpdate=function(t){var r,n;this.options=s({},this.options,t,{sourcesColorHex:s({},null==(r=this.options)?void 0:r.sourcesColorHex,t.sourcesColorHex),palettes:s({},null==(n=this.options)?void 0:n.palettes,t.palettes)});var o=new Map;if(!this.options.sourcesColorHex.primary)throw new Error("Primary source color is not set");var i=e.argbFromHex(this.options.sourcesColorHex.primary),a=e.Hct.fromInt(i);if(this.options.palettes){for(var u=0,c=Object.entries(this.options.palettes);u<c.length;u++){var l=c[u],f=l[0],h=l[1],g=h.sourceColorkey,p=h.tonalPalette,d=void 0;if(g){var v=e.argbFromHex(this.options.sourcesColorHex[g]);d=p(e.Hct.fromInt(v))}else d=p(a);o.set(f,d)}this.schemeEntity=new w(s({},this.options,{palettes:o,sourceColorArgb:i}))}},r.get=function(){if(!this.schemeEntity)throw new Error("Scheme is not created");return this.schemeEntity},t}(),P=function(){function t(t){var e=t.schemeService,r=t.variantService;this.schemeService=void 0,this.variantService=void 0,this.schemeService=e,this.variantService=r}var e=t.prototype;return e.create=function(t){this.schemeService.createOrUpdate(s({},t,{sourcesColorHex:{primary:t.sourceColorHex}})),this.variantService.set(t.variant)},e.update=function(t){var e=s({},t);t.sourceColorHex&&(e.sourcesColorHex={primary:t.sourceColorHex}),this.schemeService.createOrUpdate(e),t.variant&&this.variantService.set(t.variant)},e.addCustomPalette=function(t,e){this.variantService.addCustomPalette(t,e)},t}(),x=function(){function t(t){var e=t.schemeService;this.customPalettes={},this.variantEntity=void 0,this.schemeService=void 0,this.schemeService=e}var r=t.prototype;return r.addCustomPalette=function(t,e){this.customPalettes[t]=e,this.update()},r.set=function(t){this.variantEntity=t,t.palettes.error||(t.palettes.error=function(){return e.TonalPalette.fromHueAndChroma(25,84)}),this.update()},r.update=function(){var t=this;if(this.variantEntity){var e={};Object.keys(this.variantEntity.palettes).forEach((function(r){e[r]={tonalPalette:t.variantEntity.palettes[r]}})),this.variantEntity.customPalettes&&Object.keys(this.customPalettes).forEach((function(r){e[r]={sourceColorkey:r,tonalPalette:t.variantEntity.customPalettes}})),this.schemeService.createOrUpdate({sourcesColorHex:this.customPalettes,palettes:e})}},t}(),S={schemeService:t.asClass(k).singleton(),variantService:t.asClass(x).singleton(),themeService:t.asClass(P).singleton()},D=function(t){var e=t.colorService,r=t.themeService,n=t.pluginService;this.colorService=void 0,this.themeService=void 0,this.pluginService=void 0,this.pluginService=n,this.colorService=e,this.themeService=r},E={appService:t.asClass(D).singleton()},O=function(t){return{fromPalettes:["primary","secondary","tertiary"],colors:{background:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},onBackground:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(e){return t.getColor("background").getDynamicColor()},contrastCurve:new p(3,3,4.5,7)},surface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},surfaceDim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:87},isBackground:!0},surfaceBright:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?24:98},isBackground:!0},surfaceContainerLowest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?4:100},isBackground:!0},surfaceContainerLow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?10:96},isBackground:!0},surfaceContainer:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?12:94},isBackground:!0},surfaceContainerHigh:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?17:92},isBackground:!0},surfaceContainerHighest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?22:90},isBackground:!0},onSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(e){return y(e,t)},contrastCurve:new p(4.5,7,11,21)},surfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:90},isBackground:!0},onSurfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?80:30},background:function(e){return y(e,t)},contrastCurve:new p(3,4.5,7,11)},inverseSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:20}},inverseOnSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?20:95},background:function(e){return t.getColor("inverseSurface").getDynamicColor()},contrastCurve:new p(4.5,7,11,21)},outline:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?60:50},background:function(e){return y(e,t)},contrastCurve:new p(1.5,3,4.5,7)},outlineVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:80},background:function(e){return y(e,t)},contrastCurve:new p(1,1,3,7)},shadow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},scrim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},surfaceTint:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?80:40},isBackground:!0},secondaryContainer:{tone:function(t){var r=t.isDark?30:90;return function(t,r,n,o){var i=n,a=e.Hct.from(t,r,n);if(a.chroma<r)for(var u=a.chroma;a.chroma<r;){var c=e.Hct.from(t,r,i+=o?-1:1);if(u>c.chroma)break;if(Math.abs(c.chroma-r)<.4)break;Math.abs(c.chroma-r)<Math.abs(a.chroma-r)&&(a=c),u=Math.max(u,c.chroma)}return i}(t.getPalette("secondary").hue,t.getPalette("secondary").chroma,r,!t.isDark)}},onSecondaryContainer:{tone:function(e){return d.foregroundTone(t.getColor("secondaryContainer").getDynamicColor().tone(e),4.5)}},tertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){var r=t.getPalette("tertiary").getHct(t.sourceColorHct.tone);return e.DislikeAnalyzer.fixIfDisliked(r).tone}},onTertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(e){return d.foregroundTone(t.getColor("tertiaryContainer").getDynamicColor().tone(e),4.5)}},error:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(e){return y(e,t)},contrastCurve:new p(3,4.5,7,11),toneDeltaPair:function(e){return new v(t.getColor("errorContainer").getDynamicColor(),t.getColor("error").getDynamicColor(),15,"nearer",!1)}},onError:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?20:100},background:function(e){return t.getColor("error").getDynamicColor()},contrastCurve:new p(4.5,7,11,21)},errorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(e){return y(e,t)},contrastCurve:new p(1,1,3,7),toneDeltaPair:function(e){return new v(t.getColor("errorContainer").getDynamicColor(),t.getColor("error").getDynamicColor(),15,"nearer",!1)}},onErrorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?90:10},background:function(e){return t.getColor("errorContainer").getDynamicColor()},contrastCurve:new p(4.5,7,11,21)},onTertiaryFixed:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 10},background:function(e){return t.getColor("tertiaryFixedDim").getDynamicColor()},secondBackground:function(e){return t.getColor("tertiaryFixed").getDynamicColor()},contrastCurve:new p(4.5,7,11,21)},onTertiaryFixedVariant:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 30},background:function(e){return t.getColor("tertiaryFixedDim").getDynamicColor()},secondBackground:function(e){return t.getColor("tertiaryFixed").getDynamicColor()},contrastCurve:new p(3,4.5,7,11)}}}},T=function(t,r,n){var o=t.hue;if(r.length!==n.length)throw new Error("mismatch between hue length "+r.length+" & rotations "+n.length);if(1===n.length)return e.sanitizeDegreesDouble(t.hue+n[0]);for(var i=r.length,a=0;a<=i-2;a++)if(r[a]<o&&o<r[a+1])return e.sanitizeDegreesDouble(o+n[a]);return o},A=function(){};g=A,A.tonalSpot={palettes:{primary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,36)},secondary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,16)},tertiary:function(t){return e.TonalPalette.fromHueAndChroma(e.sanitizeDegreesDouble(t.hue+60),24)},neutral:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,6)},neutralVariant:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,8)}},customPalettes:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,16)}},A.vibrant={palettes:{primary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,200)},secondary:function(t){return e.TonalPalette.fromHueAndChroma(T(t,g.hues,g.secondaryRotations),24)},tertiary:function(t){return e.TonalPalette.fromHueAndChroma(T(t,g.hues,g.tertiaryRotations),32)},neutral:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,6)},neutralVariant:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,8)}},customPalettes:function(t){return e.TonalPalette.fromHueAndChroma(T(t,g.hues,g.secondaryRotations),24)}},A.hues=[0,41,61,101,131,181,251,301,360],A.secondaryRotations=[18,15,10,12,15,18,15,12,12],A.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var L=function(){function t(t){var e=t.appService;this.configPath="./theme.config",this.appService=void 0,this.appService=e}var e=t.prototype;return e.loadConfig=function(){var t=u(l().mark((function t(){var e,r,n,o,i,a,u,c,s,f,h,g,p;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(e=this.appService).themeService,n=e.colorService,o=e.pluginService,t.next=3,this.getConfig();case 3:s=(i=t.sent).palettes,f=i.colors,g=void 0===(h=i.useDefaultColors)||h,p=i.plugins,r.create({contrastLevel:void 0===(a=i.contrastLevel)?0:a,isDark:void 0!==(u=i.isDark)&&u,sourceColorHex:i.sourceColor,variant:void 0===(c=i.variant)?A.tonalSpot:c}),s&&Object.entries(s).forEach((function(t){return r.addCustomPalette(t[0],t[1])})),g&&n.addColors(O),f&&n.addColors(f),p&&(p.forEach((function(t){Array.isArray(t)?o.addPlugin(t[0],t[1]):o.addPlugin(t,{})})),o.loadPlugins(this.appService));case 21:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),e.getConfig=function(){var t=u(l().mark((function t(){var e;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.resolve(this.configPath),t.next=3,import(e);case 3:return t.abrupt("return",t.sent.default);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),t}(),M={configService:t.asClass(L).singleton()},H=function(){function t(){this.pluginInstances=new Map,this.pluginConstructors=new Map}var e=t.prototype;return e.addPlugin=function(t,e){this.pluginConstructors.set(t.name,[t,e])},e.loadPlugins=function(t){var e=this;this.pluginConstructors.forEach((function(r){var n=r[0];e.pluginInstances.set(n.name,new n(t,r[1]))}))},e.getPlugin=function(t){var e=this.pluginInstances.get(t.name);if(!e)throw new Error("Plugin "+t.name+" not found");return e},t}(),B={pluginService:t.asClass(H).singleton()};function j(t,e){return e.forEach((function(e){Object.entries(e).forEach((function(e){t.register(e[0],e[1])}))})),t}var F=t.createContainer({injectionMode:t.InjectionMode.PROXY});function _(t){return U.apply(this,arguments)}function U(){return U=u(l().mark((function t(e){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=F.resolve("configService"),e&&(r.configPath=e),t.next=4,r.loadConfig();case 4:return t.abrupt("return",F.resolve("appService"));case 5:case"end":return t.stop()}}),t)}))),U.apply(this,arguments)}j(F,[M,E,B,b,S]);var I=function(){};I.dependencies=void 0;var V=function(t){return n((function(e){N(e,{statePrefix:"state",disabledStyles:{textOpacity:.38,backgroundOpacity:.12},transition:{duration:150}},t)}),{})},N=function(t,e,r){for(var n=t.addComponents,o=e.statePrefix,i=e.disabledStyles,a=e.transition,u={},s=0,l=[!1,!0];s<l.length;s++)for(var f,h=l[s]?"group-":"",g=c(r);!(f=g()).done;){var p,d=f.value,v="."+h+o+"-"+d;u[v]=((p={})["@apply "+h+"hover:bg-"+d+"/[0.08]"]={},p["@apply "+h+"active:bg-"+d+"/[0.12]"]={},p["@apply "+h+"focus-visible:bg-"+d+"/[0.12]"]={},p),a&&(u[v]["@apply transition-colors"]={},u[v]["@apply duration-"+a.duration]={}),i&&(u[v]["@apply "+h+"disabled:text-on-surface/["+i.textOpacity+"]"]={},u[v]["@apply "+h+"disabled:bg-on-surface/["+i.backgroundOpacity+"]"]={})}for(var m,y=c(r);!(m=y()).done;)for(var C=m.value,b=0,w=["hover","active","focus","disabled"];b<w.length;b++){var k,P=w[b],x="."+P+"-"+o+"-"+C;if("active"===P||"focus"===P)u[x]=((k={})["@apply bg-"+C+"/[0.12]"]={},k);else if("hover"===P){var S;u[x]=((S={})["@apply bg-"+C+"/[0.08]"]={},S)}else if("disabled"===P){var D,E;u[x]=((D={})["@apply text-on-surface/["+i.textOpacity+"]"]={},D),u[x]=((E={})["@apply bg-on-surface/["+i.backgroundOpacity+"]"]={},E)}}n(u)},G=function(t,e){var r={defaultTheme:{extend:{colors:{}}},themes:[{name:"darkTheme",extend:{colors:{}}}]};return Object.entries(t).forEach((function(t){var e=t[0],n=t[1];r.defaultTheme.extend.colors[e]=n.light,r.themes[0].extend.colors[e]=n.dark})),r.themes[0].selectors="class"===e?[".dark-mode",'[data-theme="dark"]']:void 0,r.themes[0].mediaQuery="media"===e?"@media (prefers-color-scheme: dark)":void 0,require("tailwindcss-themer")(r)},R=function(t){function e(e,r){var n;return(n=t.call(this)||this).appService=void 0,n.options=void 0,n.appService=e,n.options=r,n}var r,n;return n=t,(r=e).prototype=Object.create(n.prototype),r.prototype.constructor=r,f(r,n),e.config=function(t){return t},e.prototype.getTheme=function(){for(var t={},e=0,r=[!1,!0];e<r.length;e++){var n=r[e];this.appService.themeService.update({isDark:n});for(var o,i=c(this.appService.colorService.getColors().entries());!(o=i()).done;){var a=o.value,u=a[1],s=a[0].replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase();null!=t[s]||(t[s]={light:"",dark:""}),t[s][n?"dark":"light"]=u.getHex()}}return console.log(t),{colors:{},fontFamily:{expressive:[],neutral:[]},plugins:[V(Object.keys(t)),G(t,this.options.darkMode)]}},e}(I),z=function(){var t=u(l().mark((function t(){var e;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_();case 2:if(e=t.sent.pluginService.getPlugin(R)){t.next=6;break}throw new Error("Tailwind plugin not found");case 6:return t.abrupt("return",e.getTheme());case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();exports.AppContainer=F,exports.AppModule=E,exports.AppService=D,exports.ColorEntity=m,exports.ColorManagerService=C,exports.ColorModule=b,exports.ColorService=o,exports.ConfigModule=M,exports.ConfigService=L,exports.ContrastCurve=p,exports.DynamicColor=d,exports.PluginAbstract=I,exports.PluginModule=B,exports.PluginService=H,exports.SchemeEntity=w,exports.SchemeService=k,exports.TailwindPlugin=R,exports.ThemeModule=S,exports.ThemeService=P,exports.ToneDeltaPair=v,exports.VariantEntity=function(t,e){void 0===t&&(t={}),this.palettes=void 0,this.customPalettes=void 0,this.palettes=t,this.customPalettes=e},exports.VariantModel=A,exports.VariantService=x,exports.bootstrap=function(){return F.resolve("appService")},exports.bootstrapFromConfig=_,exports.createTheme=z,exports.defaultColors=O,exports.defineConfig=function(t){if(!t||"object"!=typeof t)throw new Error("The configuration is missing or not an object");if(!("sourceColor"in t))throw new Error("Invalid configuration");return t},exports.getRotatedHue=T,exports.highestSurface=y,exports.importContainer=j,exports.state=V,exports.themer=G;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("awilix"),e=require("@material/material-color-utilities"),r=require("path"),n=require("node:fs"),o=require("tailwindcss/plugin"),i=function(){function t(t){var e=t.colorManagerService;this.colorManagerService=void 0,this.colorManagerService=e}var e=t.prototype;return e.getColors=function(){return this.colorManagerService.getAll()},e.addColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},e.addColors=function(t){var e=this;Array.isArray(t)||(t=[t]),t.forEach((function(t){"function"==typeof t&&(t=t(e)),t.fromPalettes&&(Array.isArray(t.fromPalettes)||(t.fromPalettes=[t.fromPalettes]),t.fromPalettes.map((function(t){e.colorManagerService.addFromPalette(t)}))),t.colors&&Object.keys(t.colors).map((function(r){return e.addColor(r,t.colors[r])}))}))},e.getColor=function(t){return this.colorManagerService.get(t)},e.removeColor=function(t){return this.colorManagerService.remove(t)},e.updateColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},t}();function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(null,arguments)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function l(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}var f,h=function(){function t(t,e,r,n){this.low=void 0,this.normal=void 0,this.medium=void 0,this.high=void 0,this.low=t,this.normal=e,this.medium=r,this.high=n}return t.prototype.get=function(t){return t<=-1?this.low:t<0?e.lerp(this.low,this.normal,(t- -1)/1):t<.5?e.lerp(this.normal,this.medium,(t-0)/.5):t<1?e.lerp(this.medium,this.high,(t-.5)/.5):this.high},t}(),g=function(){function t(t,e,r,n,o,i,a,u){if(this.name=void 0,this.palette=void 0,this.tone=void 0,this.isBackground=void 0,this.background=void 0,this.secondBackground=void 0,this.contrastCurve=void 0,this.toneDeltaPair=void 0,this.hctCache=new Map,this.name=t,this.palette=e,this.tone=r,this.isBackground=n,this.background=o,this.secondBackground=i,this.contrastCurve=a,this.toneDeltaPair=u,!o&&i)throw new Error("Color "+t+" has secondBackgrounddefined, but background is not defined.");if(!o&&a)throw new Error("Color "+t+" has contrastCurvedefined, but background is not defined.");if(o&&!a)throw new Error("Color "+t+" has backgrounddefined, but contrastCurve is not defined.")}t.fromPalette=function(e){var r,n;return new t(null!=(r=e.name)?r:"",e.palette,e.tone,null!=(n=e.isBackground)&&n,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)},t.foregroundTone=function(r,n){var o=e.Contrast.lighterUnsafe(r,n),i=e.Contrast.darkerUnsafe(r,n),a=e.Contrast.ratioOfTones(o,r),u=e.Contrast.ratioOfTones(i,r);if(t.tonePrefersLightForeground(r)){var s=Math.abs(a-u)<.1&&a<n&&u<n;return a>=n||a>=u||s?o:i}return u>=n||u>=a?i:o},t.tonePrefersLightForeground=function(t){return Math.round(t)<60},t.toneAllowsLightForeground=function(t){return Math.round(t)<=49},t.enableLightForeground=function(e){return t.tonePrefersLightForeground(e)&&!t.toneAllowsLightForeground(e)?49:e};var r=t.prototype;return r.getArgb=function(t){return this.getHct(t).toInt()},r.getHct=function(t){var e=this.hctCache.get(t);if(null!=e)return e;var r=this.getTone(t),n=this.palette(t).getHct(r);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n},r.getTone=function(r){var n=r.contrastLevel<0;if(this.toneDeltaPair){var o=this.toneDeltaPair(r),i=o.roleA,a=o.roleB,u=o.delta,s=o.polarity,c=o.stayTogether,l=this.background(r).getTone(r),f="nearer"===s||"lighter"===s&&!r.isDark||"darker"===s&&r.isDark,h=f?i:a,g=f?a:i,d=this.name===h.name,p=r.isDark?1:-1,v=h.contrastCurve.get(r.contrastLevel),m=g.contrastCurve.get(r.contrastLevel),C=h.tone(r),y=e.Contrast.ratioOfTones(l,C)>=v?C:t.foregroundTone(l,v),k=g.tone(r),P=e.Contrast.ratioOfTones(l,k)>=m?k:t.foregroundTone(l,m);return n&&(y=t.foregroundTone(l,v),P=t.foregroundTone(l,m)),(P-y)*p>=u||((P=e.clampDouble(0,100,y+u*p))-y)*p>=u||(y=e.clampDouble(0,100,P-u*p)),50<=y&&y<60?p>0?(y=60,P=Math.max(P,y+u*p)):(y=49,P=Math.min(P,y+u*p)):50<=P&&P<60&&(c?p>0?(y=60,P=Math.max(P,y+u*p)):(y=49,P=Math.min(P,y+u*p)):P=p>0?60:49),d?y:P}var b=this.tone(r);if(null==this.background)return b;var D=this.background(r).getTone(r),S=this.contrastCurve.get(r.contrastLevel);if(e.Contrast.ratioOfTones(D,b)>=S||(b=t.foregroundTone(D,S)),n&&(b=t.foregroundTone(D,S)),this.isBackground&&50<=b&&b<60&&(b=e.Contrast.ratioOfTones(49,D)>=S?49:60),this.secondBackground){var w=[this.background,this.secondBackground],x=w[1],T=[(0,w[0])(r).getTone(r),x(r).getTone(r)],O=T[0],A=T[1],M=[Math.max(O,A),Math.min(O,A)],E=M[0],H=M[1];if(e.Contrast.ratioOfTones(E,b)>=S&&e.Contrast.ratioOfTones(H,b)>=S)return b;var B=e.Contrast.lighter(E,S),j=e.Contrast.darker(H,S),F=[];return-1!==B&&F.push(B),-1!==j&&F.push(j),t.tonePrefersLightForeground(O)||t.tonePrefersLightForeground(A)?B<0?100:B:1===F.length?F[0]:j<0?0:j}return b},t}(),d=function(t,e,r,n,o){this.roleA=void 0,this.roleB=void 0,this.delta=void 0,this.polarity=void 0,this.stayTogether=void 0,this.roleA=t,this.roleB=e,this.delta=r,this.polarity=n,this.stayTogether=o},p=function(){function t(t,e,r){this.option=void 0,this.schemeService=void 0,this.colorService=void 0,this.dynamicColor=null,this.option=t,this.schemeService=e,this.colorService=r}var r=t.prototype;return r.update=function(t){this.dynamicColor=null,this.option=s({},this.option,t)},r.getHex=function(){return e.hexFromArgb(this.getArgb())},r.getArgb=function(){return this.getDynamicColor().getArgb(this.schemeService.get())},r.getRgb=function(){return{r:(t=this.getArgb())>>16&255,g:t>>8&255,b:255&t};var t},r.getName=function(){return this.option.name.replace(/([A-Z])/g,"_$1").toLowerCase()},r.getDynamicColor=function(){return this.dynamicColor||(this.dynamicColor=g.fromPalette(s({},this.option,{name:this.getName()}))),this.dynamicColor},t}(),v=function(t,e){return e instanceof i?t.isDark?e.getColor("surfaceBright").getDynamicColor():e.getColor("surfaceDim").getDynamicColor():t.isDark?e.get("surfaceBright").getDynamicColor():e.get("surfaceDim").getDynamicColor()},m=function(){function t(t){var e=t.schemeService;this.colorMap=new Map,this.schemeService=void 0,this.schemeService=e}var e=t.prototype;return e.createOrUpdate=function(t,e){var r=this.colorMap.get(t);if(r)r.update(s({},e,{name:t})),this.colorMap.set(t,r);else{var n=e.palette,o=e.tone;if(!n||!o)throw new Error("Palette "+t+" does not exist");r=new p(s({},e,{palette:n,tone:o,name:t}),this.schemeService,this),this.colorMap.set(t,r)}return r},e.remove=function(t){return this.colorMap.delete(t)},e.get=function(t){var e=this.colorMap.get(t);if(e)return e;throw new Error("Color "+t+" does not exist")},e.getAll=function(){return this.colorMap},e.addFromPalette=function(t){var e,r=this,n=t,o=(e=t).charAt(0).toUpperCase()+e.slice(1),i="on"+o,a=n+"Container",u="on"+o+"Container",s="inverse"+o,c=n+"Fixed",l=n+"FixedDim",f="on"+o+"Fixed",g="on"+o+"FixedVariant";this.createOrUpdate(n,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(t){return v(t,r)},contrastCurve:new h(3,4.5,7,11),toneDeltaPair:function(t){return new d(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),15,"nearer",!1)}}),this.createOrUpdate(i,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?20:100},background:function(t){return r.get(n).getDynamicColor()},contrastCurve:new h(4.5,7,11,21)}),this.createOrUpdate(a,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(t){return v(t,r)},contrastCurve:new h(1,1,3,7),toneDeltaPair:function(t){return new d(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),15,"nearer",!1)}}),this.createOrUpdate(u,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?90:10},background:function(t){return r.get(a).getDynamicColor()},contrastCurve:new h(4.5,7,11,21)}),this.createOrUpdate(s,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?40:80},background:function(t){return r.get("inverseSurface").getDynamicColor()},contrastCurve:new h(3,4.5,7,11)}),this.createOrUpdate(c,{palette:function(e){return e.getPalette(t)},tone:function(t){return 90},isBackground:!0,background:function(t){return v(t,r)},contrastCurve:new h(1,1,3,7),toneDeltaPair:function(t){return new d(r.get(c).getDynamicColor(),r.get(l).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(l,{palette:function(e){return e.getPalette(t)},tone:function(t){return 80},isBackground:!0,background:function(t){return v(t,r)},contrastCurve:new h(1,1,3,7),toneDeltaPair:function(t){return new d(r.get(c).getDynamicColor(),r.get(l).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(f,{palette:function(e){return e.getPalette(t)},tone:function(t){return 10},background:function(t){return r.get(l).getDynamicColor()},secondBackground:function(t){return r.get(c).getDynamicColor()},contrastCurve:new h(4.5,7,11,21)}),this.createOrUpdate(g,{palette:function(e){return e.getPalette(t)},tone:function(t){return 30},background:function(t){return r.get(l).getDynamicColor()},secondBackground:function(t){return r.get(c).getDynamicColor()},contrastCurve:new h(3,4.5,7,11)})},t}(),C={colorManagerService:t.asClass(m).singleton(),colorService:t.asClass(i).singleton()},y=function(){function t(t){this.options=void 0,this.options=t}var r,n;return t.prototype.getPalette=function(t){if(!this.options)throw new Error("Scheme options is not set");var e=this.options.palettes.get(t);if(!e)throw new Error("Palette "+t+" not found");return e},r=t,(n=[{key:"contrastLevel",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.contrastLevel}},{key:"isDark",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.isDark}},{key:"sourceColorHct",get:function(){if(!this.options)throw new Error("Scheme options is not set");return e.Hct.fromInt(this.options.sourceColorArgb)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(),k=function(){function t(){this.schemeEntity=void 0,this.options=void 0}var r=t.prototype;return r.createOrUpdate=function(t){var r,n;this.options=s({},this.options,t,{sourcesColorHex:s({},null==(r=this.options)?void 0:r.sourcesColorHex,t.sourcesColorHex),palettes:s({},null==(n=this.options)?void 0:n.palettes,t.palettes)});var o=new Map;if(!this.options.sourcesColorHex.primary)throw new Error("Primary source color is not set");var i=e.argbFromHex(this.options.sourcesColorHex.primary),a=e.Hct.fromInt(i);if(this.options.palettes){for(var u=0,c=Object.entries(this.options.palettes);u<c.length;u++){var l=c[u],f=l[0],h=l[1],g=h.sourceColorkey,d=h.tonalPalette,p=void 0;if(g){var v=e.argbFromHex(this.options.sourcesColorHex[g]);p=d(e.Hct.fromInt(v))}else p=d(a);o.set(f,p)}this.schemeEntity=new y(s({},this.options,{palettes:o,sourceColorArgb:i}))}},r.get=function(){if(!this.schemeEntity)throw new Error("Scheme is not created");return this.schemeEntity},t}(),P=function(){function t(t){var e=t.schemeService,r=t.variantService;this.schemeService=void 0,this.variantService=void 0,this.schemeService=e,this.variantService=r}var e=t.prototype;return e.create=function(t){this.schemeService.createOrUpdate(s({},t,{sourcesColorHex:{primary:t.sourceColorHex}})),this.variantService.set(t.variant)},e.update=function(t){var e=s({},t);t.sourceColorHex&&(e.sourcesColorHex={primary:t.sourceColorHex}),this.schemeService.createOrUpdate(e),t.variant&&this.variantService.set(t.variant)},e.addCustomPalette=function(t,e){this.variantService.addCustomPalette(t,e)},t}(),b=function(){function t(t){var e=t.schemeService;this.customPalettes={},this.variantEntity=void 0,this.schemeService=void 0,this.schemeService=e}var r=t.prototype;return r.addCustomPalette=function(t,e){this.customPalettes[t]=e,this.update()},r.set=function(t){this.variantEntity=t,t.palettes.error||(t.palettes.error=function(){return e.TonalPalette.fromHueAndChroma(25,84)}),this.update()},r.update=function(){var t=this;if(this.variantEntity){var e={};Object.keys(this.variantEntity.palettes).forEach((function(r){e[r]={tonalPalette:t.variantEntity.palettes[r]}})),this.variantEntity.customPalettes&&Object.keys(this.customPalettes).forEach((function(r){e[r]={sourceColorkey:r,tonalPalette:t.variantEntity.customPalettes}})),this.schemeService.createOrUpdate({sourcesColorHex:this.customPalettes,palettes:e})}},t}(),D={schemeService:t.asClass(k).singleton(),variantService:t.asClass(b).singleton(),themeService:t.asClass(P).singleton()},S=function(t){var e=t.colorService,r=t.themeService,n=t.pluginService;this.colorService=void 0,this.themeService=void 0,this.pluginService=void 0,this.pluginService=n,this.colorService=e,this.themeService=r},w={appService:t.asClass(S).singleton()},x=function(t){return{fromPalettes:["primary","secondary","tertiary"],colors:{background:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},onBackground:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(e){return t.getColor("background").getDynamicColor()},contrastCurve:new h(3,3,4.5,7)},surface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},surfaceDim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:87},isBackground:!0},surfaceBright:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?24:98},isBackground:!0},surfaceContainerLowest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?4:100},isBackground:!0},surfaceContainerLow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?10:96},isBackground:!0},surfaceContainer:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?12:94},isBackground:!0},surfaceContainerHigh:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?17:92},isBackground:!0},surfaceContainerHighest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?22:90},isBackground:!0},onSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(e){return v(e,t)},contrastCurve:new h(4.5,7,11,21)},surfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:90},isBackground:!0},onSurfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?80:30},background:function(e){return v(e,t)},contrastCurve:new h(3,4.5,7,11)},inverseSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:20}},inverseOnSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?20:95},background:function(e){return t.getColor("inverseSurface").getDynamicColor()},contrastCurve:new h(4.5,7,11,21)},outline:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?60:50},background:function(e){return v(e,t)},contrastCurve:new h(1.5,3,4.5,7)},outlineVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:80},background:function(e){return v(e,t)},contrastCurve:new h(1,1,3,7)},shadow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},scrim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},surfaceTint:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?80:40},isBackground:!0},secondaryContainer:{tone:function(t){var r=t.isDark?30:90;return function(t,r,n,o){var i=n,a=e.Hct.from(t,r,n);if(a.chroma<r)for(var u=a.chroma;a.chroma<r;){var s=e.Hct.from(t,r,i+=o?-1:1);if(u>s.chroma)break;if(Math.abs(s.chroma-r)<.4)break;Math.abs(s.chroma-r)<Math.abs(a.chroma-r)&&(a=s),u=Math.max(u,s.chroma)}return i}(t.getPalette("secondary").hue,t.getPalette("secondary").chroma,r,!t.isDark)}},onSecondaryContainer:{tone:function(e){return g.foregroundTone(t.getColor("secondaryContainer").getDynamicColor().tone(e),4.5)}},tertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){var r=t.getPalette("tertiary").getHct(t.sourceColorHct.tone);return e.DislikeAnalyzer.fixIfDisliked(r).tone}},onTertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(e){return g.foregroundTone(t.getColor("tertiaryContainer").getDynamicColor().tone(e),4.5)}},error:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(e){return v(e,t)},contrastCurve:new h(3,4.5,7,11),toneDeltaPair:function(e){return new d(t.getColor("errorContainer").getDynamicColor(),t.getColor("error").getDynamicColor(),15,"nearer",!1)}},onError:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?20:100},background:function(e){return t.getColor("error").getDynamicColor()},contrastCurve:new h(4.5,7,11,21)},errorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(e){return v(e,t)},contrastCurve:new h(1,1,3,7),toneDeltaPair:function(e){return new d(t.getColor("errorContainer").getDynamicColor(),t.getColor("error").getDynamicColor(),15,"nearer",!1)}},onErrorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?90:10},background:function(e){return t.getColor("errorContainer").getDynamicColor()},contrastCurve:new h(4.5,7,11,21)},onTertiaryFixed:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 10},background:function(e){return t.getColor("tertiaryFixedDim").getDynamicColor()},secondBackground:function(e){return t.getColor("tertiaryFixed").getDynamicColor()},contrastCurve:new h(4.5,7,11,21)},onTertiaryFixedVariant:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 30},background:function(e){return t.getColor("tertiaryFixedDim").getDynamicColor()},secondBackground:function(e){return t.getColor("tertiaryFixed").getDynamicColor()},contrastCurve:new h(3,4.5,7,11)}}}},T=function(t,r,n){var o=t.hue;if(r.length!==n.length)throw new Error("mismatch between hue length "+r.length+" & rotations "+n.length);if(1===n.length)return e.sanitizeDegreesDouble(t.hue+n[0]);for(var i=r.length,a=0;a<=i-2;a++)if(r[a]<o&&o<r[a+1])return e.sanitizeDegreesDouble(o+n[a]);return o},O=function(){};f=O,O.tonalSpot={palettes:{primary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,36)},secondary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,16)},tertiary:function(t){return e.TonalPalette.fromHueAndChroma(e.sanitizeDegreesDouble(t.hue+60),24)},neutral:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,6)},neutralVariant:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,8)}},customPalettes:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,16)}},O.vibrant={palettes:{primary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,200)},secondary:function(t){return e.TonalPalette.fromHueAndChroma(T(t,f.hues,f.secondaryRotations),24)},tertiary:function(t){return e.TonalPalette.fromHueAndChroma(T(t,f.hues,f.tertiaryRotations),32)},neutral:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,6)},neutralVariant:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,8)}},customPalettes:function(t){return e.TonalPalette.fromHueAndChroma(T(t,f.hues,f.secondaryRotations),24)}},O.hues=[0,41,61,101,131,181,251,301,360],O.secondaryRotations=[18,15,10,12,15,18,15,12,12],O.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var A=function(){function t(t){var e=t.appService;this.configPath="./theme.config",this.appService=void 0,this.appService=e}var e=t.prototype;return e.loadConfig=function(){var t=this.appService,e=t.themeService,r=t.colorService,n=t.pluginService,o=this.getConfig(),i=o.contrastLevel,a=o.isDark,u=o.variant,s=o.palettes,c=o.colors,l=o.useDefaultColors,f=void 0===l||l,h=o.plugins;e.create({contrastLevel:void 0===i?0:i,isDark:void 0!==a&&a,sourceColorHex:o.sourceColor,variant:void 0===u?O.tonalSpot:u}),s&&Object.entries(s).forEach((function(t){return e.addCustomPalette(t[0],t[1])})),f&&r.addColors(x),c&&r.addColors(c),h&&(h.forEach((function(t){Array.isArray(t)?n.addPlugin(t[0],t[1]):n.addPlugin(t,{})})),n.loadPlugins(this.appService))},e.getConfig=function(){for(var t=r.resolve(this.configPath),e=null,o=0,i=[".js",".ts",".jms",".jcs"];o<i.length;o++){var a=t+i[o];if(n.existsSync(a)){e=require(a);break}}if(!e)throw new Error("Configuration file not found");return e.default},t}(),M={configService:t.asClass(A).singleton()},E=function(){function t(){this.pluginInstances=new Map,this.pluginConstructors=new Map}var e=t.prototype;return e.addPlugin=function(t,e){this.pluginConstructors.set(t.name,[t,e])},e.loadPlugins=function(t){var e=this;this.pluginConstructors.forEach((function(r){var n=r[0];e.pluginInstances.set(n.name,new n(t,r[1]))}))},e.getPlugin=function(t){var e=this.pluginInstances.get(t.name);if(!e)throw new Error("Plugin "+t.name+" not found");return e},t}(),H={pluginService:t.asClass(E).singleton()};function B(t,e){return e.forEach((function(e){Object.entries(e).forEach((function(e){t.register(e[0],e[1])}))})),t}var j=t.createContainer({injectionMode:t.InjectionMode.PROXY});function F(t){var e=j.resolve("configService");return t&&(e.configPath=t),e.loadConfig(),j.resolve("appService")}B(j,[M,w,H,C,D]);var L=function(){};L.dependencies=void 0;var U=function(t){return o((function(e){V(e,{statePrefix:"state",disabledStyles:{textOpacity:.38,backgroundOpacity:.12},transition:{duration:150}},t)}),{})},V=function(t,e,r){for(var n=t.addComponents,o=e.statePrefix,i=e.disabledStyles,a=e.transition,s={},c=0,l=[!1,!0];c<l.length;c++)for(var f,h=l[c]?"group-":"",g=u(r);!(f=g()).done;){var d,p=f.value,v="."+h+o+"-"+p;s[v]=((d={})["@apply "+h+"hover:bg-"+p+"/[0.08]"]={},d["@apply "+h+"active:bg-"+p+"/[0.12]"]={},d["@apply "+h+"focus-visible:bg-"+p+"/[0.12]"]={},d),a&&(s[v]["@apply transition-colors"]={},s[v]["@apply duration-"+a.duration]={}),i&&(s[v]["@apply "+h+"disabled:text-on-surface/["+i.textOpacity+"]"]={},s[v]["@apply "+h+"disabled:bg-on-surface/["+i.backgroundOpacity+"]"]={})}for(var m,C=u(r);!(m=C()).done;)for(var y=m.value,k=0,P=["hover","active","focus","disabled"];k<P.length;k++){var b,D=P[k],S="."+D+"-"+o+"-"+y;if("active"===D||"focus"===D)s[S]=((b={})["@apply bg-"+y+"/[0.12]"]={},b);else if("hover"===D){var w;s[S]=((w={})["@apply bg-"+y+"/[0.08]"]={},w)}else if("disabled"===D){var x,T;s[S]=((x={})["@apply text-on-surface/["+i.textOpacity+"]"]={},x),s[S]=((T={})["@apply bg-on-surface/["+i.backgroundOpacity+"]"]={},T)}}n(s)},I=function(t,e){var r={defaultTheme:{extend:{colors:{}}},themes:[{name:"darkTheme",extend:{colors:{}}}]};return Object.entries(t).forEach((function(t){var e=t[0],n=t[1];r.defaultTheme.extend.colors[e]=n.light,r.themes[0].extend.colors[e]=n.dark})),r.themes[0].selectors="class"===e?[".dark-mode",'[data-theme="dark"]']:void 0,r.themes[0].mediaQuery="media"===e?"@media (prefers-color-scheme: dark)":void 0,require("tailwindcss-themer")(r)},R=function(t){function e(e,r){var n;return(n=t.call(this)||this).appService=void 0,n.options=void 0,n.appService=e,n.options=r,n}var r,n;return n=t,(r=e).prototype=Object.create(n.prototype),r.prototype.constructor=r,c(r,n),e.config=function(t){return t},e.prototype.getTheme=function(){for(var t={},e=0,r=[!1,!0];e<r.length;e++){var n=r[e];this.appService.themeService.update({isDark:n});for(var o,i=u(this.appService.colorService.getColors().entries());!(o=i()).done;){var a=o.value,s=a[1],c=a[0].replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase();null!=t[c]||(t[c]={light:"",dark:""}),t[c][n?"dark":"light"]=s.getHex()}}return console.log(t),{colors:{},fontFamily:{expressive:[],neutral:[]},plugins:[U(Object.keys(t)),I(t,this.options.darkMode)]}},e}(L);exports.AppContainer=j,exports.AppModule=w,exports.AppService=S,exports.ColorEntity=p,exports.ColorManagerService=m,exports.ColorModule=C,exports.ColorService=i,exports.ConfigModule=M,exports.ConfigService=A,exports.ContrastCurve=h,exports.DynamicColor=g,exports.PluginAbstract=L,exports.PluginModule=H,exports.PluginService=E,exports.SchemeEntity=y,exports.SchemeService=k,exports.TailwindPlugin=R,exports.ThemeModule=D,exports.ThemeService=P,exports.ToneDeltaPair=d,exports.VariantEntity=function(t,e){void 0===t&&(t={}),this.palettes=void 0,this.customPalettes=void 0,this.palettes=t,this.customPalettes=e},exports.VariantModel=O,exports.VariantService=b,exports.bootstrap=function(){return j.resolve("appService")},exports.bootstrapFromConfig=F,exports.createTheme=function(){var t=F().pluginService.getPlugin(R);if(!t)throw new Error("Tailwind plugin not found");return t.getTheme()},exports.defaultColors=x,exports.defineConfig=function(t){if(!t||"object"!=typeof t)throw new Error("The configuration is missing or not an object");if(!("sourceColor"in t))throw new Error("Invalid configuration");return t},exports.getRotatedHue=T,exports.highestSurface=v,exports.importContainer=B,exports.state=U,exports.themer=I;
|
|
2
2
|
//# sourceMappingURL=theme.cjs.production.min.js.map
|