f||ed||rf?c.offsetWidth:n.setup.minPositionX||0,r>d?c.offsetHeight:n.setup.minPositionY||0,o,n.bounds,u||s),y=g.x,b=g.y;return{scale:o,positionX:v?y:e,positionY:m?b:r}}}(n);l&&Gl(n,l,s,c)}}function pf(n,t,e){var r=n.transformState.scale,o=n.wrapperComponent,i=n.setup,a=i.minScale,u=i.limitToBounds,s=i.zoomAnimation,c=s.disabled,l=s.animationTime,f=s.animationType,p=c||r>=a;if((r>=1||u)&&ff(n),!p&&o&&n.mounted){var d=df(n,a,t||o.offsetWidth/2,e||o.offsetHeight/2);d&&Gl(n,d,l,f)}}function df(n,t,e,r){var o=n.setup,i=o.minScale,a=o.maxScale,u=o.limitToBounds,s=tf(Yl(t,2),i,a,0,!1),c=nf(n,e,r,s,Zl(n,s),u);return{scale:s,positionX:c.x,positionY:c.y}}var hf={previousScale:1,scale:1,positionX:0,positionY:0},vf=Fl(Fl({},hf),{setComponents:function(){},contextInstance:null}),mf={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:\"zoomIn\",animationType:\"easeOut\",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:\"easeOut\"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:\"easeOut\"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:\"easeOut\",equalToMove:!0}},gf=function(n){var t,e,r,o;return{previousScale:null!==(t=n.initialScale)&&void 0!==t?t:hf.scale,scale:null!==(e=n.initialScale)&&void 0!==e?e:hf.scale,positionX:null!==(r=n.initialPositionX)&&void 0!==r?r:hf.positionX,positionY:null!==(o=n.initialPositionY)&&void 0!==o?o:hf.positionY}},yf=function(n){var t=Fl({},mf);return Object.keys(n).forEach((function(e){var r=void 0!==n[e];if(void 0!==mf[e]&&r){var o=Object.prototype.toString.call(mf[e]),i=\"[object Object]\"===o,a=\"[object Array]\"===o;t[e]=i?Fl(Fl({},mf[e]),n[e]):a?Wl(Wl([],mf[e]),n[e]):n[e]}})),t},bf=function(n,t,e){var r=n.transformState.scale,o=n.wrapperComponent,i=n.setup,a=i.maxScale,u=i.minScale,s=i.zoomAnimation.size;if(!o)throw new Error(\"Wrapper is not mounted\");var c=r*Math.exp(t*e);return tf(Yl(c,3),u,a,s,!1)};function wf(n,t,e,r,o){var i=n.wrapperComponent,a=n.transformState,u=a.scale,s=a.positionX,c=a.positionY;if(!i)return console.error(\"No WrapperComponent found\");var l=(i.offsetWidth/2-s)/u,f=(i.offsetHeight/2-c)/u,p=df(n,bf(n,t,e),l,f);if(!p)return console.error(\"Error during zoom event. New transformation state was not calculated.\");Gl(n,p,r,o)}function xf(n,t,e){var r=n.setup,o=n.wrapperComponent,i=r.limitToBounds,a=gf(n.props),u=n.transformState,s=u.scale,c=u.positionX,l=u.positionY;if(o){var f=Kl(n,a.scale),p=Jl(a.positionX,a.positionY,f,i,0,0,o),d={scale:a.scale,positionX:p.x,positionY:p.y};s===a.scale&&c===a.positionX&&l===a.positionY||Gl(n,d,t,e)}}var Sf=function(n){return function(t,e,r){void 0===t&&(t=.5),void 0===e&&(e=300),void 0===r&&(r=\"easeOut\"),wf(n,1,t,e,r)}},_f=function(n){return function(t,e,r){void 0===t&&(t=.5),void 0===e&&(e=300),void 0===r&&(r=\"easeOut\"),wf(n,-1,t,e,r)}},Ef=function(n){return function(t,e,r,o,i){void 0===o&&(o=300),void 0===i&&(i=\"easeOut\");var a=n.transformState,u=a.positionX,s=a.positionY,c=a.scale,l=n.wrapperComponent,f=n.contentComponent;if(!n.setup.disabled&&l&&f){var p={positionX:isNaN(t)?u:t,positionY:isNaN(e)?s:e,scale:isNaN(r)?c:r};Gl(n,p,o,i)}}},Tf=function(n){return function(t,e){void 0===t&&(t=200),void 0===e&&(e=\"easeOut\"),xf(n,t,e)}},Pf=function(n){return function(t,e,r){void 0===e&&(e=200),void 0===r&&(r=\"easeOut\");var o=n.transformState,i=n.wrapperComponent,a=n.contentComponent;if(i&&a){var u=Nf(t||o.scale,i,a);Gl(n,u,e,r)}}},Cf=function(n){return function(t,e,r,o){void 0===r&&(r=600),void 0===o&&(o=\"easeOut\"),Xl(n);var i=n.wrapperComponent,a=\"string\"==typeof t?document.getElementById(t):t;if(i&&function(n){return n?void 0!==(null==n?void 0:n.offsetWidth)&&void 0!==(null==n?void 0:n.offsetHeight)||(console.error(\"Zoom node is not valid - it must contain offsetWidth and offsetHeight\"),!1):(console.error(\"Zoom node not found\"),!1)}(a)&&a&&i.contains(a)){var u=function(n,t,e){var r=n.wrapperComponent,o=n.setup,i=o.limitToBounds,a=o.minScale,u=o.maxScale;if(!r)return hf;var s=r.getBoundingClientRect(),c=function(n){for(var t=n,e=0,r=0;t;)e+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:e,y:r}}(t),l=c.x,f=c.y,p=t.offsetWidth,d=t.offsetHeight,h=r.offsetWidth/p,v=r.offsetHeight/d,m=tf(e||Math.min(h,v),a,u,0,!1),g=(s.width-p*m)/2,y=(s.height-d*m)/2,b=Jl((s.left-l)*m+g,(s.top-f)*m+y,Kl(n,m),i,0,0,r);return{positionX:b.x,positionY:b.y,scale:m}}(n,a,e);Gl(n,u,r,o)}}},Af=function(n){return{instance:n,state:n.transformState,zoomIn:Sf(n),zoomOut:_f(n),setTransform:Ef(n),resetTransform:Tf(n),centerView:Pf(n),zoomToElement:Cf(n)}};function Lf(){try{return{get passive(){return!0,!1}}}catch(n){return!1}}var Of=function(n,t){var e=n.tagName.toUpperCase();return!!t.find((function(n){return n.toUpperCase()===e}))||!!t.find((function(t){return n.classList.contains(t)}))},kf=function(n){n&&clearTimeout(n)},Rf=function(n,t,e){return\"translate3d(\"+n+\"px, \"+t+\"px, 0) scale(\"+e+\")\"},Nf=function(n,t,e){var r=e.offsetWidth*n,o=e.offsetHeight*n;return{scale:n,positionX:(t.offsetWidth-r)/2,positionY:(t.offsetHeight-o)/2}},zf=function(n,t){var e=n.setup.wheel,r=e.disabled,o=e.wheelDisabled,i=e.touchPadDisabled,a=e.excluded,u=n.isInitialized,s=n.isPanning,c=t.target;return!(!u||s||r||!c)&&(!(o&&!t.ctrlKey)&&((!i||!t.ctrlKey)&&!Of(c,a)))};function If(n,t,e){var r=t.getBoundingClientRect(),o=0,i=0;if(\"clientX\"in n)o=(n.clientX-r.left)/e,i=(n.clientY-r.top)/e;else{var a=n.touches[0];o=(a.clientX-r.left)/e,i=(a.clientY-r.top)/e}return(isNaN(o)||isNaN(i))&&console.error(\"No mouse or touch offset found\"),{x:o,y:i}}var Df=function(n,t){var e=n.setup.pinch,r=e.disabled,o=e.excluded,i=n.isInitialized,a=t.target;return!(!i||r||!a)&&!Of(a,o)},Mf=function(n){var t=n.setup.pinch.disabled,e=n.isInitialized,r=n.pinchStartDistance;return!(!e||t||!r)},jf=function(n){return Math.sqrt(Math.pow(n.touches[0].pageX-n.touches[1].pageX,2)+Math.pow(n.touches[0].pageY-n.touches[1].pageY,2))},Bf=function(n,t){var e=n.props,r=e.onWheelStart,o=e.onZoomStart;n.wheelStopEventTimer||(Xl(n),Hl(Af(n),t,r),Hl(Af(n),t,o))},Vf=function(n,t){var e=n.props,r=e.onWheel,o=e.onZoom,i=n.contentComponent,a=n.setup,u=n.transformState.scale,s=a.limitToBounds,c=a.centerZoomedOut,l=a.zoomAnimation,f=a.wheel,p=l.size,d=l.disabled,h=f.step;if(!i)throw new Error(\"Component not mounted\");t.preventDefault(),t.stopPropagation();var v=function(n,t,e,r,o){var i=n.transformState.scale,a=n.wrapperComponent,u=n.setup,s=u.maxScale,c=u.minScale,l=u.zoomAnimation,f=l.size,p=l.disabled;if(!a)throw new Error(\"Wrapper is not mounted\");var d=i+t*(i-i*e)*e;if(o)return d;var h=!r&&!p;return tf(Yl(d,3),c,s,f,h)}(n,function(n,t){var e,r,o=n?n.deltaY<0?1:-1:0;return r=o,\"number\"==typeof(e=t)?e:r}(t,null),h,!t.ctrlKey);if(u!==v){var m=Zl(n,v),g=If(t,i,u),y=s&&(d||0===p||c),b=nf(n,g.x,g.y,v,m,y),w=b.x,x=b.y;n.previousWheelEvent=t,n.setTransformState(v,w,x),Hl(Af(n),t,r),Hl(Af(n),t,o)}},Ff=function(n,t){var e=n.props,r=e.onWheelStop,o=e.onZoomStop;kf(n.wheelAnimationTimer),n.wheelAnimationTimer=setTimeout((function(){n.mounted&&(pf(n,t.x,t.y),n.wheelAnimationTimer=null)}),100),function(n,t){var e=n.previousWheelEvent,r=n.transformState.scale,o=n.setup,i=o.maxScale,a=o.minScale;return!!e&&(ra||Math.sign(e.deltaY)!==Math.sign(t.deltaY)||e.deltaY>0&&e.deltaYt.deltaY||Math.sign(e.deltaY)!==Math.sign(t.deltaY))}(n,t)&&(kf(n.wheelStopEventTimer),n.wheelStopEventTimer=setTimeout((function(){n.mounted&&(n.wheelStopEventTimer=null,Hl(Af(n),t,r),Hl(Af(n),t,o))}),160))},Wf=function(n,t){var e=jf(t);n.pinchStartDistance=e,n.lastDistance=e,n.pinchStartScale=n.transformState.scale,n.isPanning=!1,Xl(n)},Yf=function(n,t){var e=n.contentComponent,r=n.pinchStartDistance,o=n.transformState.scale,i=n.setup,a=i.limitToBounds,u=i.centerZoomedOut,s=i.zoomAnimation,c=s.disabled,l=s.size;if(null!==r&&e){var f=function(n,t,e){var r=e.getBoundingClientRect(),o=n.touches,i=Yl(o[0].clientX-r.left,5),a=Yl(o[0].clientY-r.top,5);return{x:(i+Yl(o[1].clientX-r.left,5))/2/t,y:(a+Yl(o[1].clientY-r.top,5))/2/t}}(t,o,e);if(isFinite(f.x)&&isFinite(f.y)){var p=jf(t),d=function(n,t){var e=n.pinchStartScale,r=n.pinchStartDistance,o=n.setup,i=o.maxScale,a=o.minScale,u=o.zoomAnimation,s=u.size,c=u.disabled;if(!e||null===r||!t)throw new Error(\"Pinch touches distance was not provided\");return t<0?n.transformState.scale:tf(Yl(t/r*e,2),a,i,s,!c)}(n,p);if(d!==o){var h=Zl(n,d),v=a&&(c||0===l||u),m=nf(n,f.x,f.y,d,h,v),g=m.x,y=m.y;n.pinchMidpoint=f,n.lastDistance=p,n.setTransformState(d,g,y)}}}},Hf=function(n){var t=n.pinchMidpoint;n.velocity=null,n.lastDistance=null,n.pinchMidpoint=null,n.pinchStartScale=null,n.pinchStartDistance=null,pf(n,null==t?void 0:t.x,null==t?void 0:t.y)};function Uf(n,t){var e=n.setup.doubleClick,r=e.disabled,o=e.mode,i=e.step,a=e.animationTime,u=e.animationType;if(!r){if(\"reset\"===o)return xf(n,a,u);var s=n.transformState.scale,c=n.contentComponent;if(!c)return console.error(\"No ContentComponent found\");var l=bf(n,\"zoomOut\"===o?-1:1,i),f=If(t,c,s),p=df(n,l,f.x,f.y);if(!p)return console.error(\"Error during zoom event. New transformation state was not calculated.\");Gl(n,p,a,u)}}var $f=function(n,t){var e=n.isInitialized,r=n.setup,o=n.wrapperComponent,i=r.doubleClick,a=i.disabled,u=i.excluded,s=t.target,c=null==o?void 0:o.contains(s),l=e&&s&&c&&!a;return!!l&&(!Of(s,u)&&!!l)},Xf=t.createContext(vf),qf=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.mounted=!0,t.transformState=gf(t.props),t.setup=yf(t.props),t.wrapperComponent=null,t.contentComponent=null,t.isInitialized=!1,t.bounds=null,t.previousWheelEvent=null,t.wheelStopEventTimer=null,t.wheelAnimationTimer=null,t.isPanning=!1,t.startCoords=null,t.lastTouch=null,t.distance=null,t.lastDistance=null,t.pinchStartDistance=null,t.pinchStartScale=null,t.pinchMidpoint=null,t.velocity=null,t.velocityTime=null,t.lastMousePosition=null,t.animate=!1,t.animation=null,t.maxBounds=null,t.pressedKeys={},t.handleInitializeWrapperEvents=function(n){var e=Lf();n.addEventListener(\"wheel\",t.onWheelZoom,e),n.addEventListener(\"dblclick\",t.onDoubleClick,e),n.addEventListener(\"touchstart\",t.onTouchPanningStart,e),n.addEventListener(\"touchmove\",t.onTouchPanning,e),n.addEventListener(\"touchend\",t.onTouchPanningStop,e)},t.handleInitialize=function(){var n=t.setup.centerOnInit;t.applyTransformation(),t.forceUpdate(),n&&(setTimeout((function(){t.mounted&&t.setCenter()}),50),setTimeout((function(){t.mounted&&t.setCenter()}),100),setTimeout((function(){t.mounted&&t.setCenter()}),200))},t.onWheelZoom=function(n){t.setup.disabled||zf(t,n)&&t.isPressingKeys(t.setup.wheel.activationKeys)&&(Bf(t,n),Vf(t,n),Ff(t,n))},t.onPanningStart=function(n){var e=t.setup.disabled,r=t.props.onPanningStart;e||ef(t,n)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(n.preventDefault(),n.stopPropagation(),Xl(t),sf(t,n),Hl(Af(t),n,r))},t.onPanning=function(n){var e=t.setup.disabled,r=t.props.onPanning;e||rf(t)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(n.preventDefault(),n.stopPropagation(),cf(t,n.clientX,n.clientY),Hl(Af(t),n,r))},t.onPanningStop=function(n){var e=t.props.onPanningStop;t.isPanning&&(lf(t),Hl(Af(t),n,e))},t.onPinchStart=function(n){var e=t.setup.disabled,r=t.props,o=r.onPinchingStart,i=r.onZoomStart;e||Df(t,n)&&(Wf(t,n),Xl(t),Hl(Af(t),n,o),Hl(Af(t),n,i))},t.onPinch=function(n){var e=t.setup.disabled,r=t.props,o=r.onPinching,i=r.onZoom;e||Mf(t)&&(n.preventDefault(),n.stopPropagation(),Yf(t,n),Hl(Af(t),n,o),Hl(Af(t),n,i))},t.onPinchStop=function(n){var e=t.props,r=e.onPinchingStop,o=e.onZoomStop;t.pinchStartScale&&(Hf(t),Hl(Af(t),n,r),Hl(Af(t),n,o))},t.onTouchPanningStart=function(n){var e=t.setup.disabled,r=t.props.onPanningStart;if(!e&&ef(t,n))if(t.lastTouch&&+new Date-t.lastTouch<200&&1===n.touches.length)t.onDoubleClick(n);else{t.lastTouch=+new Date,Xl(t);var o=n.touches,i=1===o.length,a=2===o.length;i&&(Xl(t),sf(t,n),Hl(Af(t),n,r)),a&&t.onPinchStart(n)}},t.onTouchPanning=function(n){var e=t.setup.disabled,r=t.props.onPanning;if(t.isPanning&&1===n.touches.length){if(e)return;if(!rf(t))return;n.preventDefault(),n.stopPropagation();var o=n.touches[0];cf(t,o.clientX,o.clientY),Hl(Af(t),n,r)}else n.touches.length>1&&t.onPinch(n)},t.onTouchPanningStop=function(n){t.onPanningStop(n),t.onPinchStop(n)},t.onDoubleClick=function(n){t.setup.disabled||$f(t,n)&&Uf(t,n)},t.clearPanning=function(n){t.isPanning&&t.onPanningStop(n)},t.setKeyPressed=function(n){t.pressedKeys[n.key]=!0},t.setKeyUnPressed=function(n){t.pressedKeys[n.key]=!1},t.isPressingKeys=function(n){return!n.length||Boolean(n.find((function(n){return t.pressedKeys[n]})))},t.setComponents=function(n,e){t.wrapperComponent=n,t.contentComponent=e,Zl(t,t.transformState.scale),t.handleInitializeWrapperEvents(n),t.handleInitialize(),t.handleRef(),t.isInitialized=!0,Hl(Af(t),void 0,t.props.onInit)},t.setTransformState=function(n,e,r){isNaN(n)||isNaN(e)||isNaN(r)?console.error(\"Detected NaN set state values\"):(n!==t.transformState.scale&&(t.transformState.previousScale=t.transformState.scale,t.transformState.scale=n),t.transformState.positionX=e,t.transformState.positionY=r,t.applyTransformation())},t.setCenter=function(){if(t.wrapperComponent&&t.contentComponent){var n=Nf(t.transformState.scale,t.wrapperComponent,t.contentComponent);t.setTransformState(n.scale,n.positionX,n.positionY)}},t.applyTransformation=function(){if(t.mounted&&t.contentComponent){var n=t.transformState,e=n.scale,r=n.positionX,o=n.positionY,i=Rf(r,o,e);t.contentComponent.style.transform=i,t.handleRef()}},t.handleRef=function(){t.props.setRef(Af(t))},t}return function(n,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function e(){this.constructor=n}Vl(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}(e,n),e.prototype.componentDidMount=function(){var n=Lf();window.addEventListener(\"mousedown\",this.onPanningStart,n),window.addEventListener(\"mousemove\",this.onPanning,n),window.addEventListener(\"mouseup\",this.onPanningStop,n),document.addEventListener(\"mouseleave\",this.clearPanning,n),window.addEventListener(\"keyup\",this.setKeyUnPressed,n),window.addEventListener(\"keydown\",this.setKeyPressed,n),this.handleRef()},e.prototype.componentWillUnmount=function(){var n=Lf();window.removeEventListener(\"mousedown\",this.onPanningStart,n),window.removeEventListener(\"mousemove\",this.onPanning,n),window.removeEventListener(\"mouseup\",this.onPanningStop,n),window.removeEventListener(\"keyup\",this.setKeyUnPressed,n),window.removeEventListener(\"keydown\",this.setKeyPressed,n),Xl(this)},e.prototype.componentDidUpdate=function(n){n!==this.props&&(Zl(this,this.transformState.scale),this.setup=yf(this.props))},e.prototype.render=function(){var n=Af(this),e=this.props.children,r=\"function\"==typeof e?e(n):e;return t.createElement(Xf.Provider,{value:Fl(Fl({},this.transformState),{setComponents:this.setComponents,contextInstance:this})},r)},e}(y),Gf=t.forwardRef((function(n,e){var r=d(null),o=r[0],i=r[1];return g(e,(function(){return o}),[o]),t.createElement(qf,Fl({},n,{setRef:i}))}));var Kf=\"transform-component-module_wrapper__1_Fgj\",Zf=\"transform-component-module_content__2jYgh\";!function(n,t){void 0===t&&(t={});var e=t.insertAt;if(n&&\"undefined\"!=typeof document){var r=document.head||document.getElementsByTagName(\"head\")[0],o=document.createElement(\"style\");o.type=\"text/css\",\"top\"===e&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}(\".transform-component-module_wrapper__1_Fgj {\\n position: relative;\\n width: -moz-fit-content;\\n width: fit-content;\\n height: -moz-fit-content;\\n height: fit-content;\\n overflow: hidden;\\n -webkit-touch-callout: none; /* iOS Safari */\\n -webkit-user-select: none; /* Safari */\\n -khtml-user-select: none; /* Konqueror HTML */\\n -moz-user-select: none; /* Firefox */\\n -ms-user-select: none; /* Internet Explorer/Edge */\\n user-select: none;\\n margin: 0;\\n padding: 0;\\n}\\n.transform-component-module_content__2jYgh {\\n display: flex;\\n flex-wrap: wrap;\\n width: -moz-fit-content;\\n width: fit-content;\\n height: -moz-fit-content;\\n height: fit-content;\\n margin: 0;\\n padding: 0;\\n transform-origin: 0% 0%;\\n}\\n.transform-component-module_content__2jYgh img {\\n pointer-events: none;\\n}\\n\");var Jf,Qf,np,tp,ep,rp=function(n){var e=n.children,a=n.wrapperClass,u=void 0===a?\"\":a,s=n.contentClass,c=void 0===s?\"\":s,l=n.wrapperStyle,f=n.contentStyle,p=r(Xf).setComponents,d=o(null),h=o(null);return i((function(){var n=d.current,t=h.current;null!==n&&null!==t&&p&&p(n,t)}),[]),t.createElement(\"div\",{ref:d,className:\"react-transform-wrapper \"+Kf+\" \"+u,style:l},t.createElement(\"div\",{ref:h,className:\"react-transform-component \"+Zf+\" \"+c,style:f},e))},op=t.memo((function(n){var e=n.src,r=n.caption,o=n.disablePanzoom,a=n.handlePanzoom,u=n.panzoomEnabled,s=n.boxShadow,c=n.imgHeight,l=n.imgWidth,f=bn(d(!0),2),p=f[0],h=f[1];function v(n){n.touches.length>1&&!u&&n.cancelable&&(n.preventDefault(),a(!0))}i((function(){var n=new Image;n.src=e,n.onload=function(){h(!1)}}),[e]),i((function(){return document.addEventListener(\"touchstart\",v,{passive:!1}),function(){document.addEventListener(\"touchstart\",v,{passive:!1})}}),[]);var m=p?t.createElement(Bl,null):u?t.createElement(Gf,{maxScale:6,minScale:.5,wheel:{step:.5},zoomAnimation:{animationType:\"easeInOutQuad\"}},t.createElement(rp,null,t.createElement(jl,{src:e,className:\"SRLImage SRLImageZoomed\",alt:r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:\"easeInOut\"}}))):t.createElement(Ml,{src:e,className:\"SRLImage\",disablePanzoom:o,onClick:function(){return a(!0)},alt:r,boxShadow:s,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:\"easeInOut\"},width:l,height:c});return t.createElement(Jc,null,m)}));op.displayName=\"ImageLoad\",op.propTypes={handlePanzoom:mn.func,src:mn.string,caption:mn.string,disablePanzoom:mn.bool,boxShadow:mn.string,panzoomEnabled:mn.bool,containerRef:mn.any,imgWidth:mn.number,imgHeight:mn.number};var ip,ap,up,sp,cp,lp,fp,pp,dp,hp,vp,mp,gp,yp,bp,wp,xp,Sp,_p,Ep=Te(Jf||(Jf=Mn([\"\\n -ms-grid-columns: 1fr auto;\\n grid-template-columns: 1fr auto;\\n -ms-grid-rows: 90% auto;\\n grid-template-rows: 90% auto;\\n\\n > *:nth-of-type(1) {\\n -ms-grid-row: 1;\\n }\\n\\n > *:nth-of-type(2) {\\n -ms-grid-row: 2;\\n }\\n\\n > *:nth-of-type(3) {\\n -ms-grid-row: 1;\\n }\\n\"]))),Tp=Te(Qf||(Qf=Mn([\"\\n -ms-grid-columns: auto 1fr;\\n grid-template-columns: auto 1fr;\\n -ms-grid-rows: 90% auto;\\n grid-template-rows: 90% auto;\\n\\n > *:nth-of-type(1) {\\n -ms-grid-row: 1;\\n }\\n\\n > *:nth-of-type(2) {\\n -ms-grid-row: 2;\\n }\\n\\n > *:nth-of-type(3) {\\n -ms-grid-row: 1;\\n }\\n\"]))),Pp=Be.div(np||(np=Mn([\"\\n bottom: 0;\\n left: 0;\\n right: 0;\\n top: 0;\\n display: grid;\\n display: -ms-grid;\\n -ms-grid-rows: auto;\\n grid-template-rows: auto;\\n align-items: center;\\n justify-content: center;\\n justify-items: center;\\n width: 100vw;\\n height: 100vh;\\n height: calc(var(--vh, 1vh) * 100);\\n\\n > *:nth-of-type(1) {\\n -ms-grid-row: 1;\\n }\\n\\n > *:nth-of-type(2) {\\n -ms-grid-row: 2;\\n }\\n\\n > *:nth-of-type(3) {\\n -ms-grid-row: 3;\\n }\\n\\n /* Thumbnails aligned to the right */\\n \",\";\\n\\n /* Thumbnails aligned to the left */\\n \",\";\\n\\n \",\";\\n\\n \",\";\\n\\n @media (max-width: 768px) {\\n grid-template-columns: auto;\\n grid-template-rows: auto;\\n }\\n\"])),(function(n){return\"right\"===n.thumbnailsPosition&&Ep}),(function(n){return\"left\"===n.thumbnailsPosition&&Tp}),(function(n){return n.hideThumbnails&&Te(tp||(tp=Mn([\"\\n -ms-grid-rows: 90% auto;\\n grid-template-rows: 90% auto;\\n \"])))}),(function(n){return!n.showCaption&&Te(ep||(ep=Mn([\"\\n -ms-grid-rows: auto;\\n grid-template-rows: auto;\\n \"])))}));function Cp(n){var e,r,a=n.caption,u=n.direction,s=n.elements,c=n.handleCurrentElement,l=n.handleCloseLightbox,f=n.handleNextElement,p=n.handlePanzoom,d=n.handlePrevElement,h=n.height,v=n.hideThumbnails,m=n.id,g=n.options,y=n.panzoomEnabled,b=n.source,w=n.SRLThumbnailsRef,x=n.SRLCaptionRef,S=n.width,_=g.settings,E=g.thumbnails,T=g.caption,P=bn(Rl(x),1)[0],C=bn(Rl(w),1)[0],A=o(),L=!!window.MSInputMethodContext&&!!document.documentMode,O=L?1e3:\"100%\",k=L?-1e3:\"-100%\",R={slideIn:function(n){return{x:void 0===n?0:\"next\"===n?O:k,transition:{ease:_.slideTransitionTimingFunction}}},slideOut:function(n){return{x:\"previous\"===n?O:k,transition:{ease:_.slideTransitionTimingFunction}}},fadeIn:{opacity:0,transition:{ease:_.slideTransitionTimingFunction}},fadeOut:{opacity:0,transition:{ease:_.slideTransitionTimingFunction}},bothIn:function(n){return{opacity:1,x:void 0===n?\"0\":\"next\"===n?1e3:-1e3,transition:{ease:_.slideTransitionTimingFunction}}},bothOut:function(n){return{opacity:0,x:\"previous\"===n?1e3:-1e3,transition:{ease:_.slideTransitionTimingFunction}}},center:{x:0,opacity:1}},N=bl({onSwipedLeft:function(){return f(m)},onSwipedRight:function(){return d(m)},delta:y?500:90,preventDefaultTouchmoveEvent:!0,trackTouch:!0,trackMouse:!1}),z=wl((function(n){n>0?f(m):n<0&&d(m)}),150);i((function(){if(!y&&!_.disableWheelControls){var n=Ll(document,\"wheel\",(function(n){return z(n.deltaY)}));return function(){n()}}}),[z,y,_.disableWheelControls]),i((function(){var n=function(n){!e.current||n.target.classList.contains(\"SRLImage\")||n.target.classList.contains(\"SRLPanzoomImage\")||n.target.classList.contains(\"SRLNextButton\")||n.target.classList.contains(\"SRLPrevButton\")||n.target.classList.contains(\"SRLCloseButton\")||n.target.classList.contains(\"SRLAutoplayButton\")||n.target.classList.contains(\"SRLExpandButton\")||n.target.classList.contains(\"SRLZoomOutButton\")||n.target.classList.contains(\"SRLDownloadButton\")||n.target.classList.contains(\"SRLThumbnailsButton\")||n.target.classList.contains(\"SRLCaptionContainer\")||n.target.classList.contains(\"SRLCaptionText\")||n.target.classList.contains(\"SRLCustomCaption\")||n.target.classList.contains(\"SRLThumbnails\")||n.target.classList.contains(\"SRLThumb\")||n.target.classList.contains(\"SRLCaption\")||n.target.classList.contains(\"react-transform-component\")||n.target.classList.contains(\"react-transform-element\")||\"touchstart\"===n.type||0!==n.button||r(n)};return\"undefined\"!=typeof window&&(document.addEventListener(\"mousedown\",n),document.addEventListener(\"touchstart\",n)),function(){\"undefined\"!=typeof window&&(document.removeEventListener(\"mousedown\",n),document.removeEventListener(\"touchstart\",n))}}),[e=A,r=function(){return l()}]);var I={captionAlignment:g.caption.captionAlignment,captionColor:g.caption.captionColor,captionContainerPadding:g.caption.captionContainerPadding,captionFontFamily:g.caption.captionFontFamily,captionFontSize:g.caption.captionFontSize,captionFontStyle:g.caption.captionFontStyle,captionFontWeight:g.caption.captionFontWeight,captionTextTransform:g.caption.captionTextTransform};return t.createElement(Pp,{className:\"SRLContainer\",ref:A,thumbnailsPosition:E.thumbnailsPosition,showCaption:T.showCaption,hideThumbnails:v},t.createElement(Il,Dn({thumbnailsPosition:E.thumbnailsPosition,showThumbnails:E.showThumbnails,hideThumbnails:v,showCaption:T.showCaption,className:\"SRLElementContainer\",captionDivSizes:P,thumbnailsDivSizes:C},N),t.createElement(Jc,{className:\"SRLAnimatePresence\",custom:u},t.createElement(Dl,{variants:R,custom:u,initial:\"slide\"===_.slideAnimationType?\"slideIn\":\"both\"===_.slideAnimationType?\"bothIn\":\"fadeIn\",animate:\"center\",exit:\"slide\"===_.slideAnimationType?\"slideOut\":\"both\"===_.slideAnimationType?\"bothOut\":\"fadeOut\",className:\"SRLElementWrapper\",key:m||0,transition:{x:{type:\"spring\",stiffness:_.slideSpringValues[0],damping:_.slideSpringValues[1]},opacity:{duration:_.slideTransitionSpeed}}},t.createElement(op,{disablePanzoom:_.disablePanzoom,panzoomEnabled:y,handlePanzoom:p,containerRef:A,imgHeight:h,imgWidth:S,src:b,caption:a,boxShadow:_.boxShadow})))),T.showCaption&&t.createElement(hl,{id:m,thumbnailsPosition:E.thumbnailsPosition,captionOptions:I,caption:a,SRLCaptionRef:x}),E.showThumbnails&&!v&&t.createElement(pl,{handleCurrentElement:c,thumbnails:E,currentId:m,elements:s||[],SRLThumbnailsRef:w}))}Cp.propTypes={caption:mn.string,direction:mn.string,elements:mn.array,handleCloseLightbox:mn.func,handleCurrentElement:mn.func,handleNextElement:mn.func,handlePanzoom:mn.func,handlePrevElement:mn.func,height:mn.oneOfType([mn.number,mn.string]),hideThumbnails:mn.bool,id:mn.string,options:mn.shape({settings:mn.shape({boxShadow:mn.string,disablePanzoom:mn.bool,disableWheelControls:mn.bool,slideAnimationType:mn.string,slideSpringValues:mn.array,slideTransitionSpeed:mn.number,slideTransitionTimingFunction:mn.oneOfType([mn.string,mn.array])}),caption:mn.shape({captionAlignment:mn.string,captionColor:mn.string,captionFontFamily:mn.string,captionFontSize:mn.string,captionFontStyle:mn.string,captionFontWeight:mn.oneOfType([mn.number,mn.string]),captionContainerPadding:mn.string,captionTextTransform:mn.string,showCaption:mn.bool}),thumbnails:mn.shape({showThumbnails:mn.bool,thumbnailsOpacity:mn.number,thumbnailsPosition:mn.string,thumbnailsSize:mn.array})}),panzoomEnabled:mn.bool,showControls:mn.bool,source:mn.oneOfType([mn.string,mn.object]),SRLCaptionRef:mn.object,SRLThumbnailsRef:mn.object,thumbnailsOpacity:mn.number,type:mn.string,width:mn.oneOfType([mn.number,mn.string])};var Ap,Lp,Op=Be.button(ip||(ip=Mn([\"\\n position: absolute;\\n height: \",\";\\n width: \",\";\\n transition: color 0.3s ease;\\n background-color: \",\";\\n border: 0;\\n border-radius: 0;\\n box-shadow: none;\\n cursor: pointer;\\n margin: 0;\\n padding: 0;\\n visibility: inherit;\\n z-index: 9998;\\n opacity: 1;\\n transition: opacity 0.3s ease;\\n display: flex;\\n align-items: center;\\n align-content: center;\\n justify-content: center;\\n\\n .SRLIdle & {\\n opacity: 0;\\n\\n @media (max-width: 768px) {\\n opacity: 1;\\n }\\n\\n @media (max-width: 360px) {\\n opacity: 1;\\n }\\n }\\n\\n &:focus {\\n outline: none;\\n }\\n\\n @media (max-width: 768px) {\\n height: \",\";\\n width: \",\";\\n\\n .SRLIdle & {\\n opacity: 1;\\n }\\n }\\n\\n div {\\n height: \",\";\\n width: \",\";\\n padding: \",\";\\n box-sizing: border-box;\\n display: flex;\\n align-items: center;\\n\\n @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {\\n padding: 10px;\\n height: \",\";\\n width: \",\";\\n }\\n\\n @media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) {\\n padding: 10px;\\n height: \",\";\\n width: \",\";\\n }\\n\\n @media (max-width: 768px) {\\n padding: 10px;\\n height: \",\";\\n width: \",\";\\n\\n .SRLIdle & {\\n opacity: 1;\\n }\\n }\\n\\n svg {\\n display: block;\\n height: 100%;\\n width: 100%;\\n overflow: visible;\\n position: relative;\\n path {\\n transition: fill 0.3s ease;\\n fill: \",\";\\n }\\n }\\n &:hover {\\n svg path {\\n fill: \",\";\\n }\\n }\\n }\\n\"])),(function(n){return n.buttonsSize?n.buttonsSize:\"30px\"}),(function(n){return n.buttonsSize?n.buttonsSize:\"30px\"}),(function(n){return n.buttonsBackgroundColor?n.buttonsBackgroundColor:\"rgba(30, 30, 36, 0.8)\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1.2)+\"px\":\"30px\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1.2)+\"px\":\"30px\"}),(function(n){return n.buttonsSize?n.buttonsSize:\"30px\"}),(function(n){return n.buttonsSize?n.buttonsSize:\"30px\"}),(function(n){return n.buttonsIconPadding?n.buttonsIconPadding:\"5px\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1)+\"px\":\"30px\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1)+\"px\":\"30px\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1)+\"px\":\"30px\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1)+\"px\":\"30px\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1.1)+\"px\":\"30px\"}),(function(n){return n.buttonsSize?Math.round(parseInt(n.buttonsSize,10)/1.1)+\"px\":\"30px\"}),(function(n){return n.buttonsIconColor?n.buttonsIconColor:\"rgba(255, 255, 255, 0.8)\"}),(function(n){return n.buttonsIconColor&&n.buttonsIconColor.replace(/[\\d\\.]+\\)$/g,\"1)\")})),kp=Be.div(ap||(ap=Mn(['\\n position: absolute;\\n top: 5px;\\n right: 5px;\\n top: calc(env(safe-area-inset-top) + 5px);\\n right: calc(env(safe-area-inset-right) + 5px);\\n display: flex;\\n flex-direction: row;\\n flex-wrap: wrap;\\n transition: 0.3s ease;\\n will-change: right;\\n\\n /* Offset the buttons if the progress bar is active and the autoplay is \"playing\" */\\n ',\";\\n\\n /* Offset the buttons if the thumbnails are on the right */\\n \",\";\\n\\n /* Thumbnails on right are closed so we need to reset the position */\\n \",\";\\n\\n @media (max-width: 768px) {\\n right: 5px;\\n right: calc(env(safe-area-inset-right) + 5px) !important;\\n }\\n\"])),(function(n){return n.showProgressBar&&n.autoplay&&Te(up||(up=Mn([\"\\n top: \",\"px;\\n top: calc(\\n env(safe-area-inset-top) +\\n \",\"px\\n );\\n \"])),2*Math.round(parseInt(n.buttonsOffsetFromProgressBar,10)),2*Math.round(parseInt(n.buttonsOffsetFromProgressBar,10)))}),(function(n){return\"right\"===n.thumbnailsPosition&&Te(sp||(sp=Mn([\"\\n right: \",\"px;\\n right: calc(\\n env(safe-area-inset-top) + \",\"px\\n );\\n \"])),n.thumbnailsDivSizes.width+5,n.thumbnailsDivSizes.width+5)}),(function(n){return n.hideThumbnails&&\"right\"===n.thumbnailsPosition&&Te(cp||(cp=Mn([\"\\n right: 5px;\\n right: calc(env(safe-area-inset-right) + 5px);\\n \"])))})),Rp=Be(Op)(lp||(lp=Mn([\"\\n position: relative;\\n\"]))),Np=Be(Op)(fp||(fp=Mn([\"\\n position: relative;\\n margin-right: 5px;\\n\\n @media (max-width: 768px) {\\n display: none;\\n }\\n\"]))),zp=Be(Op)(pp||(pp=Mn([\"\\n position: relative;\\n margin-right: 5px;\\n\"]))),Ip=Be(Op)(dp||(dp=Mn([\"\\n position: relative;\\n margin-right: 5px;\\n display: \",\";\\n\"])),(function(n){return 0===n.autoplaySpeed?\"none\":\"flex\"})),Dp=Be(Op)(hp||(hp=Mn([\"\\n position: relative;\\n margin-right: 5px;\\n\\n \",\"\\n\\n \",\"\\n\\n @media (max-width: 768px) {\\n svg {\\n transform: rotate(0) !important;\\n }\\n }\\n\"])),(function(n){return\"right\"===n.thumbnailsPosition&&Te(vp||(vp=Mn([\"\\n svg {\\n transform: rotate(-90deg);\\n }\\n \"])))}),(function(n){return\"left\"===n.thumbnailsPosition&&Te(mp||(mp=Mn([\"\\n svg {\\n transform: rotate(90deg);\\n }\\n \"])))})),Mp=Be(Op)(gp||(gp=Mn([\"\\n position: relative;\\n margin-right: 5px;\\n\"]))),jp=Be(Op)(yp||(yp=Mn([\"\\n top: calc(50% - 50px);\\n right: 5px;\\n right: calc(env(safe-area-inset-right) + 5px);\\n transition: 0.3s ease;\\n will-change: right;\\n\\n /* Offset the thumbnails with the width of the div of the thumbnails */\\n \",\";\\n\\n /* Thumbnails on right are closed so we need to reset the position */\\n \",\";\\n\\n @media (max-width: 768px) {\\n display: none;\\n }\\n\"])),(function(n){return\"right\"===n.thumbnailsPosition&&Te(bp||(bp=Mn([\"\\n right: \",\"px;\\n right: calc(\\n env(safe-area-inset-right) + \",\"px\\n );\\n \"])),n.thumbnailsDivSizes.width+5,n.thumbnailsDivSizes.width+5)}),(function(n){return n.hideThumbnails&&\"right\"===n.thumbnailsPosition&&Te(wp||(wp=Mn([\"\\n right: 5px;\\n right: calc(env(safe-area-inset-right) + 5px);\\n \"])))})),Bp=Be(Op)(xp||(xp=Mn([\"\\n top: calc(50% - 50px);\\n left: 5px;\\n left: calc(env(safe-area-inset-left) + 5px);\\n transition: 0.3s ease;\\n will-change: left;\\n\\n /* Offset the thumbnails with the width of the div of the thumbnails */\\n \",\";\\n\\n /* Thumbnails on left are closed so we need to reset the position */\\n \",\";\\n\\n @media (max-width: 768px) {\\n display: none;\\n }\\n\"])),(function(n){return\"left\"===n.thumbnailsPosition&&Te(Sp||(Sp=Mn([\"\\n left: \",\"px;\\n left: calc(\\n env(safe-area-inset-right) + \",\"px\\n );\\n \"])),n.thumbnailsDivSizes.width+5,n.thumbnailsDivSizes.width+5)}),(function(n){return n.hideThumbnails&&\"left\"===n.thumbnailsPosition&&Te(_p||(_p=Mn([\"\\n left: 5px;\\n left: calc(env(safe-area-inset-right) + 5px);\\n \"])))})),Vp=function(n){var e=n.autoplay,r=n.buttons,o=n.buttonsOffsetFromProgressBar,i=n.currentElementID,a=n.handleCloseLightbox,u=n.handleFullScreen,s=n.handleImageDownload,c=n.handleNextElement,l=n.handlePanzoom,f=n.handlePrevElement,p=n.handleThumbnails,d=n.hideThumbnails,h=n.panzoomEnabled,v=n.setAutoplay,m=n.settings,g=n.showProgressBar,y=n.showThumbnails,b=n.SRLThumbnailsRef,w=n.thumbnailsPosition,x=n.thumbnailsSize,S=bn(Rl(b),1)[0];return t.createElement(t.Fragment,null,t.createElement(kp,{className:\"SRLControls\",autoplay:e,showProgressBar:g,buttonsOffsetFromProgressBar:o,thumbnailsPosition:w,thumbnailsDivSizes:S,thumbnailsSize:x,hideThumbnails:d},r.showAutoplayButton&&t.createElement(Ip,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,autoplaySpeed:m.autoplaySpeed,title:e?\"Pause\":\"Play\",className:\"SRLAutoplayButton\",onClick:function(){return v(!e)}},t.createElement(\"div\",{className:\"SRLAutoplayButton\"},e?t.createElement(\"svg\",{className:\"SRLAutoplayButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLAutoplayButton\",d:\"M14.2 38.7h5.9c1.6 0 2.9-1.3 2.9-2.9V14.2c0-1.6-1.3-2.9-2.9-2.9h-5.9c-1.6 0-2.9 1.3-2.9 2.9v21.6c0 1.6 1.3 2.9 2.9 2.9zm-1-24.5c0-.5.4-1 1-1h5.9c.5 0 1 .4 1 1v21.6c0 .5-.4 1-1 1h-5.9c-.5 0-1-.4-1-1V14.2zm16.7 24.5h5.9c1.6 0 2.9-1.3 2.9-2.9V14.2c0-1.6-1.3-2.9-2.9-2.9h-5.9c-1.6 0-2.9 1.3-2.9 2.9v21.6c0 1.6 1.3 2.9 2.9 2.9zm-1-24.5c0-.5.4-1 1-1h5.9c.5 0 1 .4 1 1v21.6c0 .5-.4 1-1 1h-5.9c-.5 0-1-.4-1-1V14.2z\"})):t.createElement(\"svg\",{className:\"SRLAutoplayButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLAutoplayButton\",d:\"M35.7 22.8L16.9 11.6c-1.5-.9-3.9 0-3.9 2.2v22.3c0 2 2.2 3.2 3.9 2.2l18.9-11.1c1.6-1 1.6-3.4-.1-4.4zm-.8 2.9L16 36.9c-.6.3-1.3-.1-1.3-.7V13.8c0-.9.9-1 1.3-.7l18.9 11.1c.5.4.5 1.2 0 1.5z\"})))),r.showThumbnailsButton&&y&&t.createElement(Dp,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,thumbnailsPosition:w,onClick:p,title:d?\"Show Thumbnails\":\"Hide Thumbnails\",className:\"SRLThumbnailsButton\"},t.createElement(\"div\",{className:\"SRLThumbnailsButton\"},t.createElement(\"svg\",{className:\"SRLThumbnailsButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"g\",{fill:\"#fff\",className:\"SRLThumbnailsButton\"},t.createElement(\"path\",{className:\"SRLThumbnailsButton\",d:\"M15.4 27.4h-4.8c-1.3 0-2.4 1.1-2.4 2.4v4.8c0 1.3 1.1 2.4 2.4 2.4h4.8c1.3 0 2.4-1.1 2.4-2.4v-4.8c0-1.3-1.1-2.4-2.4-2.4zm12 0h-4.8c-1.3 0-2.4 1.1-2.4 2.4v4.8c0 1.3 1.1 2.4 2.4 2.4h4.8c1.3 0 2.4-1.1 2.4-2.4v-4.8c0-1.3-1.1-2.4-2.4-2.4zm12 0h-4.8c-1.3 0-2.4 1.1-2.4 2.4v4.8c0 1.3 1.1 2.4 2.4 2.4h4.8c1.3 0 2.4-1.1 2.4-2.4v-4.8c0-1.3-1.1-2.4-2.4-2.4z\",opacity:\".4\"}),t.createElement(\"path\",{className:\"SRLThumbnailsButton\",d:\"M39.4 13h-4.8c-1.3 0-2.4 1.1-2.4 2.4v4.8c0 1.3 1.1 2.4 2.4 2.4h4.8c1.3 0 2.4-1.1 2.4-2.4v-4.8c0-1.3-1.1-2.4-2.4-2.4zm-24 0h-4.8c-1.3 0-2.4 1.1-2.4 2.4v4.8c0 1.3 1.1 2.4 2.4 2.4h4.8c1.3 0 2.4-1.1 2.4-2.4v-4.8c0-1.3-1.1-2.4-2.4-2.4zm12 0h-4.8c-1.3 0-2.4 1.1-2.4 2.4v4.8c0 1.3 1.1 2.4 2.4 2.4h4.8c1.3 0 2.4-1.1 2.4-2.4v-4.8c0-1.3-1.1-2.4-2.4-2.4z\"}))))),r.showDownloadButton&&t.createElement(Mp,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,title:\"Download image\",className:\"SRLDownloadButton\",onClick:s},t.createElement(\"div\",{className:\"SRLDownloadButton\"},t.createElement(\"svg\",{className:\"SRLDownloadButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLDownloadButton\",d:\"M35.7 34.1c0 .6-.5 1-1.1 1-.6 0-1.1-.5-1.1-1s.5-1 1.1-1c.6 0 1.1.5 1.1 1zm-4.6-1c-.6 0-1.1.5-1.1 1s.5 1 1.1 1c.6 0 1.1-.5 1.1-1s-.5-1-1.1-1zm7.8-2.5V36c0 1.3-1.1 2.3-2.4 2.3h-23c-1.3 0-2.4-1-2.4-2.3v-5.4c0-1.3 1.1-2.3 2.4-2.3h5.4l-3.1-2.9c-1.4-1.3-.4-3.5 1.5-3.5h2.9v-8.1c0-1.1 1-2.1 2.2-2.1h5.2c1.2 0 2.2.9 2.2 2.1v8.1h2.9c1.9 0 2.9 2.2 1.5 3.5l-3.1 2.9h5.4c1.3 0 2.4 1 2.4 2.3zm-14.2.9c.2.2.4.2.6 0l7.6-7.3c.3-.3.1-.7-.3-.7H28v-9.7c0-.2-.2-.4-.4-.4h-5.2c-.2 0-.4.2-.4.4v9.7h-4.6c-.4 0-.6.4-.3.7l7.6 7.3zm12.5-.9c0-.3-.3-.6-.7-.6h-7.1l-2.8 2.7c-.8.8-2.2.8-3.1 0L20.6 30h-7.1c-.4 0-.7.3-.7.6V36c0 .3.3.6.7.6h23c.4 0 .7-.3.7-.6v-5.4z\"})))),h?t.createElement(zp,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,title:\"Zoom out\",className:\"SRLZoomOutButton\",onClick:function(){return l(!1)}},t.createElement(\"div\",{className:\"SRLZoomOutButton\"},t.createElement(\"svg\",{className:\"SRLZoomOutButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLZoomOutButton\",d:\"M27.9 21.6v1.3c0 .4-.3.7-.7.7h-10c-.4 0-.7-.3-.7-.7v-1.3c0-.4.3-.7.7-.7h10c.4 0 .7.3.7.7zm10.7 15.8l-1.2 1.2c-.3.3-.7.3-.9 0L29.9 32c-.1-.1-.2-.3-.2-.5v-.7c-2 1.7-4.6 2.8-7.4 2.8C16 33.6 11 28.5 11 22.3s5-11.4 11.3-11.4S33.6 16 33.6 22.3c0 2.8-1 5.4-2.8 7.4h.7c.2 0 .3.1.5.2l6.6 6.6c.3.2.3.6 0 .9zM31 22.3c0-4.8-3.9-8.7-8.7-8.7s-8.7 3.9-8.7 8.7 3.9 8.7 8.7 8.7 8.7-3.9 8.7-8.7z\"})))):\"\",r.showFullscreenButton&&t.createElement(Np,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,title:\"Enter fullscreen\",className:\"SRLExpandButton\",onClick:u},t.createElement(\"div\",{className:\"SRLExpandButton\"},t.createElement(\"svg\",{className:\"SRLExpandButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLExpandButton\",d:\"M11.22 20.66v-7.91a1.52 1.52 0 011.53-1.53h7.91a.76.76 0 01.76.76v1.53a.77.77 0 01-.76.77h-6.38v6.38a.77.77 0 01-.77.76H12a.76.76 0 01-.78-.76zM29.58 12v1.53a.78.78 0 00.77.77h6.38v6.38a.76.76 0 00.76.76H39a.77.77 0 00.77-.76v-7.93a1.52 1.52 0 00-1.53-1.53h-7.89a.77.77 0 00-.77.78zM39 29.58h-1.51a.77.77 0 00-.76.77v6.38h-6.38a.77.77 0 00-.77.76V39a.78.78 0 00.77.77h7.91a1.52 1.52 0 001.53-1.53v-7.89a.78.78 0 00-.79-.77zM21.42 39v-1.51a.76.76 0 00-.76-.76h-6.38v-6.38a.78.78 0 00-.77-.77H12a.77.77 0 00-.76.77v7.91a1.52 1.52 0 001.53 1.53h7.91a.77.77 0 00.74-.79z\"})))),r.showCloseButton&&t.createElement(Rp,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,title:\"Close\",className:\"SRLCloseButton\",onClick:function(){return a()}},t.createElement(\"div\",{className:\"SRLCloseButton\"},t.createElement(\"svg\",{className:\"SRLCloseButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLCloseButton\",d:\"M27.92 25l8.84-8.84 1.82-1.82c.27-.27.27-.71 0-.97l-1.95-1.95a.682.682 0 0 0-.97 0L25 22.08 14.34 11.42a.682.682 0 0 0-.97 0l-1.95 1.95c-.27.27-.27.71 0 .97L22.08 25 11.42 35.66c-.27.27-.27.71 0 .97l1.95 1.95c.27.27.71.27.97 0L25 27.92l8.84 8.84 1.82 1.82c.27.27.71.27.97 0l1.95-1.95c.27-.27.27-.71 0-.97L27.92 25z\"}))))),r.showNextButton&&t.createElement(jp,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,thumbnailsPosition:w,thumbnailsDivSizes:S,thumbnailsSize:x,hideThumbnails:d,title:\"Next\",className:\"SRLNextButton\",onClick:function(){return c(i)}},t.createElement(\"div\",{className:\"SRLNextButton\"},t.createElement(\"svg\",{className:\"SRLNextButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLPrevButton\",d:\"M24.53 11.36l-.44.44c-.29.29-.29.76 0 1.05l11.09 11.09H11.83c-.41 0-.75.33-.75.75v.62c0 .41.33.75.75.75h23.35L24.09 37.14c-.29.29-.29.76 0 1.05l.44.44c.29.29.76.29 1.05 0l13.11-13.11c.29-.29.29-.76 0-1.05l-13.1-13.11a.754.754 0 0 0-1.06 0z\"})))),r.showPrevButton&&t.createElement(Bp,{buttonsBackgroundColor:r.backgroundColor,buttonsIconColor:r.iconColor,buttonsSize:r.size,buttonsIconPadding:r.iconPadding,title:\"Previous\",className:\"SRLPrevButton\",thumbnailsPosition:w,thumbnailsDivSizes:S,thumbnailsSize:x,hideThumbnails:d,onClick:function(){return f(i)}},t.createElement(\"div\",{className:\"SRLPrevButton\"},t.createElement(\"svg\",{className:\"SRLPrevButton\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"11 11 30 30\"},t.createElement(\"path\",{className:\"SRLPrevButton\",d:\"M25.47 38.64l.44-.44c.29-.29.29-.76 0-1.05L14.82 26.06h23.35c.41 0 .75-.33.75-.75v-.62c0-.41-.33-.75-.75-.75H14.82l11.09-11.09c.29-.29.29-.76 0-1.05l-.44-.44a.742.742 0 0 0-1.05 0L11.31 24.47c-.29.29-.29.76 0 1.05l13.11 13.11c.29.3.76.3 1.05.01z\"})))))};Vp.propTypes={autoplay:mn.bool,buttons:mn.shape({backgroundColor:mn.string,iconColor:mn.string,iconPadding:mn.string,showAutoplayButton:mn.bool,showCloseButton:mn.bool,showDownloadButton:mn.bool,showFullscreenButton:mn.bool,showNextButton:mn.bool,showPrevButton:mn.bool,showThumbnailsButton:mn.bool,size:mn.string}),hideThumbnails:mn.bool,buttonsOffsetFromProgressBar:mn.string,currentElementID:mn.string,handleCloseLightbox:mn.func,handleFullScreen:mn.func,handleImageDownload:mn.func,handleNextElement:mn.func,handlePanzoom:mn.func,handlePrevElement:mn.func,handleThumbnails:mn.func,panzoomEnabled:mn.bool,setAutoplay:mn.func,settings:mn.shape({autoplaySpeed:mn.number}),showProgressBar:mn.bool,showThumbnails:mn.bool,thumbnailsPosition:mn.string,SRLThumbnailsRef:mn.object,thumbnailsSize:mn.array};var Fp=Be.div(Ap||(Ap=Mn([\"\\n width: 100%;\\n height: \",\";\\n background-color: \",\";\\n position: fixed;\\n top: 0;\\n left: 0;\\n z-index: 9999;\\n\"])),(function(n){return n.barHeight}),(function(n){return n.backgroundColor})),Wp=Be.div(Lp||(Lp=Mn([\"\\n height: \",\";\\n width: 100%;\\n background-color: \",\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n transform: scaleX(0);\\n transform-origin: 0;\\n\"])),(function(n){return n.barHeight}),(function(n){return n.fillColor})),Yp=function(n){var e=n.autoplay,r=n.autoplaySpeed,o=n.progressBar,a=n.currentElementID,u=bn(d(!1),2),s=u[0],c=u[1];return i((function(){c(!1)}),[a]),kl((function(){c(!0)}),e?r/100:null,a),t.createElement(Fp,{barHeight:o.height,backgroundColor:o.backgroundColor,className:\"SRLProgressBar\"},t.createElement(Wp,{barHeight:o.height,fillColor:o.fillColor,style:{transform:\"scaleX(\".concat(s?1:0,\")\"),transitionDuration:\"\".concat(s?r+\"ms\":\"0ms\")}}))};function Hp(n){for(var t=[],e=1;en?d():!0!==t&&(o=setTimeout(r?h:d,void 0===r?n-p:n)))}return\"boolean\"!=typeof t&&(r=e,e=t,t=void 0),s.cancel=function(){u(),i=!0},s}(50,(function(){i&&u(!1),clearTimeout(t),t=setTimeout((function(){return u(!0)}),n)})),c=function(){document.hidden||s()},l=0;l1),Zp=[],Jp=!1,Qp=-1,nd=void 0,td=void 0,ed=function(n){return Zp.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(n))}))},rd=function(n){var t=n||window.event;return!!ed(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},od=function(n,t){if(n){if(!Zp.some((function(t){return t.targetElement===n}))){var e={targetElement:n,options:t||{}};Zp=[].concat(function(n){if(Array.isArray(n)){for(var t=0,e=Array(n.length);t0||function(n){return!!n&&n.scrollHeight-n.scrollTop<=n.clientHeight}(t)&&e<0?rd(n):n.stopPropagation())}(t,n)},Jp||(document.addEventListener(\"touchmove\",rd,qp?{passive:!1}:void 0),Jp=!0)):function(n){if(void 0===td){var t=!!n&&!0===n.reserveScrollBarGap,e=window.innerWidth-document.documentElement.clientWidth;t&&e>0&&(td=document.body.style.paddingRight,document.body.style.paddingRight=e+\"px\")}void 0===nd&&(nd=document.body.style.overflow,document.body.style.overflow=\"hidden\")}(t)}}else console.error(\"disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.\")},id=function(){Kp?(Zp.forEach((function(n){n.targetElement.ontouchstart=null,n.targetElement.ontouchmove=null})),Jp&&(document.removeEventListener(\"touchmove\",rd,qp?{passive:!1}:void 0),Jp=!1),Qp=-1):(void 0!==td&&(document.body.style.paddingRight=td,td=void 0),void 0!==nd&&(document.body.style.overflow=nd,nd=void 0)),Zp=[]},ad=function(n){var e=n.options,a=n.callbacks,u=n.selectedElement,s=n.elements,c=n.dispatch,l=n.compensateForScrollbar,p=r(En),h=o(),v=o(),m=o(),g=o(),y=e.buttons,b=e.settings,w=e.progressBar,x=e.thumbnails,S=a.onCountSlides,_=a.onSlideChange,E=a.onLightboxClosed,T=a.onLightboxOpened,P=f((function(n){if(\"function\"==typeof _)return p.callbacks.onSlideChange(n);console.error('Simple React Lightbox error: you are not passing a function in your \"onSlideChange\" callback! You are passing a '.concat(el(_),\".\"))}),[p.callbacks,_]),C=f((function(n){\"function\"==typeof T?p.callbacks.onLightboxOpened(n):console.error('Simple React Lightbox error: you are not passing a function in your \"onLightboxOpened\" callback! You are passing a '.concat(el(T),\".\"))}),[p.callbacks,T]),A=f((function(n){\"function\"==typeof E?p.callbacks.onLightboxClosed(n):console.error('Simple React Lightbox error: you are not passing a function in your \"onLightboxClosed\" callback! You are passing a '.concat(el(E),\".\"))}),[p.callbacks,E]),L=f((function(n){\"function\"==typeof S?p.callbacks.onCountSlides(n):console.error('Simple React Lightbox error: you are not passing a function in your \"onCountSlides\" callback! You are passing a '.concat(el(S),\".\"))}),[p.callbacks,S]),O=bn(d(!1),2),k=O[0],R=O[1],N=bn(d(!1),2),z=N[0],I=N[1],D=bn(d(),2),M=D[0],j=D[1],B=bn(d(!1),2),V=B[0],F=B[1],W=Xp(b.hideControlsAfter<1e3?9999999:b.hideControlsAfter),Y=f((function(n){return Rn.exports.findIndex(s,(function(t){return t.id===n}))}),[s]),H=f((function(n,t,e){j(e?\"next\"===e?\"next\":\"previous\"===e?\"previous\":void 0:n>t?\"next\":nwindow.innerHeight&&c(window.innerWidth-document.documentElement.clientWidth)})),a?t.createElement(tl,{selector:\"SRLLightbox\",isOpened:e},t.createElement(ad,Dn({},n,{compensateForScrollbar:s}))):t.createElement(Jc,null,e&&t.createElement(tl,{selector:\"SRLLightbox\",isOpened:e},t.createElement(ad,Dn({},n,{compensateForScrollbar:s}))))}ad.propTypes={callbacks:mn.object,compensateForScrollbar:mn.number,elements:mn.array,isOpened:mn.bool,dispatch:mn.func,selectedElement:mn.object,options:mn.shape({thumbnails:mn.shape({thumbnailsContainerPadding:mn.string,thumbnailsPosition:mn.string,thumbnailsSize:mn.array,showThumbnails:mn.bool}),settings:mn.shape({overlayColor:mn.string,autoplaySpeed:mn.number,disableKeyboardControls:mn.bool,disablePanzoom:mn.bool,hideControlsAfter:mn.oneOfType([mn.number,mn.bool])}),buttons:mn.shape({backgroundColor:mn.string,iconColor:mn.string,iconPadding:mn.string,size:mn.string}),progressBar:mn.shape({showProgressBar:mn.bool,background:mn.string,height:mn.string})})},ud.propTypes={context:mn.object};var sd=function(n){var e=n.children;return t.createElement(Tn,null,e,t.createElement(ud,null))};sd.propTypes={children:mn.oneOfType([mn.arrayOf(mn.node),mn.node]).isRequired};export{In as SRLWrapper,sd as default,Ol as useLightbox};\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _slider = _interopRequireDefault(require(\"./slider\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar _default = _slider[\"default\"];\nexports[\"default\"] = _default;","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.filter(function (f) {\n return f != null;\n }).reduce(function (acc, f) {\n if (typeof f !== 'function') {\n throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n\n if (acc === null) return f;\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n // @ts-ignore\n acc.apply(this, args); // @ts-ignore\n\n f.apply(this, args);\n };\n }, null);\n}\n\nexport default createChainedFunction;","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n","'use strict';\n\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n};\n\nif (functionsHaveConfigurableNames && Object.defineProperty) {\n\tObject.defineProperty(module.exports, 'name', { value: 'get flags' });\n}\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset)\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @return {Function} A new, throttled, function.\n */\nmodule.exports = function ( delay, noTrailing, callback, debounceMode ) {\n\n\t// After wrapper has stopped being called, this timeout ensures that\n\t// `callback` is executed at the proper times in `throttle` and `end`\n\t// debounce modes.\n\tvar timeoutID;\n\n\t// Keep track of the last time `callback` was executed.\n\tvar lastExec = 0;\n\n\t// `noTrailing` defaults to falsy.\n\tif ( typeof noTrailing !== 'boolean' ) {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t// The `wrapper` function encapsulates all of the throttling / debouncing\n\t// functionality and when executed will limit the rate at which `callback`\n\t// is executed.\n\tfunction wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}\n\n\t// Return the wrapper function.\n\treturn wrapper;\n\n};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = convertNodeToElement;\n\nvar _elementTypes = require('./elementTypes');\n\nvar _elementTypes2 = _interopRequireDefault(_elementTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Converts a htmlparser2 node to a React element\n *\n * @param {Object} node The htmlparser2 node to convert\n * @param {Number} index The index of the current node\n * @param {Function} transform Transform function to apply to children of the node\n * @returns {React.Element}\n */\nfunction convertNodeToElement(node, index, transform) {\n return _elementTypes2.default[node.type](node, index, transform);\n}","var Tokenizer = require(\"./Tokenizer.js\");\n\n/*\n\tOptions:\n\n\txmlMode: Disables the special behavior for script/style tags (false by default)\n\tlowerCaseAttributeNames: call .toLowerCase for each attribute name (true if xmlMode is `false`)\n\tlowerCaseTags: call .toLowerCase for each tag name (true if xmlMode is `false`)\n*/\n\n/*\n\tCallbacks:\n\n\toncdataend,\n\toncdatastart,\n\tonclosetag,\n\toncomment,\n\toncommentend,\n\tonerror,\n\tonopentag,\n\tonprocessinginstruction,\n\tonreset,\n\tontext\n*/\n\nvar formTags = {\n input: true,\n option: true,\n optgroup: true,\n select: true,\n button: true,\n datalist: true,\n textarea: true\n};\n\nvar openImpliesClose = {\n tr: { tr: true, th: true, td: true },\n th: { th: true },\n td: { thead: true, th: true, td: true },\n body: { head: true, link: true, script: true },\n li: { li: true },\n p: { p: true },\n h1: { p: true },\n h2: { p: true },\n h3: { p: true },\n h4: { p: true },\n h5: { p: true },\n h6: { p: true },\n select: formTags,\n input: formTags,\n output: formTags,\n button: formTags,\n datalist: formTags,\n textarea: formTags,\n option: { option: true },\n optgroup: { optgroup: true }\n};\n\nvar voidElements = {\n __proto__: null,\n area: true,\n base: true,\n basefont: true,\n br: true,\n col: true,\n command: true,\n embed: true,\n frame: true,\n hr: true,\n img: true,\n input: true,\n isindex: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true\n};\n\nvar foreignContextElements = {\n __proto__: null,\n math: true,\n svg: true\n};\nvar htmlIntegrationElements = {\n __proto__: null,\n mi: true,\n mo: true,\n mn: true,\n ms: true,\n mtext: true,\n \"annotation-xml\": true,\n foreignObject: true,\n desc: true,\n title: true\n};\n\nvar re_nameEnd = /\\s|\\//;\n\nfunction Parser(cbs, options) {\n this._options = options || {};\n this._cbs = cbs || {};\n\n this._tagname = \"\";\n this._attribname = \"\";\n this._attribvalue = \"\";\n this._attribs = null;\n this._stack = [];\n this._foreignContext = [];\n\n this.startIndex = 0;\n this.endIndex = null;\n\n this._lowerCaseTagNames =\n \"lowerCaseTags\" in this._options\n ? !!this._options.lowerCaseTags\n : !this._options.xmlMode;\n this._lowerCaseAttributeNames =\n \"lowerCaseAttributeNames\" in this._options\n ? !!this._options.lowerCaseAttributeNames\n : !this._options.xmlMode;\n\n if (this._options.Tokenizer) {\n Tokenizer = this._options.Tokenizer;\n }\n this._tokenizer = new Tokenizer(this._options, this);\n\n if (this._cbs.onparserinit) this._cbs.onparserinit(this);\n}\n\nrequire(\"inherits\")(Parser, require(\"events\").EventEmitter);\n\nParser.prototype._updatePosition = function(initialOffset) {\n if (this.endIndex === null) {\n if (this._tokenizer._sectionStart <= initialOffset) {\n this.startIndex = 0;\n } else {\n this.startIndex = this._tokenizer._sectionStart - initialOffset;\n }\n } else this.startIndex = this.endIndex + 1;\n this.endIndex = this._tokenizer.getAbsoluteIndex();\n};\n\n//Tokenizer event handlers\nParser.prototype.ontext = function(data) {\n this._updatePosition(1);\n this.endIndex--;\n\n if (this._cbs.ontext) this._cbs.ontext(data);\n};\n\nParser.prototype.onopentagname = function(name) {\n if (this._lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n\n this._tagname = name;\n\n if (!this._options.xmlMode && name in openImpliesClose) {\n for (\n var el;\n (el = this._stack[this._stack.length - 1]) in\n openImpliesClose[name];\n this.onclosetag(el)\n );\n }\n\n if (this._options.xmlMode || !(name in voidElements)) {\n this._stack.push(name);\n if (name in foreignContextElements) this._foreignContext.push(true);\n else if (name in htmlIntegrationElements)\n this._foreignContext.push(false);\n }\n\n if (this._cbs.onopentagname) this._cbs.onopentagname(name);\n if (this._cbs.onopentag) this._attribs = {};\n};\n\nParser.prototype.onopentagend = function() {\n this._updatePosition(1);\n\n if (this._attribs) {\n if (this._cbs.onopentag)\n this._cbs.onopentag(this._tagname, this._attribs);\n this._attribs = null;\n }\n\n if (\n !this._options.xmlMode &&\n this._cbs.onclosetag &&\n this._tagname in voidElements\n ) {\n this._cbs.onclosetag(this._tagname);\n }\n\n this._tagname = \"\";\n};\n\nParser.prototype.onclosetag = function(name) {\n this._updatePosition(1);\n\n if (this._lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n \n if (name in foreignContextElements || name in htmlIntegrationElements) {\n this._foreignContext.pop();\n }\n\n if (\n this._stack.length &&\n (!(name in voidElements) || this._options.xmlMode)\n ) {\n var pos = this._stack.lastIndexOf(name);\n if (pos !== -1) {\n if (this._cbs.onclosetag) {\n pos = this._stack.length - pos;\n while (pos--) this._cbs.onclosetag(this._stack.pop());\n } else this._stack.length = pos;\n } else if (name === \"p\" && !this._options.xmlMode) {\n this.onopentagname(name);\n this._closeCurrentTag();\n }\n } else if (!this._options.xmlMode && (name === \"br\" || name === \"p\")) {\n this.onopentagname(name);\n this._closeCurrentTag();\n }\n};\n\nParser.prototype.onselfclosingtag = function() {\n if (\n this._options.xmlMode ||\n this._options.recognizeSelfClosing ||\n this._foreignContext[this._foreignContext.length - 1]\n ) {\n this._closeCurrentTag();\n } else {\n this.onopentagend();\n }\n};\n\nParser.prototype._closeCurrentTag = function() {\n var name = this._tagname;\n\n this.onopentagend();\n\n //self-closing tags will be on the top of the stack\n //(cheaper check than in onclosetag)\n if (this._stack[this._stack.length - 1] === name) {\n if (this._cbs.onclosetag) {\n this._cbs.onclosetag(name);\n }\n this._stack.pop();\n \n }\n};\n\nParser.prototype.onattribname = function(name) {\n if (this._lowerCaseAttributeNames) {\n name = name.toLowerCase();\n }\n this._attribname = name;\n};\n\nParser.prototype.onattribdata = function(value) {\n this._attribvalue += value;\n};\n\nParser.prototype.onattribend = function() {\n if (this._cbs.onattribute)\n this._cbs.onattribute(this._attribname, this._attribvalue);\n if (\n this._attribs &&\n !Object.prototype.hasOwnProperty.call(this._attribs, this._attribname)\n ) {\n this._attribs[this._attribname] = this._attribvalue;\n }\n this._attribname = \"\";\n this._attribvalue = \"\";\n};\n\nParser.prototype._getInstructionName = function(value) {\n var idx = value.search(re_nameEnd),\n name = idx < 0 ? value : value.substr(0, idx);\n\n if (this._lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n\n return name;\n};\n\nParser.prototype.ondeclaration = function(value) {\n if (this._cbs.onprocessinginstruction) {\n var name = this._getInstructionName(value);\n this._cbs.onprocessinginstruction(\"!\" + name, \"!\" + value);\n }\n};\n\nParser.prototype.onprocessinginstruction = function(value) {\n if (this._cbs.onprocessinginstruction) {\n var name = this._getInstructionName(value);\n this._cbs.onprocessinginstruction(\"?\" + name, \"?\" + value);\n }\n};\n\nParser.prototype.oncomment = function(value) {\n this._updatePosition(4);\n\n if (this._cbs.oncomment) this._cbs.oncomment(value);\n if (this._cbs.oncommentend) this._cbs.oncommentend();\n};\n\nParser.prototype.oncdata = function(value) {\n this._updatePosition(1);\n\n if (this._options.xmlMode || this._options.recognizeCDATA) {\n if (this._cbs.oncdatastart) this._cbs.oncdatastart();\n if (this._cbs.ontext) this._cbs.ontext(value);\n if (this._cbs.oncdataend) this._cbs.oncdataend();\n } else {\n this.oncomment(\"[CDATA[\" + value + \"]]\");\n }\n};\n\nParser.prototype.onerror = function(err) {\n if (this._cbs.onerror) this._cbs.onerror(err);\n};\n\nParser.prototype.onend = function() {\n if (this._cbs.onclosetag) {\n for (\n var i = this._stack.length;\n i > 0;\n this._cbs.onclosetag(this._stack[--i])\n );\n }\n if (this._cbs.onend) this._cbs.onend();\n};\n\n//Resets the parser to a blank state, ready to parse a new HTML document\nParser.prototype.reset = function() {\n if (this._cbs.onreset) this._cbs.onreset();\n this._tokenizer.reset();\n\n this._tagname = \"\";\n this._attribname = \"\";\n this._attribs = null;\n this._stack = [];\n\n if (this._cbs.onparserinit) this._cbs.onparserinit(this);\n};\n\n//Parses a complete HTML document and pushes it to the handler\nParser.prototype.parseComplete = function(data) {\n this.reset();\n this.end(data);\n};\n\nParser.prototype.write = function(chunk) {\n this._tokenizer.write(chunk);\n};\n\nParser.prototype.end = function(chunk) {\n this._tokenizer.end(chunk);\n};\n\nParser.prototype.pause = function() {\n this._tokenizer.pause();\n};\n\nParser.prototype.resume = function() {\n this._tokenizer.resume();\n};\n\n//alias for backwards compat\nParser.prototype.parseChunk = Parser.prototype.write;\nParser.prototype.done = Parser.prototype.end;\n\nmodule.exports = Parser;\n","module.exports = Tokenizer;\n\nvar decodeCodePoint = require(\"entities/lib/decode_codepoint.js\");\nvar entityMap = require(\"entities/maps/entities.json\");\nvar legacyMap = require(\"entities/maps/legacy.json\");\nvar xmlMap = require(\"entities/maps/xml.json\");\n\nvar i = 0;\n\nvar TEXT = i++;\nvar BEFORE_TAG_NAME = i++; //after <\nvar IN_TAG_NAME = i++;\nvar IN_SELF_CLOSING_TAG = i++;\nvar BEFORE_CLOSING_TAG_NAME = i++;\nvar IN_CLOSING_TAG_NAME = i++;\nvar AFTER_CLOSING_TAG_NAME = i++;\n\n//attributes\nvar BEFORE_ATTRIBUTE_NAME = i++;\nvar IN_ATTRIBUTE_NAME = i++;\nvar AFTER_ATTRIBUTE_NAME = i++;\nvar BEFORE_ATTRIBUTE_VALUE = i++;\nvar IN_ATTRIBUTE_VALUE_DQ = i++; // \"\nvar IN_ATTRIBUTE_VALUE_SQ = i++; // '\nvar IN_ATTRIBUTE_VALUE_NQ = i++;\n\n//declarations\nvar BEFORE_DECLARATION = i++; // !\nvar IN_DECLARATION = i++;\n\n//processing instructions\nvar IN_PROCESSING_INSTRUCTION = i++; // ?\n\n//comments\nvar BEFORE_COMMENT = i++;\nvar IN_COMMENT = i++;\nvar AFTER_COMMENT_1 = i++;\nvar AFTER_COMMENT_2 = i++;\n\n//cdata\nvar BEFORE_CDATA_1 = i++; // [\nvar BEFORE_CDATA_2 = i++; // C\nvar BEFORE_CDATA_3 = i++; // D\nvar BEFORE_CDATA_4 = i++; // A\nvar BEFORE_CDATA_5 = i++; // T\nvar BEFORE_CDATA_6 = i++; // A\nvar IN_CDATA = i++; // [\nvar AFTER_CDATA_1 = i++; // ]\nvar AFTER_CDATA_2 = i++; // ]\n\n//special tags\nvar BEFORE_SPECIAL = i++; //S\nvar BEFORE_SPECIAL_END = i++; //S\n\nvar BEFORE_SCRIPT_1 = i++; //C\nvar BEFORE_SCRIPT_2 = i++; //R\nvar BEFORE_SCRIPT_3 = i++; //I\nvar BEFORE_SCRIPT_4 = i++; //P\nvar BEFORE_SCRIPT_5 = i++; //T\nvar AFTER_SCRIPT_1 = i++; //C\nvar AFTER_SCRIPT_2 = i++; //R\nvar AFTER_SCRIPT_3 = i++; //I\nvar AFTER_SCRIPT_4 = i++; //P\nvar AFTER_SCRIPT_5 = i++; //T\n\nvar BEFORE_STYLE_1 = i++; //T\nvar BEFORE_STYLE_2 = i++; //Y\nvar BEFORE_STYLE_3 = i++; //L\nvar BEFORE_STYLE_4 = i++; //E\nvar AFTER_STYLE_1 = i++; //T\nvar AFTER_STYLE_2 = i++; //Y\nvar AFTER_STYLE_3 = i++; //L\nvar AFTER_STYLE_4 = i++; //E\n\nvar BEFORE_ENTITY = i++; //&\nvar BEFORE_NUMERIC_ENTITY = i++; //#\nvar IN_NAMED_ENTITY = i++;\nvar IN_NUMERIC_ENTITY = i++;\nvar IN_HEX_ENTITY = i++; //X\n\nvar j = 0;\n\nvar SPECIAL_NONE = j++;\nvar SPECIAL_SCRIPT = j++;\nvar SPECIAL_STYLE = j++;\n\nfunction whitespace(c) {\n return c === \" \" || c === \"\\n\" || c === \"\\t\" || c === \"\\f\" || c === \"\\r\";\n}\n\nfunction ifElseState(upper, SUCCESS, FAILURE) {\n var lower = upper.toLowerCase();\n\n if (upper === lower) {\n return function(c) {\n if (c === lower) {\n this._state = SUCCESS;\n } else {\n this._state = FAILURE;\n this._index--;\n }\n };\n } else {\n return function(c) {\n if (c === lower || c === upper) {\n this._state = SUCCESS;\n } else {\n this._state = FAILURE;\n this._index--;\n }\n };\n }\n}\n\nfunction consumeSpecialNameChar(upper, NEXT_STATE) {\n var lower = upper.toLowerCase();\n\n return function(c) {\n if (c === lower || c === upper) {\n this._state = NEXT_STATE;\n } else {\n this._state = IN_TAG_NAME;\n this._index--; //consume the token again\n }\n };\n}\n\nfunction Tokenizer(options, cbs) {\n this._state = TEXT;\n this._buffer = \"\";\n this._sectionStart = 0;\n this._index = 0;\n this._bufferOffset = 0; //chars removed from _buffer\n this._baseState = TEXT;\n this._special = SPECIAL_NONE;\n this._cbs = cbs;\n this._running = true;\n this._ended = false;\n this._xmlMode = !!(options && options.xmlMode);\n this._decodeEntities = !!(options && options.decodeEntities);\n}\n\nTokenizer.prototype._stateText = function(c) {\n if (c === \"<\") {\n if (this._index > this._sectionStart) {\n this._cbs.ontext(this._getSection());\n }\n this._state = BEFORE_TAG_NAME;\n this._sectionStart = this._index;\n } else if (\n this._decodeEntities &&\n this._special === SPECIAL_NONE &&\n c === \"&\"\n ) {\n if (this._index > this._sectionStart) {\n this._cbs.ontext(this._getSection());\n }\n this._baseState = TEXT;\n this._state = BEFORE_ENTITY;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateBeforeTagName = function(c) {\n if (c === \"/\") {\n this._state = BEFORE_CLOSING_TAG_NAME;\n } else if (c === \"<\") {\n this._cbs.ontext(this._getSection());\n this._sectionStart = this._index;\n } else if (c === \">\" || this._special !== SPECIAL_NONE || whitespace(c)) {\n this._state = TEXT;\n } else if (c === \"!\") {\n this._state = BEFORE_DECLARATION;\n this._sectionStart = this._index + 1;\n } else if (c === \"?\") {\n this._state = IN_PROCESSING_INSTRUCTION;\n this._sectionStart = this._index + 1;\n } else {\n this._state =\n !this._xmlMode && (c === \"s\" || c === \"S\")\n ? BEFORE_SPECIAL\n : IN_TAG_NAME;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateInTagName = function(c) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this._emitToken(\"onopentagname\");\n this._state = BEFORE_ATTRIBUTE_NAME;\n this._index--;\n }\n};\n\nTokenizer.prototype._stateBeforeCloseingTagName = function(c) {\n if (whitespace(c));\n else if (c === \">\") {\n this._state = TEXT;\n } else if (this._special !== SPECIAL_NONE) {\n if (c === \"s\" || c === \"S\") {\n this._state = BEFORE_SPECIAL_END;\n } else {\n this._state = TEXT;\n this._index--;\n }\n } else {\n this._state = IN_CLOSING_TAG_NAME;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateInCloseingTagName = function(c) {\n if (c === \">\" || whitespace(c)) {\n this._emitToken(\"onclosetag\");\n this._state = AFTER_CLOSING_TAG_NAME;\n this._index--;\n }\n};\n\nTokenizer.prototype._stateAfterCloseingTagName = function(c) {\n //skip everything until \">\"\n if (c === \">\") {\n this._state = TEXT;\n this._sectionStart = this._index + 1;\n }\n};\n\nTokenizer.prototype._stateBeforeAttributeName = function(c) {\n if (c === \">\") {\n this._cbs.onopentagend();\n this._state = TEXT;\n this._sectionStart = this._index + 1;\n } else if (c === \"/\") {\n this._state = IN_SELF_CLOSING_TAG;\n } else if (!whitespace(c)) {\n this._state = IN_ATTRIBUTE_NAME;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateInSelfClosingTag = function(c) {\n if (c === \">\") {\n this._cbs.onselfclosingtag();\n this._state = TEXT;\n this._sectionStart = this._index + 1;\n } else if (!whitespace(c)) {\n this._state = BEFORE_ATTRIBUTE_NAME;\n this._index--;\n }\n};\n\nTokenizer.prototype._stateInAttributeName = function(c) {\n if (c === \"=\" || c === \"/\" || c === \">\" || whitespace(c)) {\n this._cbs.onattribname(this._getSection());\n this._sectionStart = -1;\n this._state = AFTER_ATTRIBUTE_NAME;\n this._index--;\n }\n};\n\nTokenizer.prototype._stateAfterAttributeName = function(c) {\n if (c === \"=\") {\n this._state = BEFORE_ATTRIBUTE_VALUE;\n } else if (c === \"/\" || c === \">\") {\n this._cbs.onattribend();\n this._state = BEFORE_ATTRIBUTE_NAME;\n this._index--;\n } else if (!whitespace(c)) {\n this._cbs.onattribend();\n this._state = IN_ATTRIBUTE_NAME;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateBeforeAttributeValue = function(c) {\n if (c === '\"') {\n this._state = IN_ATTRIBUTE_VALUE_DQ;\n this._sectionStart = this._index + 1;\n } else if (c === \"'\") {\n this._state = IN_ATTRIBUTE_VALUE_SQ;\n this._sectionStart = this._index + 1;\n } else if (!whitespace(c)) {\n this._state = IN_ATTRIBUTE_VALUE_NQ;\n this._sectionStart = this._index;\n this._index--; //reconsume token\n }\n};\n\nTokenizer.prototype._stateInAttributeValueDoubleQuotes = function(c) {\n if (c === '\"') {\n this._emitToken(\"onattribdata\");\n this._cbs.onattribend();\n this._state = BEFORE_ATTRIBUTE_NAME;\n } else if (this._decodeEntities && c === \"&\") {\n this._emitToken(\"onattribdata\");\n this._baseState = this._state;\n this._state = BEFORE_ENTITY;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateInAttributeValueSingleQuotes = function(c) {\n if (c === \"'\") {\n this._emitToken(\"onattribdata\");\n this._cbs.onattribend();\n this._state = BEFORE_ATTRIBUTE_NAME;\n } else if (this._decodeEntities && c === \"&\") {\n this._emitToken(\"onattribdata\");\n this._baseState = this._state;\n this._state = BEFORE_ENTITY;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateInAttributeValueNoQuotes = function(c) {\n if (whitespace(c) || c === \">\") {\n this._emitToken(\"onattribdata\");\n this._cbs.onattribend();\n this._state = BEFORE_ATTRIBUTE_NAME;\n this._index--;\n } else if (this._decodeEntities && c === \"&\") {\n this._emitToken(\"onattribdata\");\n this._baseState = this._state;\n this._state = BEFORE_ENTITY;\n this._sectionStart = this._index;\n }\n};\n\nTokenizer.prototype._stateBeforeDeclaration = function(c) {\n this._state =\n c === \"[\"\n ? BEFORE_CDATA_1\n : c === \"-\"\n ? BEFORE_COMMENT\n : IN_DECLARATION;\n};\n\nTokenizer.prototype._stateInDeclaration = function(c) {\n if (c === \">\") {\n this._cbs.ondeclaration(this._getSection());\n this._state = TEXT;\n this._sectionStart = this._index + 1;\n }\n};\n\nTokenizer.prototype._stateInProcessingInstruction = function(c) {\n if (c === \">\") {\n this._cbs.onprocessinginstruction(this._getSection());\n this._state = TEXT;\n this._sectionStart = this._index + 1;\n }\n};\n\nTokenizer.prototype._stateBeforeComment = function(c) {\n if (c === \"-\") {\n this._state = IN_COMMENT;\n this._sectionStart = this._index + 1;\n } else {\n this._state = IN_DECLARATION;\n }\n};\n\nTokenizer.prototype._stateInComment = function(c) {\n if (c === \"-\") this._state = AFTER_COMMENT_1;\n};\n\nTokenizer.prototype._stateAfterComment1 = function(c) {\n if (c === \"-\") {\n this._state = AFTER_COMMENT_2;\n } else {\n this._state = IN_COMMENT;\n }\n};\n\nTokenizer.prototype._stateAfterComment2 = function(c) {\n if (c === \">\") {\n //remove 2 trailing chars\n this._cbs.oncomment(\n this._buffer.substring(this._sectionStart, this._index - 2)\n );\n this._state = TEXT;\n this._sectionStart = this._index + 1;\n } else if (c !== \"-\") {\n this._state = IN_COMMENT;\n }\n // else: stay in AFTER_COMMENT_2 (`--->`)\n};\n\nTokenizer.prototype._stateBeforeCdata1 = ifElseState(\n \"C\",\n BEFORE_CDATA_2,\n IN_DECLARATION\n);\nTokenizer.prototype._stateBeforeCdata2 = ifElseState(\n \"D\",\n BEFORE_CDATA_3,\n IN_DECLARATION\n);\nTokenizer.prototype._stateBeforeCdata3 = ifElseState(\n \"A\",\n BEFORE_CDATA_4,\n IN_DECLARATION\n);\nTokenizer.prototype._stateBeforeCdata4 = ifElseState(\n \"T\",\n BEFORE_CDATA_5,\n IN_DECLARATION\n);\nTokenizer.prototype._stateBeforeCdata5 = ifElseState(\n \"A\",\n BEFORE_CDATA_6,\n IN_DECLARATION\n);\n\nTokenizer.prototype._stateBeforeCdata6 = function(c) {\n if (c === \"[\") {\n this._state = IN_CDATA;\n this._sectionStart = this._index + 1;\n } else {\n this._state = IN_DECLARATION;\n this._index--;\n }\n};\n\nTokenizer.prototype._stateInCdata = function(c) {\n if (c === \"]\") this._state = AFTER_CDATA_1;\n};\n\nTokenizer.prototype._stateAfterCdata1 = function(c) {\n if (c === \"]\") this._state = AFTER_CDATA_2;\n else this._state = IN_CDATA;\n};\n\nTokenizer.prototype._stateAfterCdata2 = function(c) {\n if (c === \">\") {\n //remove 2 trailing chars\n this._cbs.oncdata(\n this._buffer.substring(this._sectionStart, this._index - 2)\n );\n this._state = TEXT;\n this._sectionStart = this._index + 1;\n } else if (c !== \"]\") {\n this._state = IN_CDATA;\n }\n //else: stay in AFTER_CDATA_2 (`]]]>`)\n};\n\nTokenizer.prototype._stateBeforeSpecial = function(c) {\n if (c === \"c\" || c === \"C\") {\n this._state = BEFORE_SCRIPT_1;\n } else if (c === \"t\" || c === \"T\") {\n this._state = BEFORE_STYLE_1;\n } else {\n this._state = IN_TAG_NAME;\n this._index--; //consume the token again\n }\n};\n\nTokenizer.prototype._stateBeforeSpecialEnd = function(c) {\n if (this._special === SPECIAL_SCRIPT && (c === \"c\" || c === \"C\")) {\n this._state = AFTER_SCRIPT_1;\n } else if (this._special === SPECIAL_STYLE && (c === \"t\" || c === \"T\")) {\n this._state = AFTER_STYLE_1;\n } else this._state = TEXT;\n};\n\nTokenizer.prototype._stateBeforeScript1 = consumeSpecialNameChar(\n \"R\",\n BEFORE_SCRIPT_2\n);\nTokenizer.prototype._stateBeforeScript2 = consumeSpecialNameChar(\n \"I\",\n BEFORE_SCRIPT_3\n);\nTokenizer.prototype._stateBeforeScript3 = consumeSpecialNameChar(\n \"P\",\n BEFORE_SCRIPT_4\n);\nTokenizer.prototype._stateBeforeScript4 = consumeSpecialNameChar(\n \"T\",\n BEFORE_SCRIPT_5\n);\n\nTokenizer.prototype._stateBeforeScript5 = function(c) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this._special = SPECIAL_SCRIPT;\n }\n this._state = IN_TAG_NAME;\n this._index--; //consume the token again\n};\n\nTokenizer.prototype._stateAfterScript1 = ifElseState(\"R\", AFTER_SCRIPT_2, TEXT);\nTokenizer.prototype._stateAfterScript2 = ifElseState(\"I\", AFTER_SCRIPT_3, TEXT);\nTokenizer.prototype._stateAfterScript3 = ifElseState(\"P\", AFTER_SCRIPT_4, TEXT);\nTokenizer.prototype._stateAfterScript4 = ifElseState(\"T\", AFTER_SCRIPT_5, TEXT);\n\nTokenizer.prototype._stateAfterScript5 = function(c) {\n if (c === \">\" || whitespace(c)) {\n this._special = SPECIAL_NONE;\n this._state = IN_CLOSING_TAG_NAME;\n this._sectionStart = this._index - 6;\n this._index--; //reconsume the token\n } else this._state = TEXT;\n};\n\nTokenizer.prototype._stateBeforeStyle1 = consumeSpecialNameChar(\n \"Y\",\n BEFORE_STYLE_2\n);\nTokenizer.prototype._stateBeforeStyle2 = consumeSpecialNameChar(\n \"L\",\n BEFORE_STYLE_3\n);\nTokenizer.prototype._stateBeforeStyle3 = consumeSpecialNameChar(\n \"E\",\n BEFORE_STYLE_4\n);\n\nTokenizer.prototype._stateBeforeStyle4 = function(c) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this._special = SPECIAL_STYLE;\n }\n this._state = IN_TAG_NAME;\n this._index--; //consume the token again\n};\n\nTokenizer.prototype._stateAfterStyle1 = ifElseState(\"Y\", AFTER_STYLE_2, TEXT);\nTokenizer.prototype._stateAfterStyle2 = ifElseState(\"L\", AFTER_STYLE_3, TEXT);\nTokenizer.prototype._stateAfterStyle3 = ifElseState(\"E\", AFTER_STYLE_4, TEXT);\n\nTokenizer.prototype._stateAfterStyle4 = function(c) {\n if (c === \">\" || whitespace(c)) {\n this._special = SPECIAL_NONE;\n this._state = IN_CLOSING_TAG_NAME;\n this._sectionStart = this._index - 5;\n this._index--; //reconsume the token\n } else this._state = TEXT;\n};\n\nTokenizer.prototype._stateBeforeEntity = ifElseState(\n \"#\",\n BEFORE_NUMERIC_ENTITY,\n IN_NAMED_ENTITY\n);\nTokenizer.prototype._stateBeforeNumericEntity = ifElseState(\n \"X\",\n IN_HEX_ENTITY,\n IN_NUMERIC_ENTITY\n);\n\n//for entities terminated with a semicolon\nTokenizer.prototype._parseNamedEntityStrict = function() {\n //offset = 1\n if (this._sectionStart + 1 < this._index) {\n var entity = this._buffer.substring(\n this._sectionStart + 1,\n this._index\n ),\n map = this._xmlMode ? xmlMap : entityMap;\n\n if (map.hasOwnProperty(entity)) {\n this._emitPartial(map[entity]);\n this._sectionStart = this._index + 1;\n }\n }\n};\n\n//parses legacy entities (without trailing semicolon)\nTokenizer.prototype._parseLegacyEntity = function() {\n var start = this._sectionStart + 1,\n limit = this._index - start;\n\n if (limit > 6) limit = 6; //the max length of legacy entities is 6\n\n while (limit >= 2) {\n //the min length of legacy entities is 2\n var entity = this._buffer.substr(start, limit);\n\n if (legacyMap.hasOwnProperty(entity)) {\n this._emitPartial(legacyMap[entity]);\n this._sectionStart += limit + 1;\n return;\n } else {\n limit--;\n }\n }\n};\n\nTokenizer.prototype._stateInNamedEntity = function(c) {\n if (c === \";\") {\n this._parseNamedEntityStrict();\n if (this._sectionStart + 1 < this._index && !this._xmlMode) {\n this._parseLegacyEntity();\n }\n this._state = this._baseState;\n } else if (\n (c < \"a\" || c > \"z\") &&\n (c < \"A\" || c > \"Z\") &&\n (c < \"0\" || c > \"9\")\n ) {\n if (this._xmlMode);\n else if (this._sectionStart + 1 === this._index);\n else if (this._baseState !== TEXT) {\n if (c !== \"=\") {\n this._parseNamedEntityStrict();\n }\n } else {\n this._parseLegacyEntity();\n }\n\n this._state = this._baseState;\n this._index--;\n }\n};\n\nTokenizer.prototype._decodeNumericEntity = function(offset, base) {\n var sectionStart = this._sectionStart + offset;\n\n if (sectionStart !== this._index) {\n //parse entity\n var entity = this._buffer.substring(sectionStart, this._index);\n var parsed = parseInt(entity, base);\n\n this._emitPartial(decodeCodePoint(parsed));\n this._sectionStart = this._index;\n } else {\n this._sectionStart--;\n }\n\n this._state = this._baseState;\n};\n\nTokenizer.prototype._stateInNumericEntity = function(c) {\n if (c === \";\") {\n this._decodeNumericEntity(2, 10);\n this._sectionStart++;\n } else if (c < \"0\" || c > \"9\") {\n if (!this._xmlMode) {\n this._decodeNumericEntity(2, 10);\n } else {\n this._state = this._baseState;\n }\n this._index--;\n }\n};\n\nTokenizer.prototype._stateInHexEntity = function(c) {\n if (c === \";\") {\n this._decodeNumericEntity(3, 16);\n this._sectionStart++;\n } else if (\n (c < \"a\" || c > \"f\") &&\n (c < \"A\" || c > \"F\") &&\n (c < \"0\" || c > \"9\")\n ) {\n if (!this._xmlMode) {\n this._decodeNumericEntity(3, 16);\n } else {\n this._state = this._baseState;\n }\n this._index--;\n }\n};\n\nTokenizer.prototype._cleanup = function() {\n if (this._sectionStart < 0) {\n this._buffer = \"\";\n this._bufferOffset += this._index;\n this._index = 0;\n } else if (this._running) {\n if (this._state === TEXT) {\n if (this._sectionStart !== this._index) {\n this._cbs.ontext(this._buffer.substr(this._sectionStart));\n }\n this._buffer = \"\";\n this._bufferOffset += this._index;\n this._index = 0;\n } else if (this._sectionStart === this._index) {\n //the section just started\n this._buffer = \"\";\n this._bufferOffset += this._index;\n this._index = 0;\n } else {\n //remove everything unnecessary\n this._buffer = this._buffer.substr(this._sectionStart);\n this._index -= this._sectionStart;\n this._bufferOffset += this._sectionStart;\n }\n\n this._sectionStart = 0;\n }\n};\n\n//TODO make events conditional\nTokenizer.prototype.write = function(chunk) {\n if (this._ended) this._cbs.onerror(Error(\".write() after done!\"));\n\n this._buffer += chunk;\n this._parse();\n};\n\nTokenizer.prototype._parse = function() {\n while (this._index < this._buffer.length && this._running) {\n var c = this._buffer.charAt(this._index);\n if (this._state === TEXT) {\n this._stateText(c);\n } else if (this._state === BEFORE_TAG_NAME) {\n this._stateBeforeTagName(c);\n } else if (this._state === IN_TAG_NAME) {\n this._stateInTagName(c);\n } else if (this._state === BEFORE_CLOSING_TAG_NAME) {\n this._stateBeforeCloseingTagName(c);\n } else if (this._state === IN_CLOSING_TAG_NAME) {\n this._stateInCloseingTagName(c);\n } else if (this._state === AFTER_CLOSING_TAG_NAME) {\n this._stateAfterCloseingTagName(c);\n } else if (this._state === IN_SELF_CLOSING_TAG) {\n this._stateInSelfClosingTag(c);\n } else if (this._state === BEFORE_ATTRIBUTE_NAME) {\n\n /*\n\t\t*\tattributes\n\t\t*/\n this._stateBeforeAttributeName(c);\n } else if (this._state === IN_ATTRIBUTE_NAME) {\n this._stateInAttributeName(c);\n } else if (this._state === AFTER_ATTRIBUTE_NAME) {\n this._stateAfterAttributeName(c);\n } else if (this._state === BEFORE_ATTRIBUTE_VALUE) {\n this._stateBeforeAttributeValue(c);\n } else if (this._state === IN_ATTRIBUTE_VALUE_DQ) {\n this._stateInAttributeValueDoubleQuotes(c);\n } else if (this._state === IN_ATTRIBUTE_VALUE_SQ) {\n this._stateInAttributeValueSingleQuotes(c);\n } else if (this._state === IN_ATTRIBUTE_VALUE_NQ) {\n this._stateInAttributeValueNoQuotes(c);\n } else if (this._state === BEFORE_DECLARATION) {\n\n /*\n\t\t*\tdeclarations\n\t\t*/\n this._stateBeforeDeclaration(c);\n } else if (this._state === IN_DECLARATION) {\n this._stateInDeclaration(c);\n } else if (this._state === IN_PROCESSING_INSTRUCTION) {\n\n /*\n\t\t*\tprocessing instructions\n\t\t*/\n this._stateInProcessingInstruction(c);\n } else if (this._state === BEFORE_COMMENT) {\n\n /*\n\t\t*\tcomments\n\t\t*/\n this._stateBeforeComment(c);\n } else if (this._state === IN_COMMENT) {\n this._stateInComment(c);\n } else if (this._state === AFTER_COMMENT_1) {\n this._stateAfterComment1(c);\n } else if (this._state === AFTER_COMMENT_2) {\n this._stateAfterComment2(c);\n } else if (this._state === BEFORE_CDATA_1) {\n\n /*\n\t\t*\tcdata\n\t\t*/\n this._stateBeforeCdata1(c);\n } else if (this._state === BEFORE_CDATA_2) {\n this._stateBeforeCdata2(c);\n } else if (this._state === BEFORE_CDATA_3) {\n this._stateBeforeCdata3(c);\n } else if (this._state === BEFORE_CDATA_4) {\n this._stateBeforeCdata4(c);\n } else if (this._state === BEFORE_CDATA_5) {\n this._stateBeforeCdata5(c);\n } else if (this._state === BEFORE_CDATA_6) {\n this._stateBeforeCdata6(c);\n } else if (this._state === IN_CDATA) {\n this._stateInCdata(c);\n } else if (this._state === AFTER_CDATA_1) {\n this._stateAfterCdata1(c);\n } else if (this._state === AFTER_CDATA_2) {\n this._stateAfterCdata2(c);\n } else if (this._state === BEFORE_SPECIAL) {\n\n /*\n\t\t* special tags\n\t\t*/\n this._stateBeforeSpecial(c);\n } else if (this._state === BEFORE_SPECIAL_END) {\n this._stateBeforeSpecialEnd(c);\n } else if (this._state === BEFORE_SCRIPT_1) {\n\n /*\n\t\t* script\n\t\t*/\n this._stateBeforeScript1(c);\n } else if (this._state === BEFORE_SCRIPT_2) {\n this._stateBeforeScript2(c);\n } else if (this._state === BEFORE_SCRIPT_3) {\n this._stateBeforeScript3(c);\n } else if (this._state === BEFORE_SCRIPT_4) {\n this._stateBeforeScript4(c);\n } else if (this._state === BEFORE_SCRIPT_5) {\n this._stateBeforeScript5(c);\n } else if (this._state === AFTER_SCRIPT_1) {\n this._stateAfterScript1(c);\n } else if (this._state === AFTER_SCRIPT_2) {\n this._stateAfterScript2(c);\n } else if (this._state === AFTER_SCRIPT_3) {\n this._stateAfterScript3(c);\n } else if (this._state === AFTER_SCRIPT_4) {\n this._stateAfterScript4(c);\n } else if (this._state === AFTER_SCRIPT_5) {\n this._stateAfterScript5(c);\n } else if (this._state === BEFORE_STYLE_1) {\n\n /*\n\t\t* style\n\t\t*/\n this._stateBeforeStyle1(c);\n } else if (this._state === BEFORE_STYLE_2) {\n this._stateBeforeStyle2(c);\n } else if (this._state === BEFORE_STYLE_3) {\n this._stateBeforeStyle3(c);\n } else if (this._state === BEFORE_STYLE_4) {\n this._stateBeforeStyle4(c);\n } else if (this._state === AFTER_STYLE_1) {\n this._stateAfterStyle1(c);\n } else if (this._state === AFTER_STYLE_2) {\n this._stateAfterStyle2(c);\n } else if (this._state === AFTER_STYLE_3) {\n this._stateAfterStyle3(c);\n } else if (this._state === AFTER_STYLE_4) {\n this._stateAfterStyle4(c);\n } else if (this._state === BEFORE_ENTITY) {\n\n /*\n\t\t* entities\n\t\t*/\n this._stateBeforeEntity(c);\n } else if (this._state === BEFORE_NUMERIC_ENTITY) {\n this._stateBeforeNumericEntity(c);\n } else if (this._state === IN_NAMED_ENTITY) {\n this._stateInNamedEntity(c);\n } else if (this._state === IN_NUMERIC_ENTITY) {\n this._stateInNumericEntity(c);\n } else if (this._state === IN_HEX_ENTITY) {\n this._stateInHexEntity(c);\n } else {\n this._cbs.onerror(Error(\"unknown _state\"), this._state);\n }\n\n this._index++;\n }\n\n this._cleanup();\n};\n\nTokenizer.prototype.pause = function() {\n this._running = false;\n};\nTokenizer.prototype.resume = function() {\n this._running = true;\n\n if (this._index < this._buffer.length) {\n this._parse();\n }\n if (this._ended) {\n this._finish();\n }\n};\n\nTokenizer.prototype.end = function(chunk) {\n if (this._ended) this._cbs.onerror(Error(\".end() after done!\"));\n if (chunk) this.write(chunk);\n\n this._ended = true;\n\n if (this._running) this._finish();\n};\n\nTokenizer.prototype._finish = function() {\n //if there is remaining data, emit it in a reasonable way\n if (this._sectionStart < this._index) {\n this._handleTrailingData();\n }\n\n this._cbs.onend();\n};\n\nTokenizer.prototype._handleTrailingData = function() {\n var data = this._buffer.substr(this._sectionStart);\n\n if (\n this._state === IN_CDATA ||\n this._state === AFTER_CDATA_1 ||\n this._state === AFTER_CDATA_2\n ) {\n this._cbs.oncdata(data);\n } else if (\n this._state === IN_COMMENT ||\n this._state === AFTER_COMMENT_1 ||\n this._state === AFTER_COMMENT_2\n ) {\n this._cbs.oncomment(data);\n } else if (this._state === IN_NAMED_ENTITY && !this._xmlMode) {\n this._parseLegacyEntity();\n if (this._sectionStart < this._index) {\n this._state = this._baseState;\n this._handleTrailingData();\n }\n } else if (this._state === IN_NUMERIC_ENTITY && !this._xmlMode) {\n this._decodeNumericEntity(2, 10);\n if (this._sectionStart < this._index) {\n this._state = this._baseState;\n this._handleTrailingData();\n }\n } else if (this._state === IN_HEX_ENTITY && !this._xmlMode) {\n this._decodeNumericEntity(3, 16);\n if (this._sectionStart < this._index) {\n this._state = this._baseState;\n this._handleTrailingData();\n }\n } else if (\n this._state !== IN_TAG_NAME &&\n this._state !== BEFORE_ATTRIBUTE_NAME &&\n this._state !== BEFORE_ATTRIBUTE_VALUE &&\n this._state !== AFTER_ATTRIBUTE_NAME &&\n this._state !== IN_ATTRIBUTE_NAME &&\n this._state !== IN_ATTRIBUTE_VALUE_SQ &&\n this._state !== IN_ATTRIBUTE_VALUE_DQ &&\n this._state !== IN_ATTRIBUTE_VALUE_NQ &&\n this._state !== IN_CLOSING_TAG_NAME\n ) {\n this._cbs.ontext(data);\n }\n //else, ignore remaining data\n //TODO add a way to remove current tag\n};\n\nTokenizer.prototype.reset = function() {\n Tokenizer.call(\n this,\n { xmlMode: this._xmlMode, decodeEntities: this._decodeEntities },\n this._cbs\n );\n};\n\nTokenizer.prototype.getAbsoluteIndex = function() {\n return this._bufferOffset + this._index;\n};\n\nTokenizer.prototype._getSection = function() {\n return this._buffer.substring(this._sectionStart, this._index);\n};\n\nTokenizer.prototype._emitToken = function(name) {\n this._cbs[name](this._getSection());\n this._sectionStart = -1;\n};\n\nTokenizer.prototype._emitPartial = function(value) {\n if (this._baseState !== TEXT) {\n this._cbs.onattribdata(value); //TODO implement the new event\n } else {\n this._cbs.ontext(value);\n }\n};\n","var ElementType = require(\"domelementtype\");\n\nvar re_whitespace = /\\s+/g;\nvar NodePrototype = require(\"./lib/node\");\nvar ElementPrototype = require(\"./lib/element\");\n\nfunction DomHandler(callback, options, elementCB){\n\tif(typeof callback === \"object\"){\n\t\telementCB = options;\n\t\toptions = callback;\n\t\tcallback = null;\n\t} else if(typeof options === \"function\"){\n\t\telementCB = options;\n\t\toptions = defaultOpts;\n\t}\n\tthis._callback = callback;\n\tthis._options = options || defaultOpts;\n\tthis._elementCB = elementCB;\n\tthis.dom = [];\n\tthis._done = false;\n\tthis._tagStack = [];\n\tthis._parser = this._parser || null;\n}\n\n//default options\nvar defaultOpts = {\n\tnormalizeWhitespace: false, //Replace all whitespace with single spaces\n\twithStartIndices: false, //Add startIndex properties to nodes\n\twithEndIndices: false, //Add endIndex properties to nodes\n};\n\nDomHandler.prototype.onparserinit = function(parser){\n\tthis._parser = parser;\n};\n\n//Resets the handler back to starting state\nDomHandler.prototype.onreset = function(){\n\tDomHandler.call(this, this._callback, this._options, this._elementCB);\n};\n\n//Signals the handler that parsing is done\nDomHandler.prototype.onend = function(){\n\tif(this._done) return;\n\tthis._done = true;\n\tthis._parser = null;\n\tthis._handleCallback(null);\n};\n\nDomHandler.prototype._handleCallback =\nDomHandler.prototype.onerror = function(error){\n\tif(typeof this._callback === \"function\"){\n\t\tthis._callback(error, this.dom);\n\t} else {\n\t\tif(error) throw error;\n\t}\n};\n\nDomHandler.prototype.onclosetag = function(){\n\t//if(this._tagStack.pop().name !== name) this._handleCallback(Error(\"Tagname didn't match!\"));\n\t\n\tvar elem = this._tagStack.pop();\n\n\tif(this._options.withEndIndices && elem){\n\t\telem.endIndex = this._parser.endIndex;\n\t}\n\n\tif(this._elementCB) this._elementCB(elem);\n};\n\nDomHandler.prototype._createDomElement = function(properties){\n\tif (!this._options.withDomLvl1) return properties;\n\n\tvar element;\n\tif (properties.type === \"tag\") {\n\t\telement = Object.create(ElementPrototype);\n\t} else {\n\t\telement = Object.create(NodePrototype);\n\t}\n\n\tfor (var key in properties) {\n\t\tif (properties.hasOwnProperty(key)) {\n\t\t\telement[key] = properties[key];\n\t\t}\n\t}\n\n\treturn element;\n};\n\nDomHandler.prototype._addDomElement = function(element){\n\tvar parent = this._tagStack[this._tagStack.length - 1];\n\tvar siblings = parent ? parent.children : this.dom;\n\tvar previousSibling = siblings[siblings.length - 1];\n\n\telement.next = null;\n\n\tif(this._options.withStartIndices){\n\t\telement.startIndex = this._parser.startIndex;\n\t}\n\tif(this._options.withEndIndices){\n\t\telement.endIndex = this._parser.endIndex;\n\t}\n\n\tif(previousSibling){\n\t\telement.prev = previousSibling;\n\t\tpreviousSibling.next = element;\n\t} else {\n\t\telement.prev = null;\n\t}\n\n\tsiblings.push(element);\n\telement.parent = parent || null;\n};\n\nDomHandler.prototype.onopentag = function(name, attribs){\n\tvar properties = {\n\t\ttype: name === \"script\" ? ElementType.Script : name === \"style\" ? ElementType.Style : ElementType.Tag,\n\t\tname: name,\n\t\tattribs: attribs,\n\t\tchildren: []\n\t};\n\n\tvar element = this._createDomElement(properties);\n\n\tthis._addDomElement(element);\n\n\tthis._tagStack.push(element);\n};\n\nDomHandler.prototype.ontext = function(data){\n\t//the ignoreWhitespace is officially dropped, but for now,\n\t//it's an alias for normalizeWhitespace\n\tvar normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace;\n\n\tvar lastTag;\n\n\tif(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){\n\t\tif(normalize){\n\t\t\tlastTag.data = (lastTag.data + data).replace(re_whitespace, \" \");\n\t\t} else {\n\t\t\tlastTag.data += data;\n\t\t}\n\t} else {\n\t\tif(\n\t\t\tthis._tagStack.length &&\n\t\t\t(lastTag = this._tagStack[this._tagStack.length - 1]) &&\n\t\t\t(lastTag = lastTag.children[lastTag.children.length - 1]) &&\n\t\t\tlastTag.type === ElementType.Text\n\t\t){\n\t\t\tif(normalize){\n\t\t\t\tlastTag.data = (lastTag.data + data).replace(re_whitespace, \" \");\n\t\t\t} else {\n\t\t\t\tlastTag.data += data;\n\t\t\t}\n\t\t} else {\n\t\t\tif(normalize){\n\t\t\t\tdata = data.replace(re_whitespace, \" \");\n\t\t\t}\n\n\t\t\tvar element = this._createDomElement({\n\t\t\t\tdata: data,\n\t\t\t\ttype: ElementType.Text\n\t\t\t});\n\n\t\t\tthis._addDomElement(element);\n\t\t}\n\t}\n};\n\nDomHandler.prototype.oncomment = function(data){\n\tvar lastTag = this._tagStack[this._tagStack.length - 1];\n\n\tif(lastTag && lastTag.type === ElementType.Comment){\n\t\tlastTag.data += data;\n\t\treturn;\n\t}\n\n\tvar properties = {\n\t\tdata: data,\n\t\ttype: ElementType.Comment\n\t};\n\n\tvar element = this._createDomElement(properties);\n\n\tthis._addDomElement(element);\n\tthis._tagStack.push(element);\n};\n\nDomHandler.prototype.oncdatastart = function(){\n\tvar properties = {\n\t\tchildren: [{\n\t\t\tdata: \"\",\n\t\t\ttype: ElementType.Text\n\t\t}],\n\t\ttype: ElementType.CDATA\n\t};\n\n\tvar element = this._createDomElement(properties);\n\n\tthis._addDomElement(element);\n\tthis._tagStack.push(element);\n};\n\nDomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){\n\tthis._tagStack.pop();\n};\n\nDomHandler.prototype.onprocessinginstruction = function(name, data){\n\tvar element = this._createDomElement({\n\t\tname: name,\n\t\tdata: data,\n\t\ttype: ElementType.Directive\n\t});\n\n\tthis._addDomElement(element);\n};\n\nmodule.exports = DomHandler;\n","// This object will be used as the prototype for Nodes when creating a\n// DOM-Level-1-compliant structure.\nvar NodePrototype = module.exports = {\n\tget firstChild() {\n\t\tvar children = this.children;\n\t\treturn children && children[0] || null;\n\t},\n\tget lastChild() {\n\t\tvar children = this.children;\n\t\treturn children && children[children.length - 1] || null;\n\t},\n\tget nodeType() {\n\t\treturn nodeTypes[this.type] || nodeTypes.element;\n\t}\n};\n\nvar domLvl1 = {\n\ttagName: \"name\",\n\tchildNodes: \"children\",\n\tparentNode: \"parent\",\n\tpreviousSibling: \"prev\",\n\tnextSibling: \"next\",\n\tnodeValue: \"data\"\n};\n\nvar nodeTypes = {\n\telement: 1,\n\ttext: 3,\n\tcdata: 4,\n\tcomment: 8\n};\n\nObject.keys(domLvl1).forEach(function(key) {\n\tvar shorthand = domLvl1[key];\n\tObject.defineProperty(NodePrototype, key, {\n\t\tget: function() {\n\t\t\treturn this[shorthand] || null;\n\t\t},\n\t\tset: function(val) {\n\t\t\tthis[shorthand] = val;\n\t\t\treturn val;\n\t\t}\n\t});\n});\n","var DomUtils = module.exports;\n\n[\n\trequire(\"./lib/stringify\"),\n\trequire(\"./lib/traversal\"),\n\trequire(\"./lib/manipulation\"),\n\trequire(\"./lib/querying\"),\n\trequire(\"./lib/legacy\"),\n\trequire(\"./lib/helpers\")\n].forEach(function(ext){\n\tObject.keys(ext).forEach(function(key){\n\t\tDomUtils[key] = ext[key].bind(DomUtils);\n\t});\n});\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar legacy_json_1 = __importDefault(require(\"./maps/legacy.json\"));\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar decode_codepoint_1 = __importDefault(require(\"./decode_codepoint\"));\nvar strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;\nexports.decodeXML = getStrictDecoder(xml_json_1.default);\nexports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);\nfunction getStrictDecoder(map) {\n var replace = getReplacer(map);\n return function (str) { return String(str).replace(strictEntityRe, replace); };\n}\nvar sorter = function (a, b) { return (a < b ? 1 : -1); };\nexports.decodeHTML = (function () {\n var legacy = Object.keys(legacy_json_1.default).sort(sorter);\n var keys = Object.keys(entities_json_1.default).sort(sorter);\n for (var i = 0, j = 0; i < keys.length; i++) {\n if (legacy[j] === keys[i]) {\n keys[i] += \";?\";\n j++;\n }\n else {\n keys[i] += \";\";\n }\n }\n var re = new RegExp(\"&(?:\" + keys.join(\"|\") + \"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)\", \"g\");\n var replace = getReplacer(entities_json_1.default);\n function replacer(str) {\n if (str.substr(-1) !== \";\")\n str += \";\";\n return replace(str);\n }\n // TODO consider creating a merged map\n return function (str) { return String(str).replace(re, replacer); };\n})();\nfunction getReplacer(map) {\n return function replace(str) {\n if (str.charAt(1) === \"#\") {\n var secondChar = str.charAt(2);\n if (secondChar === \"X\" || secondChar === \"x\") {\n return decode_codepoint_1.default(parseInt(str.substr(3), 16));\n }\n return decode_codepoint_1.default(parseInt(str.substr(2), 10));\n }\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n return map[str.slice(1, -1)] || str;\n };\n}\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar inverseXML = getInverseObj(xml_json_1.default);\nvar xmlReplacer = getInverseReplacer(inverseXML);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeXML = getASCIIEncoder(inverseXML);\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar inverseHTML = getInverseObj(entities_json_1.default);\nvar htmlReplacer = getInverseReplacer(inverseHTML);\n/**\n * Encodes all entities and non-ASCII characters in the input.\n *\n * This includes characters that are valid ASCII characters in HTML documents.\n * For example `#` will be encoded as `#`. To get a more compact output,\n * consider using the `encodeNonAsciiHTML` function.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeHTML = getInverse(inverseHTML, htmlReplacer);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in HTML\n * documents using HTML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);\nfunction getInverseObj(obj) {\n return Object.keys(obj)\n .sort()\n .reduce(function (inverse, name) {\n inverse[obj[name]] = \"&\" + name + \";\";\n return inverse;\n }, {});\n}\nfunction getInverseReplacer(inverse) {\n var single = [];\n var multiple = [];\n for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {\n var k = _a[_i];\n if (k.length === 1) {\n // Add value to single array\n single.push(\"\\\\\" + k);\n }\n else {\n // Add value to multiple array\n multiple.push(k);\n }\n }\n // Add ranges to single characters.\n single.sort();\n for (var start = 0; start < single.length - 1; start++) {\n // Find the end of a run of characters\n var end = start;\n while (end < single.length - 1 &&\n single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {\n end += 1;\n }\n var count = 1 + end - start;\n // We want to replace at least three characters\n if (count < 3)\n continue;\n single.splice(start, count, single[start] + \"-\" + single[end]);\n }\n multiple.unshift(\"[\" + single.join(\"\") + \"]\");\n return new RegExp(multiple.join(\"|\"), \"g\");\n}\n// /[^\\0-\\x7F]/gu\nvar reNonASCII = /(?:[\\x80-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/g;\nvar getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n function (str) { return str.codePointAt(0); }\n : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n function (c) {\n return (c.charCodeAt(0) - 0xd800) * 0x400 +\n c.charCodeAt(1) -\n 0xdc00 +\n 0x10000;\n };\nfunction singleCharReplacer(c) {\n return \"\" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))\n .toString(16)\n .toUpperCase() + \";\";\n}\nfunction getInverse(inverse, re) {\n return function (data) {\n return data\n .replace(re, function (name) { return inverse[name]; })\n .replace(reNonASCII, singleCharReplacer);\n };\n}\nvar reEscapeChars = new RegExp(xmlReplacer.source + \"|\" + reNonASCII.source, \"g\");\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `ü`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nfunction escape(data) {\n return data.replace(reEscapeChars, singleCharReplacer);\n}\nexports.escape = escape;\n/**\n * Encodes all characters not valid in XML documents using numeric hexadecimal\n * reference (eg. `ü`).\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nfunction escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}\nexports.escapeUTF8 = escapeUTF8;\nfunction getASCIIEncoder(obj) {\n return function (data) {\n return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });\n };\n}\n","module.exports = Stream;\n\nvar Parser = require(\"./Parser.js\");\nvar WritableStream = require(\"readable-stream\").Writable;\nvar StringDecoder = require(\"string_decoder\").StringDecoder;\nvar Buffer = require(\"buffer\").Buffer;\n\nfunction Stream(cbs, options) {\n var parser = (this._parser = new Parser(cbs, options));\n var decoder = (this._decoder = new StringDecoder());\n\n WritableStream.call(this, { decodeStrings: false });\n\n this.once(\"finish\", function() {\n parser.end(decoder.end());\n });\n}\n\nrequire(\"inherits\")(Stream, WritableStream);\n\nStream.prototype._write = function(chunk, encoding, cb) {\n if (chunk instanceof Buffer) chunk = this._decoder.write(chunk);\n this._parser.write(chunk);\n cb();\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.default = generatePropsFromAttributes;\n\nvar _htmlAttributesToReact = require('./htmlAttributesToReact');\n\nvar _htmlAttributesToReact2 = _interopRequireDefault(_htmlAttributesToReact);\n\nvar _inlineStyleToObject = require('./inlineStyleToObject');\n\nvar _inlineStyleToObject2 = _interopRequireDefault(_inlineStyleToObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Generates props for a React element from an object of HTML attributes\n *\n * @param {Object} attributes The HTML attributes\n * @param {String} key The key to give the react element\n */\nfunction generatePropsFromAttributes(attributes, key) {\n\n // generate props\n var props = _extends({}, (0, _htmlAttributesToReact2.default)(attributes), { key: key });\n\n // if there is an inline/string style prop then convert it to a React style object\n // otherwise, it is invalid and omitted\n if (typeof props.style === 'string' || props.style instanceof String) {\n props.style = (0, _inlineStyleToObject2.default)(props.style);\n } else {\n delete props.style;\n }\n\n return props;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isValidTagOrAttributeName;\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/;\n\nvar nameCache = {};\n\nfunction isValidTagOrAttributeName(tagName) {\n if (!nameCache.hasOwnProperty(tagName)) {\n nameCache[tagName] = VALID_TAG_REGEX.test(tagName);\n }\n return nameCache[tagName];\n}","/**\n * Helper function for iterating over a collection\n *\n * @param collection\n * @param fn\n */\nfunction each(collection, fn) {\n var i = 0,\n length = collection.length,\n cont;\n\n for(i; i < length; i++) {\n cont = fn(collection[i], i);\n if(cont === false) {\n break; //allow early exit\n }\n }\n}\n\n/**\n * Helper function for determining whether target object is an array\n *\n * @param target the object under test\n * @return {Boolean} true if array, false otherwise\n */\nfunction isArray(target) {\n return Object.prototype.toString.apply(target) === '[object Array]';\n}\n\n/**\n * Helper function for determining whether target object is a function\n *\n * @param target the object under test\n * @return {Boolean} true if function, false otherwise\n */\nfunction isFunction(target) {\n return typeof target === 'function';\n}\n\nmodule.exports = {\n isFunction : isFunction,\n isArray : isArray,\n each : each\n};\n","// reading a dimension prop will cause the browser to recalculate,\n// which will let our animations work\nexport default function triggerBrowserReflow(node) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n node.offsetHeight;\n}","import css from 'dom-helpers/css';\nimport transitionEnd from 'dom-helpers/transitionEnd';\n\nfunction parseDuration(node, property) {\n var str = css(node, property) || '';\n var mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\n\nexport default function transitionEndListener(element, handler) {\n var duration = parseDuration(element, 'transitionDuration');\n var delay = parseDuration(element, 'transitionDelay');\n var remove = transitionEnd(element, function (e) {\n if (e.target === element) {\n remove();\n handler(e);\n }\n }, duration + delay);\n}","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.VerticleButton = exports.CircleArrow = exports.TinyButton = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _tweenFunctions = require('tween-functions');\n\nvar _tweenFunctions2 = _interopRequireDefault(_tweenFunctions);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _detectPassiveEvents = require('detect-passive-events');\n\nvar _detectPassiveEvents2 = _interopRequireDefault(_detectPassiveEvents);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ScrollUpButton = function (_React$Component) {\n _inherits(ScrollUpButton, _React$Component);\n\n function ScrollUpButton(props) {\n _classCallCheck(this, ScrollUpButton);\n\n var _this = _possibleConstructorReturn(this, (ScrollUpButton.__proto__ || Object.getPrototypeOf(ScrollUpButton)).call(this, props));\n\n _this.state = { ToggleScrollUp: '' };\n _this.Animation = {\n StartPosition: 0,\n CurrentAnimationTime: 0,\n StartTime: null,\n AnimationFrame: null\n };\n _this.HandleScroll = _this.HandleScroll.bind(_this);\n _this.StopScrollingFrame = _this.StopScrollingFrame.bind(_this);\n _this.ScrollingFrame = _this.ScrollingFrame.bind(_this);\n _this.HandleClick = _this.HandleClick.bind(_this);\n return _this;\n }\n\n _createClass(ScrollUpButton, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.HandleScroll(); // run HandleScroll() at mount incase we are already scrolled down\n window.addEventListener('scroll', this.HandleScroll);\n window.addEventListener('wheel', this.StopScrollingFrame, _detectPassiveEvents2.default.hasSupport ? { passive: true } : false); // Stop animation if user mouse wheels during animation.\n window.addEventListener('touchstart', this.StopScrollingFrame, _detectPassiveEvents2.default.hasSupport ? { passive: true } : false); // Stop animation if user touches the screen during animation.\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n // Remove all events, since component is no longer mounted.\n window.removeEventListener('scroll', this.HandleScroll);\n window.removeEventListener('wheel', this.StopScrollingFrame, false);\n window.removeEventListener('touchstart', this.StopScrollingFrame, false);\n }\n }, {\n key: 'HandleScroll',\n value: function HandleScroll() {\n var _props = this.props,\n ShowAtPosition = _props.ShowAtPosition,\n TransitionClassName = _props.TransitionClassName;\n // window.pageYOffset = current scroll position\n // ShowAtPosition = position at which we want the button to show.\n\n if (window.pageYOffset > ShowAtPosition) {\n // styles.Toggled = the class name we want applied to transition the button in.\n this.setState({ ToggleScrollUp: TransitionClassName });\n } else {\n // remove the class name\n this.setState({ ToggleScrollUp: '' });\n }\n }\n }, {\n key: 'HandleClick',\n value: function HandleClick() {\n // Is this needed?\n // const { ShowAtPosition } = this.props\n // // For some reason the user was able to click the button.\n // if (window.pageYOffset < ShowAtPosition) {\n // event.preventDefault()\n // this.HandleScroll()\n // }\n // Scroll to StopPosition\n this.StopScrollingFrame(); // Stoping all AnimationFrames\n this.Animation.StartPosition = window.pageYOffset; // current scroll position\n this.Animation.CurrentAnimationTime = 0;\n this.Animation.StartTime = null;\n // Start the scrolling animation.\n this.Animation.AnimationFrame = window.requestAnimationFrame(this.ScrollingFrame);\n }\n }, {\n key: 'ScrollingFrame',\n value: function ScrollingFrame() {\n var _props2 = this.props,\n StopPosition = _props2.StopPosition,\n EasingType = _props2.EasingType,\n AnimationDuration = _props2.AnimationDuration;\n\n var timestamp = Math.floor(Date.now());\n // If StartTime has not been assigned a value, assign it the start timestamp.\n if (!this.Animation.StartTime) {\n this.Animation.StartTime = timestamp;\n }\n\n // set CurrentAnimationTime every iteration of ScrollingFrame()\n this.Animation.CurrentAnimationTime = timestamp - this.Animation.StartTime;\n // if we hit the StopPosition, StopScrollingFrame()\n if (window.pageYOffset <= StopPosition) {\n this.StopScrollingFrame();\n } else {\n // Otherwise continue ScrollingFrame to the StopPosition.\n // Does not support horizontal ScrollingFrame.\n // Let TweenFunctions handle the math to give us a new position based on AnimationDuration and EasingType type\n var YPos = _tweenFunctions2.default[EasingType](this.Animation.CurrentAnimationTime, this.Animation.StartPosition, StopPosition, AnimationDuration);\n if (YPos <= StopPosition) {\n YPos = StopPosition;\n }\n window.scrollTo(0, YPos);\n // Request another frame to be painted\n this.Animation.AnimationFrame = window.requestAnimationFrame(this.ScrollingFrame);\n }\n }\n }, {\n key: 'StopScrollingFrame',\n value: function StopScrollingFrame() {\n // Stop the Animation Frames.\n window.cancelAnimationFrame(this.Animation.AnimationFrame);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var styles = {\n MainStyle: {\n backgroundColor: 'rgba(50, 50, 50, 0.5)',\n height: 50,\n position: 'fixed',\n bottom: 20,\n width: 50,\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n opacity: 0,\n right: -50,\n zIndex: 1000\n },\n SvgStyle: {\n display: 'inline-block',\n width: '100%',\n height: '100%',\n strokeWidth: 0,\n stroke: 'white',\n fill: 'white'\n },\n ToggledStyle: {\n opacity: 1,\n right: 20\n }\n };\n var _props3 = this.props,\n children = _props3.children,\n style = _props3.style,\n ToggledStyle = _props3.ToggledStyle,\n ContainerClassName = _props3.ContainerClassName;\n var ToggleScrollUp = this.state.ToggleScrollUp;\n\n if (children) {\n var childrenWithProps = _react2.default.Children.map(children, function (child) {\n return _react2.default.cloneElement(child, {\n className: _this2.className\n });\n });\n return _react2.default.createElement(\n 'aside',\n {\n role: 'button',\n 'aria-label': 'Scroll to top of page',\n tabIndex: ToggleScrollUp ? 0 : -1,\n 'data-testid': 'react-scroll-up-button',\n style: _extends({}, style, ToggleScrollUp && ToggledStyle),\n className: ContainerClassName + ' ' + ToggleScrollUp,\n onClick: this.HandleClick,\n onKeyPress: this.HandleClick\n },\n childrenWithProps\n );\n }\n return _react2.default.createElement(\n 'aside',\n {\n role: 'button',\n 'aria-label': 'Scroll to top of page',\n tabIndex: ToggleScrollUp ? 0 : -1,\n 'data-testid': 'react-scroll-up-button',\n className: ContainerClassName + ' ' + ToggleScrollUp,\n style: _extends({}, styles.MainStyle, style, ToggleScrollUp && styles.ToggledStyle, ToggleScrollUp && ToggledStyle),\n onClick: this.HandleClick,\n onKeyPress: this.HandleClick\n },\n _react2.default.createElement(\n 'svg',\n {\n viewBox: '0 0 32 32',\n version: '1.1',\n xmlns: 'http://www.w3.org/2000/svg',\n x: '0',\n y: '0',\n xmlSpace: 'preserve',\n style: styles.SvgStyle\n },\n _react2.default.createElement('path', {\n transform: 'scale(1.4) translate(1,-5)',\n d: 'M19.196 23.429q0 0.232-0.179 0.411l-0.893 0.893q-0.179 0.179-0.411 0.179t-0.411-0.179l-7.018-7.018-7.018 7.018q-0.179 0.179-0.411 0.179t-0.411-0.179l-0.893-0.893q-0.179-0.179-0.179-0.411t0.179-0.411l8.321-8.321q0.179-0.179 0.411-0.179t0.411 0.179l8.321 8.321q0.179 0.179 0.179 0.411zM19.196 16.571q0 0.232-0.179 0.411l-0.893 0.893q-0.179 0.179-0.411 0.179t-0.411-0.179l-7.018-7.018-7.018 7.018q-0.179 0.179-0.411 0.179t-0.411-0.179l-0.893-0.893q-0.179-0.179-0.179-0.411t0.179-0.411l8.321-8.321q0.179-0.179 0.411-0.179t0.411 0.179l8.321 8.321q0.179 0.179 0.179 0.411z' // eslint-disable-line\n })\n )\n );\n }\n }]);\n\n return ScrollUpButton;\n}(_react2.default.Component);\n\nexports.default = ScrollUpButton;\nvar TinyButton = exports.TinyButton = function TinyButton(props) {\n var styles = {\n MainStyle: {\n backgroundColor: 'rgb(87, 86, 86)',\n height: 30,\n position: 'fixed',\n bottom: 20,\n width: 30,\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n opacity: 0,\n right: -75,\n zIndex: 1000,\n fill: '#292929',\n paddingBottom: 1,\n paddingLeft: 1,\n paddingRight: 1\n },\n ToggledStyle: {\n opacity: 1,\n right: 30\n }\n };\n var style = props.style,\n ToggledStyle = props.ToggledStyle;\n\n return _react2.default.createElement(\n ScrollUpButton,\n _extends({}, props, {\n style: _extends({}, styles.MainStyle, style),\n ToggledStyle: _extends({}, styles.ToggledStyle, ToggledStyle)\n }),\n _react2.default.createElement(\n 'svg',\n {\n viewBox: '0 0 28 28',\n version: '1.1',\n xmlns: 'http://www.w3.org/2000/svg',\n x: '0',\n y: '0',\n xmlSpace: 'preserve'\n },\n _react2.default.createElement('path', {\n d: 'M26.297 20.797l-2.594 2.578c-0.391 0.391-1.016 0.391-1.406 0l-8.297-8.297-8.297 8.297c-0.391 0.391-1.016 0.391-1.406 0l-2.594-2.578c-0.391-0.391-0.391-1.031 0-1.422l11.594-11.578c0.391-0.391 1.016-0.391 1.406 0l11.594 11.578c0.391 0.391 0.391 1.031 0 1.422z' // eslint-disable-line\n })\n )\n );\n};\n\nvar CircleArrow = exports.CircleArrow = function CircleArrow(props) {\n var styles = {\n MainStyle: {\n backgroundColor: 'rgb(255, 255, 255)',\n borderRadius: '50%',\n border: '5px solid black',\n height: 50,\n position: 'fixed',\n bottom: 20,\n width: 50,\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n opacity: 0,\n right: -75\n },\n ToggledStyle: {\n opacity: 1,\n right: 20\n }\n };\n var style = props.style,\n ToggledStyle = props.ToggledStyle;\n\n return _react2.default.createElement(\n ScrollUpButton,\n _extends({}, props, {\n style: _extends({}, styles.MainStyle, style),\n ToggledStyle: _extends({}, styles.ToggledStyle, ToggledStyle)\n }),\n _react2.default.createElement(\n 'svg',\n { viewBox: '0 0 32 32' },\n _react2.default.createElement('path', {\n d: 'M27.414 12.586l-10-10c-0.781-0.781-2.047-0.781-2.828 0l-10 10c-0.781 0.781-0.781 2.047 0 2.828s2.047 0.781 2.828 0l6.586-6.586v19.172c0 1.105 0.895 2 2 2s2-0.895 2-2v-19.172l6.586 6.586c0.39 0.39 0.902 0.586 1.414 0.586s1.024-0.195 1.414-0.586c0.781-0.781 0.781-2.047 0-2.828z' // eslint-disable-line\n })\n )\n );\n};\n\nvar VerticleButton = exports.VerticleButton = function VerticleButton(props) {\n var styles = {\n MainStyle: {\n backgroundColor: 'rgb(58, 56, 56)',\n position: 'fixed',\n bottom: 40,\n padding: '5px 10px',\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n opacity: 0,\n right: -75,\n transform: 'rotate(-90deg)'\n },\n ToggledStyle: {\n opacity: 1,\n right: 10\n }\n };\n var style = props.style,\n ToggledStyle = props.ToggledStyle;\n\n return _react2.default.createElement(\n ScrollUpButton,\n _extends({}, props, {\n style: _extends({}, styles.MainStyle, style),\n ToggledStyle: _extends({}, styles.ToggledStyle, ToggledStyle)\n }),\n _react2.default.createElement(\n 'span',\n { style: { fontSize: 23, color: 'white' } },\n 'UP \\u2192'\n )\n );\n};\n\nScrollUpButton.defaultProps = {\n ContainerClassName: 'ScrollUpButton__Container',\n StopPosition: 0,\n ShowAtPosition: 150,\n EasingType: 'easeOutCubic',\n AnimationDuration: 500,\n TransitionClassName: 'ScrollUpButton__Toggled',\n style: {},\n ToggledStyle: {},\n children: null\n};\n\nfunction LessThanShowAtPosition(props, propName, componentName) {\n var ShowAtPosition = props.ShowAtPosition;\n\n if (props[propName]) {\n // eslint-disable-line\n var value = props[propName];\n if (typeof value === 'number') {\n if (value >= ShowAtPosition) {\n // Validate the incoming prop value againt the ShowAtPosition prop\n return new Error(propName + ' (' + value + ') in ' + componentName + ' must be less then prop: ShowAtPosition (' + ShowAtPosition + ')');\n }\n return null;\n }\n return new Error(propName + ' in ' + componentName + ' must be a number.');\n }\n return null;\n}\n\nScrollUpButton.propTypes = {\n children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node]),\n StopPosition: LessThanShowAtPosition,\n ShowAtPosition: _propTypes2.default.number, // show button under this position,\n EasingType: _propTypes2.default.oneOf(['linear', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', 'easeInQuint', 'easeOutQuint', 'easeInOutQuint', 'easeInSine', 'easeOutSine', 'easeInOutSine', 'easeInExpo', 'easeOutExpo', 'easeInOutExpo', 'easeInCirc', 'easeOutCirc', 'easeInOutCirc', 'easeInElastic', 'easeOutElastic', 'easeInOutElastic', 'easeInBack', 'easeOutBack', 'easeInOutBack', 'easeInBounce', 'easeOutBounce', 'easeInOutBounce']),\n AnimationDuration: _propTypes2.default.number, // seconds\n style: _propTypes2.default.object, // eslint-disable-line react/forbid-prop-types\n ToggledStyle: _propTypes2.default.object, // eslint-disable-line react/forbid-prop-types\n ContainerClassName: _propTypes2.default.string,\n TransitionClassName: _propTypes2.default.string\n};","'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = require('react');\nvar React__default = _interopDefault(React);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect =\n /*#__PURE__*/\n function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = exports.ReactGAImplementation = void 0;\nvar _ga = _interopRequireWildcard(require(\"./ga4\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nvar ReactGAImplementation = _ga.GA4;\nexports.ReactGAImplementation = ReactGAImplementation;\nvar _default = _ga[\"default\"];\nexports[\"default\"] = _default;","import React from \"react\";\nimport { Router } from \"react-router\";\nimport { createBrowserHistory as createHistory } from \"history\";\nimport PropTypes from \"prop-types\";\nimport warning from \"tiny-warning\";\n\n/**\n * The public API for a that uses HTML5 history.\n */\nclass BrowserRouter extends React.Component {\n history = createHistory(this.props);\n\n render() {\n return ;\n }\n}\n\nif (__DEV__) {\n BrowserRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number\n };\n\n BrowserRouter.prototype.componentDidMount = function() {\n warning(\n !this.props.history,\n \" ignores the history prop. To use a custom history, \" +\n \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\"\n );\n };\n}\n\nexport default BrowserRouter;\n","import React from \"react\";\nimport { Router } from \"react-router\";\nimport { createHashHistory as createHistory } from \"history\";\nimport PropTypes from \"prop-types\";\nimport warning from \"tiny-warning\";\n\n/**\n * The public API for a that uses window.location.hash.\n */\nclass HashRouter extends React.Component {\n history = createHistory(this.props);\n\n render() {\n return ;\n }\n}\n\nif (__DEV__) {\n HashRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function() {\n warning(\n !this.props.history,\n \" ignores the history prop. To use a custom history, \" +\n \"use `import { Router }` instead of `import { HashRouter as Router }`.\"\n );\n };\n}\n\nexport default HashRouter;\n","import { createLocation } from \"history\";\n\nexport const resolveToLocation = (to, currentLocation) =>\n typeof to === \"function\" ? to(currentLocation) : to;\n\nexport const normalizeToLocation = (to, currentLocation) => {\n return typeof to === \"string\"\n ? createLocation(to, null, null, currentLocation)\n : to;\n};\n","import React from \"react\";\nimport { __RouterContext as RouterContext } from \"react-router\";\nimport { createPath } from 'history';\nimport PropTypes from \"prop-types\";\nimport invariant from \"tiny-invariant\";\nimport {\n resolveToLocation,\n normalizeToLocation\n} from \"./utils/locationUtils.js\";\n\n// React 15 compat\nconst forwardRefShim = C => C;\nlet { forwardRef } = React;\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nconst LinkAnchor = forwardRef(\n (\n {\n innerRef, // TODO: deprecate\n navigate,\n onClick,\n ...rest\n },\n forwardedRef\n ) => {\n const { target } = rest;\n\n let props = {\n ...rest,\n onClick: event => {\n try {\n if (onClick) onClick(event);\n } catch (ex) {\n event.preventDefault();\n throw ex;\n }\n\n if (\n !event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n (!target || target === \"_self\") && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n navigate();\n }\n }\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.ref = innerRef;\n }\n\n /* eslint-disable-next-line jsx-a11y/anchor-has-content */\n return ;\n }\n);\n\nif (__DEV__) {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n\n/**\n * The public API for rendering a history-aware .\n */\nconst Link = forwardRef(\n (\n {\n component = LinkAnchor,\n replace,\n to,\n innerRef, // TODO: deprecate\n ...rest\n },\n forwardedRef\n ) => {\n return (\n \n {context => {\n invariant(context, \"You should not use outside a \");\n\n const { history } = context;\n\n const location = normalizeToLocation(\n resolveToLocation(to, context.location),\n context.location\n );\n\n const href = location ? history.createHref(location) : \"\";\n const props = {\n ...rest,\n href,\n navigate() {\n const location = resolveToLocation(to, context.location);\n const isDuplicateNavigation = createPath(context.location) === createPath(normalizeToLocation(location));\n const method = (replace || isDuplicateNavigation) ? history.replace : history.push;\n\n method(location);\n }\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return React.createElement(component, props);\n }}\n \n );\n }\n);\n\nif (__DEV__) {\n const toType = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object,\n PropTypes.func\n ]);\n const refType = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.any })\n ]);\n\n Link.displayName = \"Link\";\n\n Link.propTypes = {\n innerRef: refType,\n onClick: PropTypes.func,\n replace: PropTypes.bool,\n target: PropTypes.string,\n to: toType.isRequired\n };\n}\n\nexport default Link;\n","import React from \"react\";\nimport { __RouterContext as RouterContext, matchPath } from \"react-router\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"tiny-invariant\";\nimport Link from \"./Link.js\";\nimport {\n resolveToLocation,\n normalizeToLocation\n} from \"./utils/locationUtils.js\";\n\n// React 15 compat\nconst forwardRefShim = C => C;\nlet { forwardRef } = React;\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction joinClassnames(...classnames) {\n return classnames.filter(i => i).join(\" \");\n}\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nconst NavLink = forwardRef(\n (\n {\n \"aria-current\": ariaCurrent = \"page\",\n activeClassName = \"active\", // TODO: deprecate\n activeStyle, // TODO: deprecate\n className: classNameProp,\n exact,\n isActive: isActiveProp,\n location: locationProp,\n sensitive,\n strict,\n style: styleProp,\n to,\n innerRef, // TODO: deprecate\n ...rest\n },\n forwardedRef\n ) => {\n return (\n \n {context => {\n invariant(context, \"You should not use outside a \");\n\n const currentLocation = locationProp || context.location;\n const toLocation = normalizeToLocation(\n resolveToLocation(to, currentLocation),\n currentLocation\n );\n const { pathname: path } = toLocation;\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n const escapedPath =\n path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n const match = escapedPath\n ? matchPath(currentLocation.pathname, {\n path: escapedPath,\n exact,\n sensitive,\n strict\n })\n : null;\n const isActive = !!(isActiveProp\n ? isActiveProp(match, currentLocation)\n : match);\n\n let className =\n typeof classNameProp === \"function\"\n ? classNameProp(isActive)\n : classNameProp;\n\n let style =\n typeof styleProp === \"function\" ? styleProp(isActive) : styleProp;\n\n if (isActive) {\n className = joinClassnames(className, activeClassName);\n style = { ...style, ...activeStyle };\n }\n\n const props = {\n \"aria-current\": (isActive && ariaCurrent) || null,\n className,\n style,\n to: toLocation,\n ...rest\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return ;\n }}\n \n );\n }\n);\n\nif (__DEV__) {\n NavLink.displayName = \"NavLink\";\n\n const ariaCurrentType = PropTypes.oneOf([\n \"page\",\n \"step\",\n \"location\",\n \"date\",\n \"time\",\n \"true\",\n \"false\"\n ]);\n\n NavLink.propTypes = {\n ...Link.propTypes,\n \"aria-current\": ariaCurrentType,\n activeClassName: PropTypes.string,\n activeStyle: PropTypes.object,\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n exact: PropTypes.bool,\n isActive: PropTypes.func,\n location: PropTypes.object,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool,\n style: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n };\n}\n\nexport default NavLink;\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v17.0.2\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"\"+b.valueOf().toString()+\" \";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0c?98:c,function(){a(!0)});gg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\n// t: current time, b: beginning value, _c: final value, d: total duration\nvar tweenFunctions = {\n linear: function(t, b, _c, d) {\n var c = _c - b;\n return c * t / d + b;\n },\n easeInQuad: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t + b;\n },\n easeOutQuad: function(t, b, _c, d) {\n var c = _c - b;\n return -c * (t /= d) * (t - 2) + b;\n },\n easeInOutQuad: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t + b;\n } else {\n return -c / 2 * ((--t) * (t - 2) - 1) + b;\n }\n },\n easeInCubic: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t * t + b;\n },\n easeOutCubic: function(t, b, _c, d) {\n var c = _c - b;\n return c * ((t = t / d - 1) * t * t + 1) + b;\n },\n easeInOutCubic: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t + b;\n } else {\n return c / 2 * ((t -= 2) * t * t + 2) + b;\n }\n },\n easeInQuart: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t * t * t + b;\n },\n easeOutQuart: function(t, b, _c, d) {\n var c = _c - b;\n return -c * ((t = t / d - 1) * t * t * t - 1) + b;\n },\n easeInOutQuart: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t * t + b;\n } else {\n return -c / 2 * ((t -= 2) * t * t * t - 2) + b;\n }\n },\n easeInQuint: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t * t * t * t + b;\n },\n easeOutQuint: function(t, b, _c, d) {\n var c = _c - b;\n return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n },\n easeInOutQuint: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t * t * t + b;\n } else {\n return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;\n }\n },\n easeInSine: function(t, b, _c, d) {\n var c = _c - b;\n return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;\n },\n easeOutSine: function(t, b, _c, d) {\n var c = _c - b;\n return c * Math.sin(t / d * (Math.PI / 2)) + b;\n },\n easeInOutSine: function(t, b, _c, d) {\n var c = _c - b;\n return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;\n },\n easeInExpo: function(t, b, _c, d) {\n var c = _c - b;\n return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;\n },\n easeOutExpo: function(t, b, _c, d) {\n var c = _c - b;\n return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;\n },\n easeInOutExpo: function(t, b, _c, d) {\n var c = _c - b;\n if (t === 0) {\n return b;\n }\n if (t === d) {\n return b + c;\n }\n if ((t /= d / 2) < 1) {\n return c / 2 * Math.pow(2, 10 * (t - 1)) + b;\n } else {\n return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;\n }\n },\n easeInCirc: function(t, b, _c, d) {\n var c = _c - b;\n return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;\n },\n easeOutCirc: function(t, b, _c, d) {\n var c = _c - b;\n return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;\n },\n easeInOutCirc: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;\n } else {\n return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;\n }\n },\n easeInElastic: function(t, b, _c, d) {\n var c = _c - b;\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n return b;\n } else if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n },\n easeOutElastic: function(t, b, _c, d) {\n var c = _c - b;\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n return b;\n } else if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;\n },\n easeInOutElastic: function(t, b, _c, d) {\n var c = _c - b;\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n return b;\n } else if ((t /= d / 2) === 2) {\n return b + c;\n }\n if (!p) {\n p = d * (0.3 * 1.5);\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n if (t < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n } else {\n return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * 0.5 + c + b;\n }\n },\n easeInBack: function(t, b, _c, d, s) {\n var c = _c - b;\n if (s === void 0) {\n s = 1.70158;\n }\n return c * (t /= d) * t * ((s + 1) * t - s) + b;\n },\n easeOutBack: function(t, b, _c, d, s) {\n var c = _c - b;\n if (s === void 0) {\n s = 1.70158;\n }\n return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n },\n easeInOutBack: function(t, b, _c, d, s) {\n var c = _c - b;\n if (s === void 0) {\n s = 1.70158;\n }\n if ((t /= d / 2) < 1) {\n return c / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n } else {\n return c / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n }\n },\n easeInBounce: function(t, b, _c, d) {\n var c = _c - b;\n var v;\n v = tweenFunctions.easeOutBounce(d - t, 0, c, d);\n return c - v + b;\n },\n easeOutBounce: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d) < 1 / 2.75) {\n return c * (7.5625 * t * t) + b;\n } else if (t < 2 / 2.75) {\n return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;\n } else if (t < 2.5 / 2.75) {\n return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;\n } else {\n return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;\n }\n },\n easeInOutBounce: function(t, b, _c, d) {\n var c = _c - b;\n var v;\n if (t < d / 2) {\n v = tweenFunctions.easeInBounce(t * 2, 0, c, d);\n return v * 0.5 + b;\n } else {\n v = tweenFunctions.easeOutBounce(t * 2 - d, 0, c, d);\n return v * 0.5 + c * 0.5 + b;\n }\n }\n};\n\nmodule.exports = tweenFunctions;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// adapted from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\nvar detectPassiveEvents = {\n update: function update() {\n if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n // note: have to set and remove a no-op listener instead of null\n // (which was used previously), becasue Edge v15 throws an error\n // when providing a null callback.\n // https://github.com/rafgraph/detect-passive-events/pull/3\n var noop = function noop() {};\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n detectPassiveEvents.hasSupport = passive;\n }\n }\n};\n\ndetectPassiveEvents.update();\nexports.default = detectPassiveEvents;","/** @license React v17.0.2\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = all;\n\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction all() {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n function allPropTypes() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var error = null;\n\n validators.forEach(function (validator) {\n if (error != null) {\n return;\n }\n\n var result = validator.apply(undefined, args);\n if (result != null) {\n error = result;\n }\n });\n\n return error;\n }\n\n return (0, _createChainableTypeChecker2.default)(allPropTypes);\n}\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createChainableTypeChecker;\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n// Mostly taken from ReactPropTypes.\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));\n }\n\n return null;\n }\n\n for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n args[_key - 6] = arguments[_key];\n }\n\n return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\nmodule.exports = exports['default'];","Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _class, _temp2; /* eslint-disable react/sort-comp */\n\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactDom = require(\"react-dom\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _invariant = require(\"invariant\");\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _deepEqual = require(\"deep-equal\");\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _hoistNonReactStatics = require(\"hoist-non-react-statics\");\n\nvar _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);\n\nvar _Events = require(\"./Events\");\n\nvar _Events2 = _interopRequireDefault(_Events);\n\nvar _filterProps = require(\"./utils/filterProps\");\n\nvar _filterProps2 = _interopRequireDefault(_filterProps);\n\nvar _createManager = require(\"./createManager\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * An Ad Component using Google Publisher Tags.\n * This component should work standalone w/o context.\n * https://developers.google.com/doubleclick-gpt/\n *\n * @module Bling\n * @class Bling\n * @fires Bling#Events.READY\n * @fires Bling#Events.SLOT_RENDER_ENDED\n * @fires Bling#Events.IMPRESSION_VIEWABLE\n * @fires Bling#Events.SLOT_VISIBILITY_CHANGED\n * @fires Bling#Events.SLOT_LOADED\n */\nvar Bling = (_temp2 = _class = function (_Component) {\n _inherits(Bling, _Component);\n\n function Bling() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Bling);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Bling.__proto__ || Object.getPrototypeOf(Bling)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n scriptLoaded: false,\n inViewport: false\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n /**\n * An array of prop names which can reflect to the ad by calling `refresh`.\n *\n * @property refreshableProps\n * @static\n */\n\n /**\n * An array of prop names which requires to create a new ad slot and render as a new ad.\n *\n * @property reRenderProps\n * @static\n */\n\n /**\n * An instance of ad manager.\n *\n * @property _adManager\n * @private\n * @static\n */\n\n /**\n *\n * @property\n * @private\n * @static\n */\n\n\n _createClass(Bling, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n Bling._adManager.addInstance(this);\n Bling._adManager.load(Bling._config.seedFileUrl).then(this.onScriptLoaded.bind(this)).catch(this.onScriptError.bind(this));\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var propsEqual = Bling._config.propsEqual;\n var sizeMapping = this.props.sizeMapping;\n\n if ((nextProps.sizeMapping || sizeMapping) && !propsEqual(nextProps.sizeMapping, sizeMapping)) {\n Bling._adManager.removeMQListener(this, nextProps);\n }\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n // if adUnitPath changes, need to create a new slot, re-render\n // otherwise, just refresh\n var scriptLoaded = nextState.scriptLoaded,\n inViewport = nextState.inViewport;\n\n var notInViewport = this.notInViewport(nextProps, nextState);\n var inViewportChanged = this.state.inViewport !== inViewport;\n var isScriptLoaded = this.state.scriptLoaded !== scriptLoaded;\n\n // Exit early for visibility change, before executing deep equality check.\n if (notInViewport) {\n return false;\n } else if (inViewportChanged) {\n return true;\n }\n\n var _Bling$_config = Bling._config,\n filterProps = _Bling$_config.filterProps,\n propsEqual = _Bling$_config.propsEqual;\n\n var refreshableProps = filterProps(Bling.refreshableProps, this.props, nextProps);\n var reRenderProps = filterProps(Bling.reRenderProps, this.props, nextProps);\n var shouldRender = !propsEqual(reRenderProps.props, reRenderProps.nextProps);\n var shouldRefresh = !shouldRender && !propsEqual(refreshableProps.props, refreshableProps.nextProps);\n\n if (shouldRefresh) {\n this.configureSlot(this._adSlot, nextProps);\n }\n\n if (Bling._adManager._syncCorrelator) {\n if (shouldRefresh) {\n Bling._adManager.refresh();\n } else if (shouldRender || isScriptLoaded) {\n Bling._adManager.renderAll();\n }\n } else {\n if (shouldRefresh) {\n this.refresh();\n return false;\n }\n if (shouldRender || isScriptLoaded) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.notInViewport(this.props, this.state)) {\n return;\n }\n if (this._divId) {\n // initial render will enable pubads service before any ad renders\n // so taken care of by the manager\n if (Bling._adManager._initialRender) {\n Bling._adManager.render();\n } else {\n this.renderAd();\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n Bling._adManager.removeInstance(this);\n if (this._adSlot) {\n Bling._adManager.googletag.destroySlots([this._adSlot]);\n this._adSlot = null;\n }\n }\n }, {\n key: \"onScriptLoaded\",\n value: function onScriptLoaded() {\n var onScriptLoaded = this.props.onScriptLoaded;\n\n\n if (this.getRenderWhenViewable()) {\n this.foldCheck();\n }\n this.setState({ scriptLoaded: true }, onScriptLoaded); // eslint-disable-line react/no-did-mount-set-state\n }\n }, {\n key: \"onScriptError\",\n value: function onScriptError(err) {\n console.warn(\"Ad: Failed to load gpt for \" + Bling._config.seedFileUrl, err);\n }\n }, {\n key: \"getRenderWhenViewable\",\n value: function getRenderWhenViewable() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n\n return props.renderWhenViewable !== undefined ? props.renderWhenViewable : Bling._config.renderWhenViewable;\n }\n }, {\n key: \"foldCheck\",\n value: function foldCheck() {\n if (this.state.inViewport) {\n return;\n }\n\n var slotSize = this.getSlotSize();\n if (Array.isArray(slotSize) && Array.isArray(slotSize[0])) {\n slotSize = slotSize[0];\n }\n if (slotSize === \"fluid\" || Array.isArray(slotSize) && slotSize[0] === \"fluid\") {\n slotSize = [0, 0];\n }\n\n var inViewport = Bling._adManager.isInViewport(_reactDom2.default.findDOMNode(this), slotSize, this.viewableThreshold);\n if (inViewport) {\n this.setState({ inViewport: true });\n }\n }\n }, {\n key: \"defineSizeMapping\",\n value: function defineSizeMapping(adSlot, sizeMapping) {\n if (sizeMapping) {\n Bling._adManager.addMQListener(this, this.props);\n var sizeMappingArray = sizeMapping.reduce(function (mapping, size) {\n return mapping.addSize(size.viewport, size.slot);\n }, Bling._adManager.googletag.sizeMapping()).build();\n adSlot.defineSizeMapping(sizeMappingArray);\n }\n }\n }, {\n key: \"setAttributes\",\n value: function setAttributes(adSlot, attributes) {\n // no clear method, attempting to clear existing attributes before setting new ones.\n var attributeKeys = adSlot.getAttributeKeys();\n attributeKeys.forEach(function (key) {\n adSlot.set(key, null);\n });\n if (attributes) {\n Object.keys(attributes).forEach(function (key) {\n adSlot.set(key, attributes[key]);\n });\n }\n }\n }, {\n key: \"setTargeting\",\n value: function setTargeting(adSlot, targeting) {\n adSlot.clearTargeting();\n if (targeting) {\n Object.keys(targeting).forEach(function (key) {\n adSlot.setTargeting(key, targeting[key]);\n });\n }\n }\n }, {\n key: \"addCompanionAdService\",\n value: function addCompanionAdService(serviceConfig, adSlot) {\n var companionAdsService = Bling._adManager.googletag.companionAds();\n adSlot.addService(companionAdsService);\n if ((typeof serviceConfig === \"undefined\" ? \"undefined\" : _typeof(serviceConfig)) === \"object\") {\n if (serviceConfig.hasOwnProperty(\"enableSyncLoading\")) {\n companionAdsService.enableSyncLoading();\n }\n if (serviceConfig.hasOwnProperty(\"refreshUnfilledSlots\")) {\n companionAdsService.setRefreshUnfilledSlots(serviceConfig.refreshUnfilledSlots);\n }\n }\n }\n }, {\n key: \"getSlotSize\",\n value: function getSlotSize() {\n var _props = this.props,\n origSlotSize = _props.slotSize,\n origSizeMapping = _props.sizeMapping;\n\n var slotSize = void 0;\n if (origSlotSize) {\n slotSize = origSlotSize;\n } else if (origSizeMapping) {\n var sizeMapping = origSizeMapping;\n slotSize = sizeMapping[0] && sizeMapping[0].slot;\n }\n\n return slotSize;\n }\n }, {\n key: \"renderAd\",\n value: function renderAd() {\n this.defineSlot();\n this.display();\n }\n }, {\n key: \"notInViewport\",\n value: function notInViewport() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n var inViewport = state.inViewport;\n\n return this.getRenderWhenViewable(props) && !inViewport;\n }\n }, {\n key: \"defineSlot\",\n value: function defineSlot() {\n var _props2 = this.props,\n adUnitPath = _props2.adUnitPath,\n outOfPage = _props2.outOfPage;\n\n var divId = this._divId;\n var slotSize = this.getSlotSize();\n\n if (!this._adSlot) {\n if (outOfPage) {\n this._adSlot = Bling._adManager.googletag.defineOutOfPageSlot(adUnitPath, divId);\n } else {\n this._adSlot = Bling._adManager.googletag.defineSlot(adUnitPath, slotSize || [], divId);\n }\n }\n\n this.configureSlot(this._adSlot);\n }\n }, {\n key: \"configureSlot\",\n value: function configureSlot(adSlot) {\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.props;\n var sizeMapping = props.sizeMapping,\n attributes = props.attributes,\n targeting = props.targeting,\n companionAdService = props.companionAdService,\n categoryExclusion = props.categoryExclusion,\n collapseEmptyDiv = props.collapseEmptyDiv,\n safeFrameConfig = props.safeFrameConfig,\n content = props.content,\n clickUrl = props.clickUrl,\n forceSafeFrame = props.forceSafeFrame;\n\n\n this.defineSizeMapping(adSlot, sizeMapping);\n\n if (collapseEmptyDiv !== undefined) {\n if (Array.isArray(collapseEmptyDiv)) {\n var _adSlot$setCollapseEm;\n\n (_adSlot$setCollapseEm = adSlot.setCollapseEmptyDiv).call.apply(_adSlot$setCollapseEm, [adSlot].concat(_toConsumableArray(collapseEmptyDiv)));\n } else {\n adSlot.setCollapseEmptyDiv(collapseEmptyDiv);\n }\n }\n\n // Overrides click url\n if (clickUrl) {\n adSlot.setClickUrl(clickUrl);\n }\n\n // Sets category exclusion\n if (categoryExclusion) {\n var exclusion = categoryExclusion;\n if (typeof exclusion === \"string\") {\n exclusion = [exclusion];\n }\n adSlot.clearCategoryExclusions();\n exclusion.forEach(function (item) {\n adSlot.setCategoryExclusion(item);\n });\n }\n\n // Sets AdSense attributes\n this.setAttributes(adSlot, attributes);\n\n // Sets custom targeting parameters\n this.setTargeting(adSlot, targeting);\n\n if (safeFrameConfig) {\n adSlot.setSafeFrameConfig(safeFrameConfig);\n }\n\n if (forceSafeFrame) {\n adSlot.setForceSafeFrame(forceSafeFrame);\n }\n\n // Enables companion ad service\n if (companionAdService) {\n this.addCompanionAdService(companionAdService, adSlot);\n }\n\n // GPT checks if the same service is already added.\n if (content) {\n adSlot.addService(Bling._adManager.googletag.content());\n } else {\n adSlot.addService(Bling._adManager.googletag.pubads());\n }\n }\n }, {\n key: \"display\",\n value: function display() {\n var content = this.props.content;\n\n var divId = this._divId;\n var adSlot = this._adSlot;\n\n if (content) {\n Bling._adManager.googletag.content().setContent(adSlot, content);\n } else {\n if (!Bling._adManager._disableInitialLoad && !Bling._adManager._syncCorrelator) {\n Bling._adManager.updateCorrelator();\n }\n Bling._adManager.googletag.display(divId);\n if (Bling._adManager._disableInitialLoad && !Bling._adManager._initialRender) {\n this.refresh();\n }\n }\n }\n }, {\n key: \"clear\",\n value: function clear() {\n var adSlot = this._adSlot;\n if (adSlot && adSlot.hasOwnProperty(\"getServices\")) {\n // googletag.ContentService doesn't clear content\n var services = adSlot.getServices();\n if (this._divId && services.some(function (s) {\n return !!s.setContent;\n })) {\n document.getElementById(this._divId).innerHTML = \"\";\n return;\n }\n Bling._adManager.clear([adSlot]);\n }\n }\n }, {\n key: \"refresh\",\n value: function refresh(options) {\n var adSlot = this._adSlot;\n if (adSlot) {\n this.clear();\n Bling._adManager.refresh([adSlot], options);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var scriptLoaded = this.state.scriptLoaded;\n var _props3 = this.props,\n id = _props3.id,\n outOfPage = _props3.outOfPage,\n style = _props3.style;\n\n var shouldNotRender = this.notInViewport(this.props, this.state);\n\n if (!scriptLoaded || shouldNotRender) {\n var slotSize = this.getSlotSize();\n\n if (!outOfPage) {\n (0, _invariant2.default)(slotSize, \"Either 'slotSize' or 'sizeMapping' prop needs to be set.\");\n }\n\n if (Array.isArray(slotSize) && Array.isArray(slotSize[0])) {\n slotSize = slotSize[0];\n }\n // https://developers.google.com/doubleclick-gpt/reference?hl=en#googletag.NamedSize\n if (slotSize === \"fluid\" || Array.isArray(slotSize) && slotSize[0] === \"fluid\") {\n slotSize = [\"auto\", \"auto\"];\n }\n var emptyStyle = slotSize && {\n width: slotSize[0],\n height: slotSize[1]\n };\n // render node element instead of script element so that `inViewport` check works.\n return _react2.default.createElement(\"div\", { style: emptyStyle });\n }\n\n // clear the current ad if exists\n this.clear();\n if (this._adSlot) {\n Bling._adManager.googletag.destroySlots([this._adSlot]);\n this._adSlot = null;\n }\n this._divId = id || Bling._adManager.generateDivId();\n\n return _react2.default.createElement(\"div\", { id: this._divId, style: style });\n }\n }, {\n key: \"adSlot\",\n get: function get() {\n return this._adSlot;\n }\n }, {\n key: \"viewableThreshold\",\n get: function get() {\n return this.props.viewableThreshold >= 0 ? this.props.viewableThreshold : Bling._config.viewableThreshold;\n }\n }], [{\n key: \"on\",\n value: function on(eventType, cb) {\n Bling._on(\"on\", eventType, cb);\n }\n }, {\n key: \"once\",\n value: function once(eventType, cb) {\n Bling._on(\"once\", eventType, cb);\n }\n }, {\n key: \"removeListener\",\n value: function removeListener() {\n var _Bling$_adManager;\n\n (_Bling$_adManager = Bling._adManager).removeListener.apply(_Bling$_adManager, arguments);\n }\n }, {\n key: \"removeAllListeners\",\n value: function removeAllListeners() {\n var _Bling$_adManager2;\n\n (_Bling$_adManager2 = Bling._adManager).removeAllListeners.apply(_Bling$_adManager2, arguments);\n }\n }, {\n key: \"_on\",\n value: function _on(fn, eventType, cb) {\n if (typeof cb !== \"function\") {\n return;\n }\n if (eventType === _Events2.default.READY && Bling._adManager.isReady) {\n cb.call(Bling._adManager, Bling._adManager.googletag);\n } else {\n Bling._adManager[fn](eventType, cb);\n }\n }\n }, {\n key: \"configure\",\n value: function configure() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n Bling._config = _extends({}, Bling._config, config);\n }\n /**\n * Returns the GPT version.\n *\n * @method getGPTVersion\n * @returns {Number|boolean} a version or false if GPT is not yet ready.\n * @static\n */\n\n }, {\n key: \"getGPTVersion\",\n value: function getGPTVersion() {\n return Bling._adManager.getGPTVersion();\n }\n /**\n * Returns the Pubads Service version.\n *\n * @method getPubadsVersion\n * @returns {Number|boolean} a version or false if Pubads Service is not yet ready.\n * @static\n */\n\n }, {\n key: \"getPubadsVersion\",\n value: function getPubadsVersion() {\n return Bling._adManager.getPubadsVersion();\n }\n /**\n * Sets a flag to indicate whether the correlator value should always be same across the ads in the page or not.\n *\n * @method syncCorrelator\n * @param {boolean} value\n * @static\n */\n\n }, {\n key: \"syncCorrelator\",\n value: function syncCorrelator(value) {\n Bling._adManager.syncCorrelator(value);\n }\n /**\n * Trigger re-rendering of all the ads.\n *\n * @method render\n * @static\n */\n\n }, {\n key: \"render\",\n value: function render() {\n Bling._adManager.renderAll();\n }\n /**\n * Refreshes all the ads in the page with a new correlator value.\n *\n * @param {Array} slots An array of ad slots.\n * @param {Object} options You can pass `changeCorrelator` flag.\n * @static\n */\n\n }, {\n key: \"refresh\",\n value: function refresh(slots, options) {\n Bling._adManager.refresh(slots, options);\n }\n /**\n * Clears the ads for the specified ad slots, if no slots are provided, all the ads will be cleared.\n *\n * @method clear\n * @param {Array} slots An optional array of slots to clear.\n * @static\n */\n\n }, {\n key: \"clear\",\n value: function clear(slots) {\n Bling._adManager.clear(slots);\n }\n /**\n * Updates the correlator value for the next ad request.\n *\n * @method updateCorrelator\n * @static\n */\n\n }, {\n key: \"updateCorrelator\",\n value: function updateCorrelator() {\n Bling._adManager.updateCorrelator();\n }\n }, {\n key: \"testManager\",\n set: function set(testManager) {\n (0, _invariant2.default)(testManager, \"Pass in createManagerTest to mock GPT\");\n Bling._adManager = testManager;\n }\n }]);\n\n return Bling;\n}(_react.Component), _class.propTypes = {\n /**\n * An optional string to be used as container div id.\n *\n * @property id\n */\n id: _propTypes2.default.string,\n /**\n * An optional string indicating ad unit path which will be used\n * to create an ad slot.\n *\n * @property adUnitPath\n */\n adUnitPath: _propTypes2.default.string.isRequired,\n /**\n * An optional object which includes ad targeting key-value pairs.\n *\n * @property targeting\n */\n targeting: _propTypes2.default.object,\n /**\n * An optional prop to specify the ad slot size which accepts [googletag.GeneralSize](https://developers.google.com/doubleclick-gpt/reference#googletag.GeneralSize) as a type.\n * This will be preceded by the sizeMapping if specified.\n *\n * @property slotSize\n */\n slotSize: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.string]),\n /**\n * An optional array of object which contains an array of viewport size and slot size.\n * This needs to be set if the ad needs to serve different ad sizes per different viewport sizes (responsive ad).\n * Setting the `slot` to any dimension that's not configured in DFP results in rendering an empty ad.\n * The ad slot size which is provided for the viewport size of [0, 0] will be used as default ad size if none of viewport size matches.\n *\n * https://support.google.com/dfp_premium/answer/3423562?hl=en\n *\n * e.g.\n *\n * sizeMapping={[\n * {viewport: [0, 0], slot: [320, 50]},\n * {viewport: [768, 0], slot: [728, 90]}\n * ]}\n *\n * @property sizeMapping\n */\n sizeMapping: _propTypes2.default.arrayOf(_propTypes2.default.shape({\n viewport: _propTypes2.default.array,\n slot: _propTypes2.default.array\n })),\n /**\n * An optional flag to indicate whether an ad slot should be out-of-page slot.\n *\n * @property outOfPage\n */\n outOfPage: _propTypes2.default.bool,\n /**\n * An optional flag to indicate whether companion ad service should be enabled for the ad.\n * If an object is passed, it takes as a configuration expecting `enableSyncLoading` or `refreshUnfilledSlots`.\n *\n * @property companionAdService\n */\n companionAdService: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.object]),\n /**\n * An optional HTML content for the slot. If specified, the ad will render with the HTML content using content service.\n *\n * @property content\n */\n content: _propTypes2.default.string,\n /**\n * An optional click through URL. If specified, any landing page URL associated with the creative that is served is overridden.\n *\n * @property clickUrl\n */\n clickUrl: _propTypes2.default.string,\n /**\n * An optional string or an array of string which specifies a page-level ad category exclusion for the given label name.\n *\n * @property categoryExclusion\n */\n categoryExclusion: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.array]),\n /**\n * An optional map of key-value pairs for an AdSense attribute on a particular ad slot.\n * see the list of supported key value: https://developers.google.com/doubleclick-gpt/adsense_attributes#adsense_parameters.googletag.Slot\n *\n * @property attributes\n */\n attributes: _propTypes2.default.object,\n /**\n * An optional flag to indicate whether an empty ad should be collapsed or not.\n *\n * @property collapseEmptyDiv\n */\n collapseEmptyDiv: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.array]),\n /**\n * An optional flag to indicate whether ads in this slot should be forced to be rendered using a SafeFrame container.\n *\n * @property forceSafeFrame\n */\n forceSafeFrame: _propTypes2.default.bool,\n /**\n * An optional object to set the slot-level preferences for SafeFrame configuration.\n *\n * @property safeFrameConfig\n */\n safeFrameConfig: _propTypes2.default.object,\n /**\n * An optional event handler function for `googletag.events.SlotRenderEndedEvent`.\n *\n * @property onSlotRenderEnded\n */\n onSlotRenderEnded: _propTypes2.default.func,\n /**\n * An optional event handler function for `googletag.events.ImpressionViewableEvent`.\n *\n * @property onImpressionViewable\n */\n onImpressionViewable: _propTypes2.default.func,\n /**\n * An optional event handler function for `googletag.events.slotVisibilityChangedEvent`.\n *\n * @property onSlotVisibilityChanged\n */\n onSlotVisibilityChanged: _propTypes2.default.func,\n /**\n * An optional event handler function for `googletag.events.SlotOnloadEvent`.\n *\n * @property onSlotOnload\n */\n onSlotOnload: _propTypes2.default.func,\n /**\n * An optional flag to indicate whether an ad should only render when it's fully in the viewport area.\n *\n * @property renderWhenViewable\n */\n renderWhenViewable: _propTypes2.default.bool,\n /**\n * An optional number to indicate how much percentage of an ad area needs to be in a viewable area before rendering.\n * Acceptable range is between 0 and 1.\n *\n * @property viewableThreshold\n */\n viewableThreshold: _propTypes2.default.number,\n /**\n * An optional call back function to notify when the script is loaded.\n *\n * @property onScriptLoaded\n */\n onScriptLoaded: _propTypes2.default.func,\n /**\n * An optional call back function to notify when the media queries on the document change.\n *\n * @property onMediaQueryChange\n */\n onMediaQueryChange: _propTypes2.default.func,\n /**\n * An optional object to be applied as `style` props to the container div.\n *\n * @property style\n */\n style: _propTypes2.default.object\n}, _class.refreshableProps = [\"targeting\", \"sizeMapping\", \"clickUrl\", \"categoryExclusion\", \"attributes\", \"collapseEmptyDiv\", \"companionAdService\", \"forceSafeFrame\", \"safeFrameConfig\"], _class.reRenderProps = [\"adUnitPath\", \"slotSize\", \"outOfPage\", \"content\"], _class._adManager = (0, _createManager.createManager)(), _class._config = {\n /**\n * An optional string for GPT seed file url to override.\n */\n seedFileUrl: \"//www.googletagservices.com/tag/js/gpt.js\",\n /**\n * An optional flag to indicate whether an ad should only render when it's fully in the viewport area. Default is `true`.\n */\n renderWhenViewable: true,\n /**\n * An optional number to indicate how much percentage of an ad area needs to be in a viewable area before rendering. Default value is 0.5.\n * Acceptable range is between 0 and 1.\n */\n viewableThreshold: 0.5,\n /**\n * An optional function to create an object with filtered current props and next props for a given keys to perform equality check.\n */\n filterProps: _filterProps2.default,\n /**\n * An optional function for the filtered props and the next props to perform equality check.\n */\n propsEqual: _deepEqual2.default\n}, _temp2);\n\n// proxy pubads API through Bling\n\nexports.default = (0, _hoistNonReactStatics2.default)(Bling, _createManager.pubadsAPI.reduce(function (api, method) {\n api[method] = function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return Bling._adManager.pubadsProxy({ method: method, args: args });\n };\n return api;\n}, {}));","var objectKeys = require('object-keys');\nvar isArguments = require('is-arguments');\nvar is = require('object-is');\nvar isRegex = require('is-regex');\nvar flags = require('regexp.prototype.flags');\nvar isDate = require('is-date-object');\n\nvar getTime = Date.prototype.getTime;\n\nfunction deepEqual(actual, expected, options) {\n var opts = options || {};\n\n // 7.1. All identical values are equivalent, as determined by ===.\n if (opts.strict ? is(actual, expected) : actual === expected) {\n return true;\n }\n\n // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.\n if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {\n return opts.strict ? is(actual, expected) : actual == expected;\n }\n\n /*\n * 7.4. For all other Object pairs, including Array objects, equivalence is\n * determined by having the same number of owned properties (as verified\n * with Object.prototype.hasOwnProperty.call), the same set of keys\n * (although not necessarily the same order), equivalent values for every\n * corresponding key, and an identical 'prototype' property. Note: this\n * accounts for both named and indexed properties on Arrays.\n */\n // eslint-disable-next-line no-use-before-define\n return objEquiv(actual, expected, opts);\n}\n\nfunction isUndefinedOrNull(value) {\n return value === null || value === undefined;\n}\n\nfunction isBuffer(x) {\n if (!x || typeof x !== 'object' || typeof x.length !== 'number') {\n return false;\n }\n if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n return false;\n }\n if (x.length > 0 && typeof x[0] !== 'number') {\n return false;\n }\n return true;\n}\n\nfunction objEquiv(a, b, opts) {\n /* eslint max-statements: [2, 50] */\n var i, key;\n if (typeof a !== typeof b) { return false; }\n if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; }\n\n // an identical 'prototype' property.\n if (a.prototype !== b.prototype) { return false; }\n\n if (isArguments(a) !== isArguments(b)) { return false; }\n\n var aIsRegex = isRegex(a);\n var bIsRegex = isRegex(b);\n if (aIsRegex !== bIsRegex) { return false; }\n if (aIsRegex || bIsRegex) {\n return a.source === b.source && flags(a) === flags(b);\n }\n\n if (isDate(a) && isDate(b)) {\n return getTime.call(a) === getTime.call(b);\n }\n\n var aIsBuffer = isBuffer(a);\n var bIsBuffer = isBuffer(b);\n if (aIsBuffer !== bIsBuffer) { return false; }\n if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here\n if (a.length !== b.length) { return false; }\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) { return false; }\n }\n return true;\n }\n\n if (typeof a !== typeof b) { return false; }\n\n try {\n var ka = objectKeys(a);\n var kb = objectKeys(b);\n } catch (e) { // happens when one is a string literal and the other isn't\n return false;\n }\n // having the same number of owned properties (keys incorporates hasOwnProperty)\n if (ka.length !== kb.length) { return false; }\n\n // the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n // ~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] != kb[i]) { return false; }\n }\n // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], opts)) { return false; }\n }\n\n return true;\n}\n\nmodule.exports = deepEqual;\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n arguments: true,\n arity: true\n};\n\nvar isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';\n\nmodule.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n var keys = Object.getOwnPropertyNames(sourceComponent);\n\n /* istanbul ignore else */\n if (isGetOwnPropertySymbolsAvailable) {\n keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {\n try {\n targetComponent[keys[i]] = sourceComponent[keys[i]];\n } catch (error) {\n\n }\n }\n }\n }\n\n return targetComponent;\n};\n","Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = filterProps;\nfunction filterProps(propKeys, props, nextProps) {\n return propKeys.reduce(function (filtered, key) {\n filtered.props[key] = props[key];\n filtered.nextProps[key] = nextProps[key];\n return filtered;\n }, {\n props: {},\n nextProps: {}\n });\n}","Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AdManager = exports.APIToCallBeforeServiceEnabled = exports.pubadsAPI = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nexports.createManager = createManager;\n\nvar _eventemitter = require(\"eventemitter3\");\n\nvar _eventemitter2 = _interopRequireDefault(_eventemitter);\n\nvar _throttleDebounce = require(\"throttle-debounce\");\n\nvar _invariant = require(\"invariant\");\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _exenv = require(\"exenv\");\n\nvar _Events = require(\"./Events\");\n\nvar _Events2 = _interopRequireDefault(_Events);\n\nvar _isInViewport2 = require(\"./utils/isInViewport\");\n\nvar _isInViewport3 = _interopRequireDefault(_isInViewport2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// based on https://developers.google.com/doubleclick-gpt/reference?hl=en\nvar pubadsAPI = exports.pubadsAPI = [\"enableAsyncRendering\", \"enableSingleRequest\", \"enableSyncRendering\", \"disableInitialLoad\", \"collapseEmptyDivs\", \"enableVideoAds\", \"set\", \"get\", \"getAttributeKeys\", \"setTargeting\", \"clearTargeting\", \"setCategoryExclusion\", \"clearCategoryExclusions\", \"setCentering\", \"setCookieOptions\", \"setLocation\", \"setPublisherProvidedId\", \"setTagForChildDirectedTreatment\", \"clearTagForChildDirectedTreatment\", \"setVideoContent\", \"setForceSafeFrame\"];\n\nvar APIToCallBeforeServiceEnabled = exports.APIToCallBeforeServiceEnabled = [\"enableAsyncRendering\", \"enableSingleRequest\", \"enableSyncRendering\", \"disableInitialLoad\", \"collapseEmptyDivs\", \"setCentering\"];\n\nvar AdManager = exports.AdManager = function (_EventEmitter) {\n _inherits(AdManager, _EventEmitter);\n\n function AdManager() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, AdManager);\n\n var _this = _possibleConstructorReturn(this, (AdManager.__proto__ || Object.getPrototypeOf(AdManager)).call(this, config));\n\n _this._adCnt = 0;\n _this._initialRender = true;\n _this._syncCorrelator = false;\n _this._testMode = false;\n _this._foldCheck = (0, _throttleDebounce.throttle)(20, function (event) {\n var instances = _this.getMountedInstances();\n instances.forEach(function (instance) {\n if (instance.getRenderWhenViewable()) {\n instance.foldCheck(event);\n }\n });\n\n if (_this.testMode) {\n _this._getTimer();\n }\n });\n\n _this._handleMediaQueryChange = function (event) {\n if (_this._syncCorrelator) {\n _this.refresh();\n return;\n }\n // IE returns `event.media` value differently, need to use regex to evaluate.\n // eslint-disable-next-line wrap-regex\n var res = /min-width:\\s?(\\d+)px/.exec(event.media);\n var viewportWidth = res && res[1];\n\n if (viewportWidth && _this._mqls[viewportWidth]) {\n _this._mqls[viewportWidth].listeners.forEach(function (instance) {\n instance.refresh();\n if (instance.props.onMediaQueryChange) {\n instance.props.onMediaQueryChange(event);\n }\n });\n }\n };\n\n _this.render = (0, _throttleDebounce.debounce)(4, function () {\n if (!_this._initialRender) {\n return;\n }\n\n var checkPubadsReady = function checkPubadsReady(cb) {\n if (_this.pubadsReady) {\n cb();\n } else {\n setTimeout(checkPubadsReady, 50, cb);\n }\n };\n\n var instances = _this.getMountedInstances();\n var hasPubAdsService = false;\n var dummyAdSlot = void 0;\n\n // Define all the slots\n instances.forEach(function (instance) {\n if (!instance.notInViewport()) {\n instance.defineSlot();\n var adSlot = instance.adSlot;\n\n if (adSlot && adSlot.hasOwnProperty(\"getServices\")) {\n var services = adSlot.getServices();\n if (!hasPubAdsService) {\n hasPubAdsService = services.filter(function (service) {\n return !!service.enableAsyncRendering;\n }).length > 0;\n }\n }\n }\n });\n // if none of the ad slots uses pubads service, create dummy slot to use pubads service.\n if (!hasPubAdsService) {\n dummyAdSlot = _this.googletag.defineSlot(\"/\", []);\n dummyAdSlot.addService(_this.googletag.pubads());\n }\n\n // Call pubads API which needs to be called before service is enabled.\n _this._processPubadsQueue();\n\n // Enable service\n _this.googletag.enableServices();\n\n // After the service is enabled, check periodically until `pubadsReady` flag returns true before proceeding the rest.\n checkPubadsReady(function () {\n // destroy dummy ad slot if exists.\n if (dummyAdSlot) {\n _this.googletag.destroySlots([dummyAdSlot]);\n }\n // Call the rest of the pubads API that's in the queue.\n _this._processPubadsQueue();\n // listen for GPT events\n _this._listen();\n // client should be able to set any page-level setting within the event handler.\n _this._isReady = true;\n _this.emit(_Events2.default.READY, _this.googletag);\n\n // Call display\n instances.forEach(function (instance) {\n if (!instance.notInViewport()) {\n instance.display();\n }\n });\n\n _this.emit(_Events2.default.RENDER, _this.googletag);\n\n _this._initialRender = false;\n });\n });\n _this.renderAll = (0, _throttleDebounce.debounce)(4, function () {\n if (!_this.apiReady) {\n return false;\n }\n\n // first instance updates correlator value and re-render each ad\n var instances = _this.getMountedInstances();\n instances.forEach(function (instance, i) {\n if (i === 0) {\n _this.updateCorrelator();\n }\n instance.forceUpdate();\n });\n\n return true;\n });\n\n\n if (config.test) {\n _this.testMode = config;\n }\n return _this;\n }\n\n _createClass(AdManager, [{\n key: \"_processPubadsQueue\",\n value: function _processPubadsQueue() {\n var _this2 = this;\n\n if (this._pubadsProxyQueue) {\n Object.keys(this._pubadsProxyQueue).forEach(function (method) {\n if (_this2.googletag && !_this2.googletag.pubadsReady && APIToCallBeforeServiceEnabled.indexOf(method) > -1 || _this2.pubadsReady) {\n _this2._pubadsProxyQueue[method].forEach(function (params) {\n return _this2.pubadsProxy(params);\n });\n delete _this2._pubadsProxyQueue[method];\n }\n });\n if (!Object.keys(this._pubadsProxyQueue).length) {\n this._pubadsProxyQueue = null;\n }\n }\n }\n }, {\n key: \"_callPubads\",\n value: function _callPubads(_ref) {\n var method = _ref.method,\n args = _ref.args,\n resolve = _ref.resolve,\n reject = _ref.reject;\n\n if (typeof this.googletag.pubads()[method] !== \"function\") {\n reject(new Error(\"googletag.pubads does not support \" + method + \", please update pubadsAPI\"));\n } else {\n try {\n var _googletag$pubads;\n\n var result = (_googletag$pubads = this.googletag.pubads())[method].apply(_googletag$pubads, _toConsumableArray(args));\n resolve(result);\n } catch (err) {\n reject(err);\n }\n }\n }\n }, {\n key: \"_toggleListener\",\n value: function _toggleListener(add) {\n var _this3 = this;\n\n [\"scroll\", \"resize\"].forEach(function (eventName) {\n window[add ? \"addEventListener\" : \"removeEventListener\"](eventName, _this3._foldCheck);\n });\n }\n }, {\n key: \"_getTimer\",\n value: function _getTimer() {\n return Date.now();\n }\n }, {\n key: \"_listen\",\n value: function _listen() {\n var _this4 = this;\n\n if (!this._listening) {\n [_Events2.default.SLOT_RENDER_ENDED, _Events2.default.IMPRESSION_VIEWABLE, _Events2.default.SLOT_VISIBILITY_CHANGED, _Events2.default.SLOT_LOADED].forEach(function (eventType) {\n [\"pubads\", \"content\", \"companionAds\"].forEach(function (service) {\n // there is no API to remove listeners.\n _this4.googletag[service]().addEventListener(eventType, _this4._onEvent.bind(_this4, eventType));\n });\n });\n this._listening = true;\n }\n }\n }, {\n key: \"_onEvent\",\n value: function _onEvent(eventType, event) {\n // fire to the global listeners\n if (this.listeners(eventType, true)) {\n this.emit(eventType, event);\n }\n // call event handler props\n var instances = this.getMountedInstances();\n var slot = event.slot;\n\n var funcName = \"on\" + eventType.charAt(0).toUpperCase() + eventType.substr(1);\n var instance = instances.filter(function (inst) {\n return slot === inst.adSlot;\n })[0];\n if (instance && instance.props[funcName]) {\n instance.props[funcName](event);\n }\n }\n }, {\n key: \"syncCorrelator\",\n value: function syncCorrelator() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n this._syncCorrelator = value;\n }\n }, {\n key: \"generateDivId\",\n value: function generateDivId() {\n return \"bling-\" + ++this._adCnt;\n }\n }, {\n key: \"getMountedInstances\",\n value: function getMountedInstances() {\n if (!this.mountedInstances) {\n this.mountedInstances = [];\n }\n return this.mountedInstances;\n }\n }, {\n key: \"addInstance\",\n value: function addInstance(instance) {\n var instances = this.getMountedInstances();\n var index = instances.indexOf(instance);\n if (index === -1) {\n // The first instance starts listening for the event.\n if (instances.length === 0) {\n this._toggleListener(true);\n }\n this.addMQListener(instance, instance.props);\n instances.push(instance);\n }\n }\n }, {\n key: \"removeInstance\",\n value: function removeInstance(instance) {\n var instances = this.getMountedInstances();\n var index = instances.indexOf(instance);\n if (index >= 0) {\n instances.splice(index, 1);\n // The last instance removes listening for the event.\n if (instances.length === 0) {\n this._toggleListener(false);\n }\n this.removeMQListener(instance, instance.props);\n }\n }\n }, {\n key: \"addMQListener\",\n value: function addMQListener(instance, _ref2) {\n var _this5 = this;\n\n var sizeMapping = _ref2.sizeMapping;\n\n if (!sizeMapping || !Array.isArray(sizeMapping)) {\n return;\n }\n\n sizeMapping.forEach(function (size) {\n var viewportWidth = size.viewport && size.viewport[0];\n if (viewportWidth !== undefined) {\n if (!_this5._mqls) {\n _this5._mqls = {};\n }\n if (!_this5._mqls[viewportWidth]) {\n var mql = window.matchMedia(\"(min-width: \" + viewportWidth + \"px)\");\n mql.addListener(_this5._handleMediaQueryChange);\n _this5._mqls[viewportWidth] = {\n mql: mql,\n listeners: []\n };\n }\n if (_this5._mqls[viewportWidth].listeners.indexOf(instance) === -1) {\n _this5._mqls[viewportWidth].listeners.push(instance);\n }\n }\n });\n }\n }, {\n key: \"removeMQListener\",\n value: function removeMQListener(instance) {\n var _this6 = this;\n\n if (!this._mqls) {\n return;\n }\n\n Object.keys(this._mqls).forEach(function (key) {\n var index = _this6._mqls[key].listeners.indexOf(instance);\n if (index > -1) {\n _this6._mqls[key].listeners.splice(index, 1);\n }\n if (_this6._mqls[key].listeners.length === 0) {\n _this6._mqls[key].mql.removeListener(_this6._handleMediaQueryChange);\n delete _this6._mqls[key];\n }\n });\n }\n }, {\n key: \"isInViewport\",\n value: function isInViewport() {\n return _isInViewport3.default.apply(undefined, arguments);\n }\n\n /**\n * Refreshes all the ads in the page with a new correlator value.\n *\n * @param {Array} slots An array of ad slots.\n * @param {Object} options You can pass `changeCorrelator` flag.\n * @static\n */\n\n }, {\n key: \"refresh\",\n value: function refresh(slots, options) {\n if (!this.pubadsReady) {\n return false;\n }\n\n // gpt already debounces refresh\n this.googletag.pubads().refresh(slots, options);\n\n return true;\n }\n }, {\n key: \"clear\",\n value: function clear(slots) {\n if (!this.pubadsReady) {\n return false;\n }\n\n this.googletag.pubads().clear(slots);\n\n return true;\n }\n\n /**\n * Re-render(not refresh) all the ads in the page and the first ad will update the correlator value.\n * Updating correlator value ensures competitive exclusion.\n *\n * @method renderAll\n * @static\n */\n\n }, {\n key: \"getGPTVersion\",\n value: function getGPTVersion() {\n if (!this.apiReady) {\n return false;\n }\n return this.googletag.getVersion();\n }\n }, {\n key: \"getPubadsVersion\",\n value: function getPubadsVersion() {\n if (!this.pubadsReady) {\n return false;\n }\n return this.googletag.pubads().getVersion();\n }\n }, {\n key: \"updateCorrelator\",\n value: function updateCorrelator() {\n if (!this.pubadsReady) {\n return false;\n }\n this.googletag.pubads().updateCorrelator();\n\n return true;\n }\n }, {\n key: \"load\",\n value: function load(url) {\n var _this7 = this;\n\n return this._loadPromise || (this._loadPromise = new Promise(function (resolve, reject) {\n // test mode can't be enabled in production mode\n if (_this7.testMode) {\n resolve(_this7.googletag);\n return;\n }\n if (!_exenv.canUseDOM) {\n reject(new Error(\"DOM not available\"));\n return;\n }\n if (!url) {\n reject(new Error(\"url is missing\"));\n return;\n }\n var onLoad = function onLoad() {\n if (window.googletag) {\n _this7._googletag = window.googletag;\n // make sure API is ready for use.\n _this7.googletag.cmd.push(function () {\n _this7._isLoaded = true;\n resolve(_this7.googletag);\n });\n } else {\n reject(new Error(\"window.googletag is not available\"));\n }\n };\n if (window.googletag && window.googletag.apiReady) {\n onLoad();\n } else {\n var script = document.createElement(\"script\");\n script.async = true;\n script.onload = onLoad;\n script.onerror = function () {\n reject(new Error(\"failed to load script\"));\n };\n script.src = url;\n document.head.appendChild(script);\n }\n }));\n }\n }, {\n key: \"pubadsProxy\",\n value: function pubadsProxy(_ref3) {\n var _this8 = this;\n\n var method = _ref3.method,\n _ref3$args = _ref3.args,\n args = _ref3$args === undefined ? [] : _ref3$args,\n resolve = _ref3.resolve,\n reject = _ref3.reject;\n\n if (!resolve) {\n // there are couple pubads API which doesn't provide getter methods for later use,\n // so remember them here.\n if (APIToCallBeforeServiceEnabled.indexOf(method) > -1) {\n this[\"_\" + method] = args && args.length && args[0] || true;\n }\n return new Promise(function (resolve2, reject2) {\n var params = {\n method: method,\n args: args,\n resolve: resolve2,\n reject: reject2\n };\n if (!_this8.pubadsReady) {\n if (!_this8._pubadsProxyQueue) {\n _this8._pubadsProxyQueue = {};\n }\n if (!_this8._pubadsProxyQueue[method]) {\n _this8._pubadsProxyQueue[method] = [];\n }\n _this8._pubadsProxyQueue[method].push(params);\n } else {\n _this8._callPubads(params);\n }\n });\n }\n\n this._callPubads({ method: method, args: args, resolve: resolve, reject: reject });\n\n return Promise.resolve();\n }\n }, {\n key: \"googletag\",\n get: function get() {\n return this._googletag;\n }\n }, {\n key: \"isLoaded\",\n get: function get() {\n return !!this._isLoaded;\n }\n }, {\n key: \"isReady\",\n get: function get() {\n return !!this._isReady;\n }\n }, {\n key: \"apiReady\",\n get: function get() {\n return this.googletag && this.googletag.apiReady;\n }\n }, {\n key: \"pubadsReady\",\n get: function get() {\n return this.googletag && this.googletag.pubadsReady;\n }\n }, {\n key: \"testMode\",\n get: function get() {\n return this._testMode;\n },\n set: function set(config) {\n if (process.env.NODE_ENV === \"production\") {\n return;\n }\n var test = config.test,\n GPTMock = config.GPTMock;\n\n this._isLoaded = true;\n this._testMode = !!test;\n\n if (test) {\n (0, _invariant2.default)(test && GPTMock, \"Must provide GPTMock to enable testMode. config{GPTMock}\");\n this._googletag = new GPTMock(config);\n }\n }\n }]);\n\n return AdManager;\n}(_eventemitter2.default);\n\nfunction createManager(config) {\n return new AdManager(config);\n}","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n var evt = prefix ? prefix + event : event\n , available = this._events[evt];\n\n if (exists) return !!available;\n if (!available) return [];\n if (available.fn) return [available.fn];\n\n for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n ee[i] = available[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n var listener = new EE(fn, context || this)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n var listener = new EE(fn, context || this, true)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn\n && (!once || listeners.once)\n && (!context || listeners.context === context)\n ) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn\n || (once && !listeners[i].once)\n || (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","var throttle = require('./throttle');\nvar debounce = require('./debounce');\n\nmodule.exports = {\n\tthrottle: throttle,\n\tdebounce: debounce\n};\n","/* eslint-disable no-undefined */\n\nvar throttle = require('./throttle');\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @return {Function} A new, debounced function.\n */\nmodule.exports = function ( delay, atBegin, callback ) {\n\treturn callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n};\n","/*!\n Copyright (c) 2015 Jed Watson.\n Based on code that is Copyright 2013-2015, Facebook, Inc.\n All rights reserved.\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar canUseDOM = !!(\n\t\ttypeof window !== 'undefined' &&\n\t\twindow.document &&\n\t\twindow.document.createElement\n\t);\n\n\tvar ExecutionEnvironment = {\n\n\t\tcanUseDOM: canUseDOM,\n\n\t\tcanUseWorkers: typeof Worker !== 'undefined',\n\n\t\tcanUseEventListeners:\n\t\t\tcanUseDOM && !!(window.addEventListener || window.attachEvent),\n\n\t\tcanUseViewport: canUseDOM && !!window.screen\n\n\t};\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\tdefine(function () {\n\t\t\treturn ExecutionEnvironment;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = ExecutionEnvironment;\n\t} else {\n\t\twindow.ExecutionEnvironment = ExecutionEnvironment;\n\t}\n\n}());\n","Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = isInViewport;\nfunction isInViewport(el) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0],\n _ref2 = _slicedToArray(_ref, 2),\n width = _ref2[0],\n height = _ref2[1];\n\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n if (!el || el.nodeType !== 1) {\n return false;\n }\n var clientRect = el.getBoundingClientRect();\n var rect = {\n top: clientRect.top,\n left: clientRect.left,\n bottom: clientRect.bottom,\n right: clientRect.right\n };\n var viewport = {\n top: 0,\n left: 0,\n bottom: window.innerHeight,\n right: window.innerWidth\n };\n var inViewport = rect.bottom >= viewport.top + height * offset && rect.right >= viewport.left + width * offset && rect.top <= viewport.bottom - height * offset && rect.left <= viewport.right - width * offset;\n return inViewport;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isEmptyTextNode;\n/**\n * Tests a htmlparser2 node and returns whether is it a text node at the start and end of the line containing only\n * white space. This allows these node types to be excluded from the rendering because they are unnecessary.\n *\n * @param {Object} node The element object as created by htmlparser2\n * @returns {boolean} Whether the node is an empty text node\n */\nfunction isEmptyTextNode(node) {\n return node.type === 'text' && /\\r?\\n/.test(node.data) && node.data.trim() === '';\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ElementType$Text$Ele;\n\nvar _htmlparser = require('htmlparser2');\n\nvar _TextElementType = require('./TextElementType');\n\nvar _TextElementType2 = _interopRequireDefault(_TextElementType);\n\nvar _TagElementType = require('./TagElementType');\n\nvar _TagElementType2 = _interopRequireDefault(_TagElementType);\n\nvar _StyleElementType = require('./StyleElementType');\n\nvar _StyleElementType2 = _interopRequireDefault(_StyleElementType);\n\nvar _UnsupportedElementType = require('./UnsupportedElementType');\n\nvar _UnsupportedElementType2 = _interopRequireDefault(_UnsupportedElementType);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*\n * Map each htmlparser2 element type to a function which will convert that element type to a React element\n * Not all of the element types are supported so the UnsupportedElementType is used for them which will not return any\n * value\n */\n\nexports.default = (_ElementType$Text$Ele = {}, _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Text, _TextElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Tag, _TagElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Style, _StyleElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Directive, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Comment, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Script, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.CDATA, _UnsupportedElementType2.default), _defineProperty(_ElementType$Text$Ele, _htmlparser.ElementType.Doctype, _UnsupportedElementType2.default), _ElementType$Text$Ele);","var decodeMap = require(\"../maps/decode.json\");\n\nmodule.exports = decodeCodePoint;\n\n// modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nfunction decodeCodePoint(codePoint) {\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return \"\\uFFFD\";\n }\n\n if (codePoint in decodeMap) {\n codePoint = decodeMap[codePoint];\n }\n\n var output = \"\";\n\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n\n output += String.fromCharCode(codePoint);\n return output;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","// DOM-Level-1-compliant structure\nvar NodePrototype = require('./node');\nvar ElementPrototype = module.exports = Object.create(NodePrototype);\n\nvar domLvl1 = {\n\ttagName: \"name\"\n};\n\nObject.keys(domLvl1).forEach(function(key) {\n\tvar shorthand = domLvl1[key];\n\tObject.defineProperty(ElementPrototype, key, {\n\t\tget: function() {\n\t\t\treturn this[shorthand] || null;\n\t\t},\n\t\tset: function(val) {\n\t\t\tthis[shorthand] = val;\n\t\t\treturn val;\n\t\t}\n\t});\n});\n","var DomHandler = require(\"domhandler\");\nvar DomUtils = require(\"domutils\");\n\n//TODO: make this a streamable handler\nfunction FeedHandler(callback, options) {\n this.init(callback, options);\n}\n\nrequire(\"inherits\")(FeedHandler, DomHandler);\n\nFeedHandler.prototype.init = DomHandler;\n\nfunction getElements(what, where) {\n return DomUtils.getElementsByTagName(what, where, true);\n}\nfunction getOneElement(what, where) {\n return DomUtils.getElementsByTagName(what, where, true, 1)[0];\n}\nfunction fetch(what, where, recurse) {\n return DomUtils.getText(\n DomUtils.getElementsByTagName(what, where, recurse, 1)\n ).trim();\n}\n\nfunction addConditionally(obj, prop, what, where, recurse) {\n var tmp = fetch(what, where, recurse);\n if (tmp) obj[prop] = tmp;\n}\n\nvar isValidFeed = function(value) {\n return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n};\n\nFeedHandler.prototype.onend = function() {\n var feed = {},\n feedRoot = getOneElement(isValidFeed, this.dom),\n tmp,\n childs;\n\n if (feedRoot) {\n if (feedRoot.name === \"feed\") {\n childs = feedRoot.children;\n\n feed.type = \"atom\";\n addConditionally(feed, \"id\", \"id\", childs);\n addConditionally(feed, \"title\", \"title\", childs);\n if (\n (tmp = getOneElement(\"link\", childs)) &&\n (tmp = tmp.attribs) &&\n (tmp = tmp.href)\n )\n feed.link = tmp;\n addConditionally(feed, \"description\", \"subtitle\", childs);\n if ((tmp = fetch(\"updated\", childs))) feed.updated = new Date(tmp);\n addConditionally(feed, \"author\", \"email\", childs, true);\n\n feed.items = getElements(\"entry\", childs).map(function(item) {\n var entry = {},\n tmp;\n\n item = item.children;\n\n addConditionally(entry, \"id\", \"id\", item);\n addConditionally(entry, \"title\", \"title\", item);\n if (\n (tmp = getOneElement(\"link\", item)) &&\n (tmp = tmp.attribs) &&\n (tmp = tmp.href)\n )\n entry.link = tmp;\n if ((tmp = fetch(\"summary\", item) || fetch(\"content\", item)))\n entry.description = tmp;\n if ((tmp = fetch(\"updated\", item)))\n entry.pubDate = new Date(tmp);\n return entry;\n });\n } else {\n childs = getOneElement(\"channel\", feedRoot.children).children;\n\n feed.type = feedRoot.name.substr(0, 3);\n feed.id = \"\";\n addConditionally(feed, \"title\", \"title\", childs);\n addConditionally(feed, \"link\", \"link\", childs);\n addConditionally(feed, \"description\", \"description\", childs);\n if ((tmp = fetch(\"lastBuildDate\", childs)))\n feed.updated = new Date(tmp);\n addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n\n feed.items = getElements(\"item\", feedRoot.children).map(function(\n item\n ) {\n var entry = {},\n tmp;\n\n item = item.children;\n\n addConditionally(entry, \"id\", \"guid\", item);\n addConditionally(entry, \"title\", \"title\", item);\n addConditionally(entry, \"link\", \"link\", item);\n addConditionally(entry, \"description\", \"description\", item);\n if ((tmp = fetch(\"pubDate\", item)))\n entry.pubDate = new Date(tmp);\n return entry;\n });\n }\n }\n this.dom = feed;\n DomHandler.prototype._handleCallback.call(\n this,\n feedRoot ? null : Error(\"couldn't find root of feed\")\n );\n};\n\nmodule.exports = FeedHandler;\n","var ElementType = require(\"domelementtype\"),\n getOuterHTML = require(\"dom-serializer\"),\n isTag = ElementType.isTag;\n\nmodule.exports = {\n\tgetInnerHTML: getInnerHTML,\n\tgetOuterHTML: getOuterHTML,\n\tgetText: getText\n};\n\nfunction getInnerHTML(elem, opts){\n\treturn elem.children ? elem.children.map(function(elem){\n\t\treturn getOuterHTML(elem, opts);\n\t}).join(\"\") : \"\";\n}\n\nfunction getText(elem){\n\tif(Array.isArray(elem)) return elem.map(getText).join(\"\");\n\tif(isTag(elem)) return elem.name === \"br\" ? \"\\n\" : getText(elem.children);\n\tif(elem.type === ElementType.CDATA) return getText(elem.children);\n\tif(elem.type === ElementType.Text) return elem.data;\n\treturn \"\";\n}\n","/*\n Module dependencies\n*/\nvar ElementType = require('domelementtype');\nvar entities = require('entities');\n\n/* mixed-case SVG and MathML tags & attributes\n recognized by the HTML parser, see\n https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n*/\nvar foreignNames = require('./foreignNames.json');\nforeignNames.elementNames.__proto__ = null; /* use as a simple dictionary */\nforeignNames.attributeNames.__proto__ = null;\n\nvar unencodedElements = {\n __proto__: null,\n style: true,\n script: true,\n xmp: true,\n iframe: true,\n noembed: true,\n noframes: true,\n plaintext: true,\n noscript: true\n};\n\n/*\n Format attributes\n*/\nfunction formatAttrs(attributes, opts) {\n if (!attributes) return;\n\n var output = '';\n var value;\n\n // Loop through the attributes\n for (var key in attributes) {\n value = attributes[key];\n if (output) {\n output += ' ';\n }\n\n if (opts.xmlMode === 'foreign') {\n /* fix up mixed-case attribute names */\n key = foreignNames.attributeNames[key] || key;\n }\n output += key;\n if ((value !== null && value !== '') || opts.xmlMode) {\n output +=\n '=\"' +\n (opts.decodeEntities\n ? entities.encodeXML(value)\n : value.replace(/\\\"/g, '"')) +\n '\"';\n }\n }\n\n return output;\n}\n\n/*\n Self-enclosing tags (stolen from node-htmlparser)\n*/\nvar singleTag = {\n __proto__: null,\n area: true,\n base: true,\n basefont: true,\n br: true,\n col: true,\n command: true,\n embed: true,\n frame: true,\n hr: true,\n img: true,\n input: true,\n isindex: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true\n};\n\nvar render = (module.exports = function(dom, opts) {\n if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];\n opts = opts || {};\n\n var output = '';\n\n for (var i = 0; i < dom.length; i++) {\n var elem = dom[i];\n\n if (elem.type === 'root') output += render(elem.children, opts);\n else if (ElementType.isTag(elem)) output += renderTag(elem, opts);\n else if (elem.type === ElementType.Directive)\n output += renderDirective(elem);\n else if (elem.type === ElementType.Comment) output += renderComment(elem);\n else if (elem.type === ElementType.CDATA) output += renderCdata(elem);\n else output += renderText(elem, opts);\n }\n\n return output;\n});\n\nvar foreignModeIntegrationPoints = [\n 'mi',\n 'mo',\n 'mn',\n 'ms',\n 'mtext',\n 'annotation-xml',\n 'foreignObject',\n 'desc',\n 'title'\n];\n\nfunction renderTag(elem, opts) {\n // Handle SVG / MathML in HTML\n if (opts.xmlMode === 'foreign') {\n /* fix up mixed-case element names */\n elem.name = foreignNames.elementNames[elem.name] || elem.name;\n /* exit foreign mode at integration points */\n if (\n elem.parent &&\n foreignModeIntegrationPoints.indexOf(elem.parent.name) >= 0\n )\n opts = Object.assign({}, opts, { xmlMode: false });\n }\n if (!opts.xmlMode && ['svg', 'math'].indexOf(elem.name) >= 0) {\n opts = Object.assign({}, opts, { xmlMode: 'foreign' });\n }\n\n var tag = '<' + elem.name;\n var attribs = formatAttrs(elem.attribs, opts);\n\n if (attribs) {\n tag += ' ' + attribs;\n }\n\n if (opts.xmlMode && (!elem.children || elem.children.length === 0)) {\n tag += '/>';\n } else {\n tag += '>';\n if (elem.children) {\n tag += render(elem.children, opts);\n }\n\n if (!singleTag[elem.name] || opts.xmlMode) {\n tag += '' + elem.name + '>';\n }\n }\n\n return tag;\n}\n\nfunction renderDirective(elem) {\n return '<' + elem.data + '>';\n}\n\nfunction renderText(elem, opts) {\n var data = elem.data || '';\n\n // if entities weren't decoded, no need to encode them back\n if (\n opts.decodeEntities &&\n !(elem.parent && elem.parent.name in unencodedElements)\n ) {\n data = entities.encodeXML(data);\n }\n\n return data;\n}\n\nfunction renderCdata(elem) {\n return '';\n}\n\nfunction renderComment(elem) {\n return '';\n}\n","/** Types of elements found in htmlparser2's DOM */\nexport var ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for ... ?> */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for