forked from brianblakely/nodep-date-input-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodep-date-input-polyfill.dist.js
1 lines (1 loc) · 21.7 KB
/
nodep-date-input-polyfill.dist.js
1
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n(46);var a=n(6),o=r(a),i=n(14),u=r(i);u["default"].supportsDateInput()||!function(){var e=function(){o["default"].instance=new o["default"],u["default"].addPickerToDateInputs(),document.querySelector("body").addEventListener("mousedown",function(){u["default"].addPickerToDateInputs()})},t=!1;document.addEventListener("DOMContentLoaded",function(){t=!0,e()}),window.addEventListener("load",function(){t||e()})}()},function(e,t,n){e.exports=!n(11)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n=e.exports={version:"2.2.2"};"number"==typeof __e&&(__e=n)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(9),a=n(29),o=n(39),i=Object.defineProperty;t.f=n(1)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),a)try{return i(e,t,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),o=r(a),i=n(8),u=r(i),s=function(){function e(){var t=this;if((0,o["default"])(this,e),e.instance)return e.instance;this.date=new Date,this.input=null,this.isOpen=!1,this.container=document.createElement("date-input-polyfill"),this.year=document.createElement("select"),e.createRangeSelect(this.year,this.date.getFullYear()-80,this.date.getFullYear()+20),this.year.className="yearSelect",this.year.addEventListener("change",function(){t.date.setYear(t.year.value),t.refreshDaysMatrix()}),this.container.appendChild(this.year),this.month=document.createElement("select"),this.month.className="monthSelect",this.month.addEventListener("change",function(){t.date.setMonth(t.month.value),t.refreshDaysMatrix()}),this.container.appendChild(this.month),this.today=document.createElement("button"),this.today.textContent="Today",this.today.addEventListener("click",function(){t.date=new Date,t.setInput()}),this.container.appendChild(this.today);var n=document.createElement("table");this.daysHead=document.createElement("thead"),this.days=document.createElement("tbody"),this.days.addEventListener("click",function(e){var n=e.target;if(!n.hasAttribute("data-day"))return!1;var r=t.days.querySelector("[data-selected]");r&&r.removeAttribute("data-selected"),n.setAttribute("data-selected",""),t.date.setDate(parseInt(n.textContent)),t.setInput()}),n.appendChild(this.daysHead),n.appendChild(this.days),this.container.appendChild(n),this.hide(),document.body.appendChild(this.container),document.addEventListener("click",function(e){for(var n=e.target,r=n===t.container;!r&&(n=n.parentNode);)r=n===t.container;"date"!==e.target.getAttribute("type")&&!r&&t.hide()})}return(0,u["default"])(e,[{key:"hide",value:function(){this.container.setAttribute("data-open",this.isOpen=!1)}},{key:"show",value:function(){this.container.setAttribute("data-open",this.isOpen=!0)}},{key:"goto",value:function(e){var t=e.getBoundingClientRect();this.container.style.top=t.top+t.height+(document.documentElement.scrollTop||document.body.scrollTop)+"px",this.container.style.left=t.left+(document.documentElement.scrollLeft||document.body.scrollLeft)+"px",this.show()}},{key:"attachTo",value:function(e){return e===this.input&&this.isOpen?!1:(this.input=e,this.sync(),void this["goto"](this.input.element))}},{key:"sync",value:function(){this.input.element.valueAsDate?this.date=e.absoluteDate(this.input.element.valueAsDate):this.date=new Date,this.year.value=this.date.getFullYear(),this.month.value=this.date.getMonth(),this.refreshDaysMatrix()}},{key:"setInput",value:function(){var e=this;this.input.element.value=this.date.getFullYear()+"-"+("0"+(this.date.getMonth()+1)).slice(-2)+"-"+("0"+this.date.getDate()).slice(-2),this.input.element.focus(),setTimeout(function(){e.hide()},100),this.pingInput()}},{key:"refreshLocale",value:function(){if(this.locale===this.input.locale)return!1;this.locale=this.input.locale;for(var t=["<tr>"],n=0,r=this.input.localeText.days.length;r>n;++n)t.push('<th scope="col">'+this.input.localeText.days[n]+"</th>");this.daysHead.innerHTML=t.join(""),e.createRangeSelect(this.month,0,11,this.input.localeText.months,this.date.getMonth()),this.today.textContent=this.input.localeText.today}},{key:"refreshDaysMatrix",value:function(){this.refreshLocale();for(var t=this.date.getFullYear(),n=this.date.getMonth(),r=new Date(t,n,1).getDay(),a=new Date(this.date.getFullYear(),n+1,0).getDate(),o=e.absoluteDate(this.input.element.valueAsDate)||!1,i=o&&t===o.getFullYear()&&n===o.getMonth(),u=[],s=0;a+r>s;++s)if(s%7===0&&u.push("\n "+(0!==s?"</tr>":"")+"\n <tr>\n "),r>=s+1)u.push("<td></td>");else{var l=s+1-r,c=i&&o.getDate()===l;u.push("<td data-day "+(c?"data-selected":"")+">\n "+l+"\n </td>")}this.days.innerHTML=u.join("")}},{key:"pingInput",value:function(){var e=void 0,t=void 0;try{e=new Event("input"),t=new Event("change")}catch(n){e=document.createEvent("KeyboardEvent"),e.initEvent("input",!0,!1),t=document.createEvent("KeyboardEvent"),t.initEvent("change",!0,!1)}this.input.element.dispatchEvent(e),this.input.element.dispatchEvent(t)}}],[{key:"createRangeSelect",value:function(e,t,n,r,a){e.innerHTML="";for(var o=t;n>=o;++o){var i=document.createElement("option");e.appendChild(i);var u=r?r[o-t]:o;i.text=u,i.value=o,o===a&&(i.selected="selected")}return e}},{key:"absoluteDate",value:function(e){return e&&new Date(e.getTime()+60*e.getTimezoneOffset()*1e3)}}]),e}();s.instance=null,t["default"]=s},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(17),o=r(a);t["default"]=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o["default"])(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){var r=n(4);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(3),a=n(2),o=n(23),i=n(28),u="prototype",s=function(e,t,n){var l,c,d,f=e&s.F,p=e&s.G,h=e&s.S,v=e&s.P,y=e&s.B,m=e&s.W,b=p?a:a[t]||(a[t]={}),g=b[u],x=p?r:h?r[t]:(r[t]||{})[u];p&&(n=t);for(l in n)c=!f&&x&&void 0!==x[l],c&&l in b||(d=c?x[l]:n[l],b[l]=p&&"function"!=typeof x[l]?n[l]:y&&c?o(d,r):m&&x[l]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[u]=e[u],t}(d):v&&"function"==typeof d?o(Function.call,d):d,v&&((b.virtual||(b.virtual={}))[l]=d,e&s.R&&g&&!g[l]&&i(g,l,d)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(30),a=n(24);e.exports=function(e){return r(a(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(16),o=r(a),i=n(7),u=r(i),s=n(8),l=r(s),c=n(6),d=r(c),f=n(15),p=r(f),h=function(){function e(t){var n=this;(0,u["default"])(this,e),this.element=t,this.element.setAttribute("data-has-picker","");for(var r=this.element,a="";r.parentNode&&!(a=r.getAttribute("lang"));)r=r.parentNode;this.locale=a||"en",this.localeText=this.getLocaleText(),(0,o["default"])(this.element,{value:{get:function(){return n.element.polyfillValue},set:function(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return n.element.polyfillValue="",!1;n.element.polyfillValue=e;var t=e.split("-");n.element.setAttribute("value",n.localeText.format.replace("Y",t[0]).replace("M",t[1]).replace("D",t[2]))}},valueAsDate:{get:function(){return n.element.polyfillValue?new Date(n.element.polyfillValue):null},set:function(e){n.element.value=e.toISOString().slice(0,10)}},valueAsNumber:{get:function(){return n.element.value?n.element.valueAsDate.getTime():NaN},set:function(e){n.element.valueAsDate=new Date(e)}}}),this.element.value=this.element.getAttribute("value");var i=function(){d["default"].instance.attachTo(n)};this.element.addEventListener("focus",i),this.element.addEventListener("mousedown",i),this.element.addEventListener("mouseup",i),this.element.addEventListener("keydown",function(e){var t=new Date;switch(e.keyCode){case 27:d["default"].instance.hide();break;case 38:n.element.valueAsDate&&(t.setDate(n.element.valueAsDate.getDate()+1),n.element.valueAsDate=t,d["default"].instance.pingInput());break;case 40:n.element.valueAsDate&&(t.setDate(n.element.valueAsDate.getDate()-1),n.element.valueAsDate=t,d["default"].instance.pingInput())}d["default"].instance.sync()})}return(0,l["default"])(e,[{key:"getLocaleText",value:function(){var e=this.locale.toLowerCase();for(var t in p["default"]){var n=t.split("_");if(n.map(function(e){return e.toLowerCase()}),~n.indexOf(e)||~n.indexOf(e.substr(0,2)))return p["default"][t]}}}],[{key:"supportsDateInput",value:function(){var e=document.createElement("input");e.setAttribute("type","date");var t="not-a-date";return e.setAttribute("value",t),document.currentScript&&!document.currentScript.hasAttribute("data-nodep-date-input-polyfill-debug")&&!(e.value===t)}},{key:"addPickerToDateInputs",value:function(){var t=document.querySelectorAll('input[type="date"]:not([data-has-picker])'),n=t.length;if(!n)return!1;for(var r=0;n>r;++r)new e(t[r])}}]),e}();t["default"]=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={"en_en-US":{days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],today:"Today",format:"M/D/Y"},"en-GB":{days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],today:"Today",format:"D/M/Y"},"zh_zh-CN":{days:["星期天","星期一","星期二","星期三","星期四","星期五","星期六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"Y/M/D"},"zh-Hans_zh-Hans-CN":{days:["周日","周一","周二","周三","周四","周五","周六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"Y/M/D"},"zh-Hant_zh-Hant-TW":{days:["週日","週一","週二","週三","週四","週五","週六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"Y/M/D"},"de_de-DE":{days:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],today:"Heute",format:"D.M.Y"},"da_da-DA":{days:["Søn","Man","Tirs","Ons","Tors","Fre","Lør"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],today:"I dag",format:"D/M/Y"},es:{days:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],today:"Hoy",format:"D/M/Y"},hi:{days:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],months:["जनवरी","फरवरी","मार्च","अप्रेल","मै","जून","जूलाई","अगस्त","सितम्बर","आक्टोबर","नवम्बर","दिसम्बर"],today:"आज",format:"D/M/Y"},pt:{days:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],today:"Hoje",format:"D/M/Y"},ja:{days:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"Y/M/D"},"nl_nl-NL_nl-BE":{days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],today:"Vandaag",format:"D/M/Y"},"tr_tr-TR":{days:["Pzr","Pzt","Sal","Çrş","Prş","Cum","Cmt"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],today:"Bugün",format:"D/M/Y"}};t["default"]=n},function(e,t,n){e.exports={"default":n(18),__esModule:!0}},function(e,t,n){e.exports={"default":n(19),__esModule:!0}},function(e,t,n){n(41);var r=n(2).Object;e.exports=function(e,t){return r.defineProperties(e,t)}},function(e,t,n){n(42);var r=n(2).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(13),a=n(38),o=n(37);e.exports=function(e){return function(t,n,i){var u,s=r(t),l=a(s.length),c=o(i,l);if(e&&n!=n){for(;l>c;)if(u=s[c++],u!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(4),a=n(3).document,o=r(a)&&r(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(5),a=n(34);e.exports=n(1)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(1)&&!n(11)(function(){return 7!=Object.defineProperty(n(25)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(5),a=n(9),o=n(33);e.exports=n(1)?Object.defineProperties:function(e,t){a(e);for(var n,i=o(t),u=i.length,s=0;u>s;)r.f(e,n=i[s++],t[n]);return e}},function(e,t,n){var r=n(27),a=n(13),o=n(21)(!1),i=n(35)("IE_PROTO");e.exports=function(e,t){var n,u=a(e),s=0,l=[];for(n in u)n!=i&&r(u,n)&&l.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(32),a=n(26);e.exports=Object.keys||function(e){return r(e,a)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(36)("keys"),a=n(40);e.exports=function(e){return r[e]||(r[e]=a(e))}},function(e,t,n){var r=n(3),a="__core-js_shared__",o=r[a]||(r[a]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,n){var r=n(12),a=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),0>e?a(e+t,0):o(e,t)}},function(e,t,n){var r=n(12),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},function(e,t,n){var r=n(4);e.exports=function(e,t){if(!r(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!r(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(10);r(r.S+r.F*!n(1),"Object",{defineProperties:n(31)})},function(e,t,n){var r=n(10);r(r.S+r.F*!n(1),"Object",{defineProperty:n(5).f})},function(e,t,n){t=e.exports=n(44)(),t.push([e.id,"date-input-polyfill{background:#fff;color:#000;text-shadow:none;border:0;padding:0;height:auto;width:auto;line-height:normal;border-radius:0;font-family:sans-serif;font-size:14px;position:absolute!important;text-align:center;box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12);cursor:default;z-index:1}date-input-polyfill[data-open=false]{display:none}date-input-polyfill[data-open=true]{display:block}date-input-polyfill select,date-input-polyfill table,date-input-polyfill td,date-input-polyfill th{background:#fff;color:#000;text-shadow:none;border:0;padding:0;height:auto;width:auto;line-height:normal;border-radius:0;font-family:sans-serif;font-size:14px;box-shadow:none}date-input-polyfill button,date-input-polyfill select{border:0;border-bottom:1px solid #e0e0e0;height:24px;vertical-align:top}date-input-polyfill select{width:50%}date-input-polyfill select:first-of-type{border-right:1px solid #e0e0e0;width:30%}date-input-polyfill button{padding:0;width:20%;background:#e0e0e0}date-input-polyfill table{border-collapse:collapse}date-input-polyfill td,date-input-polyfill th{width:32px;padding:4px;text-align:center}date-input-polyfill td[data-day]{cursor:pointer}date-input-polyfill td[data-day]:hover{background:#e0e0e0}date-input-polyfill [data-selected]{font-weight:700;background:#d8eaf6}input[data-has-picker]::-ms-clear{display:none}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(r[o]=!0)}for(a=0;a<t.length;a++){var i=t[a];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],a=p[r.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](r.parts[o]);for(;o<r.parts.length;o++)a.parts.push(l(r.parts[o],t))}else{for(var i=[],o=0;o<r.parts.length;o++)i.push(l(r.parts[o],t));p[r.id]={id:r.id,refs:1,parts:i}}}}function a(e){for(var t=[],n={},r=0;r<e.length;r++){var a=e[r],o=a[0],i=a[1],u=a[2],s=a[3],l={css:i,media:u,sourceMap:s};n[o]?n[o].parts.push(l):t.push(n[o]={id:o,parts:[l]})}return t}function o(e,t){var n=y(),r=g[g.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function u(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var n,r,a;if(t.singleton){var o=b++;n=m||(m=u(t)),r=c.bind(null,n,o,!1),a=c.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),r=f.bind(null,n),a=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(t),r=d.bind(null,n),a=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}function c(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function d(e,t){var n=t.css,r=t.media;if(t.sourceMap,r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(a),o&&URL.revokeObjectURL(o)}var p={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},v=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),y=h(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,b=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=v()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=a(e);return r(n,t),function(e){for(var o=[],i=0;i<n.length;i++){var u=n[i],s=p[u.id];s.refs--,o.push(s)}if(e){var l=a(e);r(l,t)}for(var i=0;i<o.length;i++){var s=o[i];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete p[s.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){var r=n(43);"string"==typeof r&&(r=[[e.id,r,""]]),n(45)(r,{}),r.locals&&(e.exports=r.locals)}])});