UNPKG

77 kBJavaScriptView Raw
1!function e(t,r,n){function o(i,s){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[i]={exports:{}};t[i][0].call(l.exports,function(e){var r=t[i][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=parseInt(e.slice(1),16),n=t<0?0:255,o=t<0?t*-1:t,a=r>>16,i=r>>8&255,s=255&r;return"#"+(16777216+65536*(Math.round((n-a)*o)+a)+256*(Math.round((n-i)*o)+i)+(Math.round((n-s)*o)+s)).toString(16).slice(1)}function a(e,t){var r="";return[["heading","h1,h2,h3,h4,h5,h6"],["paragraph","p"],["material","ul,ol,pre,table,blockquote"]].forEach(function(e){var n=e[0];r+=","+(t[n]||e[1])}),e.querySelectorAll(r.slice(1))}function i(e,t,r,n){var o={csrfToken:t};o.csrfToken||(o.csrfToken="");var a=function(e){var t={p:[]};return new Promise(function(r,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.setRequestHeader("Accept","application/json"),a.setRequestHeader("X-Requested-With","XMLHttpRequest"),""!==o.csrfToken&&a.setRequestHeader("X-CSRF-Token",o.csrfToken),a.responseType="text",a.onerror=function(){a.status;n(t)},a.onload=function(){var e=a.status,o=a.response;200===e?(o=o.replace(/^\]\)\}while\(1\);<\/x>/,""),r(JSON.parse(o))):(console.error("[ERROR] GET status: ",e),n(t))},a.send()})};return a(e).then(function(e){return r(e)},function(e){return n(e)})}function s(e,t,r){var n="<html><head>";n+=Array.from(r).map(function(e){return e.outerHTML}).join(""),n+="</head><body>";var a=["#2d96db","#4aa8a6","#64b977","#99c95d","#c5d062","#f6d866","#fab252","#fd8e3e","#fe6f43","#fd515b","#fb1b2a"],i=a,s=0;return n+=Array.from(t).map(function(t){var r=document.importNode(t,!0);if("IMG"!==r.nodeName&&"P"===r.nodeName&&"p"in e){var n=e.p[String(s)];if(void 0!==n){var a="#ffffff";try{var u=Math.round(10*parseFloat(n));a=o(i[u],.55)}catch(e){console.error(t)}r.style.background=a,r.style.backgroundColor="rgba("+a+", 0.9)"}s+=1}return r.outerHTML}).join(""),n+="</body></html>"}function u(e,t){var r=document.getElementById("scrolliris_canvas_container"),n=document.createElement("canvas");return n.setAttribute("id","scrolliris_canvas"),n.setAttribute("width",.5*e),n.setAttribute("height",.5*t),r.appendChild(n),n}function c(e,t,r,n,o){h.default.drawHTML(t,e,{zoom:.5,width:r,height:n});var a=!1,i=void 0,s=0,u={};e.addEventListener("mousedown",function(t){var r=t||u;e.style.cursor="grabbing",a=!0,i=r.clientY,t.preventDefault()},!1),e.addEventListener("mouseup",function(t){e.style.cursor="grab",a=!1},!1),window.addEventListener("mousemove",function(t){var r=t||u;if(a){var n=r.clientY-i;i=r.clientY,s+=n,s>0?s=0:s<o&&(s=o),e.style.marginTop=s+"px"}t.preventDefault()},!1),window.addEventListener("mouseout",function(t){e.style.cursor="grab",a=!1},!1)}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=e("rasterizehtml"),h=n(f);!function(e,t){var r={},n={},o={};if(t.hasOwnProperty("config")&&"object"===l(t.config)&&(r=t.config),t.hasOwnProperty("settings")&&"object"===l(t.options)&&(n=t.settings,!n.endpointURL))return console.error("endpointURL is required"),!1;t.hasOwnProperty("options")&&"object"===l(t.options)&&(o=t.options);var f=o.selectors||{},h=e.querySelector(f.article||"body article"),p=a(h,f),S=e.querySelectorAll("style")||[],m=e.documentElement,d=Math.max(e.body.clientWidth,m.clientWidth,m.scrollWidth),y=Math.max(e.body.clientHeight,m.clientHeight,m.scrollHeight),v=function(e){var t=s(e,p,S),r=u(d,y),n=290,o=22,a=22,i=9,l=.5,f=-1*(y*l/n*100)+(o+a+i);c(r,t,d,y,f)};i(n.endpointURL,n.csrfToken,function(e){v(e)},function(e){v(e)})}(window.parent.document,(window.ScrollirisReadabilityReflector||{}).Context)},{rasterizehtml:39}],2:[function(e,t,r){!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof r?t.exports=n():e.ayepromise=n()}(this,function(){"use strict";var e={},t=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},r=function(e){var t=e&&e.then;if("object"==typeof e&&"function"==typeof t)return function(){return t.apply(e,arguments)}},n=function(t,r){var n=e.defer(),o=function(e,t){setTimeout(function(){var r;try{r=e(t)}catch(e){return void n.reject(e)}r===n.promise?n.reject(new TypeError("Cannot resolve promise with itself")):n.resolve(r)},1)},i=function(e){t&&t.call?o(t,e):n.resolve(e)},s=function(e){r&&r.call?o(r,e):n.reject(e)};return{promise:n.promise,handle:function(e,t){e===a?i(t):s(t)}}},o=0,a=1,i=2;return e.defer=function(){var e,s=o,u=[],c=function(t,r){s=t,e=r,u.forEach(function(t){t.handle(s,e)}),u=null},l=function(e){c(a,e)},f=function(e){c(i,e)},h=function(t,r){var a=n(t,r);return s===o?u.push(a):a.handle(s,e),a.promise},p=function(e){var r=t();try{e(r(S),r(f))}catch(e){r(f)(e)}},S=function(e){var t;try{t=r(e)}catch(e){return void f(e)}t?p(t):l(e)},m=t();return{resolve:m(S),reject:m(f),promise:{then:h,fail:function(e){return h(null,e)}}}},e})},{}],3:[function(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(e,t,r){if(e&&c.isObject(e)&&e instanceof n)return e;var o=new n;return o.parse(e,t,r),o}function a(e){return c.isString(e)&&(e=o(e)),e instanceof n?e.format():n.prototype.format.call(e)}function i(e,t){return o(e,!1,!0).resolve(t)}function s(e,t){return e?o(e,!1,!0).resolveObject(t):t}var u=e("punycode"),c=e("./util");r.parse=o,r.resolve=i,r.resolveObject=s,r.format=a,r.Url=n;var l=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],S=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(S),d=["%","/","?",";","#"].concat(m),y=["/","?","#"],v=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,C=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,R={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=e("querystring");n.prototype.parse=function(e,t,r){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),o=n!==-1&&n<e.indexOf("#")?"?":"#",a=e.split(o),i=/\\/g;a[0]=a[0].replace(i,"/"),e=a.join(o);var s=e;if(s=s.trim(),!r&&1===e.split("#").length){var f=h.exec(s);if(f)return this.path=s,this.href=s,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=w.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var p=l.exec(s);if(p){p=p[0];var S=p.toLowerCase();this.protocol=S,s=s.substr(p.length)}if(r||p||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===s.substr(0,2);!E||p&&b[p]||(s=s.substr(2),this.slashes=!0)}if(!b[p]&&(E||p&&!x[p])){for(var T=-1,A=0;A<y.length;A++){var O=s.indexOf(y[A]);O!==-1&&(T===-1||O<T)&&(T=O)}var j,k;k=T===-1?s.lastIndexOf("@"):s.lastIndexOf("@",T),k!==-1&&(j=s.slice(0,k),s=s.slice(k+1),this.auth=decodeURIComponent(j)),T=-1;for(var A=0;A<d.length;A++){var O=s.indexOf(d[A]);O!==-1&&(T===-1||O<T)&&(T=O)}T===-1&&(T=s.length),this.host=s.slice(0,T),s=s.slice(T),this.parseHost(),this.hostname=this.hostname||"";var U="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!U)for(var L=this.hostname.split(/\./),A=0,M=L.length;A<M;A++){var D=L[A];if(D&&!D.match(g)){for(var N="",I=0,F=D.length;I<F;I++)N+=D.charCodeAt(I)>127?"x":D[I];if(!N.match(g)){var P=L.slice(0,A),_=L.slice(A+1),q=D.match(C);q&&(P.push(q[1]),_.unshift(q[2])),_.length&&(s="/"+_.join(".")+s),this.hostname=P.join(".");break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),U||(this.hostname=u.toASCII(this.hostname));var V=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+V,this.href+=this.host,U&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!R[S])for(var A=0,M=m.length;A<M;A++){var $=m[A];if(s.indexOf($)!==-1){var K=encodeURIComponent($);K===$&&(K=escape($)),s=s.split($).join(K)}}var z=s.indexOf("#");z!==-1&&(this.hash=s.substr(z),s=s.slice(0,z));var B=s.indexOf("?");if(B!==-1?(this.search=s.substr(B),this.query=s.substr(B+1),t&&(this.query=w.parse(this.query)),s=s.slice(0,B)):t&&(this.search="",this.query={}),s&&(this.pathname=s),x[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var V=this.pathname||"",W=this.search||"";this.path=V+W}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(a=w.stringify(this.query));var i=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||x[t])&&o!==!1?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),i&&"?"!==i.charAt(0)&&(i="?"+i),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),i=i.replace("#","%23"),t+o+r+i+n},n.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(c.isString(e)){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,o=Object.keys(this),a=0;a<o.length;a++){var i=o[a];r[i]=this[i]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var l=s[u];"protocol"!==l&&(r[l]=e[l])}return x[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!x[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var p=f[h];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||b[e.protocol])r.pathname=e.pathname;else{for(var S=(e.pathname||"").split("/");S.length&&!(e.host=S.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==S[0]&&S.unshift(""),S.length<2&&S.unshift(""),r.pathname=S.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",d=r.search||"";r.path=m+d}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=v||y||r.host&&e.pathname,C=g,R=r.pathname&&r.pathname.split("/")||[],S=e.pathname&&e.pathname.split("/")||[],w=r.protocol&&!x[r.protocol];if(w&&(r.hostname="",r.port=null,r.host&&(""===R[0]?R[0]=r.host:R.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===S[0]?S[0]=e.host:S.unshift(e.host)),e.host=null),g=g&&(""===S[0]||""===R[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,R=S;else if(S.length)R||(R=[]),R.pop(),R=R.concat(S),r.search=e.search,r.query=e.query;else if(!c.isNullOrUndefined(e.search)){if(w){r.hostname=r.host=R.shift();var E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");E&&(r.auth=E.shift(),r.host=r.hostname=E.shift())}return r.search=e.search,r.query=e.query,c.isNull(r.pathname)&&c.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!R.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=R.slice(-1)[0],A=(r.host||e.host||R.length>1)&&("."===T||".."===T)||""===T,O=0,j=R.length;j>=0;j--)T=R[j],"."===T?R.splice(j,1):".."===T?(R.splice(j,1),O++):O&&(R.splice(j,1),O--);if(!g&&!C)for(;O--;O)R.unshift("..");!g||""===R[0]||R[0]&&"/"===R[0].charAt(0)||R.unshift(""),A&&"/"!==R.join("/").substr(-1)&&R.push("");var k=""===R[0]||R[0]&&"/"===R[0].charAt(0);if(w){r.hostname=r.host=k?"":R.length?R.shift():"";var E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");E&&(r.auth=E.shift(),r.host=r.hostname=E.shift())}return g=g||r.host&&R.length,g&&!k&&R.unshift(""),R.length?r.pathname=R.join("/"):(r.pathname=null,r.path=null),c.isNull(r.pathname)&&c.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=f.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":4,punycode:35,querystring:38}],4:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],5:[function(e,t,r){t.exports=function(){function t(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function r(e,t,r,n,o,a){this.message=e,this.expected=t,this.found=r,this.offset=n,this.line=o,this.column=a,this.name="SyntaxError"}function n(t){function n(e){function r(e,r,n){var o,a;for(o=r;o<n;o++)a=t.charAt(o),"\n"===a?(e.seenCR||e.line++,e.column=1,e.seenCR=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(e.line++,e.column=1,e.seenCR=!0):(e.column++,e.seenCR=!1)}return z!==e&&(z>e&&(z=0,B={line:1,column:1,seenCR:!1}),r(B,z,e),z=e),B}function o(e){$<W||($>W&&(W=$,X=[]),X.push(e))}function a(e,o,a){function i(e){var t=1;for(e.sort(function(e,t){return e.description<t.description?-1:e.description>t.description?1:0});t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}function s(e,t){function r(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+t(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+t(e)}).replace(/[\u0180-\u0FFF]/g,function(e){return"\\u0"+t(e)}).replace(/[\u1080-\uFFFF]/g,function(e){return"\\u"+t(e)})}var n,o,a,i=new Array(e.length);for(a=0;a<e.length;a++)i[a]=e[a].description;return n=e.length>1?i.slice(0,-1).join(", ")+" or "+i[e.length-1]:i[0],o=t?'"'+r(t)+'"':"end of input","Expected "+n+" but "+o+" found."}var u=n(a),c=a<t.length?t.charAt(a):null;return null!==o&&i(o),new r(null!==e?e:s(o,c),o,c,a,u.line,u.column)}function i(){var e,t;return e=s(),e===y&&(e=$,t=[],t!==y&&(K=e,t=C()),e=t),e}function s(){var e,r,n,a,i,c;if(e=$,r=u(),r!==y){for(n=[],a=S();a!==y;)n.push(a),a=S();if(n!==y)if(44===t.charCodeAt($)?(a=b,$++):(a=y,0===J&&o(x)),a!==y){for(i=[],c=S();c!==y;)i.push(c),c=S();i!==y?(c=s(),c!==y?(K=e,r=w(r,c),e=r):($=e,e=R)):($=e,e=R)}else $=e,e=R;else $=e,e=R}else $=e,e=R;return e===y&&(e=$,r=u(),r!==y&&(K=e,r=E(r)),e=r),e}function u(){var e;return e=c(),e===y&&(e=h()),e}function c(){var e,t,r,n;if(e=$,t=l(),t!==y){if(r=[],n=S(),n!==y)for(;n!==y;)r.push(n),n=S();else r=R;r!==y?(n=f(),n!==y?(K=e,t=T(t,n),e=t):($=e,e=R)):($=e,e=R)}else $=e,e=R;return e===y&&(e=$,t=l(),t!==y&&(K=e,t=A(t)),e=t),e}function l(){var e,r,n,a;return e=$,t.substr($,4)===O?(r=O,$+=4):(r=y,0===J&&o(j)),r!==y?(n=p(),n!==y?(41===t.charCodeAt($)?(a=k,$++):(a=y,0===J&&o(U)),a!==y?(K=e,r=L(n),e=r):($=e,e=R)):($=e,e=R)):($=e,e=R),e}function f(){var e,r,n,a;return e=$,t.substr($,7)===M?(r=M,$+=7):(r=y,0===J&&o(D)),r!==y?(n=p(),n!==y?(41===t.charCodeAt($)?(a=k,$++):(a=y,0===J&&o(U)),a!==y?(K=e,r=L(n),e=r):($=e,e=R)):($=e,e=R)):($=e,e=R),e}function h(){var e,r,n,a;return e=$,t.substr($,6)===N?(r=N,$+=6):(r=y,0===J&&o(I)),r!==y?(n=p(),n!==y?(41===t.charCodeAt($)?(a=k,$++):(a=y,0===J&&o(U)),a!==y?(K=e,r=F(n),e=r):($=e,e=R)):($=e,e=R)):($=e,e=R),e}function p(){var e,r,n;if(e=$,r=[],P.test(t.charAt($))?(n=t.charAt($),$++):(n=y,0===J&&o(_)),n!==y)for(;n!==y;)r.push(n),P.test(t.charAt($))?(n=t.charAt($),$++):(n=y,0===J&&o(_));else r=R;return r!==y&&(K=e,r=q(r)),e=r}function S(){var e;return V.test(t.charAt($))?(e=t.charAt($),$++):(e=y,0===J&&o(H)),e}var m,d=arguments.length>1?arguments[1]:{},y={},v={start:i},g=i,C=function(){return[]},R=y,b=",",x={type:"literal",value:",",description:'","'},w=function(e,t){return[e].concat(t)},E=function(e){return[e]},T=function(e,t){return{url:e,format:t}},A=function(e){return{url:e}},O="url(",j={type:"literal",value:"url(",description:'"url("'},k=")",U={type:"literal",value:")",description:'")"'},L=function(e){return e},M="format(",D={type:"literal",value:"format(",description:'"format("'},N="local(",I={type:"literal",value:"local(",description:'"local("'},F=function(e){return{local:e}},P=/^[^)]/,_={type:"class",value:"[^)]",description:"[^)]"},q=function(e){return Y.extractValue(e.join(""))},V=/^[ \t\r\n\f]/,H={type:"class",value:"[ \\t\\r\\n\\f]",description:"[ \\t\\r\\n\\f]"},$=0,K=0,z=0,B={line:1,column:1,seenCR:!1},W=0,X=[],J=0;if("startRule"in d){if(!(d.startRule in v))throw new Error("Can't start parsing from rule \""+d.startRule+'".');g=v[d.startRule]}var Y=e("../util");if(m=g(),m!==y&&$===t.length)return m;throw m!==y&&$<t.length&&o({type:"end",description:"end of input"}),a(null,X,W)}return t(r,Error),{SyntaxError:r,parse:n}}()},{"../util":7}],6:[function(e,t,r){var n=e("./grammar");r.SyntaxError=function(e,t){this.message=e,this.offset=t},r.parse=function(e){try{return n.parse(e)}catch(e){throw new r.SyntaxError(e.message,e.offset)}},r.serialize=function(e){return e.map(function(e){var t;return e.url?(t='url("'+e.url+'")',e.format&&(t+=' format("'+e.format+'")')):t='local("'+e.local+'")',t}).join(", ")}},{"./grammar":5}],7:[function(e,t,r){var n=function(e){var t=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return e.replace(t,"$1")},o=function(e){var t=/^"(.*)"$/,r=/^'(.*)'$/;return t.test(e)?e.replace(t,"$1"):r.test(e)?e.replace(r,"$1"):e};r.extractValue=function(e){return o(n(e))}},{}],8:[function(e,t,r){"use strict";function n(e,t){return o(e).some(function(e){var r=e.inverse,n="all"===e.type||t.type===e.type;if(n&&r||!n&&!r)return!1;var o=e.expressions.every(function(e){var r=e.feature,n=e.modifier,o=e.value,u=t[r];if(!u)return!1;switch(r){case"orientation":case"scan":return u.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=s(o),u=s(u);break;case"resolution":o=i(o),u=i(u);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=a(o),u=a(u);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,u=parseInt(u,10)||0}switch(n){case"min":return u>=o;case"max":return u<=o;default:return u===o}});return o&&!r||!o&&r})}function o(e){return e.split(",").map(function(e){e=e.trim();var t=e.match(u),r=t[1],n=t[2],o=t[3]||"",a={};return a.inverse=!!r&&"not"===r.toLowerCase(),a.type=n?n.toLowerCase():"all",o=o.match(/\([^\)]+\)/g)||[],a.expressions=o.map(function(e){var t=e.match(c),r=t[1].toLowerCase().match(l);return{modifier:r[1],feature:r[2],value:t[2]}}),a})}function a(e){var t,r=Number(e);return r||(t=e.match(/^(\d+)\s*\/\s*(\d+)$/),r=t[1]/t[2]),r}function i(e){var t=parseFloat(e),r=String(e).match(h)[1];switch(r){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function s(e){var t=parseFloat(e),r=String(e).match(f)[1];switch(r){case"em":return 16*t;case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}r.match=n,r.parse=o;var u=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,c=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,l=/^(?:(min|max)-)?(.+)/,f=/(em|rem|px|cm|mm|in|pt|pc)?$/,h=/(dpi|dpcm|dppx)?$/},{}],9:[function(e,t,r){var n={CSSRule:e("./CSSRule").CSSRule,MatcherList:e("./MatcherList").MatcherList};n.CSSDocumentRule=function(){n.CSSRule.call(this),this.matcher=new n.MatcherList,this.cssRules=[]},n.CSSDocumentRule.prototype=new n.CSSRule,n.CSSDocumentRule.prototype.constructor=n.CSSDocumentRule,n.CSSDocumentRule.prototype.type=10,Object.defineProperty(n.CSSDocumentRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(this.cssRules[t].cssText);return"@-moz-document "+this.matcher.matcherText+" {"+e.join("")+"}"}}),r.CSSDocumentRule=n.CSSDocumentRule},{"./CSSRule":16,"./MatcherList":22}],10:[function(e,t,r){var n={CSSStyleDeclaration:e("./CSSStyleDeclaration").CSSStyleDeclaration,CSSRule:e("./CSSRule").CSSRule};n.CSSFontFaceRule=function(){n.CSSRule.call(this),this.style=new n.CSSStyleDeclaration,this.style.parentRule=this},n.CSSFontFaceRule.prototype=new n.CSSRule,n.CSSFontFaceRule.prototype.constructor=n.CSSFontFaceRule,n.CSSFontFaceRule.prototype.type=5,Object.defineProperty(n.CSSFontFaceRule.prototype,"cssText",{get:function(){return"@font-face {"+this.style.cssText+"}"}}),r.CSSFontFaceRule=n.CSSFontFaceRule},{"./CSSRule":16,"./CSSStyleDeclaration":17}],11:[function(e,t,r){var n={CSSRule:e("./CSSRule").CSSRule};n.CSSHostRule=function(){n.CSSRule.call(this),this.cssRules=[]},n.CSSHostRule.prototype=new n.CSSRule,n.CSSHostRule.prototype.constructor=n.CSSHostRule,n.CSSHostRule.prototype.type=1001,Object.defineProperty(n.CSSHostRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(this.cssRules[t].cssText);return"@host {"+e.join("")+"}"}}),r.CSSHostRule=n.CSSHostRule},{"./CSSRule":16}],12:[function(e,t,r){var n={CSSRule:e("./CSSRule").CSSRule,CSSStyleSheet:e("./CSSStyleSheet").CSSStyleSheet,MediaList:e("./MediaList").MediaList};n.CSSImportRule=function(){n.CSSRule.call(this),this.href="",this.media=new n.MediaList,this.styleSheet=new n.CSSStyleSheet},n.CSSImportRule.prototype=new n.CSSRule,n.CSSImportRule.prototype.constructor=n.CSSImportRule,n.CSSImportRule.prototype.type=3,Object.defineProperty(n.CSSImportRule.prototype,"cssText",{get:function(){var e=this.media.mediaText;return"@import url("+this.href+")"+(e?" "+e:"")+";"},set:function(e){for(var t,r,n=0,o="",a="";r=e.charAt(n);n++)switch(r){case" ":case"\t":case"\r":case"\n":case"\f":"after-import"===o?o="url":a+=r;break;case"@":o||e.indexOf("@import",n)!==n||(o="after-import",n+="import".length,a="");break;case"u":if("url"===o&&e.indexOf("url(",n)===n){if(t=e.indexOf(")",n+1),t===-1)throw n+': ")" not found';n+="url(".length;var i=e.slice(n,t);i[0]===i[i.length-1]&&('"'!==i[0]&&"'"!==i[0]||(i=i.slice(1,-1))),this.href=i,n=t,o="media"}break;case'"':if("url"===o){if(t=e.indexOf('"',n+1),!t)throw n+": '\"' not found";this.href=e.slice(n+1,t),n=t,o="media"}break;case"'":if("url"===o){if(t=e.indexOf("'",n+1),!t)throw n+': "\'" not found';this.href=e.slice(n+1,t),n=t,o="media"}break;case";":"media"===o&&a&&(this.media.mediaText=a.trim());break;default:"media"===o&&(a+=r)}}}),r.CSSImportRule=n.CSSImportRule},{"./CSSRule":16,"./CSSStyleSheet":19,"./MediaList":23}],13:[function(e,t,r){var n={CSSRule:e("./CSSRule").CSSRule,CSSStyleDeclaration:e("./CSSStyleDeclaration").CSSStyleDeclaration};n.CSSKeyframeRule=function(){n.CSSRule.call(this),this.keyText="",this.style=new n.CSSStyleDeclaration,this.style.parentRule=this},n.CSSKeyframeRule.prototype=new n.CSSRule,n.CSSKeyframeRule.prototype.constructor=n.CSSKeyframeRule,n.CSSKeyframeRule.prototype.type=9,Object.defineProperty(n.CSSKeyframeRule.prototype,"cssText",{get:function(){return this.keyText+" {"+this.style.cssText+"} "}}),r.CSSKeyframeRule=n.CSSKeyframeRule},{"./CSSRule":16,"./CSSStyleDeclaration":17}],14:[function(e,t,r){var n={CSSRule:e("./CSSRule").CSSRule};n.CSSKeyframesRule=function(){n.CSSRule.call(this),this.name="",this.cssRules=[]},n.CSSKeyframesRule.prototype=new n.CSSRule,n.CSSKeyframesRule.prototype.constructor=n.CSSKeyframesRule,n.CSSKeyframesRule.prototype.type=8,Object.defineProperty(n.CSSKeyframesRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(" "+this.cssRules[t].cssText);return"@"+(this._vendorPrefix||"")+"keyframes "+this.name+" { \n"+e.join("\n")+"\n}"}}),r.CSSKeyframesRule=n.CSSKeyframesRule},{"./CSSRule":16}],15:[function(e,t,r){var n={CSSRule:e("./CSSRule").CSSRule,MediaList:e("./MediaList").MediaList};n.CSSMediaRule=function(){n.CSSRule.call(this),this.media=new n.MediaList,this.cssRules=[]},n.CSSMediaRule.prototype=new n.CSSRule,n.CSSMediaRule.prototype.constructor=n.CSSMediaRule,n.CSSMediaRule.prototype.type=4,Object.defineProperty(n.CSSMediaRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(this.cssRules[t].cssText);return"@media "+this.media.mediaText+" {"+e.join("")+"}"}}),r.CSSMediaRule=n.CSSMediaRule},{"./CSSRule":16,"./MediaList":23}],16:[function(e,t,r){var n={};n.CSSRule=function(){this.parentRule=null,this.parentStyleSheet=null},n.CSSRule.UNKNOWN_RULE=0,n.CSSRule.STYLE_RULE=1,n.CSSRule.CHARSET_RULE=2,n.CSSRule.IMPORT_RULE=3,n.CSSRule.MEDIA_RULE=4,n.CSSRule.FONT_FACE_RULE=5,n.CSSRule.PAGE_RULE=6,n.CSSRule.KEYFRAMES_RULE=7,n.CSSRule.KEYFRAME_RULE=8,n.CSSRule.MARGIN_RULE=9,n.CSSRule.NAMESPACE_RULE=10,n.CSSRule.COUNTER_STYLE_RULE=11,n.CSSRule.SUPPORTS_RULE=12,n.CSSRule.DOCUMENT_RULE=13,n.CSSRule.FONT_FEATURE_VALUES_RULE=14,n.CSSRule.VIEWPORT_RULE=15,n.CSSRule.REGION_STYLE_RULE=16,n.CSSRule.prototype={constructor:n.CSSRule},r.CSSRule=n.CSSRule},{}],17:[function(e,t,r){var n={};n.CSSStyleDeclaration=function(){this.length=0,this.parentRule=null,this._importants={}},n.CSSStyleDeclaration.prototype={constructor:n.CSSStyleDeclaration,getPropertyValue:function(e){return this[e]||""},setProperty:function(e,t,r){if(this[e]){var n=Array.prototype.indexOf.call(this,e);n<0&&(this[this.length]=e,this.length++)}else this[this.length]=e,this.length++;this[e]=t+"",this._importants[e]=r},removeProperty:function(e){if(!(e in this))return"";var t=Array.prototype.indexOf.call(this,e);if(t<0)return"";var r=this[e];return this[e]="",Array.prototype.splice.call(this,t,1),r},getPropertyCSSValue:function(){},getPropertyPriority:function(e){return this._importants[e]||""},getPropertyShorthand:function(){},isPropertyImplicit:function(){},get cssText(){for(var e=[],t=0,r=this.length;t<r;++t){var n=this[t],o=this.getPropertyValue(n),a=this.getPropertyPriority(n);a&&(a=" !"+a),e[t]=n+": "+o+a+";"}return e.join(" ")},set cssText(e){var t,r;for(t=this.length;t--;)r=this[t],this[r]="";Array.prototype.splice.call(this,0,this.length),this._importants={};var o=n.parse("#bogus{"+e+"}").cssRules[0].style,a=o.length;for(t=0;t<a;++t)r=o[t],this.setProperty(o[t],o.getPropertyValue(r),o.getPropertyPriority(r))}},r.CSSStyleDeclaration=n.CSSStyleDeclaration,n.parse=e("./parse").parse},{"./parse":27}],18:[function(e,t,r){var n={CSSStyleDeclaration:e("./CSSStyleDeclaration").CSSStyleDeclaration,CSSRule:e("./CSSRule").CSSRule};n.CSSStyleRule=function(){n.CSSRule.call(this),this.selectorText="",this.style=new n.CSSStyleDeclaration,this.style.parentRule=this},n.CSSStyleRule.prototype=new n.CSSRule,n.CSSStyleRule.prototype.constructor=n.CSSStyleRule,n.CSSStyleRule.prototype.type=1,Object.defineProperty(n.CSSStyleRule.prototype,"cssText",{get:function(){var e;return e=this.selectorText?this.selectorText+" {"+this.style.cssText+"}":""},set:function(e){var t=n.CSSStyleRule.parse(e);this.style=t.style,this.selectorText=t.selectorText}}),n.CSSStyleRule.parse=function(e){for(var t,r,o,a=0,i="selector",s=a,u="",c={selector:!0,value:!0},l=new n.CSSStyleRule,f="";o=e.charAt(a);a++)switch(o){case" ":case"\t":case"\r":case"\n":case"\f":if(c[i])switch(e.charAt(a-1)){case" ":case"\t":case"\r":case"\n":case"\f":break;default:u+=" "}break;case'"':if(s=a+1,t=e.indexOf('"',s)+1,!t)throw'" is missing';u+=e.slice(a,t),a=t-1;break;case"'":if(s=a+1,t=e.indexOf("'",s)+1,!t)throw"' is missing";u+=e.slice(a,t),a=t-1;break;case"/":if("*"===e.charAt(a+1)){if(a+=2,t=e.indexOf("*/",a),t===-1)throw new SyntaxError("Missing */");a=t+1}else u+=o;break;case"{":"selector"===i&&(l.selectorText=u.trim(),u="",i="name");break;case":":"name"===i?(r=u.trim(),u="",i="value"):u+=o;break;case"!":"value"===i&&e.indexOf("!important",a)===a?(f="important",a+="important".length):u+=o;break;case";":"value"===i?(l.style.setProperty(r,u.trim(),f),f="",u="",i="name"):u+=o;break;case"}":if("value"===i)l.style.setProperty(r,u.trim(),f),f="",u="";else{if("name"===i)break;u+=o}i="selector";break;default:u+=o}return l},r.CSSStyleRule=n.CSSStyleRule},{"./CSSRule":16,"./CSSStyleDeclaration":17}],19:[function(e,t,r){var n={StyleSheet:e("./StyleSheet").StyleSheet,CSSStyleRule:e("./CSSStyleRule").CSSStyleRule};n.CSSStyleSheet=function(){n.StyleSheet.call(this),this.cssRules=[]},n.CSSStyleSheet.prototype=new n.StyleSheet,n.CSSStyleSheet.prototype.constructor=n.CSSStyleSheet,n.CSSStyleSheet.prototype.insertRule=function(e,t){if(t<0||t>this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");var r=n.parse(e).cssRules[0];return r.parentStyleSheet=this,this.cssRules.splice(t,0,r),t},n.CSSStyleSheet.prototype.deleteRule=function(e){if(e<0||e>=this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");this.cssRules.splice(e,1)},n.CSSStyleSheet.prototype.toString=function(){for(var e="",t=this.cssRules,r=0;r<t.length;r++)e+=t[r].cssText+"\n";return e},r.CSSStyleSheet=n.CSSStyleSheet,n.parse=e("./parse").parse},{"./CSSStyleRule":18,"./StyleSheet":24,"./parse":27}],20:[function(e,t,r){var n={};n.CSSValue=function(){},n.CSSValue.prototype={constructor:n.CSSValue,set cssText(e){var t=this._getConstructorName();throw new Error('DOMException: property "cssText" of "'+t+'" is readonly and can not be replaced with "'+e+'"!')},get cssText(){var e=this._getConstructorName();throw new Error('getter "cssText" of "'+e+'" is not implemented!')},_getConstructorName:function(){var e=this.constructor.toString(),t=e.match(/function\s([^\(]+)/),r=t[1];return r}},r.CSSValue=n.CSSValue},{}],21:[function(e,t,r){var n={CSSValue:e("./CSSValue").CSSValue};n.CSSValueExpression=function(e,t){this._token=e,this._idx=t},n.CSSValueExpression.prototype=new n.CSSValue,n.CSSValueExpression.prototype.constructor=n.CSSValueExpression,n.CSSValueExpression.prototype.parse=function(){for(var e,t=this._token,r=this._idx,n="",o="",a="",i=[];;++r){if(n=t.charAt(r),""===n){a="css expression error: unfinished expression!";break}switch(n){case"(":i.push(n),o+=n;break;case")":i.pop(n),o+=n;break;case"/":(e=this._parseJSComment(t,r))?e.error?a="css expression error: unfinished comment in expression!":r=e.idx:(e=this._parseJSRexExp(t,r))?(r=e.idx,o+=e.text):o+=n;break;case"'":case'"':e=this._parseJSString(t,r,n),e?(r=e.idx,o+=e.text):o+=n;break;default:o+=n}if(a)break;if(0===i.length)break}var s;return s=a?{error:a}:{idx:r,expression:o}},n.CSSValueExpression.prototype._parseJSComment=function(e,t){var r,n=e.charAt(t+1);if("/"===n||"*"===n){var o,a,i=t;if("/"===n?a="\n":"*"===n&&(a="*/"),o=e.indexOf(a,i+1+1),o!==-1)return o=o+a.length-1,r=e.substring(t,o+1),{idx:o,text:r};var s="css expression error: unfinished comment in expression!";return{error:s}}return!1},n.CSSValueExpression.prototype._parseJSString=function(e,t,r){var n,o=this._findMatchedIdx(e,t,r);return o!==-1&&(n=e.substring(t,o+r.length),{idx:o,text:n})},n.CSSValueExpression.prototype._parseJSRexExp=function(e,t){var r=e.substring(0,t).replace(/\s+$/,""),n=[/^$/,/\($/,/\[$/,/\!$/,/\+$/,/\-$/,/\*$/,/\/\s+/,/\%$/,/\=$/,/\>$/,/<$/,/\&$/,/\|$/,/\^$/,/\~$/,/\?$/,/\,$/,/delete$/,/in$/,/instanceof$/,/new$/,/typeof$/,/void$/],o=n.some(function(e){return e.test(r)});if(o){var a="/";return this._parseJSString(e,t,a)}return!1},n.CSSValueExpression.prototype._findMatchedIdx=function(e,t,r){for(var n,o=t,a=-1;;){if(n=e.indexOf(r,o+1),n===-1){n=a;break}var i=e.substring(t+1,n),s=i.match(/\\+$/);if(!s||s[0]%2===0)break;o=n}var u=e.indexOf("\n",t+1);return u<n&&(n=a),n},r.CSSValueExpression=n.CSSValueExpression},{"./CSSValue":20}],22:[function(e,t,r){
2var n={};n.MatcherList=function(){this.length=0},n.MatcherList.prototype={constructor:n.MatcherList,get matcherText(){return Array.prototype.join.call(this,", ")},set matcherText(e){for(var t=e.split(","),r=this.length=t.length,n=0;n<r;n++)this[n]=t[n].trim()},appendMatcher:function(e){Array.prototype.indexOf.call(this,e)===-1&&(this[this.length]=e,this.length++)},deleteMatcher:function(e){var t=Array.prototype.indexOf.call(this,e);t!==-1&&Array.prototype.splice.call(this,t,1)}},r.MatcherList=n.MatcherList},{}],23:[function(e,t,r){var n={};n.MediaList=function(){this.length=0},n.MediaList.prototype={constructor:n.MediaList,get mediaText(){return Array.prototype.join.call(this,", ")},set mediaText(e){for(var t=e.split(","),r=this.length=t.length,n=0;n<r;n++)this[n]=t[n].trim()},appendMedium:function(e){Array.prototype.indexOf.call(this,e)===-1&&(this[this.length]=e,this.length++)},deleteMedium:function(e){var t=Array.prototype.indexOf.call(this,e);t!==-1&&Array.prototype.splice.call(this,t,1)}},r.MediaList=n.MediaList},{}],24:[function(e,t,r){var n={};n.StyleSheet=function(){this.parentStyleSheet=null},r.StyleSheet=n.StyleSheet},{}],25:[function(e,t,r){var n={CSSStyleSheet:e("./CSSStyleSheet").CSSStyleSheet,CSSStyleRule:e("./CSSStyleRule").CSSStyleRule,CSSMediaRule:e("./CSSMediaRule").CSSMediaRule,CSSStyleDeclaration:e("./CSSStyleDeclaration").CSSStyleDeclaration,CSSKeyframeRule:e("./CSSKeyframeRule").CSSKeyframeRule,CSSKeyframesRule:e("./CSSKeyframesRule").CSSKeyframesRule};n.clone=function e(t){var r=new n.CSSStyleSheet,o=t.cssRules;if(!o)return r;for(var a={1:n.CSSStyleRule,4:n.CSSMediaRule,8:n.CSSKeyframesRule,9:n.CSSKeyframeRule},i=0,s=o.length;i<s;i++){var u=o[i],c=r.cssRules[i]=new a[u.type],l=u.style;if(l){for(var f=c.style=new n.CSSStyleDeclaration,h=0,p=l.length;h<p;h++){var S=f[h]=l[h];f[S]=l[S],f._importants[S]=l.getPropertyPriority(S)}f.length=l.length}u.hasOwnProperty("keyText")&&(c.keyText=u.keyText),u.hasOwnProperty("selectorText")&&(c.selectorText=u.selectorText),u.hasOwnProperty("mediaText")&&(c.mediaText=u.mediaText),u.hasOwnProperty("cssRules")&&(c.cssRules=e(u).cssRules)}return r},r.clone=n.clone},{"./CSSKeyframeRule":13,"./CSSKeyframesRule":14,"./CSSMediaRule":15,"./CSSStyleDeclaration":17,"./CSSStyleRule":18,"./CSSStyleSheet":19}],26:[function(e,t,r){r.CSSStyleDeclaration=e("./CSSStyleDeclaration").CSSStyleDeclaration,r.CSSRule=e("./CSSRule").CSSRule,r.CSSStyleRule=e("./CSSStyleRule").CSSStyleRule,r.CSSImportRule=e("./CSSImportRule").CSSImportRule,r.MediaList=e("./MediaList").MediaList,r.CSSMediaRule=e("./CSSMediaRule").CSSMediaRule,r.StyleSheet=e("./StyleSheet").StyleSheet,r.CSSStyleSheet=e("./CSSStyleSheet").CSSStyleSheet,r.parse=e("./parse").parse,r.clone=e("./clone").clone},{"./CSSImportRule":12,"./CSSMediaRule":15,"./CSSRule":16,"./CSSStyleDeclaration":17,"./CSSStyleRule":18,"./CSSStyleSheet":19,"./MediaList":23,"./StyleSheet":24,"./clone":25,"./parse":27}],27:[function(e,t,r){var n={};n.parse=function(e){for(var t,r,o,a,i,s,u,c,l,f,h,p=0,S="before-selector",m="",d=0,y={selector:!0,value:!0,"value-parenthesis":!0,atRule:!0,"importRule-begin":!0,importRule:!0,atBlock:!0,"documentRule-begin":!0},v=new n.CSSStyleSheet,g=v,C="",R=/@(-(?:\w+-)+)?keyframes/g,b=function(t){var r=e.substring(0,p).split("\n"),n=r.length,o=r.pop().length+1,a=new Error(t+" (line "+n+", char "+o+")");throw a.line=n,a.char=o,a.styleSheet=v,a};h=e.charAt(p);p++)switch(h){case" ":case"\t":case"\r":case"\n":case"\f":y[S]&&(m+=h);break;case'"':t=p+1;do t=e.indexOf('"',t)+1,t||b('Unmatched "');while("\\"===e[t-2]);switch(m+=e.slice(p,t),p=t-1,S){case"before-value":S="value";break;case"importRule-begin":S="importRule"}break;case"'":t=p+1;do t=e.indexOf("'",t)+1,t||b("Unmatched '");while("\\"===e[t-2]);switch(m+=e.slice(p,t),p=t-1,S){case"before-value":S="value";break;case"importRule-begin":S="importRule"}break;case"/":"*"===e.charAt(p+1)?(p+=2,t=e.indexOf("*/",p),t===-1?b("Missing */"):p=t+1):m+=h,"importRule-begin"===S&&(m+=" ",S="importRule");break;case"@":if(e.indexOf("@-moz-document",p)===p){S="documentRule-begin",l=new n.CSSDocumentRule,l.__starts=p,p+="-moz-document".length,m="";break}if(e.indexOf("@media",p)===p){S="atBlock",i=new n.CSSMediaRule,i.__starts=p,p+="media".length,m="";break}if(e.indexOf("@host",p)===p){S="hostRule-begin",p+="host".length,f=new n.CSSHostRule,f.__starts=p,m="";break}if(e.indexOf("@import",p)===p){S="importRule-begin",p+="import".length,m+="@import";break}if(e.indexOf("@font-face",p)===p){S="fontFaceRule-begin",p+="font-face".length,u=new n.CSSFontFaceRule,u.__starts=p,m="";break}R.lastIndex=p;var x=R.exec(e);if(x&&x.index===p){S="keyframesRule-begin",c=new n.CSSKeyframesRule,c.__starts=p,c._vendorPrefix=x[1],p+=x[0].length-1,m="";break}"selector"===S&&(S="atRule"),m+=h;break;case"{":"selector"===S||"atRule"===S?(a.selectorText=m.trim(),a.style.__starts=p,m="",S="before-name"):"atBlock"===S?(i.media.mediaText=m.trim(),g=r=i,i.parentStyleSheet=v,m="",S="before-selector"):"hostRule-begin"===S?(g=r=f,f.parentStyleSheet=v,m="",S="before-selector"):"fontFaceRule-begin"===S?(r&&(u.parentRule=r),u.parentStyleSheet=v,a=u,m="",S="before-name"):"keyframesRule-begin"===S?(c.name=m.trim(),r&&(c.parentRule=r),c.parentStyleSheet=v,g=r=c,m="",S="keyframeRule-begin"):"keyframeRule-begin"===S?(a=new n.CSSKeyframeRule,a.keyText=m.trim(),a.__starts=p,m="",S="before-name"):"documentRule-begin"===S&&(l.matcher.matcherText=m.trim(),r&&(l.parentRule=r),g=r=l,l.parentStyleSheet=v,m="",S="before-selector");break;case":":"name"===S?(o=m.trim(),m="",S="before-value"):m+=h;break;case"(":if("value"===S)if("expression"===m.trim()){var w=new n.CSSValueExpression(e,p).parse();w.error?b(w.error):(m+=w.expression,p=w.idx)}else S="value-parenthesis",d=1,m+=h;else"value-parenthesis"===S?(d++,m+=h):m+=h;break;case")":"value-parenthesis"===S&&(d--,0===d&&(S="value")),m+=h;break;case"!":"value"===S&&e.indexOf("!important",p)===p?(C="important",p+="important".length):m+=h;break;case";":switch(S){case"value":a.style.setProperty(o,m.trim(),C),C="",m="",S="before-name";break;case"atRule":m="",S="before-selector";break;case"importRule":s=new n.CSSImportRule,s.parentStyleSheet=s.styleSheet.parentStyleSheet=v,s.cssText=m+h,v.cssRules.push(s),m="",S="before-selector";break;default:m+=h}break;case"}":switch(S){case"value":a.style.setProperty(o,m.trim(),C),C="";case"before-name":case"name":a.__ends=p+1,r&&(a.parentRule=r),a.parentStyleSheet=v,g.cssRules.push(a),m="",S=g.constructor===n.CSSKeyframesRule?"keyframeRule-begin":"before-selector";break;case"keyframeRule-begin":case"before-selector":case"selector":r||b("Unexpected }"),g.__ends=p+1,v.cssRules.push(g),g=v,r=null,m="",S="before-selector"}break;default:switch(S){case"before-selector":S="selector",a=new n.CSSStyleRule,a.__starts=p;break;case"before-name":S="name";break;case"before-value":S="value";break;case"importRule-begin":S="importRule"}m+=h}return v},r.parse=n.parse,n.CSSStyleSheet=e("./CSSStyleSheet").CSSStyleSheet,n.CSSStyleRule=e("./CSSStyleRule").CSSStyleRule,n.CSSImportRule=e("./CSSImportRule").CSSImportRule,n.CSSMediaRule=e("./CSSMediaRule").CSSMediaRule,n.CSSFontFaceRule=e("./CSSFontFaceRule").CSSFontFaceRule,n.CSSHostRule=e("./CSSHostRule").CSSHostRule,n.CSSStyleDeclaration=e("./CSSStyleDeclaration").CSSStyleDeclaration,n.CSSKeyframeRule=e("./CSSKeyframeRule").CSSKeyframeRule,n.CSSKeyframesRule=e("./CSSKeyframesRule").CSSKeyframesRule,n.CSSValueExpression=e("./CSSValueExpression").CSSValueExpression,n.CSSDocumentRule=e("./CSSDocumentRule").CSSDocumentRule},{"./CSSDocumentRule":9,"./CSSFontFaceRule":10,"./CSSHostRule":11,"./CSSImportRule":12,"./CSSKeyframeRule":13,"./CSSKeyframesRule":14,"./CSSMediaRule":15,"./CSSStyleDeclaration":17,"./CSSStyleRule":18,"./CSSStyleSheet":19,"./CSSValueExpression":21}],28:[function(e,t,r){"use strict";var n=e("./cssSupport"),o=function(e){var t=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return e.replace(t,"$1")};r.extractCssUrl=function(e){var t,r=/^url\(([^\)]+)\)/;if(!r.test(e))throw new Error("Invalid url");return t=r.exec(e)[1],n.unquoteString(o(t))};var a=function(e){var t,r="\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*",n="(url\\("+r+"\\)|[^,\\s]+)",o="(?:\\s*"+n+")+",a="^\\s*("+o+")(?:\\s*,\\s*("+o+"))*\\s*$",i=new RegExp(o,"g"),s=[],u=function(e){var t,r=new RegExp(n,"g"),o=[];for(t=r.exec(e);t;)o.push(t[1]),t=r.exec(e);return o};if(e.match(new RegExp(a))){for(t=i.exec(e);t;)s.push(u(t[0])),t=i.exec(e);return s}return[]},i=function(e){var t,n;for(t=0;t<e.length;t++)try{return n=r.extractCssUrl(e[t]),{url:n,idx:t}}catch(e){}};r.parse=function(e){var t=a(e);return t.map(function(e){var t=i(e);return t?{preUrl:e.slice(0,t.idx),url:t.url,postUrl:e.slice(t.idx+1)}:{preUrl:e}})},r.serialize=function(e){var t=e.map(function(e){var t=[].concat(e.preUrl);return e.url&&t.push('url("'+e.url+'")'),e.postUrl&&(t=t.concat(e.postUrl)),t.join(" ")});return t.join(", ")}},{"./cssSupport":29}],29:[function(e,t,r){"use strict";var n;try{n=e("cssom")}catch(e){}r.unquoteString=function(e){var t=/^"(.*)"$/,r=/^'(.*)'$/;return t.test(e)?e.replace(t,"$1"):r.test(e)?e.replace(r,"$1"):e};var o=function(e){var t,r=document.implementation.createHTMLDocument(""),n=document.createElement("style");return n.textContent=e,r.body.appendChild(n),t=n.sheet.cssRules,Array.prototype.slice.call(t)},a=function(){var e=o("a{background:url(i)}");return!e.length||e[0].cssText.indexOf("url()")>=0}(),i=function(){var e=o('@font-face { font-family: "f"; src: url("f"); }');return!e.length||/url\(['"]*\)/.test(e[0].cssText)}(),s=function(){var e=o("a{background:url(old)}");return e[0].style.setProperty("background","url(new)",""),e[0].style.getPropertyValue("background").indexOf("old")>=0}();r.rulesForCssText=function(e){return(a||i||s)&&n&&n.parse?n.parse(e).cssRules:o(e)},r.cssRulesToText=function(e){return e.reduce(function(e,t){return e+t.cssText},"")},r.exchangeRule=function(e,t,n){var o=e.indexOf(t);e[o]=r.rulesForCssText(n)[0]},r.changeFontFaceRuleSrc=function(e,t,n){var o="@font-face { font-family: "+t.style.getPropertyValue("font-family")+"; ";t.style.getPropertyValue("font-style")&&(o+="font-style: "+t.style.getPropertyValue("font-style")+"; "),t.style.getPropertyValue("font-weight")&&(o+="font-weight: "+t.style.getPropertyValue("font-weight")+"; "),o+="src: "+n+"}",r.exchangeRule(e,t,o)}},{cssom:26}],30:[function(e,t,r){"use strict";var n=e("./util"),o=e("./inlineImage"),a=e("./inlineScript"),i=e("./inlineCss"),s=e("./cssSupport"),u=function(e){return n.joinUrl(e,".")},c=function(e){var t=e.map(function(t,r){return r===e.length-1&&(t={baseUrl:u(t.baseUrl)}),JSON.stringify(t)});return t},l=function(e,t){return t.cache!==!1&&"none"!==t.cache&&t.cacheBucket?n.memoize(e,c,t.cacheBucket):e},f=function(e,t,r){var n=s.rulesForCssText(e);return i.loadCSSImportsForRules(n,t,r).then(function(t){return i.loadAndInlineCSSResourcesForRules(n,r).then(function(r){var o=t.errors.concat(r.errors),a=t.hasChanges||r.hasChanges;return a&&(e=s.cssRulesToText(n)),{hasChanges:a,content:e,errors:o}})})},h=function(e,t,r){var o=e.textContent,a=l(f,t);return a(o,r,t).then(function(t){return t.hasChanges&&(e.childNodes[0].nodeValue=t.content),n.cloneArray(t.errors)})},p=function(e){var t=e.getElementsByTagName("style");return Array.prototype.filter.call(t,function(e){return!e.attributes.type||"text/css"===e.attributes.type.value})};r.loadAndInlineStyles=function(e,t){var r,o=p(e),a=[],i=[];return r=n.clone(t),r.baseUrl=r.baseUrl||n.getDocumentBaseUrl(e),n.all(o.map(function(e){return h(e,r,i).then(function(e){a=a.concat(e)})})).then(function(){return a})};var S=function(e,t){var r,n=e.parentNode;t=t.trim(),t&&(r=e.ownerDocument.createElement("style"),r.type="text/css",r.appendChild(e.ownerDocument.createTextNode(t)),n.insertBefore(r,e)),n.removeChild(e)},m=function(e,t){return n.ajax(e,t).then(function(e){var t=s.rulesForCssText(e);return{content:e,cssRules:t}}).then(function(t){var r=i.adjustPathsOfCssResources(e,t.cssRules);return{content:t.content,cssRules:t.cssRules,hasChanges:r}}).then(function(e){return i.loadCSSImportsForRules(e.cssRules,[],t).then(function(t){return{content:e.content,cssRules:e.cssRules,hasChanges:e.hasChanges||t.hasChanges,errors:t.errors}})}).then(function(e){return i.loadAndInlineCSSResourcesForRules(e.cssRules,t).then(function(t){return{content:e.content,cssRules:e.cssRules,hasChanges:e.hasChanges||t.hasChanges,errors:e.errors.concat(t.errors)}})}).then(function(e){var t=e.content;return e.hasChanges&&(t=s.cssRulesToText(e.cssRules)),{content:t,errors:e.errors}})},d=function(e,t){var r=e.attributes.href.value,o=n.getDocumentBaseUrl(e.ownerDocument),a=n.clone(t);!a.baseUrl&&o&&(a.baseUrl=o);var i=l(m,t);return i(r,a).then(function(e){return{content:e.content,errors:n.cloneArray(e.errors)}})},y=function(e){var t=e.getElementsByTagName("link");return Array.prototype.filter.call(t,function(e){return e.attributes.rel&&"stylesheet"===e.attributes.rel.value&&(!e.attributes.type||"text/css"===e.attributes.type.value)})};r.loadAndInlineCssLinks=function(e,t){var r=y(e),o=[];return n.all(r.map(function(e){return d(e,t).then(function(t){S(e,t.content+"\n"),o=o.concat(t.errors)},function(e){o.push({resourceType:"stylesheet",url:e.url,msg:"Unable to load stylesheet "+e.url})})})).then(function(){return o})},r.loadAndInlineImages=o.inline,r.loadAndInlineScript=a.inline,r.inlineReferences=function(e,t){var o=[],a=[r.loadAndInlineImages,r.loadAndInlineStyles,r.loadAndInlineCssLinks];return t.inlineScripts!==!1&&a.push(r.loadAndInlineScript),n.all(a.map(function(r){return r(e,t).then(function(e){o=o.concat(e)})})).then(function(){return o})}},{"./cssSupport":29,"./inlineCss":31,"./inlineImage":32,"./inlineScript":33,"./util":34}],31:[function(e,t,r){"use strict";var n=e("ayepromise"),o=e("./util"),a=e("./cssSupport"),i=e("./backgroundValueParser"),s=e("css-font-face-src"),u=function(e,t,r){e.style.setProperty(t,r,e.style.getPropertyPriority(t))},c=function(e){return e.filter(function(e){return e.type===window.CSSRule.STYLE_RULE&&(e.style.getPropertyValue("background-image")||e.style.getPropertyValue("background"))})},l=function(e){var t=[];return e.forEach(function(e){e.style.getPropertyValue("background-image")?t.push({property:"background-image",value:e.style.getPropertyValue("background-image"),rule:e}):e.style.getPropertyValue("background")&&t.push({property:"background",value:e.style.getPropertyValue("background"),rule:e})}),t},f=function(e){return e.filter(function(e){return e.type===window.CSSRule.FONT_FACE_RULE&&e.style.getPropertyValue("src")})},h=function(e){return e.filter(function(e){return e.type===window.CSSRule.IMPORT_RULE&&e.href})},p=function(e){var t=[];return e.forEach(function(e,r){e.url&&!o.isDataUri(e.url)&&t.push(r)}),t},S=function(e){var t=[];return e.forEach(function(e,r){e.url&&!o.isDataUri(e.url)&&t.push(r)}),t};r.adjustPathsOfCssResources=function(e,t){var r=c(t),n=l(r),m=!1;return n.forEach(function(t){var r,n=i.parse(t.value),a=p(n);a.length>0&&(a.forEach(function(t){var r=n[t].url,a=o.joinUrl(e,r);n[t].url=a}),r=i.serialize(n),u(t.rule,t.property,r),m=!0)}),f(t).forEach(function(r){var n,i,u=r.style.getPropertyValue("src");try{n=s.parse(u)}catch(e){return}i=S(n),i.length>0&&(i.forEach(function(t){var r=n[t].url,a=o.joinUrl(e,r);n[t].url=a}),a.changeFontFaceRuleSrc(t,r,s.serialize(n)),m=!0)}),h(t).forEach(function(r){var n=r.href,i=o.joinUrl(e,n);a.exchangeRule(t,r,"@import url("+i+");"),m=!0}),m};var m=function(e,t,r){var n=e.indexOf(t);e.splice(n,1),r.forEach(function(t,r){e.splice(n+r,0,t)})},d=function(e){var t=n.defer();return t.resolve(e),t.promise},y=function(e,t,n,i){var s,u=t.href;return u=a.unquoteString(u),s=o.joinUrl(i.baseUrl,u),n.indexOf(s)>=0?(m(e,t,[]),d([])):(n.push(s),o.ajax(u,i).then(function(o){var s=a.rulesForCssText(o);return r.loadCSSImportsForRules(s,n,i).then(function(n){return r.adjustPathsOfCssResources(u,s),m(e,t,s),n.errors})},function(e){throw{resourceType:"stylesheet",url:e.url,msg:"Unable to load stylesheet "+e.url}}))};r.loadCSSImportsForRules=function(e,t,r){var n=h(e),a=[],i=!1;return o.all(n.map(function(n){return y(e,n,t,r).then(function(e){a=a.concat(e),i=!0},function(e){a.push(e)})})).then(function(){return{hasChanges:i,errors:a}})};var v=function(e,t){var r=i.parse(e),n=p(r),a=!1;return o.collectAndReportErrors(n.map(function(e){var n=r[e].url;return o.getDataURIForImageURL(n,t).then(function(t){r[e].url=t,a=!0},function(e){throw{resourceType:"backgroundImage",url:e.url,msg:"Unable to load background-image "+e.url}})})).then(function(e){return{backgroundValue:i.serialize(r),hasChanges:a,errors:e}})},g=function(e,t){var r=c(e),n=l(r),a=[],i=!1;return o.all(n.map(function(e){return v(e.value,t).then(function(t){t.hasChanges&&(u(e.rule,e.property,t.backgroundValue),i=!0),a=a.concat(t.errors)})})).then(function(){return{hasChanges:i,errors:a}})},C=function(e,t){var r,n,a=!1;try{r=s.parse(e)}catch(e){r=[]}return n=S(r),o.collectAndReportErrors(n.map(function(e){var n=r[e],i=n.format||"woff";return o.binaryAjax(n.url,t).then(function(e){var t=btoa(e);n.url="data:font/"+i+";base64,"+t,a=!0},function(e){throw{resourceType:"fontFace",url:e.url,msg:"Unable to load font-face "+e.url}})})).then(function(e){return{srcDeclarationValue:s.serialize(r),hasChanges:a,errors:e}})},R=function(e,t){var r=f(e),n=[],i=!1;return o.all(r.map(function(r){var o=r.style.getPropertyValue("src");return C(o,t).then(function(t){t.hasChanges&&(a.changeFontFaceRuleSrc(e,r,t.srcDeclarationValue),i=!0),n=n.concat(t.errors)})})).then(function(){return{hasChanges:i,errors:n}})};r.loadAndInlineCSSResourcesForRules=function(e,t){var r=!1,n=[];return o.all([g,R].map(function(o){return o(e,t).then(function(e){r=r||e.hasChanges,n=n.concat(e.errors)})})).then(function(){return{hasChanges:r,errors:n}})}},{"./backgroundValueParser":28,"./cssSupport":29,"./util":34,ayepromise:2,"css-font-face-src":6}],32:[function(e,t,r){"use strict";var n=e("./util"),o=function(e,t){var r=null;e.hasAttribute("src")?r=e.getAttribute("src"):e.hasAttributeNS("http://www.w3.org/1999/xlink","href")?r=e.getAttributeNS("http://www.w3.org/1999/xlink","href"):e.hasAttribute("href")&&(r=e.getAttribute("href"));var o=n.getDocumentBaseUrl(e.ownerDocument),a=n.clone(t);return!a.baseUrl&&o&&(a.baseUrl=o),n.getDataURIForImageURL(r,a).then(function(e){return e},function(e){throw{resourceType:"image",url:e.url,msg:"Unable to load image "+e.url}})},a=function(e){return e.filter(function(e){var t=null;return e.hasAttribute("src")?t=e.getAttribute("src"):e.hasAttributeNS("http://www.w3.org/1999/xlink","href")?t=e.getAttributeNS("http://www.w3.org/1999/xlink","href"):e.hasAttribute("href")&&(t=e.getAttribute("href")),null!==t&&!n.isDataUri(t)})},i=function(e){return Array.prototype.filter.call(e,function(e){return"image"===e.type})},s=function(e){return Array.prototype.slice.call(e)};r.inline=function(e,t){var r=s(e.getElementsByTagName("img")),u=s(e.getElementsByTagName("image")),c=i(e.getElementsByTagName("input"));r=r.concat(u),r=r.concat(c);var l=a(r);return n.collectAndReportErrors(l.map(function(e){return o(e,t).then(function(t){e.attributes.src?e.attributes.src.value=t:e.attributes["xlink:href"]?e.attributes["xlink:href"].value=t:e.attributes.href&&(e.attributes.href.value=t)})}))}},{"./util":34}],33:[function(e,t,r){"use strict";var n=e("./util"),o=function(e,t){var r=e.attributes.src.value,o=n.getDocumentBaseUrl(e.ownerDocument),a=n.clone(t);return!a.baseUrl&&o&&(a.baseUrl=o),n.ajax(r,a).fail(function(e){throw{resourceType:"script",url:e.url,msg:"Unable to load script "+e.url}})},a=function(e){return e.replace(/<\//g,"<\\/")},i=function(e,t){e.attributes.removeNamedItem("src"),e.textContent=a(t)},s=function(e){var t=e.getElementsByTagName("script");return Array.prototype.filter.call(t,function(e){return!!e.attributes.src})};r.inline=function(e,t){var r=s(e);return n.collectAndReportErrors(r.map(function(e){return o(e,t).then(function(t){i(e,t)})}))}},{"./util":34}],34:[function(e,t,r){"use strict";var n=e("url"),o=e("ayepromise");r.getDocumentBaseUrl=function(e){return"about:blank"!==e.baseURI?e.baseURI:null},r.clone=function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},r.cloneArray=function(e){return Array.prototype.slice.apply(e,[0])},r.joinUrl=function(e,t){return e?n.resolve(e,t):t},r.isDataUri=function(e){return/^data:/.test(e)},r.all=function(e){var t=o.defer(),r=e.length,n=[];return 0===e.length?(t.resolve([]),t.promise):(e.forEach(function(e,o){e.then(function(e){r-=1,n[o]=e,0===r&&t.resolve(n)},function(e){t.reject(e)})}),t.promise)},r.collectAndReportErrors=function(e){var t=[];return r.all(e.map(function(e){return e.fail(function(e){t.push(e)})})).then(function(){return t})};var a=null,i=function(e,t){return t===!1||"none"===t||"repeated"===t?(null!==a&&"repeated"===t||(a=Date.now()),e+"?_="+a):e};r.ajax=function(e,t){var n,a=new window.XMLHttpRequest,s=o.defer(),u=r.joinUrl(t.baseUrl,e),c=function(){s.reject({msg:"Unable to load url",url:u})};n=i(u,t.cache),a.addEventListener("load",function(){200===a.status||0===a.status?s.resolve(a.response):c()},!1),a.addEventListener("error",c,!1);try{a.open("GET",n,!0),a.overrideMimeType(t.mimeType),a.send(null)}catch(e){c()}return s.promise},r.binaryAjax=function(e,t){var n=r.clone(t);return n.mimeType="text/plain; charset=x-user-defined",r.ajax(e,n).then(function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(255&e.charCodeAt(r));return t})};var s=function(e){var t=function(e,t){return e.substring(0,t.length)===t};return t(e,"<?xml")||t(e,"<svg")?"image/svg+xml":"image/png"};r.getDataURIForImageURL=function(e,t){return r.binaryAjax(e,t).then(function(e){var t=btoa(e),r=s(e);return"data:"+r+";base64,"+t})};var u=[],c=function(e){return u.indexOf(e)<0&&u.push(e),u.indexOf(e)};r.memoize=function(e,t,r){if("object"!=typeof r)throw new Error("cacheBucket is not an object");return function(){var n,o=Array.prototype.slice.call(arguments),a=t(o),i=c(e);return r[i]&&r[i][a]?r[i][a]:(n=e.apply(null,o),r[i]=r[i]||{},r[i][a]=n,n)}}},{ayepromise:2,url:3}],35:[function(e,t,r){(function(e){!function(n){function o(e){throw RangeError(M[e])}function a(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function i(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(L,".");var o=e.split("."),i=a(o,t).join(".");return n+i}function s(e){for(var t,r,n=[],o=0,a=e.length;o<a;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<a?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=I(e>>>10&1023|55296),e=56320|1023&e),t+=I(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function l(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function f(e,t,r){var n=0;for(e=r?N(e/T):e>>1,e+=N(e/t);e>D*w>>1;n+=b)e=N(e/D);return N(n+(D+1)*e/(e+E))}function h(e){var t,r,n,a,i,s,l,h,p,S,m=[],d=e.length,y=0,v=O,g=A;for(r=e.lastIndexOf(j),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(a=r>0?r+1:0;a<d;){for(i=y,s=1,l=b;a>=d&&o("invalid-input"),h=c(e.charCodeAt(a++)),(h>=b||h>N((R-y)/s))&&o("overflow"),y+=h*s,p=l<=g?x:l>=g+w?w:l-g,!(h<p);l+=b)S=b-p,s>N(R/S)&&o("overflow"),s*=S;t=m.length+1,g=f(y-i,t,0==i),N(y/t)>R-v&&o("overflow"),v+=N(y/t),y%=t,m.splice(y++,0,v)}return u(m)}function p(e){var t,r,n,a,i,u,c,h,p,S,m,d,y,v,g,C=[];for(e=s(e),d=e.length,t=O,r=0,i=A,u=0;u<d;++u)m=e[u],m<128&&C.push(I(m));for(n=a=C.length,a&&C.push(j);n<d;){for(c=R,u=0;u<d;++u)m=e[u],m>=t&&m<c&&(c=m);for(y=n+1,c-t>N((R-r)/y)&&o("overflow"),r+=(c-t)*y,t=c,u=0;u<d;++u)if(m=e[u],m<t&&++r>R&&o("overflow"),m==t){for(h=r,p=b;S=p<=i?x:p>=i+w?w:p-i,!(h<S);p+=b)g=h-S,v=b-S,C.push(I(l(S+g%v,0))),h=N(g/v);C.push(I(l(h,0))),i=f(r,y,n==a),r=0,++n}++r,++t}return C.join("")}function S(e){return i(e,function(e){return k.test(e)?h(e.slice(4).toLowerCase()):e})}function m(e){return i(e,function(e){return U.test(e)?"xn--"+p(e):e})}var d="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof t&&t&&!t.nodeType&&t,v="object"==typeof e&&e;v.global!==v&&v.window!==v&&v.self!==v||(n=v);var g,C,R=2147483647,b=36,x=1,w=26,E=38,T=700,A=72,O=128,j="-",k=/^xn--/,U=/[^\x20-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=b-x,N=Math.floor,I=String.fromCharCode;if(g={version:"1.3.2",ucs2:{decode:s,encode:u},decode:h,encode:p,toASCII:m,toUnicode:S},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(d&&y)if(t.exports==d)y.exports=g;else for(C in g)g.hasOwnProperty(C)&&(d[C]=g[C]);else n.punycode=g}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],36:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,a){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(t);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,h,p,S,m=e[l].replace(s,"%20"),d=m.indexOf(r);d>=0?(f=m.substr(0,d),h=m.substr(d+1)):(f=m,h=""),p=decodeURIComponent(f),S=decodeURIComponent(h),n(i,p)?o(i[p])?i[p].push(S):i[p]=[i[p],S]:i[p]=S}return i};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],37:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?n(i(e),function(i){var s=encodeURIComponent(o(i))+r;return a(e[i])?n(e[i],function(e){return s+encodeURIComponent(o(e))}).join(t):s+encodeURIComponent(o(e[i]))}).join(t):s?encodeURIComponent(o(s))+r+encodeURIComponent(o(e)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],38:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":36,"./encode":37}],39:[function(e,t,r){!function(n,o){"function"==typeof define&&define.amd?define(["url","css-mediaquery","xmlserializer","sane-domparser-error","ayepromise","inlineresources"],function(e,t,r,a,i,s){return n.rasterizeHTML=o(e,t,r,a,i,s)}):"object"==typeof r?t.exports=o(e("url"),e("css-mediaquery"),e("xmlserializer"),e("sane-domparser-error"),e("ayepromise"),e("inlineresources")):n.rasterizeHTML=o(n.url,n.cssMediaQuery,n.xmlserializer,n.sanedomparsererror,n.ayepromise,n.inlineresources)}(this,function(e,t,r,n,o,a){var i=function(e){"use strict";var t={},r=[];t.joinUrl=function(t,r){return t?e.resolve(t,r):r},t.getConstantUniqueIdFor=function(e){return r.indexOf(e)<0&&r.push(e),r.indexOf(e)},t.clone=function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r};var n=function(e){return"object"==typeof e&&null!==e},o=function(e){return n(e)&&Object.prototype.toString.apply(e).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return t.parseOptionalParameters=function(e){var r={canvas:null,options:{}};return null==e[0]||o(e[0])?(r.canvas=e[0]||null,r.options=t.clone(e[1])):r.options=t.clone(e[0]),r},t}(e),s=function(e,t){"use strict";var r={},n=function(e,t,r){var n=e[t];return e[t]=function(){var e=Array.prototype.slice.call(arguments);return r.apply(this,[e,n])},n};return r.baseUrlRespectingXhr=function(t,r){var o=function(){var o=new t;return n(o,"open",function(t,n){var o=t.shift(),a=t.shift(),i=e.joinUrl(r,a);return n.apply(this,[o,i].concat(t))}),o};return o},r.finishNotifyingXhr=function(e){var r=0,o=0,a=!1,i=t.defer(),s=function(){var e=r-o;e<=0&&a&&i.resolve({totalCount:r})},u=function(){var t=new e;return n(t,"send",function(e,t){return r+=1,t.apply(this,arguments)}),t.addEventListener("load",function(){o+=1,s()}),t};return u.waitForRequestsToFinish=function(){return a=!0,s(),i.promise},u},r}(i,o),u=function(){"use strict";var e={},t=function(e){return Array.prototype.slice.call(e)};e.addClassName=function(e,t){e.className+=" "+t},e.addClassNameRecursively=function(t,r){e.addClassName(t,r),t.parentNode!==t.ownerDocument&&e.addClassNameRecursively(t.parentNode,r)};var r=function(e,r){var n=e.parentStyleSheet,o=t(n.cssRules).indexOf(e);n.insertRule(r,o+1),n.deleteRule(o)},n=function(e,t){var n=e.cssText.replace(/^[^\{]+/,""),o=t+" "+n;r(e,o)},o=function(e){return t(e).reduce(function(e,t){return e+t.cssText},"")},a=function(e){e.textContent=o(e.sheet.cssRules)},i=function(e){var t=document.implementation.createHTMLDocument(""),r=document.createElement("style");r.textContent=e.textContent,t.body.appendChild(r),e.sheet=r.sheet},s=function(e){return"((?:^|[^.#:\\w])|(?=\\W))("+e.join("|")+")(?=\\W|$)"},u=function(e,r,o){var u=s(r);t(e.querySelectorAll("style")).forEach(function(e){"undefined"==typeof e.sheet&&i(e);var r=t(e.sheet.cssRules).filter(function(e){return e.selectorText&&new RegExp(u,"i").test(e.selectorText)});r.length&&(r.forEach(function(e){var t=e.selectorText.replace(new RegExp(u,"gi"),function(e,t,r){return t+o(r)});t!==e.selectorText&&n(e,t)}),a(e))})};return e.rewriteCssSelectorWith=function(e,t,r){u(e,[t],function(){return r})},e.lowercaseCssTypeSelectors=function(e,t){u(e,t,function(e){return e.toLowerCase()})},e.findHtmlOnlyNodeNames=function(e){var t,r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),n={},o={};do t=r.currentNode.tagName.toLowerCase(),"http://www.w3.org/1999/xhtml"===r.currentNode.namespaceURI?n[t]=!0:o[t]=!0;while(r.nextNode());return Object.keys(n).filter(function(e){return!o[e]})},e}(),c=function(e){"use strict";var t={},r=function(e){return Array.prototype.slice.call(e)},n={active:!0,hover:!0,focus:!1,target:!1};return t.fakeUserAction=function(t,r,o){var a=t.querySelector(r),i=":"+o,s="rasterizehtml"+o;a&&(n[o]?e.addClassNameRecursively(a,s):e.addClassName(a,s),e.rewriteCssSelectorWith(t,i,"."+s))},t.persistInputValues=function(e){var t=e.querySelectorAll("input"),n=e.querySelectorAll("textarea"),o=function(e){return"checkbox"===e.type||"radio"===e.type};r(t).filter(o).forEach(function(e){e.checked?e.setAttribute("checked",""):e.removeAttribute("checked")}),r(t).filter(function(e){return!o(e)}).forEach(function(e){e.setAttribute("value",e.value)}),r(n).forEach(function(e){e.textContent=e.value})},t.rewriteTagNameSelectorsToLowerCase=function(t){e.lowercaseCssTypeSelectors(t,e.findHtmlOnlyNodeNames(t))},t}(u),l=function(e){"use strict";var t,r={},n=function(){var e='<svg id="svg" xmlns="http://www.w3.org/2000/svg" width="10" height="10"><style>@media (max-width: 1em) { svg { background: #00f; } }</style></svg>',t="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),r=document.createElement("img");return r.src=t,r},a=function(e,t,r,n){var o=document.createElement("canvas");o.width=e.width,o.height=e.height;var a,i=o.getContext("2d");return i.drawImage(e,0,0),a=i.getImageData(0,0,1,1).data,a[0]===t&&a[1]===r&&a[2]===n},i=function(){var e=n(),t=o.defer();return document.querySelector("body").appendChild(e),e.onload=function(){document.querySelector("body").removeChild(e);try{t.resolve(!a(e,0,0,255))}catch(e){t.resolve(!0)}},e.onerror=function(){t.reject()},t.promise};r.needsEmWorkaround=function(){return void 0===t&&(t=i()),t};var s=function(e){return Array.prototype.slice.call(e)},u=function(e){return s(e).map(function(e){return e.cssText}).join("\n")},c=function(e,t){return"@media "+e+"{"+u(t)+"}"},l=function(e,t,r){try{e.insertRule(r,t+1)}catch(e){return}e.deleteRule(t)},f=function(e,t){var r=e.parentStyleSheet,n=s(r.cssRules).indexOf(e);
3l(r,n,t)},h=function(e){e.textContent=u(e.sheet.cssRules)},p=function(e){var t=e.modifier?e.modifier+"-"+e.feature:e.feature;return e.value?"("+t+": "+e.value+")":"("+t+")"},S=function(e){var t=[];return e.inverse&&t.push("not"),t.push(e.type),e.expressions.length>0&&t.push("and "+e.expressions.map(p).join(" and ")),t.join(" ")};r.serializeQuery=function(e){var t=e.map(S);return t.join(", ")};var m=function(e){return 16*e},d=function(e){var t=/^((?:\d+\.)?\d+)em/.exec(e);return t?m(parseFloat(t[1]))+"px":e},y=function(t){var n=e.parse(t),o=!1;if(n.forEach(function(e){e.expressions.forEach(function(e){var t=d(e.value);o|=t!==e.value,e.value=t})}),o)return r.serializeQuery(n)},v=function(e){var t=!1;return e.forEach(function(e){var r=y(e.media.mediaText);r&&f(e,c(r,e.cssRules)),t|=!!r}),t};return r.workAroundWebKitEmSizeIssue=function(e){var t=e.querySelectorAll("style");s(t).forEach(function(e){var t=s(e.sheet.cssRules).filter(function(e){return e.type===window.CSSRule.MEDIA_RULE}),r=v(t);r&&h(e)})},r}(t),f=function(e,t,r,n,o){"use strict";var a={},i=function(e,t,r,n){var o=e.createElement(t);return o.style.visibility="hidden",o.style.width=r+"px",o.style.height=n+"px",o.style.position="absolute",o.style.top=-1e4-n+"px",o.style.left=-1e4-r+"px",e.getElementsByTagName("body")[0].appendChild(o),o};a.executeJavascript=function(e,n){var a=i(o.document,"iframe",n.width,n.height),s=e.outerHTML,u=[],c=r.defer(),l=n.executeJsTimeout||0,f=function(){var e=a.contentDocument;o.document.getElementsByTagName("body")[0].removeChild(a),c.resolve({document:e,errors:u})},h=function(){var e=r.defer();return l>0?setTimeout(e.resolve,l):e.resolve(),e.promise},p=a.contentWindow.XMLHttpRequest,S=t.finishNotifyingXhr(p),m=t.baseUrlRespectingXhr(S,n.baseUrl);return a.onload=function(){h().then(S.waitForRequestsToFinish).then(f)},a.contentDocument.open(),a.contentWindow.XMLHttpRequest=m,a.contentWindow.onerror=function(e){u.push({resourceType:"scriptExecution",msg:e})},a.contentDocument.write("<!DOCTYPE html>"),a.contentDocument.write(s),a.contentDocument.close(),c.promise};var s=function(e,t,r){var n=e.createElement("iframe");return n.style.width=t+"px",n.style.height=r+"px",n.style.visibility="hidden",n.style.position="absolute",n.style.top=-1e4-r+"px",n.style.left=-1e4-t+"px",n.sandbox="allow-same-origin",n.scrolling="no",n},u=function(e,t,r){var n=Math.floor(e/r),a=Math.floor(t/r);return s(o.document,n,a)},c=function(e,t,r,n){return{width:Math.max(e.width*n,t),height:Math.max(e.height*n,r)}},l=function(e,t){var r=e.querySelector(t);if(r)return r;if(e.ownerDocument.querySelector(t)===e)return e;throw{message:"Clipping selector not found"}},f=function(e,t,r,n,a){var i,s,u,f,h,p,S,m,d=Math.max(e.scrollWidth,e.clientWidth),y=Math.max(e.scrollHeight,e.clientHeight);return t?(p=l(e,t),S=p.getBoundingClientRect(),i=S.top,s=S.left,u=S.width,f=S.height):(i=0,s=0,u=d,f=y),m=c({width:u,height:f},r,n,a),h=o.getComputedStyle(e.ownerDocument.documentElement).fontSize,{left:s,top:i,width:m.width,height:m.height,viewportWidth:d,viewportHeight:y,rootFontSize:h}},h=function(e,t){var r=e.tagName;return t.querySelector(r)},p=function(e){var t=e.tagName.toLowerCase();return"html"===t||"body"===t?e.outerHTML:'<body style="margin: 0;">'+e.outerHTML+"</body>"};a.calculateDocumentContentSize=function(e,t){var n,a=r.defer(),i=t.zoom||1;return n=u(t.width,t.height,i),o.document.getElementsByTagName("body")[0].appendChild(n),n.onload=function(){var r,s=n.contentDocument;try{r=f(h(e,s),t.clip,t.width,t.height,i),a.resolve(r)}catch(e){a.reject(e)}finally{o.document.getElementsByTagName("body")[0].removeChild(n)}},n.contentDocument.open(),n.contentDocument.write("<!DOCTYPE html>"),n.contentDocument.write(p(e)),n.contentDocument.close(),a.promise},a.parseHtmlFragment=function(e){var t=o.document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e;var r=t.querySelector("body").firstChild;if(!r)throw"Invalid source";return r};var S=function(e,t){var r,n,a,i,s=/<html((?:\s+[^>]*)?)>/im.exec(t),u=o.document.implementation.createHTMLDocument("");if(s)for(r="<div"+s[1]+"></div>",u.documentElement.innerHTML=r,a=u.querySelector("div"),n=0;n<a.attributes.length;n++)i=a.attributes[n],e.documentElement.setAttribute(i.name,i.value)};a.parseHTML=function(e){var t=o.document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=e,S(t,e),t};var m=function(e){try{return n.failOnParseError(e)}catch(e){throw{message:"Invalid source",originalError:e}}};a.validateXHTML=function(e){var t=new DOMParser,r=t.parseFromString(e,"application/xml");m(r)};var d=null,y=function(e,t){return"none"===t||"repeated"===t?(null!==d&&"repeated"===t||(d=Date.now()),e+"?_="+d):e},v=function(t,n){var o=new window.XMLHttpRequest,a=e.joinUrl(n.baseUrl,t),i=y(a,n.cache),s=r.defer(),u=function(e){s.reject({message:"Unable to load page",originalError:e})};o.addEventListener("load",function(){200===o.status||0===o.status?s.resolve(o.responseXML):u(o.statusText)},!1),o.addEventListener("error",function(e){u(e)},!1);try{o.open("GET",i,!0),o.responseType="document",o.send(null)}catch(e){u(e)}return s.promise};return a.loadDocument=function(e,t){return v(e,t).then(function(e){return m(e)})},a}(i,s,o,n,window),h=function(e,t){"use strict";var r,n={},o=function(e,t){return t?URL.createObjectURL(new Blob([e],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e)},a=function(e){e instanceof Blob&&URL.revokeObjectURL(e)},i='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',s=function(t){var r=document.createElement("canvas"),n=new Image,o=e.defer();return n.onload=function(){var e=r.getContext("2d");try{e.drawImage(n,0,0),r.toDataURL("image/png"),o.resolve(!0)}catch(e){o.resolve(!1)}},n.onerror=o.reject,n.src=t,o.promise},u=function(){var e=o(i,!0);return s(e).then(function(t){return a(e),!t&&s(o(i,!1)).then(function(e){return e})},function(){return!1})},c=function(){if(t.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch(e){}return!1},l=function(){var r=e.defer();return c&&t.URL?u().then(function(e){r.resolve(!e)},function(){r.reject()}):r.resolve(!1),r.promise},f=function(){return void 0===r&&(r=l()),r},h=function(e){return f().then(function(t){return o(e,t)})};return n.renderSvg=function(t){var r,n,o=e.defer(),i=function(){n.onload=null,n.onerror=null},s=function(){r&&a(r)};return n=new Image,n.onload=function(){i(),s(),o.resolve(n)},n.onerror=function(){s(),o.reject()},h(t).then(function(e){r=e,n.src=r},o.reject),o.promise},n}(o,window),p=function(e,t,r,n,o){"use strict";var a={},i=function(e,t){var r=t||1,n={width:e.width,height:e.height,"font-size":e.rootFontSize};return 1!==r&&(n.style="transform:scale("+r+"); transform-origin: 0 0;"),n},s=function(e){var t,r,n,o;t=Math.round(e.viewportWidth),r=Math.round(e.viewportHeight),n=-e.left,o=-e.top;var a={x:n,y:o,width:t,height:r};return a},u=function(e){var t=e.style||"";e.style=t+"float: left;"},c=function(e){e.externalResourcesRequired=!0},l=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},f=function(e){var t=Object.keys(e);return t.length?" "+t.map(function(t){return t+'="'+e[t]+'"'}).join(" "):""},h=function(e,r,n){var a=o.serializeToString(e);t.validateXHTML(a);var h=s(r);return u(h),c(h),'<svg xmlns="http://www.w3.org/2000/svg"'+f(i(r,n))+">"+l()+"<foreignObject"+f(h)+">"+a+"</foreignObject></svg>"};return a.getSvgForDocument=function(e,t,o){return r.rewriteTagNameSelectorsToLowerCase(e),n.needsEmWorkaround().then(function(r){return r&&n.workAroundWebKitEmSizeIssue(e),h(e,t,o)})},a.drawDocumentAsSvg=function(e,n){return["hover","active","focus","target"].forEach(function(t){n[t]&&r.fakeUserAction(e,n[t],t)}),t.calculateDocumentContentSize(e,n).then(function(t){return a.getSvgForDocument(e,t,n.zoom)})},a}(i,f,c,l,r),S=function(e,t,r,n,o,a){"use strict";var i={},s=function(e){return{message:"Error rendering page",originalError:e}},u=function(e){return o.renderSvg(e).then(function(t){return{image:t,svg:e}},function(e){throw s(e)})},c=function(e,t){try{t.getContext("2d").drawImage(e,0,0)}catch(e){throw s(e)}},l=function(e,t,r){return n.drawDocumentAsSvg(e,r).then(u).then(function(e){return t&&c(e.image,t),e})},f=function(e,n){return t.executeJavascript(e,n).then(function(e){var t=e.document;return r.persistInputValues(t),{document:t,errors:e.errors}})};return i.rasterize=function(t,r,n){var o;return o=e.clone(n),o.inlineScripts=n.executeJs===!0,a.inlineReferences(t,o).then(function(e){return n.executeJs?f(t,n).then(function(t){return{element:t.document.documentElement,errors:e.concat(t.errors)}}):{element:t,errors:e}}).then(function(e){return l(e.element,r,n).then(function(t){return{image:t.image,svg:t.svg,errors:e.errors}})})},i}(i,f,c,p,h,a),m=function(e,t,r){"use strict";var n={},o=function(e,t){var r=300,n=200,o=e?e.width:r,a=e?e.height:n,i=void 0!==t.width?t.width:o,s=void 0!==t.height?t.height:a;return{width:i,height:s}},a=function(t){var r,n=o(t.canvas,t.options);return r=e.clone(t.options),r.width=n.width,r.height=n.height,r};n.drawDocument=function(){var t=arguments[0],n=Array.prototype.slice.call(arguments,1),o=e.parseOptionalParameters(n),i=t.documentElement?t.documentElement:t;return r.rasterize(i,o.canvas,a(o))};var i=function(e,r,o){var a=t.parseHTML(e);return n.drawDocument(a,r,o)};n.drawHTML=function(){var t=arguments[0],r=Array.prototype.slice.call(arguments,1),n=e.parseOptionalParameters(r);return i(t,n.canvas,n.options)};var s=function(t,r,n){var o=document.implementation.createHTMLDocument("");o.replaceChild(t.documentElement,o.documentElement);var a=n?e.clone(n):{};return n.baseUrl||(a.baseUrl=r),{document:o,options:a}},u=function(e,r,o){return t.loadDocument(e,o).then(function(t){var a=s(t,e,o);return n.drawDocument(a.document,r,a.options)})};return n.drawURL=function(){var t=arguments[0],r=Array.prototype.slice.call(arguments,1),n=e.parseOptionalParameters(r);return u(t,n.canvas,n.options)},n}(i,f,S);return m})},{ayepromise:2,"css-mediaquery":8,inlineresources:30,"sane-domparser-error":40,url:3,xmlserializer:41}],40:[function(e,t,r){"use strict";var n=function(e){var t=new XMLSerializer;return Array.prototype.map.call(e.childNodes,function(e){return t.serializeToString(e)}).join("")},o=function(e){return"parsererror"===e.documentElement.tagName&&"http://www.mozilla.org/newlayout/xml/parsererror.xml"===e.documentElement.namespaceURI?e.documentElement:("xml"===e.documentElement.tagName||"html"===e.documentElement.tagName)&&e.documentElement.childNodes&&e.documentElement.childNodes.length>0&&"parsererror"===e.documentElement.childNodes[0].nodeName?e.documentElement.childNodes[0]:"html"===e.documentElement.tagName&&e.documentElement.childNodes&&e.documentElement.childNodes.length>0&&"body"===e.documentElement.childNodes[0].nodeName&&e.documentElement.childNodes[0].childNodes&&e.documentElement.childNodes[0].childNodes.length&&"parsererror"===e.documentElement.childNodes[0].childNodes[0].nodeName?e.documentElement.childNodes[0].childNodes[0]:void 0},a=[new RegExp("^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)\n?</div>"),new RegExp("^(.+)\n")],i=function(e){var t,r,o=n(e);for(t=0;t<a.length;t++)if(r=a[t].exec(o))return r[1]},s=function(e){var t;if(null===e)throw new Error("Parse error");var r=o(e);if(void 0!==r)throw t=i(r)||"Parse error",new Error(t)};r.failOnParseError=function(e){return s(e),e}},{}],41:[function(e,t,r){var n=function(e){return e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")},o=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")},a=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},i=function(e){var t=e.value;return" "+e.name+'="'+o(t)+'"'},s=function(e){var t=e.tagName;return"http://www.w3.org/1999/xhtml"===e.namespaceURI&&(t=t.toLowerCase()),t},u=function(e,t){var r=Array.prototype.map.call(e.attributes||e.attrs,function(e){return e.name}).indexOf("xmlns")>=0;return r||!t&&e.namespaceURI===e.parentNode.namespaceURI?"":' xmlns="'+e.namespaceURI+'"'},c=function(e){return Array.prototype.map.call(e.childNodes,function(e){return S(e)}).join("")},l=function(e,t){var r="<"+s(e);return r+=u(e,t),Array.prototype.forEach.call(e.attributes||e.attrs,function(e){r+=i(e)}),e.childNodes.length>0?(r+=">",r+=c(e),r+="</"+s(e)+">"):r+="/>",r},f=function(e){var t=e.nodeValue||e.value||"";return a(t)},h=function(e){return"<!--"+e.data.replace(/-/g,"&#45;")+"-->"},p=function(e){return"<![CDATA["+e.nodeValue+"]]>"},S=function(e,t){var r=t&&t.rootNode;return"#document"===e.nodeName||"#document-fragment"===e.nodeName?c(e):e.tagName?l(e,r):"#text"===e.nodeName?f(e):"#comment"===e.nodeName?h(e):"#cdata-section"===e.nodeName?p(e):void 0};r.serializeToString=function(e){return n(S(e,{rootNode:!0}))}},{}]},{},[1]);
4//# sourceMappingURL=scrolliris-readability-reflector-canvas.min.js.map