homeassistant/custom_components/hacs/hacs_frontend_experimental/frontend_latest/6554.U8n0qbAq4RE.js

2 lines
36 KiB
JavaScript
Raw Permalink Normal View History

2025-01-10 21:08:35 -08:00
export const id=6554;export const ids=[6554];export const modules={94136:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),t(43204).__exportStar(t(15875),a)},76554:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0});var r=t(94136),i=t(77021),o=t(17106);(0,i.defineProperty)(Intl,"DateTimeFormat",{value:r.DateTimeFormat}),(0,i.defineProperty)(Date.prototype,"toLocaleString",{value:function(e,a){return(0,o.toLocaleString)(this,e,a)}}),(0,i.defineProperty)(Date.prototype,"toLocaleDateString",{value:function(e,a){return(0,o.toLocaleDateString)(this,e,a)}}),(0,i.defineProperty)(Date.prototype,"toLocaleTimeString",{value:function(e,a){return(0,o.toLocaleTimeString)(this,e,a)}})},7802:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BasicFormatMatcher=void 0;var r=t(43204),i=t(77021),o=t(35328);a.BasicFormatMatcher=function(e,a){var t=-1/0,n=a[0];(0,i.invariant)(Array.isArray(a),"formats should be a list of things");for(var c=0,l=a;c<l.length;c++){for(var s=l[c],m=0,u=0,d=o.DATE_TIME_PROPS;u<d.length;u++){var f=d[u],p=e[f],A=s[f];if(void 0===p&&void 0!==A)m-=o.additionPenalty;else if(void 0!==p&&void 0===A)m-=o.removalPenalty;else if("timeZoneName"===f)"short"===p||"shortGeneric"===p?"shortOffset"===A?m-=o.offsetPenalty:"longOffset"===A?m-=o.offsetPenalty+o.shortMorePenalty:"short"===p&&"long"===A||"shortGeneric"===p&&"longGeneric"===A?m-=o.shortMorePenalty:p!==A&&(m-=o.removalPenalty):"shortOffset"===p&&"longOffset"===A?m-=o.shortMorePenalty:"long"===p||"longGeneric"===p?"longOffset"===A?m-=o.offsetPenalty:"shortOffset"===A?m-=o.offsetPenalty+o.longLessPenalty:"long"===p&&"short"===A||"longGeneric"===p&&"shortGeneric"===A?m-=o.longLessPenalty:p!==A&&(m-=o.removalPenalty):"longOffset"===p&&"shortOffset"===A?m-=o.longLessPenalty:p!==A&&(m-=o.removalPenalty);else if(p!==A){var g=void 0,v=(g="fractionalSecondDigits"===f?[1,2,3]:["2-digit","numeric","narrow","short","long"]).indexOf(p),h=g.indexOf(A),y=Math.max(-2,Math.min(h-v,2));2===y?m-=o.longMorePenalty:1===y?m-=o.shortMorePenalty:-1===y?m-=o.shortLessPenalty:-2===y&&(m-=o.longLessPenalty)}}m>t&&(t=m,n=s)}return r.__assign({},n)}},72833:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BestFitFormatMatcher=a.bestFitFormatMatcherScore=void 0;var r=t(43204),i=t(77021),o=t(35328),n=t(20059);function c(e){return"numeric"===e||"2-digit"===e}function l(e,a){var t=0;e.hour12&&!a.hour12?t-=o.removalPenalty:!e.hour12&&a.hour12&&(t-=o.additionPenalty);for(var r=0,i=o.DATE_TIME_PROPS;r<i.length;r++){var n=i[r],l=e[n],s=a[n];if(void 0===l&&void 0!==s)t-=o.additionPenalty;else if(void 0!==l&&void 0===s)t-=o.removalPenalty;else if(l!==s)if(c(l)!==c(s))t-=o.differentNumericTypePenalty;else{var m=["2-digit","numeric","narrow","short","long"],u=m.indexOf(l),d=m.indexOf(s),f=Math.max(-2,Math.min(d-u,2));2===f?t-=o.longMorePenalty:1===f?t-=o.shortMorePenalty:-1===f?t-=o.shortLessPenalty:-2===f&&(t-=o.longLessPenalty)}}return t}a.bestFitFormatMatcherScore=l,a.BestFitFormatMatcher=function(e,a){var t=-1/0,o=a[0];(0,i.invariant)(Array.isArray(a),"formats should be a list of things");for(var s=0,m=a;s<m.length;s++){var u=m[s],d=l(e,u);d>t&&(t=d,o=u)}var f=r.__assign({},o),p={rawPattern:o.rawPattern};for(var A in(0,n.processDateTimePattern)(o.rawPattern,p),f){var g=f[A],v=p[A],h=e[A];"minute"!==A&&"second"!==A&&(h&&(c(v)&&!c(h)||g!==h&&(p[A]=h)))}return p.pattern=f.pattern,p.pattern12=f.pattern12,p.skeleton=f.skeleton,p.rangePatterns=f.rangePatterns,p.rangePatterns12=f.rangePatterns12,p}},11464:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DateTimeStyleFormat=void 0;var r=t(77021);a.DateTimeStyleFormat=function(e,a,t){var i,o;if(void 0!==a&&((0,r.invariant)("full"===a||"long"===a||"medium"===a||"short"===a,"invalid timeStyle"),o=t.timeFormat[a]),void 0!==e&&((0,r.invariant)("full"===e||"long"===e||"medium"===e||"short"===e,"invalid dateStyle"),i=t.dateFormat[e]),void 0!==e&&void 0!==a){var n={};for(var c in i)"pattern"!==c&&(n[c]=i[c]);for(var c in o)"pattern"!==c&&"pattern12"!==c&&(n[c]=o[c]);var l=t.dateTimeFormat[e],s=l.replace("{0}",o.pattern).
//# sourceMappingURL=6554.U8n0qbAq4RE.js.map