luna-dom-highlighter
Version:
Highlighter for html elements
1 lines • 73.5 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LunaDomHighlighter=e():t.LunaDomHighlighter=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/assets/",n(n.s=43)}([function(t,e,n){var r=n(11),o=n(6),i=n(20);e=function(t,e,n){var a,s;if(e=i(e,n),r(t))for(a=0,s=t.length;a<s;a++)e(t[a],a,t);else{var c=o(t);for(a=0,s=c.length;a<s;a++)e(t[c[a]],c[a],t)}return t},t.exports=e},function(t,e,n){var r=n(16);e=function(t){return"[object String]"===r(t)},t.exports=e},function(t,e){e=function(t){return void 0===t},t.exports=e},function(t,e,n){var r=n(1),o=n(9),i=n(26);e=function(t){return o(r(t)?new i(t):t)},t.exports=e},function(t,e){e=function(t){var e=typeof t;return!!t&&("function"===e||"object"===e)},t.exports=e},function(t,e,n){var r=n(16);e=function(t){var e=r(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e},t.exports=e},function(t,e,n){var r=n(13);e=Object.keys?Object.keys:function(t){var e=[];for(var n in t)r(t,n)&&e.push(n);return e},t.exports=e},function(t,e,n){var r=n(10),o=n(9),i=n(57),a=n(22),s=n(59);var c=(e=function(t,e){return c.extend(t,e)}).Base=function t(e,n,c){c=c||{};var u=n.className||a(n,"initialize.name")||"";delete n.className;var l=function(){var t=o(arguments);return this.initialize&&this.initialize.apply(this,t)||this};if(!s)try{l=new Function("toArr","return function "+u+"(){var args = toArr(arguments);return this.initialize ? this.initialize.apply(this, args) || this : this;};")(o)}catch(t){}return i(l,e),l.prototype.constructor=l,l.extend=function(e,n){return t(l,e,n)},l.inherits=function(t){i(l,t)},l.methods=function(t){return r(l.prototype,t),l},l.statics=function(t){return r(l,t),l},l.methods(n).statics(c),l}(Object,{className:"Base",callSuper:function(t,e,n){return t.prototype[e].apply(this,n)},toString:function(){return this.constructor.name}});t.exports=e},function(t,e,n){var r=n(16);e=Array.isArray?Array.isArray:function(t){return"[object Array]"===r(t)},t.exports=e},function(t,e,n){var r=n(11),o=n(23),i=n(8),a=n(1);e=function(t){return t?i(t)?t:r(t)&&!a(t)?o(t):[t]:[]},t.exports=e},function(t,e,n){e=n(17)(n(21)),t.exports=e},function(t,e,n){var r=n(12),o=n(5),i=Math.pow(2,53)-1;e=function(t){if(!t)return!1;var e=t.length;return r(e)&&e>=0&&e<=i&&!o(t)},t.exports=e},function(t,e,n){var r=n(16);e=function(t){return"[object Number]"===r(t)},t.exports=e},function(t,e){var n=Object.prototype.hasOwnProperty;e=function(t,e){return n.call(t,e)},t.exports=e},function(t,e,n){var r=n(5),o=n(4),i=n(8),a=n(20),s=n(51),c=n(54),u=n(55);e=function(t,e,n){return null==t?c:r(t)?a(t,e,n):o(t)&&!i(t)?s(t):u(t)},t.exports=e},function(t,e,n){var r=n(68),o=n(1),i=n(11),a=n(69);e=function(t,e){return o(t)?t.indexOf(e)>-1:(i(t)||(t=a(t)),r(t,e)>=0)},t.exports=e},function(t,e){var n=Object.prototype.toString;e=function(t){return n.call(t)},t.exports=e},function(t,e,n){var r=n(2),o=n(0);e=function(t,e){return function(n){return o(arguments,(function(i,a){if(0!==a){var s=t(i);o(s,(function(t){e&&!r(n[t])||(n[t]=i[t])}))}})),n}},t.exports=e},function(t,e,n){var r=n(1),o=n(4),i=n(27),a=n(2),s=n(15),c=n(12),u=n(3),l=n(70),f=n(0);e=function(t,e,n){if(t=u(t),a(n)&&r(e))return function(t,e){return t.style[l(e)]||getComputedStyle(t,"").getPropertyValue(e)}(t[0],e);var p=e;o(p)||((p={})[e]=n),function(t,e){f(t,(function(t){var n=";";f(e,(function(t,e){e=l.dash(e),n+=e+":"+function(t,e){return c(e)&&!s(h,i(t))?e+"px":e}(e,t)+";"})),t.style.cssText+=n}))}(t,p)};var h=["column-count","columns","font-weight","line-weight","opacity","z-index","zoom"];t.exports=e},function(t,e,n){(function(r){var o=n(35);e=o?window:r,t.exports=e}).call(this,n(82))},function(t,e,n){var r=n(2);e=function(t,e,n){if(r(e))return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,o){return t.call(e,n,r,o)};case 4:return function(n,r,o,i){return t.call(e,n,r,o,i)}}return function(){return t.apply(e,arguments)}},t.exports=e},function(t,e,n){var r=n(6),o=n(48),i=n(49),a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols;e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.prototype,c=void 0===n||n,u=e.unenumerable,l=void 0!==u&&u,f=e.symbol,h=void 0!==f&&f,p=[];if((l||h)&&a){var d=r;l&&a&&(d=a);do{p=p.concat(d(t)),h&&s&&(p=p.concat(s(t)))}while(c&&(t=o(t))&&t!==Object.prototype);p=i(p)}else if(c)for(var v in t)p.push(v);else p=r(t);return p},t.exports=e},function(t,e,n){var r=n(2),o=n(56);e=function(t,e){var n;for(n=(e=o(e,t)).shift();!r(n);){if(null==(t=t[n]))return;n=e.shift()}return t},t.exports=e},function(t,e,n){var r=n(14),o=n(6),i=n(11);e=function(t,e,n){e=r(e,n);for(var a=!i(t)&&o(t),s=(a||t).length,c=Array(s),u=0;u<s;u++){var l=a?a[u]:u;c[u]=e(t[l],l,t)}return c},t.exports=e},function(t,e){e=function(t,e){return e=null==e?t.length-1:+e,function(){var n,r=Math.max(arguments.length-e,0),o=new Array(r);for(n=0;n<r;n++)o[n]=arguments[n+e];switch(e){case 0:return t.call(this,o);case 1:return t.call(this,arguments[0],o);case 2:return t.call(this,arguments[0],arguments[1],o)}var i=new Array(e+1);for(n=0;n<e;n++)i[n]=arguments[n];return i[e]=o,t.apply(this,i)}},t.exports=e},function(t,e,n){var r=n(4),o=n(8),i=n(10);e=function(t){return r(t)?o(t)?t.slice():i({},t):t},t.exports=e},function(t,e,n){var r=n(7),o=n(1),i=n(0),a=n(65),s=new(e=r({className:"Select",initialize:function(t){return this.length=0,t?o(t)?s.find(t):void(t.nodeType&&(this[0]=t,this.length=1)):this},find:function(t){var n=new e;return this.each((function(){a(n,this.querySelectorAll(t))})),n},each:function(t){return i(this,(function(e,n){t.call(e,n,e)})),this}}))(document);t.exports=e},function(t,e,n){var r=n(28);e=function(t){return r(t).join("-")},t.exports=e},function(t,e){var n=/([A-Z])/g,r=/[_.\- ]+/g,o=/(^-)|(-$)/g;e=function(t){return(t=t.replace(n,"-$1").toLowerCase().replace(r,"-").replace(o,"")).split("-")},t.exports=e},function(t,e,n){var r=n(28);function o(t,e){this[e]=t.replace(/\w/,(function(t){return t.toUpperCase()}))}e=function(t){var e=r(t),n=e[0];return e.shift(),e.forEach(o,e),n+=e.join("")},t.exports=e},function(t,e,n){var r=n(9),o=n(4),i=n(1),a=n(0),s=n(2),c=n(3);(e=function(t,e,n){if(t=c(t),s(n)&&i(e))return function(t,e){return t.getAttribute(e)}(t[0],e);var r=e;o(r)||((r={})[e]=n),function(t,e){a(t,(function(t){a(e,(function(e,n){t.setAttribute(n,e)}))}))}(t,r)}).remove=function(t,e){t=c(t),e=r(e),a(t,(function(t){a(e,(function(e){t.removeAttribute(e)}))}))},t.exports=e},function(t,e){e=function(t){var e=t?t.length:0;if(e)return t[e-1]},t.exports=e},function(t,e,n){var r=n(76),o=n(2),i=n(3),a=n(0);function s(t){return function(e,n,s,c){e=i(e),o(c)&&(c=s,s=void 0),a(e,(function(e){r[t](e,n,s,c)}))}}e={on:s("add"),off:s("remove")},t.exports=e},function(t,e,n){var r=n(9),o=n(77),i=n(3),a=n(1),s=n(0);function c(t){return a(t)?t.split(/\s+/):r(t)}e={add:function(t,n){t=i(t);var r=c(n);s(t,(function(t){var n=[];s(r,(function(r){e.has(t,r)||n.push(r)})),0!==n.length&&(t.className+=(t.className?" ":"")+n.join(" "))}))},has:function(t,e){t=i(t);var n=new RegExp("(^|\\s)"+e+"(\\s|$)");return o(t,(function(t){return n.test(t.className)}))},toggle:function(t,n){t=i(t),s(t,(function(t){if(!e.has(t,n))return e.add(t,n);e.remove(t,n)}))},remove:function(t,e){t=i(t);var n=c(e);s(t,(function(t){s(n,(function(e){t.classList.remove(e)}))}))}},t.exports=e},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.resetCanvasSize=e.getPlatform=e.pxToNum=e.executeAfterTransition=e.hasVerticalScrollbar=e.measuredScrollbarWidth=e.eventPage=e.eventClient=e.drag=e.classPrefix=void 0;var o=r(n(23)),i=r(n(79)),a=r(n(19)),s=r(n(83)),c=r(n(12)),u=r(n(15)),l=r(n(39)),f=r(n(89)),h=r(n(90));e.classPrefix=function(t){var e="luna-".concat(t,"-");function n(t){return(0,o.default)((0,i.default)(t).split(/\s+/),(function(t){return(0,u.default)(t,e)?t:t.replace(/[\w-]+/,(function(t){return"".concat(e).concat(t)}))})).join(" ")}return function(t){if(/<[^>]*>/g.test(t))try{var e=s.default.parse(t);return function t(e,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];n(i),i.content&&t(i.content,n)}}(e,(function(t){t.attrs&&t.attrs.class&&(t.attrs.class=n(t.attrs.class))})),s.default.stringify(e)}catch(e){return n(t)}return n(t)}};var p,d="ontouchstart"in a.default,v={start:"touchstart",move:"touchmove",end:"touchend"},m={start:"mousedown",move:"mousemove",end:"mouseup"};e.drag=function(t){return d?v[t]:m[t]},e.eventClient=function(t,e){var n="x"===t?"clientX":"clientY";return e[n]?e[n]:e.changedTouches?e.changedTouches[0][n]:0},e.eventPage=function(t,e){var n="x"===t?"pageX":"pageY";return e[n]?e[n]:e.changedTouches?e.changedTouches[0][n]:0},e.measuredScrollbarWidth=function(){if((0,c.default)(p))return p;if(!document)return 16;var t=document.createElement("div"),e=document.createElement("div");return t.setAttribute("style","display: block; width: 100px; height: 100px; overflow: scroll;"),e.setAttribute("style","height: 200px"),t.appendChild(e),document.body.appendChild(t),p=t.offsetWidth-t.clientWidth,document.body.removeChild(t),p},e.hasVerticalScrollbar=function(t){return t.scrollHeight>t.offsetHeight},e.executeAfterTransition=function(t,e){if((0,h.default)(t))return e();var n=function(r){r.target===t&&(t.removeEventListener("transitionend",n),e())};t.addEventListener("transitionend",n)},e.pxToNum=function(t){return(0,l.default)(t.replace("px",""))},e.getPlatform=function(){var t=(0,f.default)();return"os x"===t?"mac":t},e.resetCanvasSize=function(t){t.width=Math.round(t.offsetWidth*window.devicePixelRatio),t.height=Math.round(t.offsetHeight*window.devicePixelRatio)}},function(t,e){e="object"==typeof window&&"object"==typeof document&&9===document.nodeType,t.exports=e},function(t,e){e=function(t,e){return 0===t.indexOf(e)},t.exports=e},function(t,e,n){var r=n(38);e=function(t){return r(t).toLocaleLowerCase()},t.exports=e},function(t,e){e=function(t){return null==t?"":t.toString()},t.exports=e},function(t,e,n){var r=n(12),o=n(4),i=n(5),a=n(1);e=function(t){if(r(t))return t;if(o(t)){var e=i(t.valueOf)?t.valueOf():t;t=o(e)?e+"":e}return a(t)?+t:0===t?t:+t},t.exports=e},function(t,e){e=function(t,e){var n=t.length-e.length;return n>=0&&t.indexOf(e,n)===n},t.exports=e},function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function i(t,e){var n=t[3];return[(1-n)*e[0]+n*t[0],(1-n)*e[1]+n*t[1],(1-n)*e[2]+n*t[2],n+e[3]*(1-n)]}function a(t){var e=r(t,3),n=e[0],o=e[1],i=e[2];return.2126*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))}Object.defineProperty(e,"__esModule",{value:!0}),e.getContrastThreshold=e.isLargeFont=e.getAPCAThreshold=e.desiredLuminanceAPCA=e.contrastRatioByLuminanceAPCA=e.contrastRatioAPCA=e.luminanceAPCA=e.contrastRatio=e.luminance=e.rgbaToHsla=e.blendColors=void 0,e.blendColors=i,e.rgbaToHsla=function(t){var e=r(t,4),n=e[0],o=e[1],i=e[2],a=e[3],s=Math.max(n,o,i),c=Math.min(n,o,i),u=s-c,l=s+c,f=.5*l;return[c===s?0:n===s?(1/6*(o-i)/u+1)%1:o===s?1/6*(i-n)/u+1/3:1/6*(n-o)/u+2/3,0===f||1===f?0:f<=.5?u/l:u/(2-l),f,a]},e.luminance=a,e.contrastRatio=function(t,e){var n=a(i(t,e)),r=a(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)};function s(t){var e=r(t,3),n=e[0],o=e[1],i=e[2];return.2126729*Math.pow(n,2.4)+.7151522*Math.pow(o,2.4)+.072175*Math.pow(i,2.4)}function c(t){return t>.03?t:t+Math.pow(.03-t,1.45)}function u(t,e){if(t=c(t),e=c(e),Math.abs(t-e)<5e-4)return 0;var n=0;return 100*(n=e>=t?(n=1.25*(Math.pow(e,.55)-Math.pow(t,.58)))<.001?0:n<.078?n-12.82051282051282*n*.06:n-.06:(n=1.25*(Math.pow(e,.62)-Math.pow(t,.57)))>-.001?0:n>-.078?n-12.82051282051282*n*.06:n+.06)}e.luminanceAPCA=s,e.contrastRatioAPCA=function(t,e){return u(s(t),s(e))},e.contrastRatioByLuminanceAPCA=u,e.desiredLuminanceAPCA=function(t,e,n){function r(){return n?Math.pow(Math.abs(Math.pow(t,.62)-(-e-.06)/1.25),1/.57):Math.pow(Math.abs(Math.pow(t,.55)-(e+.06)/1.25),1/.58)}t=c(t),e/=100;var o=r();return(o<0||o>1)&&(n=!n,o=r()),o};var l=[[12,-1,-1,-1,-1,100,90,80,-1,-1],[14,-1,-1,-1,100,90,80,60,60,-1],[16,-1,-1,100,90,80,60,55,50,50],[18,-1,-1,90,80,60,55,50,40,40],[24,-1,100,80,60,55,50,40,38,35],[30,-1,90,70,55,50,40,38,35,40],[36,-1,80,60,50,40,38,35,30,25],[48,100,70,55,40,38,35,30,25,20],[60,90,60,50,38,35,30,25,20,20],[72,80,55,40,35,30,25,20,20,20],[96,70,50,35,30,25,20,20,20,20],[120,60,40,30,25,20,20,20,20,20]];function f(t,e){var n=72*parseFloat(t.replace("px",""))/96;return-1!==["bold","bolder","600","700","800","900"].indexOf(e)?n>=14:n>=18}l.reverse(),e.getAPCAThreshold=function(t,e){var n,i,a,s,c=parseFloat(t.replace("px","")),u=parseFloat(e);try{for(var f=o(l),h=f.next();!h.done;h=f.next()){var p=r(h.value),d=p[0],v=p.slice(1);if(c>=d)try{for(var m=(a=void 0,o([900,800,700,600,500,400,300,200,100].entries())),g=m.next();!g.done;g=m.next()){var y=r(g.value,2),b=y[0];if(u>=y[1]){var x=v[v.length-1-b];return-1===x?null:x}}}catch(t){a={error:t}}finally{try{g&&!g.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}}catch(t){n={error:t}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return null},e.isLargeFont=f;var h={aa:3,aaa:4.5},p={aa:4.5,aaa:7};e.getContrastThreshold=function(t,e){return f(t,e)?h:p}},function(t,e,n){var r=n(106);e={encode:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var o=t[n];e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},decode:function(t){var e=[],n=t.length;r(n)&&n--;for(var o=0;o<n;o+=2)e.push(parseInt(t.substr(o,2),16));return e}},t.exports=e},function(t,e,n){n(44),t.exports=n(45)},function(t,e,n){},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var c=s(n(46)),u=n(93),l=n(34),f=s(n(96)),h=s(n(100)),p=s(n(37)),d=s(n(0)),v=s(n(102)),m=s(n(42)),g=s(n(108)),y=s(n(10)),b=s(n(29)),x=s(n(15)),w=s(n(39)),C=s(n(109)),_=s(n(1));n(110);var S=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,{compName:"dom-highlighter"},n)||this;return r.overlay=new u.HighlightOverlay(window),r.reset=function(){var t=document.documentElement.clientWidth,e=document.documentElement.clientHeight;r.overlay.reset({viewportSize:{width:t,height:e},deviceScaleFactor:1,pageScaleFactor:1,pageZoomFactor:1,emulationScaleFactor:1,scrollX:window.scrollX,scrollY:window.scrollY})},r.initOptions(n,{showRulers:!1,showExtensionLines:!1,showInfo:!0,showStyles:!0,showAccessibilityInfo:!0,colorFormat:"hex",contentColor:"rgba(111, 168, 220, .66)",paddingColor:"rgba(147, 196, 125, .55)",borderColor:"rgba(255, 229, 153, .66)",marginColor:"rgba(246, 178, 107, .66)",monitorResize:!0}),r.overlay.setContainer(e),r.overlay.setPlatform("mac"),r.redraw=(0,h.default)((function(){r.reset(),r.draw()}),16),r.redraw(),r.bindEvent(),r}return o(e,t),e.prototype.highlight=function(t,e){e&&(0,y.default)(this.options,e),this.target=t,t instanceof HTMLElement&&this.options.monitorResize&&(this.resizeSensor&&this.resizeSensor.destroy(),this.resizeSensor=new f.default(t),this.resizeSensor.addListener(this.redraw)),this.redraw()},e.prototype.hide=function(){this.target=null,this.redraw()},e.prototype.intercept=function(t){this.interceptor=t},e.prototype.destroy=function(){window.removeEventListener("resize",this.redraw),window.removeEventListener("scroll",this.redraw),this.resizeSensor&&this.resizeSensor.destroy(),t.prototype.destroy.call(this)},e.prototype.draw=function(){var t=this.target;t&&(t instanceof Text?this.drawText(t):this.drawElement(t))},e.prototype.drawText=function(t){var e=this.options,n=document.createRange();n.selectNode(t);var r=n.getBoundingClientRect(),o=r.left,i=r.top,a=r.width,s=r.height;n.detach();var c={paths:[{path:this.rectToPath({left:o,top:i,width:a,height:s}),fillColor:M(e.contentColor),name:"content"}],showExtensionLines:e.showExtensionLines,showRulers:e.showRulers};e.showInfo&&(c.elementInfo={tagName:"#text",nodeWidth:a,nodeHeight:s}),this.overlay.drawHighlight(c)},e.prototype.drawElement=function(t){var e={paths:this.getPaths(t),showExtensionLines:this.options.showExtensionLines,showRulers:this.options.showRulers,colorFormat:this.options.colorFormat};if(this.options.showInfo&&(e.elementInfo=this.getElementInfo(t)),this.interceptor){var n=this.interceptor(e);n&&(e=n)}this.overlay.drawHighlight(e)},e.prototype.getPaths=function(t){var e=this.options,n=window.getComputedStyle(t),r=t.getBoundingClientRect(),o=r.left,i=r.top,a=r.width,s=r.height,c=function(t){return(0,l.pxToNum)(n.getPropertyValue(t))},u=c("margin-left"),f=c("margin-right"),h=c("margin-top"),p=c("margin-bottom"),d=c("border-left-width"),v=c("border-right-width"),m=c("border-top-width"),g=c("border-bottom-width"),y=c("padding-left"),b=c("padding-right"),x=c("padding-top"),w=c("padding-bottom");return[{path:this.rectToPath({left:o+d+y,top:i+m+x,width:a-d-y-v-b,height:s-m-x-g-w}),fillColor:M(e.contentColor),name:"content"},{path:this.rectToPath({left:o+d,top:i+m,width:a-d-v,height:s-m-g}),fillColor:M(e.paddingColor),name:"padding"},{path:this.rectToPath({left:o,top:i,width:a,height:s}),fillColor:M(e.borderColor),name:"border"},{path:this.rectToPath({left:o-u,top:i-h,width:a+u+f,height:s+h+p}),fillColor:M(e.marginColor),name:"margin"}]},e.prototype.getElementInfo=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height,o=t.getAttribute("class")||"";o=o.split(/\s+/).map((function(t){return"."+t})).join("");var i={tagName:(0,p.default)(t.tagName),className:o,idValue:t.id,nodeWidth:n,nodeHeight:r};return this.options.showStyles&&(i.style=this.getStyles(t)),this.options.showAccessibilityInfo&&(0,y.default)(i,this.getAccessibilityInfo(t)),i},e.prototype.getStyles=function(t){for(var e=window.getComputedStyle(t),n=!1,r=t.childNodes,o=0,i=r.length;o<i;o++)3===r[o].nodeType&&(n=!0);var a=[];return n&&a.push("color","font-family","font-size","line-height"),a.push("padding","margin","background-color"),T(e,a)},e.prototype.getAccessibilityInfo=function(t){var e=window.getComputedStyle(t);return i({showAccessibilityInfo:!0,contrast:i({contrastAlgorithm:"aa",textOpacity:.1},T(e,["font-size","font-weight","background-color","text-opacity"],!0)),isKeyboardFocusable:this.isFocusable(t)},this.getAccessibleNameAndRole(t))},e.prototype.isFocusable=function(t){var e=(0,p.default)(t.tagName);if((0,x.default)(["a","button","input","textarea","select","details"],e))return!0;var n=t.getAttribute("tabindex");return!!(n&&(0,w.default)(n)>-1)},e.prototype.getAccessibleNameAndRole=function(t){var e=t.getAttribute("labelledby")||t.getAttribute("aria-label"),n=t.getAttribute("role"),r=(0,p.default)(t.tagName);return C.default.forEach((function(e){var o,i;if(!n){var s=e[0],c=e[2];if(s===r){if(c)try{for(var u=a(c),l=u.next();!l.done;l=u.next()){var f=l.value;if(t.getAttribute(f[0])!==f[1])return}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}n=e[1]}}})),{accessibleName:e||t.getAttribute("title")||"",accessibleRole:n||"generic"}},e.prototype.bindEvent=function(){var t=this;window.addEventListener("resize",this.redraw),window.addEventListener("scroll",this.redraw),this.on("optionChange",(function(){return t.redraw()}))},e.prototype.rectToPath=function(t){var e=t.left,n=t.top,r=t.width,o=t.height,i=[];return i.push("M",e,n),i.push("L",e+r,n),i.push("L",e+r,n+o),i.push("L",e,n+o),i.push("Z"),i},e}(c.default);e.default=S,t.exports=S,t.exports.default=S;var P=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,A=/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)$/;function M(t){return(0,_.default)(t)?t:(t=t).a?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(t.a,")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")}function T(t,e,n){void 0===n&&(n=!1);var r={};return(0,d.default)(e,(function(e){var o,i=t["text-opacity"===e?"color":e];i&&(o=i,(P.test(o)||A.test(o))&&(i=function(t){var e=v.default.parse(t),n=e.val[3]||1;return e.val=e.val.slice(0,3),e.val.push(Math.round(255*n)),"#"+(0,g.default)(m.default.encode(e.val))}(i),"text-opacity"===e&&(i=i.slice(7),i=m.default.decode(i)[0]/255)),n&&(e=(0,b.default)(e)),r[e]=i)})),r}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(47)),s=i(n(64)),c=n(34),u=i(n(0)),l=i(n(10)),f=i(n(91)),h=i(n(92)),p=function(t){function e(e,n,r){var o=n.compName,i=(void 0===r?{}:r).theme,a=void 0===i?"light":i,l=t.call(this)||this;return l.subComponents=[],l.compName=o,l.c=(0,c.classPrefix)(o),l.options={},l.container=e,l.$container=(0,s.default)(e),l.$container.addClass(["luna-".concat(o),l.c("platform-".concat((0,c.getPlatform)()))]),l.on("optionChange",(function(t,e,n){var r=l.c;"theme"===t&&(l.$container.rmClass(r("theme-".concat(n))).addClass(r("theme-".concat(e))),(0,u.default)(l.subComponents,(function(t){return t.setOption("theme",e)})))})),l.setOption("theme",a),l}return o(e,t),e.prototype.destroy=function(){this.destroySubComponents();var t=this.c;this.$container.rmClass("luna-".concat(this.compName)).rmClass(t("platform-".concat((0,c.getPlatform)()))).rmClass(t("theme-".concat(this.options.theme))),this.$container.html(""),this.emit("destroy"),this.removeAllListeners()},e.prototype.setOption=function(t,e){var n=this,r=this.options,o={};"string"==typeof t?o[t]=e:o=t,(0,u.default)(o,(function(t,e){var o=r[e];r[e]=t,n.emit("optionChange",e,t,o)}))},e.prototype.getOption=function(t){return this.options[t]},e.prototype.addSubComponent=function(t){t.setOption("theme",this.options.theme),this.subComponents.push(t)},e.prototype.removeSubComponent=function(t){(0,h.default)(this.subComponents,(function(e){return e===t}))},e.prototype.destroySubComponents=function(){(0,u.default)(this.subComponents,(function(t){return t.destroy()})),this.subComponents=[]},e.prototype.initOptions=function(t,e){void 0===e&&(e={}),(0,f.default)(t,e),(0,l.default)(this.options,t)},e.prototype.find=function(t){return this.$container.find(this.c(t))},e}(a.default);e.default=p},function(t,e,n){var r=n(7),o=n(13),i=n(0),a=n(60),s=n(61),c=n(25);e=r({initialize:function(){this._events=this._events||{}},on:function(t,e){return this._events[t]=this._events[t]||[],this._events[t].push(e),this},off:function(t,e){var n=this._events;if(o(n,t)){var r=n[t].indexOf(e);return r>-1&&n[t].splice(r,1),this}},once:function(t,e){return this.on(t,s(e)),this},emit:function(t){var e=this;if(o(this._events,t)){var n=a(arguments,1),r=c(this._events[t]);return i(r,(function(t){return t.apply(e,n)}),this),this}},removeAllListeners:function(t){return t?delete this._events[t]:this._events={},this}},{mixin:function(t){i(["on","off","once","emit","removeAllListeners"],(function(n){t[n]=e.prototype[n]})),t._events=t._events||{}}}),t.exports=e},function(t,e,n){var r=n(4),o=n(5),i=Object.getPrototypeOf,a={}.constructor;e=function(t){if(r(t)){if(i)return i(t);var e=t.__proto__;return e||null===e?e:o(t.constructor)?t.constructor.prototype:t instanceof a?a.prototype:void 0}},t.exports=e},function(t,e,n){var r=n(50);function o(t,e){return t===e}e=function(t,e){return e=e||o,r(t,(function(t,n,r){for(var o=r.length;++n<o;)if(e(t,r[n]))return!1;return!0}))},t.exports=e},function(t,e,n){var r=n(14),o=n(0);e=function(t,e,n){var i=[];return e=r(e,n),o(t,(function(t,n,r){e(t,n,r)&&i.push(t)})),i},t.exports=e},function(t,e,n){var r=n(52),o=n(53);e=function(t){return t=r({},t),function(e){return o(e,t)}},t.exports=e},function(t,e,n){var r=n(6);e=n(17)(r),t.exports=e},function(t,e,n){var r=n(6);e=function(t,e){var n=r(e),o=n.length;if(null==t)return!o;t=Object(t);for(var i=0;i<o;i++){var a=n[i];if(e[a]!==t[a]||!(a in t))return!1}return!0},t.exports=e},function(t,e){e=function(t){return t},t.exports=e},function(t,e,n){var r=n(8),o=n(22);e=function(t){return r(t)?function(e){return o(e,t)}:(e=t,function(t){return null==t?void 0:t[e]});var e},t.exports=e},function(t,e,n){var r=n(13),o=n(8);e=function(t,e){if(o(t))return t;if(e&&r(e,t))return[t];var n=[];return t.replace(i,(function(t,e,r,o){n.push(r?o.replace(a,"$1"):e||t)})),n};var i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;t.exports=e},function(t,e,n){var r=n(58);e=function(t,e){t.prototype=r(e.prototype)},t.exports=e},function(t,e,n){var r=n(4);e=function(t){if(!r(t))return{};if(o)return o(t);function e(){}return e.prototype=t,new e};var o=Object.create;t.exports=e},function(t,e,n){var r=n(5);e="undefined"!=typeof wx&&r(wx.openLocation),t.exports=e},function(t,e){e=function(t,e,n){var r=t.length;e=null==e?0:e<0?Math.max(r+e,0):Math.min(e,r),n=null==n?r:n<0?Math.max(r+n,0):Math.min(n,r);for(var o=[];e<n;)o.push(t[e++]);return o},t.exports=e},function(t,e,n){e=n(62)(n(63),2),t.exports=e},function(t,e,n){var r=n(24),o=n(9);e=r((function(t,e){return function(){var n=[];return n=(n=n.concat(e)).concat(o(arguments)),t.apply(this,n)}})),t.exports=e},function(t,e){e=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},t.exports=e},function(t,e,n){var r=n(26),o=n(66),i=n(67),a=n(18),s=n(30),c=n(73),u=n(31),l=n(74),f=n(75),h=n(32),p=n(33),d=n(78),v=n(2),m=n(1);e=function(t){return new r(t)},r.methods({offset:function(){return o(this)},hide:function(){return this.css("display","none")},show:function(){return i(this),this},first:function(){return e(this[0])},last:function(){return e(u(this))},get:function(t){return this[t]},eq:function(t){return e(this[t])},on:function(t,e,n){return h.on(this,t,e,n),this},off:function(t,e,n){return h.off(this,t,e,n),this},html:function(t){var e=c.html(this,t);return v(t)?e:this},text:function(t){var e=c.text(this,t);return v(t)?e:this},val:function(t){var e=c.val(this,t);return v(t)?e:this},css:function(t,e){var n=a(this,t,e);return g(t,e)?n:this},attr:function(t,e){var n=s(this,t,e);return g(t,e)?n:this},data:function(t,e){var n=f(this,t,e);return g(t,e)?n:this},rmAttr:function(t){return s.remove(this,t),this},remove:function(){return l(this),this},addClass:function(t){return p.add(this,t),this},rmClass:function(t){return p.remove(this,t),this},toggleClass:function(t){return p.toggle(this,t),this},hasClass:function(t){return p.has(this,t)},parent:function(){return e(this[0].parentNode)},append:function(t){return d.append(this,t),this},prepend:function(t){return d.prepend(this,t),this},before:function(t){return d.before(this,t),this},after:function(t){return d.after(this,t),this}});var g=function(t,e){return v(e)&&m(t)};t.exports=e},function(t,e,n){e=n(24)((function(t,e){for(var n=t.length,r=0,o=e.length;r<o;r++)for(var i=e[r],a=0,s=i.length;a<s;a++)t[n++]=i[a];return t.length=n,t})),t.exports=e},function(t,e,n){var r=n(3);e=function(t){var e=(t=r(t))[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},t.exports=e},function(t,e,n){var r=n(0),o=n(3);e=function(t){t=o(t),r(t,(function(t){(function(t){return"none"==getComputedStyle(t,"").getPropertyValue("display")})(t)&&(t.style.display=function(t){var e,n;i[t]||(e=document.createElement(t),document.documentElement.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),i[t]=n);return i[t]}(t.nodeName))}))};var i={};t.exports=e},function(t,e){e=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},t.exports=e},function(t,e,n){var r=n(0);e=function(t){var e=[];return r(t,(function(t){e.push(t)})),e},t.exports=e},function(t,e,n){var r=n(71),o=n(29),i=n(72),a=n(13),s=n(27);(e=r((function(t){if(t=t.replace(u,""),t=o(t),a(l,t))return t;for(var e=c.length;e--;){var n=c[e]+i(t);if(a(l,n))return n}return t}))).dash=r((function(t){var n=e(t);return(u.test(n)?"-":"")+s(n)}));var c=["O","ms","Moz","Webkit"],u=/^(O)|(ms)|(Moz)|(Webkit)|(-o-)|(-ms-)|(-moz-)|(-webkit-)/g,l=document.createElement("p").style;t.exports=e},function(t,e,n){var r=n(13);e=function(t,e){var n=function(o){var i=n.cache,a=""+(e?e.apply(this,arguments):o);return r(i,a)||(i[a]=t.apply(this,arguments)),i[a]};return n.cache={},n},t.exports=e},function(t,e){e=function(t){return t.length<1?t:t[0].toUpperCase()+t.slice(1)},t.exports=e},function(t,e,n){var r=n(2),o=n(0),i=n(3);function a(t){return function(e,n){var a=(e=i(e))[0];if(r(n))return a?a[t]:"";a&&o(e,(function(e){e[t]=n}))}}e={html:a("innerHTML"),text:a("textContent"),val:a("value")},t.exports=e},function(t,e,n){var r=n(0),o=n(3);e=function(t){t=o(t),r(t,(function(t){var e=t.parentNode;e&&e.removeChild(t)}))},t.exports=e},function(t,e,n){var r=n(30),o=n(1),i=n(4),a=n(0);n(3);e=function(t,e,n){var s=e;return o(e)&&(s="data-"+e),i(e)&&(s={},a(e,(function(t,e){s["data-"+e]=t}))),r(t,s,n)},t.exports=e},function(t,e,n){var r=n(7),o=n(15);function i(){return!0}function a(){return!1}function s(t){var n,r=this.events[t.type],o=c.call(this,t,r);t=new e.Event(t);for(var i,a,s=0;(a=o[s++])&&!t.isPropagationStopped();)for(t.curTarget=a.el,i=0;(n=a.handlers[i++])&&!t.isImmediatePropagationStopped();)!1===n.handler.apply(a.el,[t])&&(t.preventDefault(),t.stopPropagation())}function c(t,e){var n,r,i,a,s=t.target,c=[],u=e.delegateCount;if(s.nodeType)for(;s!==this;s=s.parentNode||this){for(r=[],a=0;a<u;a++)void 0===r[n=(i=e[a]).selector+" "]&&(r[n]=o(this.querySelectorAll(n),s)),r[n]&&r.push(i);r.length&&c.push({el:s,handlers:r})}return u<e.length&&c.push({el:this,handlers:e.slice(u)}),c}e={add:function(t,e,n,r){var o,i={selector:n,handler:r};t.events||(t.events={}),(o=t.events[e])||((o=t.events[e]=[]).delegateCount=0,t.addEventListener(e,(function(){s.apply(t,arguments)}),!1)),n?o.splice(o.delegateCount++,0,i):o.push(i)},remove:function(t,e,n,r){var o=t.events;if(o&&o[e])for(var i,a=o[e],s=a.length;s--;)i=a[s],n&&i.selector!=n||i.handler!=r||(a.splice(s,1),i.selector&&a.delegateCount--)},Event:r({className:"Event",initialize:function(t){this.origEvent=t},isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a,preventDefault:function(){var t=this.origEvent;this.isDefaultPrevented=i,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.origEvent;this.isPropagationStopped=i,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.origEvent;this.isImmediatePropagationStopped=i,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}})},t.exports=e},function(t,e,n){var r=n(14),o=n(11),i=n(6);e=function(t,e,n){e=r(e,n);for(var a=!o(t)&&i(t),s=(a||t).length,c=0;c<s;c++){var u=a?a[c]:c;if(e(t[u],u,t))return!0}return!1},t.exports=e},function(t,e,n){var r=n(0),o=n(3),i=n(1);function a(t){return function(e,n){e=o(e),r(e,(function(e){if(i(n))e.insertAdjacentHTML(t,n);else{var r=e.parentNode;switch(t){case"beforebegin":r&&r.insertBefore(n,e);break;case"afterend":r&&r.insertBefore(n,e.nextSibling);break;case"beforeend":e.appendChild(n);break;case"afterbegin":e.prepend(n)}}}))}}e={before:a("beforebegin"),after:a("afterend"),append:a("beforeend"),prepend:a("afterbegin")},t.exports=e},function(t,e,n){var r=n(80),o=n(81);e=function(t,e){return null==e&&t.trim?t.trim():r(o(t,e),e)},t.exports=e},function(t,e){var n=/^\s+/;e=function(t,e){if(null==e)return t.trimLeft?t.trimLeft():t.replace(n,"");for(var r,o,i=0,a=t.length,s=e.length,c=!0;c&&i<a;)for(c=!1,r=-1,o=t.charAt(i);++r<s;)if(o===e[r]){c=!0,i++;break}return i>=a?"":t.substr(i,a)},t.exports=e},function(t,e){e=function(t,e){if(null==e){if(t.trimRight)return t.trimRight();e=" \r\n\t\f\v"}for(var n,r,o=t.length-1,i=e.length,a=!0;a&&o>=0;)for(a=!1,n=-1,r=t.charAt(o);++n<i;)if(r===e[n]){a=!0,o--;break}return o>=0?t.substring(0,o+1):""},t.exports=e},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(84),o=n(86),i=n(8),a=n(0),s=n(1),c=n(88);var u=function(t){return t.replace(/"/g,'"')},l=function(t){return t.replace(/"/g,""")};e={parse:function(t){var e=[],n=new o;return r(t,{start:function(t,e){e=c(e,(function(t){return u(t)})),n.push({tag:t,attrs:e})},end:function(){var t=n.pop();if(n.size){var r=n.peek();i(r.content)||(r.content=[]),r.content.push(t)}else e.push(t)},comment:function(t){var r="\x3c!--".concat(t,"--\x3e"),o=n.peek();o?(o.content||(o.content=[]),o.content.push(r)):e.push(r)},text:function(t){var r=n.peek();r?(r.content||(r.content=[]),r.content.push(t)):e.push(t)}}),e},stringify:function t(e){var n="";return i(e)?a(e,(function(e){return n+=t(e)})):s(e)?n=e:(n+="<".concat(e.tag),a(e.attrs,(function(t,e){return n+=" ".concat(e,'="').concat(l(t),'"')})),n+=">",e.content&&(n+=t(e.content)),n+="</".concat(e.tag,">")),n}},t.exports=e},function(t,e,n){var r=n(31),o=n(85),i=n(36),a=n(37);e=function(t,e){for(var n,o=[],h=t;t;){if(n=!0,r(o)&&f[r(o)]){var p=new RegExp("</".concat(r(o),"[^>]*>")).exec(t);if(p){var d=t.substring(0,p.index);t=t.substring(p.index+p[0].length),d&&e.text&&e.text(d)}C("",r(o))}else{if(i(t,"\x3c!--")){var v=t.indexOf("--\x3e");v>=0&&(e.comment&&e.comment(t.substring(4,v)),t=t.substring(v+3),n=!1)}else if(i(t,"<!")){var m=t.match(s);m&&(e.text&&e.text(t.substring(0,m[0].length)),t=t.substring(m[0].length),n=!1)}else if(i(t,"</")){var g=t.match(c);g&&(t=t.substring(g[0].length),g[0].replace(c,C),n=!1)}else if(i(t,"<")){var y=t.match(u);y&&(t=t.substring(y[0].length),y[0].replace(u,w),n=!1)}if(n){var b=t.indexOf("<"),x=b<0?t:t.substring(0,b);t=b<0?"":t.substring(b),e.text&&e.text(x)}}if(h===t)throw Error("Parse Error: "+t);h=t}function w(t,n,r,i){if(n=a(n),(i=!!i)||o.push(n),e.start){var s={};r.replace(l,(function(t,e,n,r,o){s[e]=n||r||o||""})),e.start(n,s,i)}}function C(t,n){var r;if(n=a(n))for(r=o.length-1;r>=0&&o[r]!==n;r--);else r=0;if(r>=0){for(var i=o.length-1;i>=r;i--)e.end&&e.end(o[i]);o.length=r}}C()};var s=/^<!\s*doctype((?:\s+[\w:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/i,c=/^<\/([-A-Za-z0-9_]+)[^>]*>/,u=/^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_:@.]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/i,l=/([-A-Za-z0-9_:@.]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,f=o("script,style".split(","));t.exports=e},function(t,e,n){var r=n(0),o=n(2),i=n(5);e=function(t,e){o(e)&&(e=!0);var n=i(e),a={};return r(t,(function(t){a[t]=n?e(t):e})),a},t.exports=e},function(t,e,n){var r=n(7),o=n(87);e=r({initialize:function(){this.clear()},clear:function(){this._items=[],this.size=0},push:function(t){return this._items.push(t),++this.size},pop:function(){if(this.size)return this.size--,this._items.pop()},peek:function(){return this._items[this.size-1]},forEach:function(t,e){e=arguments.length>1?e:this;for(var n=this._items,r=this.size-1,o=0;r>=0;r--,o++)t.call(e,n[r],o,this)},toArr:function(){return o(this._items)}}),t.exports=e},function(t,e){e=function(t){var e=t.length,n=Array(e);e--;for(var r=0;r<=e;r++)n[e-r]=t[r];return n},t.exports=e},function(t,e,n){var r=n(14),o=n(6);e=function(t,e,n){e=r(e,n);for(var i=o(t),a=i.length,s={},c=0;c<a;c++){var u=i[c];s[u]=e(t[u],u,t)}return s},t.exports=e},function(t,e,n){var r=n(35);e=function(t){if(t=(t=t||(r?navigator.userAgent:"")).toLowerCase(),e("windows phone"))return"windows phone";if(e("win"))return"windows";if(e("android"))return"android";if(e("ipad")||e("iphone")||e("ipod"))return"ios";if(e("mac"))return"os x";if(e("linux"))return"linux";function e(e){return t.indexOf(e)>-1}return"unknown"},t.exports=e},function(t,e,n){var r=n(19),o=r.getComputedStyle,i=r.document;function a(t,e){return t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom}e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.display,r=void 0===n||n,s=e.visibility,c=void 0!==s&&s,u=e.opacity,l=void 0!==u&&u,f=e.size,h=void 0!==f&&f,p=e.viewport,d=void 0!==p&&p,v=e.overflow,m=void 0!==v&&v;if(r)return null===t.offsetParent;var g=o(t);if(c&&"hidden"===g.visibility)return!0;if(l){if("0"===g.opacity)return!0;for(var y=t;y=y.parentElement;){var b=o(y);if("0"===b.opacity)return!0}}var x=t.getBoundingClientRect();if(h&&(0===x.width||0===x.height))return!0;if(d){var w={top:0,left:0,right:i.documentElement.clientWidth,bottom:i.documentElement.clientHeight};return a(x,w)}if(m)for(var C=t;C=C.parentElement;){var _=o(C),S=_.overflow;if("scroll"===S||"hidden"===S){var P=C.getBoundingClientRect();if(a(x,P))return!0}}return!1},t.exports=e},function(t,e,n){e=n(17)(n(21),!0),t.exports=e},function(t,e,n){var r=n(14);e=function(t,e,n){var o=[];e=r(e,n);for(var i=-1,a=t.length;++i<a;){var s=t[i];e(s,i,t)&&(o.push(s),t.splice(i,1))}return o},t.exports=e},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightOverlay=void 0;var a=i(n(40)),s=n(41),c=n(94),u=n(95),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gridLabelState={gridLayerCounter:0},e}return o(e,t),e.prototype.setContainer=function(t){this._container=t},e.prototype.setPlatform=function(e){this.container&&this.container.classList.add("luna-dom-highlighter-platform-"+e),t.prototype.setPlatform.call(this,e)},Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),e.prototype.reset=function(e){t.prototype.reset.call(this,e),this.tooltip.innerHTML="",this.gridLabelState.gridLayerCounter=0},e.prototype.install=function(){var e=this.document.createElement("canvas");e.classList.add("luna-dom-highlighter-fill"),this.container.appendChild(e);var n=this.document.createElement("div");this.container.appendChild(n),this.tooltip=n,this.setCanvas(e),t.prototype.install.call(this)},e.prototype.uninstall=function(){this.document.body.classList.remove("fill"),this.document.body.innerHTML="",t.prototype.uninstall.call(this)},e.prototype.drawHighlight=function(t){this.context.save();for(var e=(0,u.emptyBounds)(),n=t.paths.slice();n.length;){var r=n.pop();r&&(this.context.save(),(0,u.drawPath)(this.context,r.path,r.fillColor,r.outlineColor,void 0,e,this.emulationScaleFactor),n.length&&(this.context.globalCompositeOperation="destination-out",(0,u.drawPath)(this.context,n[n.length-1].path,"red",void 0,void 0,e,this.emulationScaleFactor)),this.context.restore())}this.context.restore(),this.context.save();var o=Boolean(t.paths.length&&t.showRulers&&e.minX<20&&e.maxX+20<this.canvasWidth),i=Boolean(t.paths.length&&t.showRulers&&e.minY<20&&e.maxY+20<this.canvasHeight);return t.showRulers&&this.drawAxis(this.context,o,i),t.paths.length&&(t.showExtensionLines&&function(t,e,n,r,o,i,a,s){t.save();var c=a,u=s;t.strokeStyle=o||"rgba(128, 128, 128, 0.3)",t.lineWidth=1,t.translate(.5,.5),i&&t.setLineDash([3,3]);if(n)for(var l in e.rightmostXForY)t.beginPath(),t.moveTo(c,Number(l)),t.lineTo(e.rightmostXForY[l],Number(l)),t.stroke();else for(var l in e.leftmostXForY)t.beginPath(),t.moveTo(0,Number(l)),t.lineTo(e.leftmostXForY[l],Number(l)),t.stroke();if(r)for(var f in e.bottommostYForX)t.beginPath(),t.moveTo(Number(f),u),t.lineTo(Number(f),e.topmostYForX[f]),t.stroke();else for(var f in e.topmostYForX)t.beginPath(),t.moveTo(Number(f),0),t.lineTo(Number(f),e.topmostYForX[f]),t.stroke();t.restore()}(this.context,e,o,i,void 0,!1,this.canvasWidth,this.canvasHeight),t.elementInfo&&function(t,e,n,r,o,i){t.innerHTML="";var l=(0,c.createChild)(t,"div"),f=(0,c.createChild)(l,"div","tooltip-content"),h=function(t,e){var n=(0,c.createElement)("div","element-info"),r=(0,c.createChild)(n,"div","element-info-header"),o=function(t){if(t.layoutObjectName&&(0,a.default)(t.layoutObjectName,"Grid"))return"grid";if(t.layoutObjectName&&"LayoutNGFlexibleBox"===t.layoutObjectName)return"flex";return null}(t);o&&(0,c.createChild)(r,"div","element-layout-type ".concat(o));var i=(0,c.createChild)(r,"div","element-description");(0,c.createChild)(i,"span","material-tag-name").textContent=t.tagName;var l=(0,c.createChild)(i,"span","material-node-id");l.textContent=t.idValue?"#"+(0,c.ellipsify)(t.idValue,80):"",l.classList.toggle("hidden",!t.idValue);var f=(0,c.createChild)(i,"span","material-class-name");l.textContent.length<80&&(f.textContent=(0,c.ellipsify)(t.className||"",80-l.textContent.length));f.classList.toggle("hidden",!t.className);var h=(0,c.createChild)(r,"div","dimensions");(0,c.createChild)(h,"span","material-node-width").textContent=String(Math.round(100*t.nodeWidth)/100),(0,c.createTextChild)(h,"×"),(0,c.createChild)(h,"span","material-node-height").textContent=String(Math.round(100*t.nodeHeight)/100);var p,d=t.style||{};t.isLockedAncestor&&M("Showing content-visibility ancestor","");t.isLocked&&M("Descendants are skipped due to content-visibility","");var v=d.color;v&&"#00000000"!==v&&T("Color",v,e);var m=d["font-family"],g=d["font-size"];m&&"0px"!==g&&M("Font","".concat(g," ").concat(m));var y=d["background-color"];y&&"#00000000"!==y&&T("Background",y,e);var b=d.margin;b&&"0px"!==b&&M("Margin",b);var x=d.padding;x&&"0px"!==x&&M("Padding",x);var w=t.contrast?t.contrast.backgroundColor:null,C=v&&"#00000000"!==v&&w&&"#00000000"!==w;t.showAccessibilityInfo&&(!function(t){P();var e=(0,c.createChild)(p,"div","element-info-row element-info-section");(0,c.createChild)(e,"div","section-name").textContent=t,(0,c.createChild)((0,c.createChild)(e,"div","separator-container"),"div","separator")}("Accessibility"),C&&d.color&&t.contrast&&function(t,e){var n=(0,u.parseHexa)(t),r=(0,u.parseHexa)(e.backgroundColor);n[3]*=e.textOpacity;var o=A("Contrast","","element-info-value-contrast"),i=(0,c.createChild)(o,"div","contrast-text");i.style.color=(0,u.formatRgba)(n,"rgb"),i.style.backgroundColor=e.backgroundColor,i.textContent="Aa";var a=(0,c.createChild)(o,"span");if("apca"===e.contrastAlgorithm){var l=(0,s.contrastRatioAPCA)(n,r),f=(0,s.getAPCAThreshold)(e.fontSize,e.fontWeight);a.textContent=String(Math.floor(100*l)/100)+"%",(0,c.createChild)(o,"div",null===f||Math.abs(l)<f?"a11y-icon a11y-icon-warning":"a11y-icon a11y-icon-ok")}else if("aa"===e.contrastAlgorithm||"aaa"===e.contrastAlgorithm){var h=(0,s.contrastRatio)(n,r);f=(0,s.getContrastThreshold)(e.fontSize,e.fontWeight)[e.contrastAlgorithm];a.textContent=String(Math.floor(100*h)/100),(0,c.createChild)(o,"div",h<f?"a11y-icon a11y-icon-warning":"a11y-icon a11y-icon-ok")}}(d.color,t.contrast),M("Name",t.accessibleName),M("Role",t.accessibleRole),_="Keyboard-focusable",S=t.isKeyboardFocusable?"a11y-icon a11y-icon-ok":"a11y-icon a11y-icon-not-ok",(0,c.createChild)(A(_,"","element-info-value-icon"),"div",S));var _,S;function P(){p||(p=(0,c.createChild)(n,"div","element-info-body"))}function A(t,e,n){P();var r=(0,c.createChild)(p,"div","element-info-row");return e&&r.classList.add(e),(0,c.createChild)(r,"div","element-info-name").textContent=t,(0,c.createChild)(r,"div","element-info-gap"),(0,c.createChild)(r,"div",n||"")}function M(t,e){(0,c.createTextChild)(A(t,"","element-info-value-text"),e)}function T(t,e,n){var r=A(t,"","element-info-value-color"),o=(0,c.createChild)(r,"div","color-swatch");(0,c.createChild)(o,"div","color-swatch-inner").style.backgroundColor=e,(0,c.createTextChild)(r,(0,u.formatColor)(e,n))}return n}(e,n);f.appendChild(h);var p,d=f.offsetWidth,v=f.offsetHeight,m=o-2-10-16;if(r.maxX-r.minX<36)p=.5*(r.minX+r.maxX)-8;else{var g=r.minX+10,y=r.maxX-10-16;p=g>12&&g<m?g:(0,c.constrainNumber)(12,g,y)}var b=p<12||p>m,x=p-10;x=(0,c.constrainNumber)(x,2,o-d-2);var w=r.minY-8-v,C=!0;w<0?(w=Math.min(i-v,r.maxY+8),C=!1):r.minY>i&&(w=i-8-v);var _=x>=r.minX&&x+d<=r.maxX&&w>=r.minY&&w+v<=r.maxY;if(x<r.maxX&&x+d>r.minX&&w<r.maxY&&w+v>r.minY&&!_)return void(f.style.display="none");if(f.style.top=w+"px",f.style.left=x+"px",b)return;var S=(0,c.createChild)(f,"div","tooltip-arrow");S.style.clipPath=C?"polygon(0 0, 100% 0, 50% 100%)":"polygon(50% 0, 0 100%, 100% 100%)",S.style.top=(C?v-1:-8)+"px",S.style.left=p-x+"px"}(this.tooltip,t.elementInfo,t.colorFormat,e,this.canvasWidth,this.canvasHeight)),this.context.restore(),{bounds:e}},e.prototype.drawAxis=function(t,e,n){t.save();var r=this.pageZoomFactor*this.pageScaleFactor*this.emulationScaleFactor,o=this.scrollX*this.pageScaleFactor,i=this.scrollY*this.pageScaleFactor;function a(t){return Math.round(t*r)}function s(t){return Math.round(t/r)}var c=this.canvasWidth/r,u=this.canvasHeight/r;t.save(),t.fillStyle=p,n?t.fillRect(0,a(u)-15,a(c),a(u)):t.fillRect(0,0,a(c),15),t.globalCompositeOperation="destination-out",t.fillStyle="red",e?t.fillRect(a(c)-15,0,a(c),a(u)):t.fillRect(0,0,15,a(u)),t.restore(),t.fillStyle=p,e?t.fillRect(a(c)-15,0,a(c),a(u)):t.fillRect(0,0,15,a(u)),t.lineWidth=1,t.strokeStyle=h,t.fillStyle=h,t.save(),t.translate(-o,.5-i);for(var l=u+s(i),d=100;d<l;d+=100)t.save(),t.translate(o,a(d)),t.rotate(-Math.PI/2),t.fillText(String(d),2,e?a(c)-7:13),t.restore();t.translate(.5,-.5);for(var v=c+s(o),m=100;m<v;m+=100)t.save(),t.fillText(String(m),a(m)+2,n?i+a(u)-7:i+13),t.restore();t.restore(),t.save(),e&&(t.translate(a(c),0),t.scale(-1,1)),t.translate(-o,.5-i);for(l=u+s(i),d=50;d<l;d+=50){t.beginPath(),t.moveTo(o,a(d));var g=d%100?5:8;t.lineTo(o+g,a(d)),t.stroke()}t.strokeStyle=f;for(d=5;d<l;d+=5)d%50&&(t.beginPath(),t.moveTo(o,a(d)),t.lineTo(o+5,a(d)),t.stroke());t.restore(),t.save(),n&&(t.translate(0,a(u)),t.scale(1,-1)),t.translate(.5-o,-i);for(v=c+s(o),m=50;m<v;m+=50){t.beginPath(),t.moveTo(a(m),i);g=m%100?5:8;t.lineTo(a(m),i+g),t.stroke()}t.strokeStyle=f;for(m=5;m<v;m+=5)m%50&&(t.beginPath(),t.moveTo(a(m),i),t.lineTo(a(m),i+5),t.stroke());t.restore(),t.restore()},e}(c.Overlay);e.HighlightOverlay=l;var f="rgba(0,0,0,0.2)",h="rgba(0,0,0,0.7)",p="rgba(255, 255, 255, 0.8)"},function(t,e,n){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||