"); },B=function(){ var r=p+"text__",t=[],e=0; return{ push:function(n){ var a=""+r+e++; n.classList.add(a),t.push({ el:n, className:a, updated:!N }); }, forEach:function(r){ var e=[]; for(t.forEach(function(t,n){ t.updated&&(e.unshift(n),("undefined"==typeof r?"undefined":_typeof(r))&&r(t.el)); });e.length;)t.splice(e.shift(),1); }, update:function(r){ t.forEach(function(t){ t.updated||Array.prototype.some.call(r,function(r){ return r.classList.contains(t.className)?(t.el=r,t.updated=!0,!0):!1; }); }); } }; }(),$=B.push,J=B.forEach,U=B.update,D=function(){ var r=[],t=p+"pos__",e=0; return{ push:function(n,a){ var o=""+t+e++; n.classList.add(o),r.unshift({ el:n, className:o, cssKV:a, updated:!N }); }, "in":function(t,e){ var n=t.getBoundingClientRect(),a=[]; for(r.forEach(function(r,t){ if(r.updated){ r.rect||(r.rect=r.el.getBoundingClientRect()); var e=r.rect; n.top>=e.bottom||n.bottom<=e.top||n.left>=e.right||n.right<=e.left||a.unshift(t); } });a.length;){ var o=r.splice(a.shift(),1)[0]; "function"==typeof e&&e(o); } }, update:function(t){ r.forEach(function(r){ r.updated||Array.prototype.some.call(t,function(t){ return t.classList.contains(r.className)?(r.el=t,r.updated=!0,!0):!1; }); }); } }; }(),H=D.push,R=D.in,V=D.update,K=function(){ var r={ "ue-table-interlace-color-single":"#fcfcfc", "ue-table-interlace-color-double":"#f7faff" }; return function(t){ var e=null; return Array.prototype.some.call(t,function(t){ return r[t]?(e=r[t],!0):!1; }),e; }; }(),G=function Y(r,e,n){ var a=r.hsl().array(),i=r.alpha(),s=250,c=190,g=75,p=60,m=r.rgb().array(),v=(299*m[0]+587*m[1]+114*m[2])/1e3,y=void 0,w=""; if(n.isBgColor){ if(e.getAttribute(h)&&i>=.05&&e.removeAttribute(h),0===a[1]&&a[2]>40||v>s)y=t.hsl(0,0,Math.min(100,114-a[2]));else if(v>c){ var k=1e3*c/(299*m[0]+587*m[1]+114*m[2]); y=t.rgb(m[0]*k,m[1]*k,m[2]*k); }else a[2]<26&&(a[2]=26,y=t.hsl.apply(t,_toConsumableArray(a))); if(!n.hasInlineColor){ var M=e.getAttribute(l)||o,x=y||r,A=Y(t(M),e,{ isTextColor:!0, parentElementBgColorStr:x }); w+=A.newColor?z("color",A.newColor):z("color",M); } }else if(n.isTextColor||n.isBorderColor){ var C=n.parentElementBgColorStr||e.getAttribute(u)||f,E=t(C),_=E.rgb().array(),O=E.hsl().array(),j=E.alpha(),S=(299*_[0]+587*_[1]+114*_[2])/1e3,N=S*j+d*(1-j),F=function(r,e){ if(0===r[0]&&0===r[1]&&0===r[2])return t.rgb.apply(t,_toConsumableArray(r)); var n=1e3*e/(299*r[0]+587*r[1]+114*r[2]),a=Math.min(255,r[0]*n),o=Math.min(255,r[1]*n),i=Math.min(255,r[2]*n); return 0===o?o=(1e3*e-299*a-114*i)/587:0===a?a=(1e3*e-587*o-114*i)/299:0===i?i=(1e3*e-299*a-587*o)/114:255===a||255===i?o=(1e3*e-299*a-114*i)/587:255===o&&(i=(1e3*e-299*a-587*o)/114), t.rgb(a,o,i); }; if(!e.getAttribute(h))if(v>=s);else if(b>=N&&g>v)a[2]<=40&&(a[2]=90-a[2],m=t.hsl.apply(t,_toConsumableArray(a)).rgb().array(), v=(299*m[0]+587*m[1]+114*m[2])/1e3),y=v>=g?t.hsl.apply(t,_toConsumableArray(a)):F(m,g);else{ var P=Math.abs(N-v); if(p>P)if(N>100){ a[2]=90-a[2]; var q=t.hsl.apply(t,_toConsumableArray(a)).rgb().array(),I=(299*q[0]+587*q[1]+114*q[2])/1e3; y=p>N-I?F(q,N-p):t.hsl.apply(t,_toConsumableArray(a)); }else a[2]=O[2]+40,y=t.hsl.apply(t,_toConsumableArray(a)); } } return{ newColor:y&&y.alpha(i).rgb(), extStyle:w }; },W=function(n){ var a=n.nodeName.toLowerCase(); if(A.indexOf(a)>-1)return""; var i=n.style,f="",d=""; try{ !function(){ var d=y.indexOf(a)>-1,b=!1,p=!1,m=!1,v=void 0,w=void 0,k=(i.cssText&&i.cssText.split(";")||[]).map(function(r){ var t=r.indexOf(":"); return[r.slice(0,t).toLowerCase(),r.slice(t+1)].map(function(r){ return(r||"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""); }); }).filter(function(r){ var t=_slicedToArray(r,2),e=t[0],n=t[1]; return"color"===e?b=!0:/background/i.test(e)&&(p=!0,"background-position"===e?v=n:"background-size"===e&&(w=n)), (/background/i.test(e)||/^(-webkit-)?border-image/.test(e))&&/url\([^\)]*\)/i.test(n)&&(m=!0), ["-webkit-border-image","border-image","color","background-color","background-image","background","border","border-top","border-right","border-bottom","border-left","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color"].indexOf(e)>-1; }).sort(function(r,t){ var e=_slicedToArray(r,1),n=e[0],a=_slicedToArray(t,1),o=a[0]; return"color"===n?1:"background-image"===n&&"background-color"===o?1:-1; }); if(d&&!p){ var M=K(n.classList); M||(M=n.getAttribute("bgcolor")),M&&(k.unshift(["background-color",t(M).toString()]), p=!0); } k.forEach(function(a){ var d=_slicedToArray(a,2),y=d[0],k=d[1],M=k,x=!1,A=/ !important$/; k=k.replace(A,"").replace(e,function(t){ return"rgb("+r[t.toLowerCase()].toString()+")"; }); var C=/rgba?\([^)]+\)/gi,E=/^background/.test(y),_="color"===y,O=/^border/.test(y),j=/gradient/.test(k),S=function(r){ if(!r||r.length<1)return""; if(1===r.length)return r[0]; for(var e=r.shift(),n=r.pop();n;)e=t(e).mix(t(n)),n=r.pop(); return e; },N="",F=[],P=void 0; !m&&C.test(k)&&(j&&(k.replace(C,function(r){ return F.push(r); }),P=S([].concat(F))),k=k.replace(C,function(r){ j&&(r=P,x=!0); var e=G(t(r),n,{ isBgColor:E, isTextColor:_, isBorderColor:O, hasInlineColor:b }),a=e.newColor; return N+=e.extStyle,(E||_)&&!function(){ var e=E?u:l,o=E?c:s,i=a?a.toString():r; I(n).forEach(function(n){ n.setAttribute(e,i),n.setAttribute(o,r),E&&t(i).alpha()>=.05&&n.getAttribute(h)&&n.removeAttribute(h); }); }(),a&&(x=!0),a||r; }).replace(/\s?!\s?important/gi,"")),N&&(f+=N),n instanceof SVGElement||!function(){ var r=/^background/.test(y),t=/^(-webkit-)?border-image/.test(y); (r||t)&&/url\([^\)]*\)/i.test(k)&&!function(){ x=!0; var t=n.getAttribute(c)||g,e="rgba(0,0,0,0.1)"; k=k.replace(/^(.*?)url\(([^\)]*)\)(.*)$/i,function(a){ var o=a,i="",l="",u=""; return"1"!==n.getAttribute(h)&&I(n).forEach(function(r){ return r.setAttribute(h,"1"); }),r?(o="linear-gradient("+e+", "+e+"),"+a,u=z(y,o+",linear-gradient("+t+", "+t+")"), v&&(i="top left,"+v,f+=z("background-position",""+i),u+=z("background-position",i+",top left")), w&&(l="100%,"+w,f+=z("background-size",""+l),u+=z("background-size",l+",100%")), H(n,u)):!p&&H(n,z("background-image","linear-gradient("+e+", "+e+"),linear-gradient("+t+", "+t+")")), o; }),b||!function(){ var r=n.getAttribute(s)||o; f+=z("color",r),I(n).forEach(function(t){ return t.setAttribute(l,r); }); }(); }(); }(),x&&(A.test(M)&&(i[y]=M.replace(A,"")),j?H(n,z(y,k)):f+=z(y,k)); }); }(); }catch(b){ console.error(b); } if(f){ k&&n.setAttribute("data-style",i.cssText); var m=""+p+x++; n.classList.add(m),d+=f?q(m,f):""; } return L(n)&&(N?$(n):R(n,function(r){ d+=q(r.className,r.cssKV); })),d; },Q=function(r){ var t=arguments.length<=1||void 0===arguments[1]?{ type:"dom" }:arguments[1]; if(t.force&&(j=["",""]),null!==j)try{ r?"dom"===t.type?(E.length||(O.length?(E=O,O=[]):F&&(E=F.querySelectorAll("*"))), E.forEach(function(r){ if(r.className&&"string"==typeof r.className&&(r.className=r.className.replace(m,"")), S){ var t=r.getBoundingClientRect(),e=t.top,n=t.bottom; 0>=e&&0>=n?j[1]+=W(r):e>0&&v>e||n>0&&v>n?(_.push(r),j[0]+=W(r)):(S=!1,T(j[0]),_.forEach(function(r){ r.style.visibility="visible"; }),j[0]="",j[1]+=W(r)); }else j[1]+=W(r); })):"bg"===t.type&&J(function(r){ return R(r,function(r){ j[1]+=q(r.className,r.cssKV); }); }):(S=!1,N=!1,!P&&null===F&&"dom"===t.type&&E.length&&(E.forEach(function(r){ return O.push(r); }),E=[])),j[1]=j[0]+j[1],j[1]&&(T(j[1]),j=null,E=null,_=null); }catch(e){ console.error(e),(new Image).src="https://mp.weixin.qq.com/mp/jsmonitor?idkey=125617_0_1"; } },X=function(r,t){ return Q(C?"dark"===C:r.matches,t); }; return{ run:function(r,t){ this.init(t),this.convert(r); }, init:function(r){ r.whiteListName&&(A=A.concat(r.whiteListName)),void 0!==r.needJudgeFirstPage&&(S=r.needJudgeFirstPage), r.mode&&(C=r.mode),void 0!==r.delayBgJudge&&(N=r.delayBgJudge),r.container&&(F=r.container), void 0!==r.isSecOpen&&(P=r.isSecOpen),C||null!==M||(M=window.matchMedia(n),M.addListener(X)); }, convert:function(r){ var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1]; E=r||[],X(M,{ force:t, type:"dom" }); }, convertBg:function(r){ var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1]; E=r||[],P&&(V(E),U(E)),X(M,{ force:t, type:"bg" }); } }; });