s3.advarkads.com Open in urlscan Pro
2606:4700:10::ac43:dab  Public Scan

URL: http://s3.advarkads.com/modules/vpaid.js
Submission: On December 06 via manual from RU — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

!function(e){(e=e.lstorage||(e.lstorage={})).read=function(e,t){void 0===t&&(t=void 0);try{return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem(e))||t}catch(e){return t}},e.write=function(e,t){try{t?null!==localStorage&&void 0!==localStorage&&localStorage.setItem(e,t):null!==localStorage&&void 0!==localStorage&&localStorage.removeItem(e)}catch(e){}},e.del=function(e){try{null!==localStorage&&void 0!==localStorage&&localStorage.removeItem(e)}catch(e){}},e.clear=function(){try{null!==localStorage&&void 0!==localStorage&&localStorage.clear()}catch(e){}}}(advark=advark||{}),function(e){e.setImmediate||(e.setImmediate=function(r){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];0;function t(e,t){i||o||(i=!0,window.removeEventListener("message",a),window.clearTimeout(s),r.apply(void 0,n))}var i=!1,o=!0,s=window.setTimeout(function(){return t()},0),a=function(e){return t()};window.addEventListener("message",a),window.postMessage("setImmediate","*"),o=!1})}(advark=advark||{}),function(l){var c;function u(t,r){this._pending=t instanceof Function?t:function(e){return e(t,r)}}c=l.spromise||(l.spromise={}),u.prototype.then=function(s,a){return this._pending(function(e,t,r){var n,i,o=t?a:s,t=t&&void 0===o;try{n="function"==typeof o?o(e):void 0!==o?o:e,c.is(n)&&(i=c.wrap(n).then(r&&function(e){return r.resolve(e)},r&&function(e){return r.reject(e)}))}catch(e){l.catcher.gen("spromise")(e),n=e,t=!0}return i||c.complete(new u(n,t),r)})},u.prototype.catch=function(e){return this.then(void 0,e)},u.prototype.anycase=function(e){return this.then(e,e)},u.prototype.inspect=function(n,i){function t(e,t){var r=new c.Deffer;return n(e,t),t?r.resolve(e):r.reject(e),i&&i(e,t),r.promise}return this.then(function(e){return t(e,!0)},function(e){return t(e,!1)})},c.Promise=u}(advark=advark||{}),function(e){!function(n){var i;(e=i=i||{})[e.pending=0]="pending",e[e.resolved=1]="resolved",e[e.rejected=2]="rejected";var e=(Object.defineProperty(o.prototype,"pending",{get:function(){return this._state===i.pending},enumerable:!1,configurable:!0}),o.prototype.resolve=function(e){return this._complete(e,!1)},o.prototype.reject=function(e){return this._complete(e,!0)},o.prototype._complete=function(e,t){if(this._state===i.pending)if(n.is(e))n.complete(e,this);else{for(var r=0;r<this._recs.length;r++)this._recs[r].complete(e,t,this._recs[r].deffer);this._recs=[],this._state=t?i.rejected:i.resolved,this._result=e}return this.promise},o);function o(){var r=this;this._state=i.pending,this._recs=[],this.promise=new n.Promise(function(e){if(r._state!==i.pending)return e(r._result,r._state===i.rejected);var t=new o;return r._recs.push({deffer:t,complete:e}),t.promise})}n.Deffer=e}(e.spromise||(e.spromise={}))}(advark=advark||{}),function(e){var t;function s(){return new t.Deffer}function r(e){return new t.Promise(e,!1)}function n(e){return new t.Promise(e,!0)}function a(e,r){return r?e.inspect(function(e,t){return t?r.resolve(e):r.reject(e)}):e}function l(e){return e&&e.then&&"function"==typeof e.then}function c(e){return e instanceof t.Promise||e&&"function"==typeof e.inspect&&"function"==typeof e.anycase}(t=e.spromise||(e.spromise={})).deffer=s,t.promise=function(e){var t=s();return e(function(e){return t.resolve(e)},function(e){return t.reject(e)}),t.promise},t.resolved=r,t.rejected=n,t.complete=a,t.cancel=function(e,r){var n=t.deffer();return e.inspect(function(e,t){return!r||r.pending?t?n.resolve(e):n.reject(e):void 0}),n.promise},t.is=l,t.my=c,t.wrap=function(e,t){if(c(e))return e;var r=s();return l(e)?e.then(function(e){return r.resolve(e)},function(e){return r.reject(e)}):t?a(t,r):r.resolve(e),r.promise},t.lazywrap=function(r,e){if(c(r))return r;var n,i,o=s();return l(r)?(n=!1,i=o.promise.then.bind(o.promise),o.promise.then=function(e,t){return n||(r.then(function(e){return o.resolve(e)},function(e){return o.reject(e)}),n=!0),i(e,t)}):e?a(e,o):o.resolve(r),o.promise},t.invert=function(e){return e.then(n,r)}}(advark=advark||{}),function(e){var o;function n(e,t,r){function n(){t?i.resolve(r):i.reject(r)}var i=o.deffer();return setTimeout(function(){return o.asyncWrapper(n)},e),i.promise}(o=e.spromise||(e.spromise={})).asyncWrapper=function(e){return e()},o.after=n,o.timeout=function(e,t,r){return o.race([e,n(t,!1,r)])}}(advark=advark||{}),function(e){var o;(o=e.spromise||(e.spromise={})).race=function(e){e.length||(e=[o.resolved()]);for(var t=o.deffer(),r=0,n=e;r<n.length;r++){var i=n[r];o.complete(i,t)}return t.promise},o.join=function(e){for(var r=(e=!e.length?[o.resolved()]:e).length,n=o.deffer(),t=0,i=e;t<i.length;t++)i[t].inspect(function(e,t){return!--r&&n.resolve()});return n.promise},o.all=function(e){for(var r=(e=!e.length?[o.resolved()]:e).length,n=o.deffer(),t=0,i=e;t<i.length;t++)i[t].inspect(function(e,t){return t?!--r&&n.resolve():n.reject(e)});return n.promise},o.none=function(e){for(var r=(e=!e.length?[o.resolved()]:e).length,n=o.deffer(),t=0,i=e;t<i.length;t++)i[t].inspect(function(e,t){return t?n.reject(e):!--r&&n.resolve()});return n.promise}}(advark=advark||{}),function(e){var o;(o=e.spromise||(e.spromise={})).catchlist=function(r,e){for(var n=o.rejected("Empty list"),t=0,i=e;t<i.length;t++)!function(t){n=n.catch(function(e){return r(t)})}(i[t]);return n}}(advark=advark||{}),function(e){var t;(t=e.spromise||(e.spromise={})).typedall=function(r){if(!r.length)return t.resolved();var n=[],i=t.deffer(),o=0;return r.forEach(function(e,t){return e.then(function(e){n[t]=e,++o===r.length&&i.resolve(n)},function(e){return i.reject(e)})}),i.promise}}(advark=advark||{}),function(e){var _;(_=e.request||(e.request={})).makeAsync=function(e){return e()},_.send=function(t,r,n,i,o,s,a){var l,c=!1,u=new Date;function d(t){if(!c&&t){c=!0,clearTimeout(m);for(var e=0,r=["onload","onerror","ontimeout","onreadystatechange"];e<r.length;e++){var n=r[e];if(t[n])try{delete t[n]}catch(e){t[n]=null}}return 1}}function p(){var e={uri:r,delay:(new Date).getTime()-u.getTime(),succeed:!0,code:l.status||200,text:l.responseText};d(l)&&a&&_.makeAsync(function(){return a(e)})}function h(e){var t={uri:r,delay:(new Date).getTime()-u.getTime(),succeed:!1,code:l.status||400,error:e?e.message:"Request error",text:l.responseText};d(l)&&a&&_.makeAsync(function(){return a(t)})}function v(){var e={uri:r,delay:(new Date).getTime()-u.getTime(),succeed:!1,code:l.status||408,error:"Request timeout",text:l.responseText};d(l)&&a&&_.makeAsync(function(){return a(e)})}function f(){4==l.readyState&&(200==l.status||304==l.status?p:h)()}var m=i?window.setTimeout(v,i):void 0;_.makeAsync(function(){try{if("withCredentials"in(l=new XMLHttpRequest))l.onreadystatechange=f,l.ontimeout=v;else{if(!window.XDomainRequest)throw new Error("Unable to create HTTP-request object");(l=new window.XDomainRequest).onload=p}if(l.onerror=function(e){return h()},l.open(t,r,!0),i&&(l.timeout=i),n&&(l.withCredentials=n),o)for(var e in o)l.setRequestHeader(e,o[e]);l.send(s)}catch(e){h(e)}})}}(advark=advark||{}),function(e){function t(o,s){var a=document.createElement("img");a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.border="base",a.style.margin="0",a.style.padding="0",a.src=o;function e(e,t,r,n,i){a.parentNode&&a.parentNode.removeChild(a),s&&s({uri:o,delay:(new Date).getTime()-l.getTime(),succeed:!e.error,code:e.error?404:200,error:e.error})}var l=new Date;a.onload=e,a.onerror=e,document.body.appendChild(a)}(e.track||(e.track={})).send=t}(advark=advark||{}),function(u){var e,r,t,n;function i(e,t){return(null===(e=null==e?void 0:e.textContent)||void 0===e?void 0:e.trim())||t}function o(e,t,r){s(e,[void 0],t,r)}function s(e,t,r,n){if(e&&0<r.length)for(var i=0,o=t;i<o.length;i++)for(var s=o[i],a=0,l=r;a<l.length;a++){var c=l[a];!function(e,t){var r=u.spromise.deffer();if(e)for(var n=0;n<e.length;n++)t(e[n],n);r.promise}(s?e.getElementsByTagNameNS(s,c):e.getElementsByTagName(c),n)}}e=u.xml||(u.xml={}),r="children",t=new DOMParser,n=new XMLSerializer,e.parse=function(e){return t.parseFromString(e,"text/xml")},e.serialize=function(e,t){return e instanceof Node?n.serializeToString(e):t},e.childElement=function(e){if(e){if(e[r])return e[r][0];for(var t=0;t<e.childNodes.length;t++)if(e.childNodes[t].nodeType==document.ELEMENT_NODE)return e.childNodes[t]}},e.textByTag=function(e,t,r){return i(null==e?void 0:e.getElementsByTagNameNS(null==e?void 0:e.namespaceURI,t)[0],r)},e.text=i,e.removeNode=function(e){var t;null!==(t=null==e?void 0:e.parentNode)&&void 0!==t&&t.removeChild(e)},e.hasAttr=function(e,t){return t&&(null==e?void 0:e.hasAttribute)&&e.hasAttribute(t)},e.getAttr=function(e,t,r){return"string"==typeof(t=t&&(null==e?void 0:e.getAttribute)&&e.getAttribute(t))?t:r},e.setAttr=function(e,t,r){t&&null!=e&&e.setAttribute&&e.setAttribute(t,r)},e.removeAttr=function(e,t){return t&&(null==e?void 0:e.removeAttribute)&&e.removeAttribute(t)},e.firstByTag=function(e,t){return null==e?void 0:e.getElementsByTagName(t)[0]},e.eachTags=o,e.eachTagsNs=s,e.eachTagsAll=function(e,t,r){s(e,["*"],t,r)},e.eachTagsAdv=function(e,t,r,n){o(e,r,n),s(e,t,r,n)}}(advark=advark||{}),function(e){(e.xml||(e.xml={})).getByTags=function(e,t){var r=[];if(e&&null!=t&&t.length)for(var n=0,i=t;n<i.length;n++)for(var o=i[n],s=e.getElementsByTagName(o),a=0;a<s.length;a++)r.push(s[a]);return r}}(advark=advark||{}),function(e){(e=e.devstat||(e.devstat={})).strUnk="?",e.strEnd=".",e.strTo="->",e.strSuccess="+",e.strFail="-",e.strSelector=":",e.strField=".",e.strComma=",",e.strChildOn="(",e.strChildOff=")",e.strTick="t",e.strAnd="&",e.strOr="|",e.strResolve=e.strSuccess,e.strReject=e.strFail}(advark=advark||{}),function(c){!function(e){e.loggerAlways=!1;var a="//sys.advarkads.com/log/module/count/",l=200;function t(e,t){var r,n,i=e;if(i.c=i.c&&parseInt(i.c.toString())?parseInt(i.c.toString()):0,i.l=i.l&&parseInt(i.l.toString())?parseInt(i.l.toString()):0,i.m=i.m?i.m.toString().substr(0,l):"",e.d)i.d=(r=e.d,n=c.clone(r),c.each(r,function(t,e){var r;try{r=c.xml.serialize(t)||JSON.stringify(t)}catch(e){r=""+t}n[e]=r}),n),c.request.send("POST",a,!1,void 0,{"Content-Type":"application/json; charset=utf-8"},JSON.stringify(i),t);else{var o,s=a+"?c=[c]&l=[l]&m=[m]&r="+Math.random();for(o in i)s=s.replace("["+o+"]",encodeURIComponent(i[o]));c.track.send(s,t)}}e.sendLogger=function(e){e.se.c="h:44",t(e)}}(c.devstat||(c.devstat={}))}(advark=advark||{}),function(e){var r,t;function n(e){return!e||-1==t.indexOf(e)}e=e.loc||(e.loc={}),r=/(\w+\:)?\/\/(.*?)(\:\d+)?(?:\/|$)/i,t=["http:","https:"],e.isFailedOriginProtocol=n,e.uri2origin=function(e,t){return!(e=r.exec(e))||!e[2]||n(e[1])?t:e[1]+"//"+e[2]+(e[3]||"")},e.uri2domain=function(e,t){return!(e=r.exec(e))||!e[2]||n(e[1])?t:e[2]}}(advark=advark||{}),function(d){!function(s){s.any="*",s.blank="about:blank";var a="about:srcdoc",l="null";function r(e){for(var t,r=e=void 0===e?window:e;r&&(null===(t=r.location)||void 0===t?void 0:t.href)==s.blank&&r!=r.parent;)r=r.parent;return null==r?void 0:r.location}function o(e,t){void 0===e&&(e=window),void 0===t&&(t=s.any);e=r(e);return s.isFailedOriginProtocol(null==e?void 0:e.protocol)?t:e.origin||s.uri2origin(e.href,t)}function c(e,t){void 0===t&&(t=0);var r=[o(e=void 0===e?window:e)],n=e.location.ancestorOrigins;if(n)for(var i=0;i<n.length;i++)r.push(n[i]);-1!=(r=u(r,s.any)).indexOf(l)&&d.catcher.gen("origin","unexpected")(new EvalError,r);for(i=0;i<t;i++)r.shift();return r.reverse()}function n(e,t){for(var r=[],n=0,i=c(e=void 0===e?window:e,t=void 0===t?0:t);n<i.length;n++){var o=i[n];o!=s.any&&r.push(s.uri2domain(o))}return u(r,s.any)}function u(e,t){for(var r,n=[],i=0,o=e;i<o.length;i++){var s=o[i];s&&s!==r&&s!=l&&s!=a&&n.push(r=s)}return n=t&&!n.length?[t]:n}s.location=r,s.referer=function(e,t){return(null==(e=r(e=void 0===e?window:e))?void 0:e.href)||t},s.origin=o,s.domain=function(e,t){return void 0===t&&(t=""),e=r(e=void 0===e?window:e),s.isFailedOriginProtocol(null==e?void 0:e.protocol)?t:e.hostname||s.uri2domain(e.href,t)},s.origins=c,s.domains=n,s.toporigin=function(e,t){return c(e=void 0===e?window:e).shift()||t},s.topdomain=function(e,t){return n(e=void 0===e?window:e).shift()||t}}(d.loc||(d.loc={}))}(advark=advark||{}),function(c){var u;(u=c.catcher||(c.catcher={})).gen=function(s,a,l){return function(e,t,r){var n,i;switch(s){case"origin":var o={c:null!=e&&e.code?null==e?void 0:e.code:0,l:r||(e?u.MessageTypeEnum.Error:u.MessageTypeEnum.Trace),m:(null==e?void 0:e.message)||e,s:s,se:u.sendergenObj("catcher"),d:c.extend({},t,l,null===e||void 0===e?void 0:e.data)};o.se.t=a||"error",o.d.userAgent=navigator.userAgent,o.d.errStack=null==e?void 0:e.stack,c.devstat.sendLogger(o);break;case"logger":case"states":break;case"intdata":throw console.error(e),e;default:!0===c.devstat.loggerAlways&&(u.isSend=!0),null==u.isSend&&(u.isSend=Math.random()<1e-4),!u.isSend&&null!==(n=c.catcher.setupData)&&void 0!==n&&n.publisherId&&-1<c.catcher.setupData.publisherId.indexOf("8113-3")&&(u.isSend=Math.random()<.001),u.isSend&&((i={c:null!=e&&e.code?null==e?void 0:e.code:0,l:r||(e?u.MessageTypeEnum.Error:u.MessageTypeEnum.Trace),m:(null==e?void 0:e.message)||e,s:s,se:u.sendergenObj("catcher"),d:c.extend({},t,l,null===e||void 0===e?void 0:e.data)}).se.t=a||"error",i.d.href=null===(n=null===window||void 0===window?void 0:window.location)||void 0===n?void 0:n.href,i.d.origin=c.loc.toporigin(),i.d.userAgent=navigator.userAgent,i.d.errStack=null==e?void 0:e.stack,c.devstat.sendLogger(i))}}},u.sendergen=function(e){return e},u.sendergenObj=function(e){return{c:e,t:"",i:0,p:"",a:0,ca:""}}}(advark=advark||{}),function(e){(e=(e=e.catcher||(e.catcher={})).MessageTypeEnum||(e.MessageTypeEnum={}))[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(advark=advark||{}),function(e){(e=(e=e.str||(e.str={})).duration||(e.duration={})).serialize=function(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);var i,o,s=n=void 0===n?"":n;return"number"!=typeof e||isNaN(e)||(i=e-Math.floor(e),o=Math.floor(e%60),n=Math.floor(e/60)%60,e=Math.floor(e/3600)%24,i=i.toFixed(3).substr(1),o=(o<10?"0":"")+o.toString(),n=(n<10?"0":"")+n.toString(),e=(e<10?"0":"")+e.toString(),s=(r?e+":":"")+n+":"+o+(t?i:"")),s},e.deserialize=function(e){if(e){for(var t=e.split("."),r=t[0].split(":"),t=Number(t[1]),n=0,i=0;i<r.length;i++)n*=60,n+=Number(r[i]);t=1e3*n+(isNaN(t)?0:t)}return t}}(advark=advark||{}),function(e){(e=(e=e.str||(e.str={})).query||(e.query={})).parse=function(e,t){function r(e){return e&&t?decodeURIComponent(e):e}void 0===t&&(t=!0);for(var n={},i=null===(e=null==e?void 0:e.trim())||void 0===e?void 0:e.split("&"),o=0;o<(null==i?void 0:i.length);o++){var s=i[o].split("="),a=r(s[0]),l=r(s[1]),c=n[a];switch(typeof c){case"object":n[a].push(l);break;case"string":n[a]=[c,l];break;case"undefined":n[a]=l}}return n},e.serialize=function(e,r,n){function t(e,t){return(!n||!!t)&&i.push((r?encodeURIComponent(e):e)+(t||""==t?"="+(r?encodeURIComponent(t):t):""))}void 0===r&&(r=!0),void 0===n&&(n=!1);var i=[];if(e)for(var o in e){var s=e[o];if(s instanceof Array)for(var a=0;a<s.length;a++)t(o,s[a]);else t(o,s)}return i.join("&")}}(advark=advark||{}),function(t){var e;(e=t.str||(t.str={})).toMap=function(e){if(e){var r={};return t.each(e,function(e,t){return r[t.toString()]=(null==e?void 0:e.toString)&&e.toString()}),r}},e.guid=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}(advark=advark||{}),function(e){function t(e,t){("number"==typeof(null==e?void 0:e.length)?o:n)(e,t)}function o(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r],r)}function n(e,t){if(e)for(var r in e)e.hasOwnProperty&&!e.hasOwnProperty(r)||t(e[r],r)}e.each=t,e.processlist=o,e.processobj=n,e.clone=function r(e,n){var i;switch(void 0===n&&(n=10),Object.prototype.toString.apply(e)){case"[object Array]":i=[];break;case"[object Object]":i={}}return i?0<n?(t(e,function(e,t){return i[t]=r(e,n-1)}),i):void 0:e},e.extend=function(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return r=r||{},o(e,function(e){return n(e,function(e,t){return r[t]=e}),0}),r},e.filter=function(r,n){var i=[];return o(r,function(e,t){return n(e,t,r)&&i.push(e)}),i}}(advark=advark||{}),function(n){var e;function a(e,t){if(t&&e&&e.style&&e.style.setProperty)for(var r in t)"string"==typeof r&&"string"==typeof t[r]&&(""!=t[r]?e.style.setProperty(r,t[r]):e.style.removeProperty(r))}function l(e){return e?e.body?e:e.document||e.ownerDocument||document:document}function i(e,t,r,n,i){var o=l(i||n).createElement(e);if(t&&"object"==typeof t)for(var s in t)t[s]&&o.setAttribute(s,t[s]);return r&&a(o,r),n&&n.appendChild(o),o}(e=n.html||(n.html={})).createStylesTable=function(e,t){var r=i("style");return r.textContent=e,l(t).head.appendChild(r),r},e.setStyle=a,e.getSize=function(e){return e&&e.style&&{width:e.style.width,height:e.style.height,position:e.style.position}},e.parent=function(e){return e&&e.tagName?e:l(e).body},e.doc=l,e.win=function(e){return e?e.document?e:l(e).defaultView||l(e).parentWindow:window},e.createElement=i,e.addClass=function(e,t){var r;"string"==typeof t&&e&&e.getAttribute&&e.setAttribute&&(""===(t=(((r=e.getAttribute("class"))?r+" ":"")+t).trim())&&e.removeAttribute?e.removeAttribute("class"):e.setAttribute("class",t))},e.removeClass=function(e,t){var r;"string"==typeof t&&e&&e.getAttribute&&e.setAttribute&&(r=(e.getAttribute("class")||"").split(/\s+/g),""===(r=n.filter(r,function(e){return e!==t}).join(" ").trim())&&e.removeAttribute?e.removeAttribute("class"):e.setAttribute("class",r))},e.hasClass=function(e,t){return!(!e||!e.getAttribute)&&-1<(e.getAttribute("class")||"").split(/\s+/g).indexOf(t)}}(advark=advark||{}),function(c){var a,l;function u(t,r,e,n){function i(e){clearTimeout(l),t.removeEventListener("load",s),t.removeEventListener("error",a),e&&e.tagName?o.resolve(t):(n&&n(e),o.reject(e),r&&c.xml.removeNode(t))}var o=c.spromise.deffer(),s=function(e){return i(t)},a=function(e){return i(e.error)},l=e&&setTimeout(function(){return i("Load "+(t?t.tagName:"element")+" timeout")},e);return t.addEventListener("load",s),t.addEventListener("error",a),o.promise}function d(t,e,r){void 0===e&&(e="interactive");function n(){switch(t.readyState){case"loading":return"loading"===e;case"loaded":switch(e){case"loading":case"loaded":return 1;default:return}case"interactive":switch(e){case"loading":case"loaded":case"interactive":return 1;default:return}case"complete":return 1}}var i,o,s,a=c.spromise.deffer();return n()?a.resolve(t):(i=function(e){t.removeEventListener("readystatechange",o),clearTimeout(s),a.resolve(t)},t.addEventListener("readystatechange",o=function(){n()&&i()}),s=r&&setTimeout(function(){return i()},r)),a.promise}a=c.html||(c.html={}),(l=a.load||(a.load={})).iframeStyleHidden={position:"absolute",border:"0px",width:"1px",height:"1px",left:"-100000px",top:"-100000px"},l.iframeEmptySrc="about:blank",l.detect=u,l.script=function(e,t,r,n){var i,o=a.doc(n),n=a.createElement("script",{type:"text/javascript"});return t&&(i=u(n,!0,r,c.catcher.gen("html.load",n.tagName,{uri:t,timeout:r})),n.src=t),e&&(n.innerText=e),o.head.appendChild(n),i||c.spromise.resolved(n)},l.iframe=function(e,t,r,n,i){var o=a.createElement("iframe",e,t),t=c.catcher.gen("html.load",o.tagName,{uri:r,timeout:n}),t=u(o,!0,n,t);o.src=r||l.iframeEmptySrc,a.parent(i).appendChild(o);var s=c.spromise.deffer();return o.src===l.iframeEmptySrc&&(o.contentWindow&&(o.contentWindow.onload=function(){return s.resolve(o)}),o.contentDocument&&d(o.contentDocument).inspect(function(e,t){return t&&s.resolve(o)})),c.spromise.race([t,s.promise])},l.doc=d}(advark=advark||{}),function(e){var t;function r(e){this._source=e,this._parse()}t=e.parser||(e.parser={}),Object.defineProperty(r.prototype,"protocol",{get:function(){return this._protocol},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"domain",{get:function(){return this._domain},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"port",{get:function(){return this._port},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"path",{get:function(){return this._path},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"params",{get:function(){return this._params},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"anchor",{get:function(){return this._anchor},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"site",{get:function(){return(this._protocol?this._protocol+":":"")+(this._domain?"//"+this._domain:"")+(this._port?":"+this._port:"")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){for(var e=this.toString().split("/"),t=e.length-1;3<=t;t--)if(e[t])return e[t];return""},enumerable:!1,configurable:!0}),r.prototype.setProtocol=function(e){return this._protocol=e,this},r.prototype.setDomain=function(e){return this._domain=e,this},r.prototype.setPort=function(e){return this._port=e,this},r.prototype.setPath=function(e){return this._path=e,this},r.prototype.setParams=function(e){return this._params=e,this},r.prototype.setAnchor=function(e){return this._anchor=e,this},r.prototype.toString=function(){return(this._protocol?this._protocol+":":"")+(this._domain?"//"+this._domain:"")+(this._port?":"+this._port:"")+(this._path||"")+(0<this._params.length?"?"+this._params.toString():"")+(this._anchor?"#"+this._anchor:"")},r.prototype._parse=function(){try{var e=/^(([a-z0-9]+)\:)?(\/\/([^:?#\/]+))?(\:([0-9]+))?([^?#]+)?[?]?([^#]+)?[#]?(.+)?$/i.exec(this._source);if(void 0===e)throw new Error("Input string isn't URI.");this._protocol=e[2],this._domain=e[4],this._port=e[6]?Number(e[6]):void 0,this._path=e[7],this._params=new t.UriParams(e[8]),this._anchor=e[9]}catch(e){try{t.errorHandler&&t.errorHandler(e,{source:this._source})}catch(e){}throw e}},t.Uri=r}(advark=advark||{}),function(e){var t;function r(e){this._items={},this._source=e,this._parse()}t=e.parser||(e.parser={}),Object.defineProperty(r.prototype,"length",{get:function(){var e,t=0;for(e in this._items)this._items[e]&&t++;return t},enumerable:!1,configurable:!0}),r.prototype.toString=function(){return e.str.query.serialize(this._items,!1)},r.prototype.get=function(e){return this._items[e]},r.prototype.set=function(e,t){this._items[e]!==t&&(this._items[e]=t)},r.prototype._parse=function(){this._items=e.str.query.parse(this._source,!1)},t.UriParams=r}(advark=advark||{}),function(e){e.parser||(e.parser={})}(advark=advark||{}),function(i){var e=(Object.defineProperty(t.prototype,"length",{get:function(){return this._queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this._queue.length},enumerable:!1,configurable:!0}),t.prototype.append=function(e){function t(){try{n.resolve(e())}catch(e){i.catcher.gen("conveyor")(e),n.reject(e)}r._queue.shift(),r._queue[0]&&r._queue[0]()}var r=this,n=i.spromise.deffer();return this._queue.push(t),this._queue[0]===t&&t(),n.promise},t);function t(){this._queue=[]}i.Conveyor=e}(advark=advark||{}),function(e){(e=(e=(e=e.lib||(e.lib={})).network||(e.network={})).ConnectionType||(e.ConnectionType={}))[e.unknown=0]="unknown",e[e.none=1]="none",e[e.other=2]="other",e[e.mixed=4]="mixed",e[e.ethernet=8]="ethernet",e[e.bluetooth=16]="bluetooth",e[e.cellular=32]="cellular",e[e.wifi=64]="wifi",e[e.wimax=128]="wimax"}(advark=advark||{}),function(e){(e=(e=(e=e.lib||(e.lib={})).network||(e.network={})).EffectiveConnectionType||(e.EffectiveConnectionType={}))[e["2g"]=1]="2g",e[e["3g"]=2]="3g",e[e["4g"]=4]="4g",e[e["slow-2g"]=8]="slow-2g"}(advark=advark||{}),function(e){((e=e.lib||(e.lib={})).network||(e.network={})).connection=navigator.connection||navigator.mozConnection||navigator.webkitConnection}(advark=advark||{}),function(e){(e=(e=e.lib||(e.lib={})).video||(e.video={})).NotTarget="Video slot not specified",e.InitTimeout="Video slot was not initialized in time ",e.EventsAll=["loadstart","progress","suspend","abort","error","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange","webkitendfullscreen"]}(advark=advark||{}),function(e){(e=(e=(e=e.lib||(e.lib={})).video||(e.video={})).attrs||(e.attrs={})).controls="controls",e.poster="poster",e.playsinline="playsinline",e.webkitPlaysinline="webkit-playsinline",e.All=[e.controls,e.poster,e.playsinline,e.webkitPlaysinline]}(advark=advark||{}),function(l){!function(e){function t(){this._listenerRecs={}}e=e.video||(e.video={}),t.prototype.subscribe=function(e,t,r){this._listenerRecs[t]||(this._listenerRecs[t]=[]),this._listenerRecs[t].push({listener:e,scope:r||window})},t.prototype.unsubscribe=function(e,t){var r=this._listenerRecs[t];if(r)for(var n=0;r&&r.length>n;)r[n].listener==e?r.splice(n,1):n++},t.prototype._resetListeners=function(){this._listenerRecs={}},t.prototype._dispatch=function(t){for(var r=this,n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var i=this._listenerRecs[t];if(!i||0===i.length)return l.spromise.resolved("No listeners");for(var o=l.spromise.resolved(),s=0,a=i;s<a.length;s++)!function(e){o=o.then(function(){return r._callListener(t,e,n)})}(a[s]);return o=o.catch(function(){return l.spromise.resolved()})},t.prototype._callListener=function(t,r,n){var i;try{i=r.listener.apply(r.scope,n)||l.spromise.resolved()}catch(e){r={eventName:t,args:n,listener:r.listener.toString()};l.catcher.gen("dispatcher")(e,r),i=l.spromise.resolved()}return i},e.AEventDispatcher=t}(l.lib||(l.lib={}))}(advark=advark||{});var advark,__extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();function getVPAIDAd(){return(new advark.module.intvpaid.Module).build()}!function(i){!function(e){var r,t;function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._lastSlotPromise=void 0,e}r=e.video||(e.video={}),t=r.AEventDispatcher,__extends(n,t),n.MediaErrorMessage=function(e){switch(null==e?void 0:e.code){case MediaError.MEDIA_ERR_ABORTED:return"MEDIA_ERR_ABORTED";case MediaError.MEDIA_ERR_NETWORK:return"MEDIA_ERR_NETWORK";case MediaError.MEDIA_ERR_DECODE:return"MEDIA_ERR_DECODE";case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:return(null==e?void 0:e.message)||"MEDIA_ERR_UNKNOWN"}},n.prototype.setTarget=function(e){return this._target=e,this},Object.defineProperty(n.prototype,"target",{get:function(){return this._target},enumerable:!1,configurable:!0}),n.prototype.play=function(){var e=this;this._target&&(this._lastSlotPromise=this._lastSlotPromise?this._lastSlotPromise.anycase(function(){return i.spromise.wrap(e._target.play())}):i.spromise.wrap(this._target.play()));var t=this._target?this._lastSlotPromise:i.spromise.rejected(r.NotTarget);return t.inspect(function(e,t){return i.catcher.gen("lib.video",(t?"warming":"info")+": lib.video")({message:"AElement.play() "+(t?"err":"ok"),name:""})}),t},n.prototype.pause=function(){var e=this;this._target&&this._lastSlotPromise&&this._lastSlotPromise.then(function(){return e._target.pause()})},n.prototype.canPlayType=function(e){var t;return null===(t=this._target)||void 0===t?void 0:t.canPlayType(e)},Object.defineProperty(n.prototype,"error",{get:function(){var e;return null===(e=this._target)||void 0===e?void 0:e.error},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"src",{get:function(){var e;return null===(e=this._target)||void 0===e?void 0:e.src},enumerable:!1,configurable:!0}),n.prototype._setSrc=function(e){this._target&&(""==e?this._target.removeAttribute("src"):this.src,this._target.src=e,this._target.load())},n.prototype.setSrc=function(e){var t=this;return this._target?this._lastSlotPromise?this._lastSlotPromise.anycase(function(){t._setSrc(e)}):(this._setSrc(e),i.spromise.resolved()):i.spromise.rejected(r.NotTarget)},Object.defineProperty(n.prototype,"volume",{get:function(){var e;return null===(e=this._target)||void 0===e?void 0:e.volume},set:function(e){this._target&&(this._target.volume=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"muted",{get:function(){var e;return null===(e=this._target)||void 0===e?void 0:e.muted},set:function(e){this._target&&((this._target.muted=e)?this._target.setAttribute("muted",e.toString()):this._target.removeAttribute("muted"))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentTime",{get:function(){var e;return null===(e=this._target)||void 0===e?void 0:e.currentTime},set:function(e){this._target&&(this._target.currentTime=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"duration",{get:function(){var e;return null===(e=this._target)||void 0===e?void 0:e.duration},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"progress",{get:function(){var e;return{time:null===(e=this._target)||void 0===e?void 0:e.currentTime,duration:null===(e=this._target)||void 0===e?void 0:e.duration}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"videoSize",{get:function(){var e;return{width:null===(e=this._target)||void 0===e?void 0:e.videoWidth,height:null===(e=this._target)||void 0===e?void 0:e.videoHeight}},enumerable:!1,configurable:!0}),r.AElement=n}(i.lib||(i.lib={}))}(advark=advark||{}),function(e){!function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.video||(e.video={}),t=e.AElement,__extends(r,t),r.prototype.start=function(e){var t=this;return e=e||this.src,this.setSrc(e).then(function(){return t.play()})},r.prototype.stop=function(e){this.setSrc("")},e.AStarter=r}(e.lib||(e.lib={}))}(advark=advark||{}),function(i){!function(e){var t,r;function n(){var e=null!==r&&r.apply(this,arguments)||this;return e._targetEventNames=t.EventsAll,e}t=e.video||(e.video={}),r=t.AStarter,__extends(n,r),n.prototype.setConveyor=function(e){return this._conveyor=e,this},n.prototype.setTarget=function(e){return this._targetListeners={},r.prototype.setTarget.call(this,e),this._targetListentersBind(),this},n.prototype.addEventListener=function(e,t){this._targetListenerBind(e,t)},n.prototype._targetEventHandler=function(e){return this._dispatch.apply(this,[e.type,e])},n.prototype._targetListentersBind=function(){function e(e){function t(){r._targetEventHandler(e)}r._conveyor&&r._conveyor.empty?r._conveyor.append(t):t()}for(var r=this,t=0,n=this._targetEventNames;t<n.length;t++){var i=n[t];this._targetListenerBind(i,e)}},n.prototype._targetListenerBind=function(e,t){this._targetListeners[e]||(this._targetListeners[e]=[]),this._targetListeners[e].push(t),this.target&&this.target.addEventListener(e,t)},n.prototype._targetListenersUnbind=function(e){if(this.target)if(e){for(var t=this._targetListeners[e];t&&0<t.length;){var r=t.pop();this.target.removeEventListener(e,r)}delete this._targetListeners[e]}else{var n,i=[];for(n in this._targetListeners)n&&(i.push(n),this._targetListenersUnbind(n));this._targetListeners={}}},n.prototype._dispose=function(){return this._targetListenersUnbind(),i.spromise.resolved()},t.AListener=n}(i.lib||(i.lib={}))}(advark=advark||{}),function(o){!function(e){var t,r;function n(){var e=null!==r&&r.apply(this,arguments)||this;return e._initTimeout=100,e._initSources=["data:video/mp4;base64,AAAAFGZ0eXBNU05WAAACAE1TTlYAAAOUbW9vdgAAAGxtdmhkAAAAAM9ghv7PYIb+AAACWAAACu8AAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAnh0cmFrAAAAXHRraGQAAAAHz2CG/s9ghv4AAAABAAAAAAAACu8AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAFAAAAA4AAAAAAHgbWRpYQAAACBtZGhkAAAAAM9ghv7PYIb+AAALuAAANq8AAAAAAAAAIWhkbHIAAAAAbWhscnZpZGVBVlMgAAAAAAABAB4AAAABl21pbmYAAAAUdm1oZAAAAAAAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAVdzdGJsAAAAp3N0c2QAAAAAAAAAAQAAAJdhdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAFAAOABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAEmNvbHJuY2xjAAEAAQABAAAAL2F2Y0MBTUAz/+EAGGdNQDOadCk/LgIgAAADACAAAAMA0eMGVAEABGjuPIAAAAAYc3R0cwAAAAAAAAABAAAADgAAA+gAAAAUc3RzcwAAAAAAAAABAAAAAQAAABxzdHNjAAAAAAAAAAEAAAABAAAADgAAAAEAAABMc3RzegAAAAAAAAAAAAAADgAAAE8AAAAOAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA4AAAAOAAAAFHN0Y28AAAAAAAAAAQAAA7AAAAA0dXVpZFVTTVQh0k/Ou4hpXPrJx0AAAAAcTVREVAABABIAAAAKVcQAAAAAAAEAAAAAAAAAqHV1aWRVU01UIdJPzruIaVz6ycdAAAAAkE1URFQABAAMAAAAC1XEAAACHAAeAAAABBXHAAEAQQBWAFMAIABNAGUAZABpAGEAAAAqAAAAASoOAAEAZABlAHQAZQBjAHQAXwBhAHUAdABvAHAAbABhAHkAAAAyAAAAA1XEAAEAMgAwADAANQBtAGUALwAwADcALwAwADYAMAA2ACAAMwA6ADUAOgAwAAABA21kYXQAAAAYZ01AM5p0KT8uAiAAAAMAIAAAAwDR4wZUAAAABGjuPIAAAAAnZYiAIAAR//eBLT+oL1eA2Nlb/edvwWZflzEVLlhlXtJvSAEGRA3ZAAAACkGaAQCyJ/8AFBAAAAAJQZoCATP/AOmBAAAACUGaAwGz/wDpgAAAAAlBmgQCM/8A6YEAAAAJQZoFArP/AOmBAAAACUGaBgMz/wDpgQAAAAlBmgcDs/8A6YEAAAAJQZoIBDP/AOmAAAAACUGaCQSz/wDpgAAAAAlBmgoFM/8A6YEAAAAJQZoLBbP/AOmAAAAACkGaDAYyJ/8AFBAAAAAKQZoNBrIv/4cMeQ=="],e._initEventNames=["gesturechange","orientationchange","tap","scrollstart","touchstart","mouseover","keypress","scroll","load","click"],e._initPause=!1,e}t=e.video||(e.video={}),r=t.AListener,__extends(n,r),Object.defineProperty(n.prototype,"initDeffer",{get:function(){return this._initDeffer},enumerable:!1,configurable:!0}),n.prototype.initPause=function(e){!(this._initPause=e)&&this._initSrc&&(this._init(this._initSrc),delete this._initSrc)},n.prototype.setTarget=function(e){return r.prototype.setTarget.call(this,e),this._initDeffer=o.spromise.deffer(),this},n.prototype.listen=function(){var i=this;if(this._initDeffer&&this._initDeffer.pending)for(var e=o.html.doc(this.target).body,t=0,r=this._initEventNames;t<r.length;t++)!function(t,r){var n=function(e){i._initPause||(r.removeEventListener(t,n),i.init())};r.addEventListener(t,n)}(r[t],e);return this._initDeffer.promise},n.prototype.init=function(){var t=this;return o.spromise.catchlist(function(e){return t._init(e)},this._initSources)},n.prototype._init=function(r){var e,n=this;return this.target?(this._initDeffer.pending?this._initPause?(e=this._initDeffer.promise,this._initSrc=r):e=(e=this.target.paused?o.spromise.timeout(this.start(r),this._initTimeout,t.InitTimeout).inspect(function(e,t){return n._initPause||r==n.src&&n.stop()}):o.spromise.resolved()).then(function(e){return n._initDeffer.resolve("playing")}):e=this._initDeffer.promise,e):o.spromise.rejected(t.NotTarget)},n.prototype.dispose=function(e){return this._dispose()},t.Wrapper=n}(o.lib||(o.lib={}))}(advark=advark||{}),function(e){(e=e.vpaid||(e.vpaid={})).sizeToStyle=function(e){return e&&0<e.width&&0<e.height&&{width:e.width+"px",height:e.height+"px"}},e.sizeByElement=function(e,t){return e&&{width:e.clientWidth,height:e.clientHeight,viewMode:t}}}(advark=advark||{}),function(e){(e=(e=e.openvv||(e.openvv={})).Events||(e.Events={})).START="start",e.STOP="stop",e.CHANGE="change",e.COMPLETE="complete",e.UNMEASUREABLE="unmeasureable",e.INVIEW="inview",e.OUTVIEW="outview"}(advark=advark||{}),function(e){(e=(e=e.openvv||(e.openvv={})).FrameServingScenarios||(e.FrameServingScenarios={})).ON_PAGE="on page",e.SAME_DOMAIN_IFRAME="same domain iframe",e.CROSS_DOMAIN_IFRAME="cross domain iframe"}(advark=advark||{}),function(e){(e=(e=e.openvv||(e.openvv={})).ListenersType||(e.ListenersType={})).inView="inView",e.outView="outView",e.changeView="changeView"}(advark=advark||{}),function(e){var r;e=e.openvv||(e.openvv={}),(r=e.ViewabilityCriteria||(e.ViewabilityCriteria={})).MRC_VIDEO={inViewThreshold:.5,timeInView:2e3},r.MRC_DISPLAY={inViewThreshold:.5,timeInView:1e3},r.customCriteria=function(e,t){return{inViewThreshold:e=void 0===e?r.MRC_VIDEO.inViewThreshold:e,timeInView:t=void 0===t?r.MRC_VIDEO.timeInView:t}}}(advark=advark||{}),function(e){!function(t){var e;function r(){this.listeners={inView:[],outView:[],changeView:[]},this.percentViewable=0}e=t.MeasurementTechniques||(t.MeasurementTechniques={}),r.prototype.onInView=function(e){return this.addCallback(e,t.ListenersType.inView)},r.prototype.onChangeView=function(e){return this.addCallback(e,t.ListenersType.changeView)},r.prototype.onOutView=function(e){return this.addCallback(e,t.ListenersType.outView)},r.prototype.addCallback=function(e,t){if("function"==typeof e&&this.listeners[t])this.listeners[t].push(e);else if("function"!=typeof e)throw"callback must be function";return this},r.prototype.start=function(){},r.prototype.dispose=function(){this.listeners={inView:[],outView:[],changeView:[]}},Object.defineProperty(r.prototype,"unmeasureable",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewable",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"techniqueName",{get:function(){return"BaseTechnique"},enumerable:!1,configurable:!0}),e.BaseTechnique=r}(e.openvv||(e.openvv={}))}(advark=advark||{}),function(e){!function(n){var e,i;function t(e,t){void 0===t&&(t=n.Strategies.DEFAULT_STRATEGY.criteria);var r=i.call(this)||this;if(void 0!==t&&e)r.element=e,r.criteria=t,r.inView=!1,r.started=!1,r.notificationLevels=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],-1===r.notificationLevels.indexOf(r.criteria.inViewThreshold)&&r.notificationLevels.push(r.criteria.inViewThreshold);else if(!e)throw"element not provided";return r}e=n.MeasurementTechniques||(n.MeasurementTechniques={}),i=e.BaseTechnique,__extends(t,i),t.prototype.start=function(){this.observer=new IntersectionObserver(this.viewableChange.bind(this),{threshold:this.notificationLevels}),this.observer.observe(this.element)},t.prototype.dispose=function(){this.observer&&(this.observer.unobserve(this.element),this.observer.disconnect()),i.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"unmeasureable",{get:function(){return!IntersectionObserver||this.usesPolyfill||!n.Validators.validElement(this.element)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewable",{get:function(){return this.inView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"techniqueName",{get:function(){return"IntersectionObserver"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"usesPolyfill",{get:function(){return"number"==typeof IntersectionObserver.prototype.THROTTLE_TIMEOUT},enumerable:!1,configurable:!0}),t.prototype.viewableChange=function(e){e&&e.length&&void 0!==e[0].intersectionRatio&&(this.percentViewable=e[0].intersectionRatio,e[0].intersectionRatio<this.criteria.inViewThreshold&&this.started&&this.inView&&(this.inView=!1,this.listeners.outView.forEach(function(e){return e()})),e[0].intersectionRatio>=this.criteria.inViewThreshold&&!this.inView&&(this.started=!0,this.inView=!0,this.listeners.inView.forEach(function(e){return e()})),this.listeners.changeView.forEach(function(e){return e()}))},e.IntersectionObserverModule=t}(e.openvv||(e.openvv={}))}(advark=advark||{}),function(e){!function(n){var e,i;function t(e,t){void 0===t&&(t=n.Strategies.DEFAULT_STRATEGY.criteria);var r=i.call(this)||this;if(void 0!==t&&e)r.element=e,r.criteria=t,r.inView=!1,r.started=!1,r.notificationLevels=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],-1===r.notificationLevels.indexOf(r.criteria.inViewThreshold)&&r.notificationLevels.push(r.criteria.inViewThreshold);else if(!e)throw"element not provided";return r}e=n.MeasurementTechniques||(n.MeasurementTechniques={}),i=e.BaseTechnique,__extends(t,i),t.prototype.start=function(){window.addEventListener("resize",this._onResize),window.addEventListener("scroll",this._onScroll)},t.prototype.dispose=function(){window.removeEventListener("resize",this._onResize),window.removeEventListener("scroll",this._onScroll),i.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"unmeasureable",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewable",{get:function(){return this.inView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"techniqueName",{get:function(){return"CalculateEvent"},enumerable:!1,configurable:!0}),t.prototype._onResize=function(){this._prevTop=NaN,this.viewableChange()},t.prototype._onScroll=function(){this.viewableChange()},t.prototype._getClientSizeRec=function(){var e=window,t=document.documentElement,r=document.getElementsByTagName("body")[0];return{width:e.innerWidth||t.clientWidth||r.clientWidth,height:e.innerHeight||t.clientHeight||r.clientHeight,viewMode:"fullscreen"}},t.prototype._calculate=function(){var e=this._getClientSizeRec(),t=this.element.getBoundingClientRect(),r={x:t.left,y:t.top},n=this._getClientSizeRec(),i={x:r.x+n.width,y:r.y+n.height},t=Math.min(i.x,e.width)-Math.max(0,r.x),r=Math.min(i.y,e.height)-Math.max(0,r.y);return n.width*n.height/(t*r)},t.prototype.viewableChange=function(){var e=this._calculate();void 0!==e&&((this.percentViewable=e)<this.criteria.inViewThreshold&&this.started&&this.inView&&(this.inView=!1,this.listeners.outView.forEach(function(e){return e()})),e>=this.criteria.inViewThreshold&&!this.inView&&(this.started=!0,this.inView=!0,this.listeners.inView.forEach(function(e){return e()})),this.listeners.changeView.forEach(function(e){return e()}))},e.CalculateEventModule=t}(e.openvv||(e.openvv={}))}(advark=advark||{}),function(e){!function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.MeasurementTechniques||(e.MeasurementTechniques={}),r=t.IntersectionObserverModule,__extends(n,r),Object.defineProperty(n.prototype,"unmeasureable",{get:function(){return e.Environment.iFrameContext()===e.FrameServingScenarios.CROSS_DOMAIN_IFRAME},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"techniqueName",{get:function(){return"IntersectionObserverPolyFill"},enumerable:!1,configurable:!0}),t.IntersectionObserverPolyfill=n}(e.openvv||(e.openvv={}))}(advark=advark||{}),function(e){!function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.MeasurementTechniques||(e.MeasurementTechniques={}),r=t.CalculateEventModule,__extends(n,r),Object.defineProperty(n.prototype,"unmeasureable",{get:function(){return e.Environment.iFrameContext()===e.FrameServingScenarios.CROSS_DOMAIN_IFRAME},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"techniqueName",{get:function(){return"CalculateEventPolyfill"},enumerable:!1,configurable:!0}),t.CalculateEventPolyfill=n}(e.openvv||(e.openvv={}))}(advark=advark||{}),function(e){var n;function i(){}n=e.openvv||(e.openvv={}),i.validTechnique=function(r){return"function"==typeof r&&Object.getOwnPropertyNames(n.MeasurementTechniques.BaseTechnique).reduce(function(e,t){return e&&typeof r[t]==typeof n.MeasurementTechniques.BaseTechnique[t]},!0)},i.validElement=function(e){return e&&-1<e.toString().indexOf("Element")},i.validateCriteria=function(e){var t=!1,r=[];return("number"!=typeof e.inViewThreshold||1<e.inViewThreshold)&&(t=!0,r.push("inViewThreshold must be a number equal to or less than 1")),("number"!=typeof e.timeInView||e.timeInView<0)&&(t=!0,r.push("timeInView must be a number greater to or equal 0")),{invalid:t,reasons:r.join(" | ")}},i.validateStrategy=function(e){var t=!1,r=[];"boolean"!=typeof e.autostart&&(t=!0,r.push("autostart must be boolean")),Array.isArray(e.techniques)&&0!==e.techniques.length||(t=!0,r.push("techniques must be an array containing atleast on measurement techniques"));e=i.validateCriteria(e.criteria);return e.invalid&&(t=!0,r.push(e.reasons)),{invalid:t,reasons:r.join(" | ")}},n.Validators=i}(advark=advark||{}),function(e){var n;function i(){}n=e.openvv||(e.openvv={}),i.StrategyFactory=function(e,t,r){t={autostart:e=void 0===e?i.DEFAULT_STRATEGY.autostart:e,techniques:t=void 0===t?i.DEFAULT_STRATEGY.techniques:t,criteria:r=void 0===r?i.DEFAULT_STRATEGY.criteria:r},r=n.Validators.validateStrategy(t);if(r.invalid)throw r.reasons;return t},i.DEFAULT_STRATEGY={autostart:!0,techniques:[n.MeasurementTechniques.IntersectionObserverModule,n.MeasurementTechniques.IntersectionObserverPolyfill],criteria:n.ViewabilityCriteria.MRC_VIDEO},n.Strategies=i}(advark=advark||{}),function(e){var t;function r(){}t=e.openvv||(e.openvv={}),r.getDetails=function(e){return{viewportWidth:Math.max(document.body.clientWidth,window.innerWidth)||-1,viewportHeight:Math.max(document.body.clientHeight,window.innerHeight)||-1,elementWidth:e.clientWidth||-1,elementHeight:e.clientHeight||-1,iframeContext:this.iFrameContext(),focus:this.isInFocus()}},r.isInFocus=function(){return(!document.hidden||!0!==document.hidden)&&(this.iFrameContext()===t.FrameServingScenarios.CROSS_DOMAIN_IFRAME||(!window.document.hasFocus||window.top.document.hasFocus()))},r.iFrameContext=function(){try{if(window.top===window)return t.FrameServingScenarios.ON_PAGE;for(var e=window;e.parent!==e;){if(e.parent.document.domain!==e.document.domain)return t.FrameServingScenarios.CROSS_DOMAIN_IFRAME;e=e.parent}return t.FrameServingScenarios.SAME_DOMAIN_IFRAME}catch(e){return t.FrameServingScenarios.CROSS_DOMAIN_IFRAME}},t.Environment=r}(advark=advark||{}),function(e){var i;function t(e,t){var r=this;void 0===t&&(t=i.Strategies.DEFAULT_STRATEGY),this._listeners={start:[],stop:[],change:[],complete:[],unmeasureable:[]},this._element=e,this._strategy=this._assign(i.Strategies.DEFAULT_STRATEGY,t),this._criteriaMet=!1;t=i.Validators.validateStrategy(this._strategy);if(t.invalid)throw t.reasons;this._technique=this._selectTechnique(this._strategy.techniques),this._technique&&this._addSubscriptions(this._technique),this.unmeasureable?setTimeout(function(){return r._publish(i.Events.UNMEASUREABLE,r._appendEnvironment(void 0))},0):this._strategy.autostart&&this._technique.start()}i=e.openvv||(e.openvv={}),t.prototype.start=function(){this._technique.start()},t.prototype.dispose=function(){this._technique&&this._technique.dispose(),this.timer&&this.timer.dispose(),this._listeners={start:[],stop:[],change:[],complete:[],unmeasureable:[]}},t.prototype.onViewableStart=function(e){return this._addCallback(e,i.Events.START)},t.prototype.onViewableStop=function(e){return this._addCallback(e,i.Events.STOP)},t.prototype.onViewableChange=function(e){return this._addCallback(e,i.Events.CHANGE)},t.prototype.onViewableComplete=function(e){return this._addCallback(e,i.Events.COMPLETE),this.criteriaMet&&this._techniqueChange(i.Events.COMPLETE,this._technique),this},t.prototype.onUnmeasureable=function(e){return this._addCallback(e,i.Events.UNMEASUREABLE),this.unmeasureable&&this._techniqueChange(i.Events.UNMEASUREABLE),this},Object.defineProperty(t.prototype,"unmeasureable",{get:function(){return!this._technique||this._technique.unmeasureable},enumerable:!1,configurable:!0}),t.prototype._selectTechnique=function(e){return e.filter(i.Validators.validTechnique).map(this._instantiateTechnique.bind(this)).find(function(e){return!e.unmeasureable})},t.prototype._instantiateTechnique=function(e){return new e(this._element,this._strategy.criteria)},t.prototype._addSubscriptions=function(e){e&&(e.onInView(this._techniqueChange.bind(this,i.Events.INVIEW,e)),e.onChangeView(this._techniqueChange.bind(this,i.Events.CHANGE,e)),e.onOutView(this._techniqueChange.bind(this,i.Events.OUTVIEW,e)))},t.prototype._techniqueChange=function(e,t){var r,n=this._appendEnvironment(t=void 0===t?void 0:t);switch(e){case i.Events.INVIEW:this._criteriaMet||(this.timer=new i.InViewTimer(this._strategy.criteria.timeInView),this.timer.elapsed(this._timerElapsed.bind(this,t)),this.timer.start(),r=i.Events.START);break;case i.Events.CHANGE:r=e;break;case i.Events.COMPLETE:this._criteriaMet||(this._criteriaMet=!0,r=e);break;case i.Events.OUTVIEW:this._criteriaMet||(this.timer&&(this.timer.stop(),delete this.timer),r=i.Events.STOP);break;case i.Events.UNMEASUREABLE:r=i.Events.UNMEASUREABLE}r&&this._publish(r,n)},t.prototype._publish=function(e,t){Array.isArray(this._listeners[e])&&this._listeners[e].forEach(function(e){return e(t)})},t.prototype._timerElapsed=function(e){this._techniqueChange(i.Events.COMPLETE,e)},t.prototype._addCallback=function(e,t){if(this._listeners[t]&&"function"==typeof e)this._listeners[t].push(e);else if("function"!=typeof e)throw"Callback must be a function";return this},t.prototype._appendEnvironment=function(e){var t=i.Environment.getDetails(this._element);return{percentViewable:e&&void 0!==e.percentViewable?e.percentViewable:void 0,technique:e&&e.techniqueName||void 0,viewable:e&&void 0!==e.viewable?e.viewable:void 0,viewportWidth:t.viewportWidth,viewportHeight:t.viewportHeight,elementWidth:t.elementWidth,elementHeight:t.elementHeight,iframeContext:t.iframeContext,focus:t.focus}},t.prototype._assign=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,i=e;n<i.length;n++){var o,s=i[n];for(o in s)r[o]=s[o]}return r},i.MeasurementExecutor=t}(advark=advark||{}),function(e){function t(e){this.duration=e,this.listeners=[],this.completed=!1}e=e.openvv||(e.openvv={}),t.prototype.timerComplete=function(){this.completed=!0,this.listeners.forEach(function(e){return e()})},t.prototype.elapsed=function(e){"function"==typeof e&&this.listeners.push(e)},t.prototype.start=function(){this.endTimer(),this.timer=window.setTimeout(this.timerComplete.bind(this),this.duration)},t.prototype.stop=function(){this.endTimer()},t.prototype.endTimer=function(){this.timer&&(clearTimeout(this.timer),this.listeners.length=0)},t.prototype.dispose=function(){this.endTimer()},e.InViewTimer=t}(advark=advark||{}),function(e){var r;function t(){this._executors=[]}r=e.openvv||(e.openvv={}),t.prototype.measureElement=function(e,t){t=new r.MeasurementExecutor(e,t);return this._executors.push(t),t},t.prototype.dispose=function(){this._executors.forEach(function(e){return e.dispose()})},r.Observer=t}(advark=advark||{}),function(s){var a;function l(e){return e&&e!==a.ViewabilityCriteria.MRC_VIDEO?a.Strategies.StrategyFactory(a.Strategies.DEFAULT_STRATEGY.autostart,a.Strategies.DEFAULT_STRATEGY.techniques,e):null}(a=s.openvv||(s.openvv={})).getStrategy=l,a.wait=function(e,r){for(var t=s.spromise.deffer(),n=[],i=0,o=e;i<o.length;i++)!function(e){try{var t=s.spromise.deffer();(new a.Observer).measureElement(e,l(r)).onViewableComplete(function(e){return t.resolve()}).onUnmeasureable(function(e){return t.reject(e)}).start(),n.push(t.promise)}catch(e){}}(o[i]);return 0<n.length?s.spromise.complete(s.spromise.invert(s.spromise.none(n)),t):t.reject(),t.promise}}(advark=advark||{}),function(e){(e=(e=e.vast||(e.vast={})).errors||(e.errors={})).XMLParsingError=100,e.VastSchemaError=101,e.VastVersionNotSupported=102,e.AdUnsupported=200,e.AdUnexpectedLinearity=201,e.AdUnexpectedDuration=202,e.AdUnexpectedSize=203,e.WrapperError=300,e.WrapperTimeout=301,e.WrapperLimit=302,e.WrapperNoAd=303,e.WaterfallTimeout=304,e.LinearError=400,e.LinearFileLoadError=401,e.LinearTimeout=402,e.LinearNoSupportedFile=403,e.LinearFileError=405,e.NonLinearError=500,e.NonLinearInvalidSize=501,e.NonLinearFileLoadError=502,e.NonLinearNoSupportedFile=503,e.CompanionAdsError=600,e.CompanionNoAvailableSpace=601,e.UnableDisplayCompanion=602,e.UnableFetchCompanion=603,e.CompanionResourceUnsuported=604,e.Error=900,e.VpaidError=901}(advark=advark||{}),function(e){(e=(e=e.vast||(e.vast={})).errors||(e.errors={})).DmpError=10001,e.DmpReject=10002,e.DmpBadRequest=10003,e.DmpParseRespError=10004,e.ExternalVpaid=2e4}(advark=advark||{}),function(o){var s;(s=o.vast||(o.vast={})).parseInteractiveFile=function(e,t,r){var n,i={api:e.getAttribute("apiFramework"),type:e.getAttribute("type"),path:e.textContent};for(n in i)"string"==typeof i[n]&&(i[n]=i[n].trim(),"path"!==n&&(i[n]=i[n].toLowerCase()));if(0===i.path.length)throw new Error("Interactive file has no path");if(t){var o=!1;if(!i.api)throw new Error("Not supported API");for(var s=0,a=t;s<a.length;s++)if(a[s].trim().toLowerCase()===i.api){o=!0;break}if(!o)throw new Error("Not supported API")}if(r){o=!1;if(!i.type)throw new Error("Not supported MIME-type");for(var l=0,c=r;l<c.length;l++)if(c[l].trim().toLowerCase()===i.type){o=!0;break}if(!o)throw new Error("Not supported MIME-type")}return i},s.parseInteractiveFiles=function(e,t,r,n){var i=[];return o.xml.eachTags(e,t,function(e){try{i.push(s.parseInteractiveFile(e,r,n))}catch(e){}}),i},s.parseVideoFile=function(e,t){var r,n={type:e.getAttribute("type"),path:e.textContent,width:parseInt(e.getAttribute("width")),height:parseInt(e.getAttribute("height"))};for(r in n)"string"==typeof n[r]&&(n[r]=n[r].trim(),"path"!==r&&(n[r]=n[r].toLowerCase()));if(0===n.path.length)throw new Error("Media file has no path");if(isNaN(n.width)||isNaN(n.height))throw new Error("Media file has no width/height attribute");if(t){var i=!1;if(!n.type)throw new Error("Not supported MIME-type");for(var o=0,s=t;o<s.length;o++)if(s[o].test(n.type)){i=!0;break}if(!i)throw new Error("Not supported MIME-type")}return n},s.parseVideoFiles=function(e,t,r){var n=[];return o.xml.eachTags(e,t,function(e){try{n.push(s.parseVideoFile(e,r))}catch(e){}}),n}}(advark=advark||{}),function(e){var t,r,n,i,o;t=e.vast||(e.vast={}),r=t.events||(t.events={}),n=r.v2||(r.v2={}),(o=i=n.tags||(n.tags={})).Survey="Survey",o.Error="Error",o.Impression="Impression",o.ClickTracking="ClickTracking",o.All=[o.Survey,o.Error,o.Impression,o.ClickTracking],(t=e=n.linear||(n.linear={})).creativeView="creativeView",t.start="start",t.firstQuartile="firstQuartile",t.midpoint="midpoint",t.thirdQuartile="thirdQuartile",t.complete="complete",t.mute="mute",t.unmute="unmute",t.pause="pause",t.rewind="rewind",t.resume="resume",t.fullscreen="fullscreen",t.expand="expand",t.collapse="collapse",t.acceptInvitation="acceptInvitation",t.close="close",t.All=[t.creativeView,t.start,t.firstQuartile,t.midpoint,t.thirdQuartile,t.complete,t.mute,t.unmute,t.pause,t.rewind,t.resume,t.fullscreen,t.expand,t.collapse,t.acceptInvitation,t.close],(o=r=n.companion||(n.companion={})).creativeView="creativeView",o.All=[o.creativeView],(o=t=n.nonlinear||(n.nonlinear={})).creativeView="creativeView",o.fullscreen="fullscreen",o.expand="expand",o.collapse="collapse",o.acceptInvitation="acceptInvitation",o.close="close",o.All=[o.creativeView,o.fullscreen,o.expand,o.collapse,o.acceptInvitation,o.close],n.All=i.All.concat(r.All,e.All,t.All)}(advark=advark||{}),function(e){var t,r,n,i;t=e.vast||(e.vast={}),r=t.events||(t.events={}),n=r.v3||(r.v3={}),(i=n.tags||(n.tags={})).NonLinearClickTracking="NonLinearClickTracking",i.All=r.v2.tags.All.concat(i.NonLinearClickTracking),(t=e=n.linear||(n.linear={})).exitFullscreen="exitFullscreen",t.acceptInvitationLinear="acceptInvitationLinear",t.closeLinear="closeLinear",t.skip="skip",t.progress="progress",t.All=r.v2.linear.All.concat(t.exitFullscreen,t.acceptInvitationLinear,t.closeLinear,t.skip,t.progress),(t=i=n.nonlinear||(n.nonlinear={})).exitFullscreen="exitFullscreen",t.progress="progress",t.All=r.v2.nonlinear.All.concat(t.exitFullscreen,t.progress),n.All=r.v2.tags.All.concat(r.v2.companion.All,e.All,i.All)}(advark=advark||{}),function(e){var t,r,n,i,o,s;t=e.vast||(e.vast={}),r=t.events||(t.events={}),n=r.v4||(r.v4={}),(s=i=n.viewability||(n.viewability={})).Viewable="Viewable",s.NotViewable="NotViewable",s.ViewUndetermined="ViewUndetermined",s.All=[s.Viewable,s.NotViewable,s.ViewUndetermined],(e=o=n.player||(n.player={})).mute="mute",e.unmute="unmute",e.pause="pause",e.resume="resume",e.rewind="rewind",e.skip="skip",e.playerExpand="playerExpand",e.playerCollapse="playerCollapse",e.All=[e.mute,e.unmute,e.pause,e.resume,e.rewind,e.skip,e.playerExpand,e.playerCollapse],(s=t=n.linear||(n.linear={})).timeSpentViewing="timeSpentViewing",s.otherAdInteraction="otherAdInteraction",s.All=r.v3.linear.All.concat(s.timeSpentViewing,s.otherAdInteraction),(s=e=n.nonlinear||(n.nonlinear={})).adExpand="adExpand",s.adCollapse="adCollapse",s.minimize="minimize",s.overlayViewDuration="overlayViewDuration",s.otherAdInteraction="otherAdInteraction",s.All=r.v3.linear.All.concat(s.adExpand,s.adCollapse,s.minimize,s.overlayViewDuration,s.otherAdInteraction),n.All=r.v3.tags.All.concat(r.v2.companion.All,t.All,e.All,i.All,o.All)}(advark=advark||{}),function(e){var t;e=e.vast||(e.vast={}),(t=e.events||(e.events={})).prev=function(e){switch(e){case t.v2.tags.Error:case t.v2.linear.creativeView:return[t.v2.tags.Survey];case t.v2.linear.start:return[t.v2.linear.creativeView];case t.v2.linear.firstQuartile:return[t.v2.linear.start];case t.v2.linear.midpoint:return[t.v2.linear.firstQuartile];case t.v2.linear.thirdQuartile:return[t.v2.linear.midpoint];case t.v2.linear.complete:return[t.v2.linear.thirdQuartile];case t.v2.linear.mute:return[t.v2.linear.unmute,t.v2.linear.creativeView];case t.v2.linear.unmute:return[t.v2.linear.mute,t.v2.linear.creativeView];case t.v2.linear.pause:return[t.v2.linear.resume,t.v2.linear.creativeView];case t.v2.linear.resume:return[t.v2.linear.pause,t.v2.linear.creativeView];case t.v3.linear.exitFullscreen:return[t.v2.linear.fullscreen,t.v2.linear.creativeView];default:return[t.v2.linear.creativeView]}}}(advark=advark||{}),function(e){(e=(e=e.vpaid||(e.vpaid={})).events||(e.events={})).AdLoaded="AdLoaded",e.AdStarted="AdStarted",e.AdStopped="AdStopped",e.AdSkipped="AdSkipped",e.AdSkippableStateChange="AdSkippableStateChange",e.AdSizeChange="AdSizeChange",e.AdLinearChange="AdLinearChange",e.AdDurationChange="AdDurationChange",e.AdExpandedChange="AdExpandedChange",e.AdRemainingTimeChange="AdRemainingTimeChange",e.AdVolumeChange="AdVolumeChange",e.AdImpression="AdImpression",e.AdVideoStart="AdVideoStart",e.AdVideoFirstQuartile="AdVideoFirstQuartile",e.AdVideoMidpoint="AdVideoMidpoint",e.AdVideoThirdQuartile="AdVideoThirdQuartile",e.AdVideoComplete="AdVideoComplete",e.AdClickThru="AdClickThru",e.AdInteraction="AdInteraction",e.AdUserAcceptInvitation="AdUserAcceptInvitation",e.AdUserMinimize="AdUserMinimize",e.AdUserClose="AdUserClose",e.AdPaused="AdPaused",e.AdPlaying="AdPlaying",e.AdLog="AdLog",e.AdError="AdError",e.All=[e.AdClickThru,e.AdDurationChange,e.AdError,e.AdExpandedChange,e.AdImpression,e.AdInteraction,e.AdLoaded,e.AdPaused,e.AdPlaying,e.AdRemainingTimeChange,e.AdSizeChange,e.AdSkippableStateChange,e.AdSkipped,e.AdStarted,e.AdStopped,e.AdUserAcceptInvitation,e.AdUserClose,e.AdUserMinimize,e.AdVideoFirstQuartile,e.AdVideoMidpoint,e.AdVideoStart,e.AdVideoThirdQuartile,e.AdVideoComplete,e.AdVolumeChange]}(advark=advark||{}),function(n){var e;((e=n.vpaid||(n.vpaid={})).events||(e.events={})).toVast=function(e,t,r){switch(e){case"AdSkipped":return[n.vast.events.v3.linear.skip];case"AdStarted":return[n.vast.events.v2.linear.creativeView];case"AdImpression":return[n.vast.events.v2.tags.Impression];case"AdVideoStart":return[n.vast.events.v2.linear.start];case"AdVideoFirstQuartile":return[n.vast.events.v2.linear.firstQuartile];case"AdVideoMidpoint":return[n.vast.events.v2.linear.midpoint];case"AdVideoThirdQuartile":return[n.vast.events.v2.linear.thirdQuartile];case"AdVideoComplete":return[n.vast.events.v2.linear.complete];case"AdClickThru":return[n.vast.events.v2.tags.ClickTracking];case"AdUserAcceptInvitation":return[n.vast.events.v2.linear.acceptInvitation];case"AdUserMinimize":return[n.vast.events.v2.linear.collapse];case"AdUserClose":return[].concat(r&&"linear"!==r?[]:[n.vast.events.v3.linear.closeLinear],r&&"nonlinear"!==r?[]:[n.vast.events.v2.linear.close]);case"AdPaused":return[n.vast.events.v2.linear.pause];case"AdPlaying":return[n.vast.events.v2.linear.resume];case"AdError":return[n.vast.events.v2.tags.Error];case"AdInteraction":return[n.vast.events.v4.linear.otherAdInteraction];default:return[]}}}(advark=advark||{}),function(e){(e=e.vpaid||(e.vpaid={})).VolumeMax=1,e.VolumeMin=0,e.WidthMin=0,e.HeightMin=0,e.CodeNotImplemented=-1,e.CodeUnknown=-2}(advark=advark||{}),function(e){var t;(t=e.vpaid||(e.vpaid={})).getExpectedEvents=function(e){switch(e){case"initAd":return[t.events.AdLoaded];case"startAd":return[t.events.AdStarted];case"stopAd":return[t.events.AdStopped];case"pauseAd":return[t.events.AdPaused];case"resumeAd":return[t.events.AdPlaying];default:return}}}(advark=advark||{}),function(e){var t,r,n;t=e.module||(e.module={}),r=t.events||(t.events={}),(t=n=r.spec||(r.spec={})).empty="Empty",t.ready="Ready",t.progress="Progress",t.teaserEnd="TeaserEnd",t.request="Request",t.delivery="Delivery",t.waitUser="AdWaitUser",t.All=[t.empty,t.ready,t.progress,t.teaserEnd,t.request,t.delivery,t.waitUser],r.AllDisp=[].concat(e.vpaid.events.All,e.vast.events.v4.viewability.All,n.All),r.AllTrack=[].concat(e.vast.events.v4.All,n.All)}(advark=advark||{}),function(r){var e;function n(e){return"number"!=typeof e||e<0}function i(e){return"object"!=typeof e||!e||n(e.time)&&n(e.remainingTime)&&n(e.duration)}(e=(e=r.module||(r.module={})).progress||(e.progress={})).unknownPart=n,e.unknown=i,e.norm=function(e,t){return(e=i(e)?t||{}:e)&&(e.time=n(e.time)?e&&0<e.duration&&0<=e.remainingTime?Math.max(e.duration-e.remainingTime,0):r.vpaid.CodeNotImplemented:e.time,e.remainingTime=n(e.remainingTime)?e&&0<e.duration&&0<=e.time?Math.max(e.duration-e.time,0):r.vpaid.CodeNotImplemented:e.remainingTime,e.duration=n(e.duration)?e&&0<e.time&&0<=e.remainingTime?e.time+e.remainingTime:r.vpaid.CodeNotImplemented:e.duration),e}}(advark=advark||{}),function(t){var r;(r=t.catcher||(t.catcher={})).sendergen=function(e){return t.devstat.sender(e,r.startupData,r.setupData,r.campaignData)},r.sendergenObj=function(e){return t.devstat.senderObj(e,r.startupData,r.setupData,r.campaignData)}}(advark=advark||{}),function(e){var t;(t=e.devstat||(e.devstat={})).strCreated="new",t.strDisposed="disposed",t.strNewAd="newad",t.strWrapper="wrap",t.strError="err",t.strDispose="dispose",t.strLinear="linear",t.strNonlinear="nonlinear",t.strDelay="delay",t.strClient="cl",t.strPlayer="pl",t.strFrame="fr",t.strChild="ch",t.strCalled=">",t.strDone="#",t.strDispatch="dispatch",t.strErrorData=t.strSelector,t.strErrorPrefix=t.strError+t.strSelector,t.strBreakPrefix="break"+t.strSelector,t.evtSelect="as",t.evtRequest="ar",t.evtVastLoad="vl",t.evtLoaded="al",t.evtWaitUser="wu",t.evtImpression="ai",t.evtInit="ini",t.evtStart="sta",t.evtStop="stp",t.evtSkip="skip",t.evtUserClose="uclose",t.evtError=t.strError,t.evtPause="pa",t.evtResume="re",t.evtClick="clk",t.evtViewable="av",t.evtVideoStart="vs",t.evtFirstQuartile="fq",t.evtMidpoint="mp",t.evtThridQuartile="tq",t.evtVideoComplete="vc",t.mthInit=(e="_")+t.evtInit,t.mthLoad="_l",t.mthLoadNode="_ln",t.mthLoadElement="_le",t.mthSubscribe="_sub",t.mthStart=e+t.evtStart,t.mthStop=e+t.evtStop,t.mthPause=e+t.evtPause,t.mthResume=e+t.evtResume,t.msgToRequest=t.evtSelect+t.strTo+t.evtRequest,t.msgToVastLoad=t.evtRequest+t.strTo+t.evtVastLoad,t.msgToLoaded=t.evtVastLoad+t.strTo+t.evtLoaded,t.msgToViewable=t.evtVastLoad+t.strTo+t.evtViewable,t.msgToWaitUser=t.evtLoaded+t.strTo+t.evtWaitUser,t.msgToStarted=t.evtWaitUser+t.strTo+t.evtStart,t.msgToImpression=t.evtStart+t.strTo+t.evtImpression,t.msgToVideoStart=t.evtStart+t.strTo+t.evtVideoStart,t.msgToStopped=t.evtStart+t.strTo+t.evtStop,t.msgToFirstQuartile=t.evtVideoStart+t.strTo+t.evtFirstQuartile,t.msgUid="uid",t.msgUserAgent="user-agent",t.msgSeq="sequence",t.msgVast="vast",t.errLogicBreak=t.strErrorPrefix+"logicbreak",t.errTrack=t.strErrorPrefix+"track",t.errDispatch=t.strErrorPrefix+t.strDispatch,t.errNoUid=t.strErrorPrefix+"nouid",t.errDmpTooLate=t.strErrorPrefix+"dmptoolate",t.errBuilder=t.strErrorPrefix+"builder",t.errPlayerBuild=t.strErrorPrefix+"playerBuild",t.errHandle=t.strErrorPrefix+"handle",t.errXmlParse=t.strErrorPrefix+"xmlParse",t.errPrepr=t.strErrorPrefix+"prepr",t.errDelta=t.strErrorPrefix+"delta",t.errNoToken=t.strErrorPrefix+"notoken",t.errPrefixMethod=t.strErrorPrefix+"method"+t.strSelector,t.errViewUnd=t.strErrorPrefix+"viewUnd",t.errVastHead=t.strErrorPrefix+"vastHead",t.errCall=t.strErrorPrefix+t.strCalled}(advark=advark||{}),function(t){var r;(r=t.devstat||(t.devstat={})).EventName=function(e){switch(e){case t.module.events.spec.delivery:return r.evtVastLoad;case t.module.events.spec.waitUser:return r.evtWaitUser;case t.vpaid.events.AdLoaded:return r.evtLoaded;case t.vpaid.events.AdError:return r.strError;case t.vpaid.events.AdPaused:return r.evtPause;case t.vpaid.events.AdPlaying:return r.evtResume;case t.vpaid.events.AdStopped:return r.evtStop;case t.vpaid.events.AdStarted:return r.evtStart;case t.vpaid.events.AdSkipped:return r.evtSkip;case t.vpaid.events.AdUserClose:return r.evtUserClose;case t.vpaid.events.AdImpression:return r.evtImpression;case t.vpaid.events.AdVideoStart:return r.evtVideoStart;case t.vpaid.events.AdVideoFirstQuartile:return r.evtFirstQuartile;case t.vpaid.events.AdVideoMidpoint:return r.evtMidpoint;case t.vpaid.events.AdVideoThirdQuartile:return r.evtThridQuartile;case t.vpaid.events.AdVideoComplete:return r.evtVideoComplete;default:return}},r.MethodName=function(e){switch(e){case"initAd":return r.mthInit;case"startAd":return r.mthStart;case"stopAd":return r.mthStop;case"pauseAd":return r.mthPause;case"resumeAd":return r.mthResume;default:return}}}(advark=advark||{}),function(e){var i;(i=e.devstat||(e.devstat={})).sender=function(e,t,r,n){return t&&(e+=i.strSelector+t.intType),r&&(e+=i.strSelector+r.publisherId),n&&(e+=i.strSelector+n.advertId+i.strSelector+n.campaignId),e},i.senderObj=function(e,t,r,n){return{c:"",t:"",i:null==t?void 0:t.intType,p:null==r?void 0:r.publisherId,a:null==n?void 0:n.advertId,ca:null===(n=null==n?void 0:n.campaignId)||void 0===n?void 0:n.toString()}}}(advark=advark||{}),function(u){var d;function p(e,t,r,n){void 0===t&&(t=u.vast.errors.Error),this.name="AdError",this.message=String(e),this.code=parseInt(""+t),(isNaN(this.code)||this.code<=0)&&(this.code=u.vast.errors.Error,u.catcher.gen("Error")(new Error(e))),this.previous=r,this.data=n}d=u.module||(u.module={}),p.Build=function(e,t,r,n){try{if((e=e instanceof Array?e.pop():e)instanceof p)return n&&(e.data=u.extend(e.data,n)),e;if(!e)throw new Error("Undefined error passed to builder");var i="string"==typeof e?/^((\d+)\W*)?(.+)?$/i.exec(e):void 0,o=d.errors.defaultMessage,s=new p(e?e.message||(null!==(c=e.data)&&void 0!==c&&c.message?e.data.message:i&&i[3]?i[3]:o):r?r.message||r:o,t||e.code||(null!==(l=e.data)&&void 0!==l&&l.code?e.data.code:i&&i[2]?i[2]:null!=r&&r.code?r.code:void 0),e instanceof Error?e:r instanceof Error?r:void 0,n||(null!=e&&e.data?e.data:void 0)),a=e;return a&&(s.breakType=a.breakType,s.timeOffset=a.timeOffset,s.offerId=a.offerId),s}catch(e){return new p(d.errors.defaultMessage,u.vast.errors.Error,e)}var l,c},Object.defineProperty(p.prototype,"stringLine",{get:function(){return this.code+" "+this.message},enumerable:!1,configurable:!0}),d.AdError=p}(advark=advark||{}),function(n){var i,o;i=n.module||(n.module={}),(o=i.errors||(i.errors={})).defaultMessage="Undefined error",o.AdLinearNoSupported=function(e,t){return new i.AdError("Linear ad has no supported files",n.vast.errors.LinearNoSupportedFile,e,t)},o.AdLinearFeedError=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Feed load error",n.vast.errors.LinearFileLoadError,e,t)},o.AdNonLinearNoSupported=function(e,t){return new i.AdError("Non-linear ad has no supported files",n.vast.errors.NonLinearNoSupportedFile,e,t)},o.AdNonLinearFeedError=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Feed load error",n.vast.errors.NonLinearFileLoadError,e,t)},o.SeqEmpty=function(e,t){return new i.AdError("Sequence is empty",n.vast.errors.WrapperNoAd,e,t)},o.VpaidStartTimeout=function(e,t){return new i.AdError("Vpaid start timeout",n.vast.errors.WaterfallTimeout,e,t)},o.FrameConnectTimeout=function(e,t){return new i.AdError("Frame connect timeout",n.vast.errors.Error,e,t)},o.ClientNoAd=function(e,t){return new i.AdError("Unable to find suitable ad",n.vast.errors.WrapperNoAd,e,t)},o.PlayerBuild=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Player building error",n.vast.errors.VpaidError,e,t)},o.LinearError=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Linear ad error",n.vast.errors.LinearError,e,t)},o.VideoElementError=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Video element error",n.vast.errors.LinearFileError,e,t)},o.VideoFileLoadTimeout=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Video file playing timeout",n.vast.errors.LinearFileLoadError,e,t)},o.BannerFileLoadError=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Unable to load banner image",n.vast.errors.NonLinearFileLoadError,e,t)},o.UserActionTimeout=function(e,t){return new i.AdError("Waiting user timeout",n.vast.errors.LinearTimeout,e,t)},o.ExternalVpaid=function(e,t){var r=i.AdError.Build(e,t),e=(e=r.code===n.vast.errors.Error?n.vast.errors.VpaidError:r.code)<n.vast.errors.ExternalVpaid?e+n.vast.errors.ExternalVpaid:e,t=r.message===o.defaultMessage?"External VPAID Error":r.message;return i.AdError.Build(t,e,r)},o.UndefinedVpaidError=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Undefined VPAID Error",n.vast.errors.VpaidError,e,t)},o.UndefinedError=function(e,t){return new i.AdError((null==e?void 0:e.message)||e||"Undefined Error",n.vast.errors.Error,e,t)},o.StateErrorDuplicate=function(e,t,r){return new i.AdError("Duplicate state switching is not allowed",void 0,void 0,{state:e,eventName:t,commandName:r})},o.StateErrorStopping=function(e,t,r){return new i.AdError("Trying to change state while stopping or stopped",void 0,void 0,{state:e,eventName:t,commandName:r})},o.StateErrorSequence=function(e,t,r){return new i.AdError("Wrong sequence",void 0,void 0,{state:e,eventName:t,commandName:r})}}(advark=advark||{}),function(i){var e;function o(){return[{lsName:"813CCA82-1C2D-4EE4-8A80-80E45F722431",jsName:"client_logClient",desc:"Лог клиента"},{lsName:"88E6ED70-7A0C-4676-8DB5-E822F59FF0B4",jsName:"client_logControls",desc:"Лог элементов управления"},{lsName:"CD3CD4A2-5825-4216-91CE-823EBD4837D8",jsName:"client_logIntegration",desc:"Лог интеграции"},{lsName:"C9A72BDB-5DE2-4DE8-BD58-80604EEB1D25",jsName:"client_logVpaidWrapper",desc:"Лог обертки стороннего VPAID"},{lsName:"7F3CCD25-177A-4E95-B2DF-A9A0D61E5991",jsName:"client_logPlayer",desc:"Лог проигрывателя рекламы"},{lsName:"8B8B6DCC-D9B3-40C6-9E35-6D69DAE3E81B",jsName:"client_logVideo",desc:"Лог событий элемента video"}]}(e=(e=(e=i.module||(i.module={})).context||(e.context={})).utils||(e.utils={})).secretKeysGetInfo=o,e.secretKeysLoad=function(){for(var e={},t=0,r=o();t<r.length;t++){var n=r[t];e[n.jsName]="true"===i.lstorage.read(n.lsName)}return e}}(advark=advark||{}),function(e){(function(e){e.secretKeys=e.secretKeys||{};var t,r=e.utils.secretKeysLoad();for(t in r)e.secretKeys[t]=r[t];e.settings=e.settings||{},e.timeouts=e.timeouts||{videoStart:4e3,videoInit:void 0,requestEssential:5e3,frameConnect:5e3,vpaidStartTimeout:3e3,initWaterfall:1e4,initAd:3500,disposeVpaid:500,playerUpdate:250,controlHideLogo:3e3,controlShowClose:3e3,teaserCollapse:14e3,teaserExpand:1e3,teaserNext:6e3,vpaidResp:500},e.settings.xmlNs=e.settings.xmlNs||"https://s3.advarkads.com/modules/",e.settings.clickTarget=e.settings.clickTarget||"_blank",e.settings.teaserMinWidth=e.settings.teaserMinWidth||400,e.settings.logoRedirectUri=e.settings.logoRedirectUri||"//advarkads.com/advertisers/",e.taskFlags=e.taskFlags||{}})((e=e.module||(e.module={})).context||(e.context={}))}(advark=advark||{}),function(i){var e;function o(){return[{lsName:"0C376D1A-6F4F-45FD-B6E9-ADFE95065D0C",jsName:"logLevelDebug",desc:"Включение отладочного уровня лога"},{lsName:"C31FA8E4-5C16-4C54-9DDD-DACB24847D02",jsName:"logDispatchingEvents",desc:"Лог отправления событий"},{lsName:"3E5DE066-0B24-4B45-A73D-2BF00670C5A7",jsName:"logBuilders",desc:"Лог строителей объектов"},{lsName:"5AD29AC6-BC20-463D-B9B3-12BAD91DAE0C",jsName:"logDevstat",desc:"Лог отправки статистики разработчика"},{lsName:"B409D4B8-A2DE-40F8-8997-2FB0AE4995F3",jsName:"logWrappers",desc:"Лог обёрток"}]}(e=(e=i.context||(i.context={})).utils||(e.utils={})).secretKeysGetInfo=o,e.secretKeysLoad=function(){for(var e={},t=0,r=o();t<r.length;t++){var n=r[t];e[n.jsName]="true"===i.lstorage.read(n.lsName)}return e}}(advark=advark||{}),function(e){!function(e){e.secretKeys=e.secretKeys||{};var t,r=e.utils.secretKeysLoad();for(t in r)e.secretKeys[t]=r[t];e.settings=e.settings||{debug:!1,nodeEnv:"production",gitHash:"7180c4c6"},e.timeouts=e.timeouts||{request:2500}}(e.context||(e.context={}))}(advark=advark||{}),function(e){(e=(e=e.base||(e.base={})).errors||(e.errors={})).AlreadyDone="Something already done",e.Disposing="Disposing",e.Disposed="Disposed",e.Duplicate="Duplicate",e.Empty="Empty",e.InvalidParams="Invalid parameters",e.New="New instance",e.NoListeners="No listeners",e.NotAllowed="Not allowed",e.NotImplemented="Not implemented",e.NotPassed="Not passed",e.NotReady="Object isn't ready",e.Reset="Reset",e.Skipped="Skipped",e.Stopped="Stopped",e.Timeout="Timeout exceed"}(advark=advark||{}),function(t){var r;function e(){this._disposing=!1,this._disposed=!1}r=t.base||(t.base={}),e.prototype.dispose=function(e){return this._disposing?t.spromise.rejected(r.errors.Disposing):(this._disposing=!0,this._dispose(e))},e.prototype._dispose=function(e){return this._disposed?t.spromise.rejected(r.errors.Disposed):(this._disposed=!0,t.spromise.resolved())},r.ADisposableObject=e}(advark=advark||{}),function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.base||(e.base={}),t=e.ADisposableObject,__extends(r,t),Object.defineProperty(r.prototype,"level",{get:function(){return this._parent?this._parent.level?this._parent.level+1:0:1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return Object.getPrototypeOf(this).constructor.name||"X"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pathStr",{get:function(){var e,t;return((null===(e=this._parent)||void 0===e?void 0:e.pathStr)||(null===(t=null===(t=this._parent)||void 0===t?void 0:t.name)||void 0===t?void 0:t.substr(0,1).toLowerCase())||"")+(null===(t=this.name)||void 0===t?void 0:t.substr(0,1).toLowerCase())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pathList",{get:function(){return(this._parent?this._parent.pathList||(this._parent.name?[this._parent.name]:[]):[]).concat(this.name)},enumerable:!1,configurable:!0}),r.prototype.setParent=function(e){return this._parent=e,this},e.AParentableObject=r}(advark=advark||{}),function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.base||(e.base={}),t=e.AParentableObject,__extends(r,t),e.ALogWriter=r}(advark=advark||{}),function(i){var e;function t(){this.name="",this.text="",this.level=0,this.multiply=!0,this.count=0,this._tickStr=i.devstat.strTick,this._tickSize=1e3,this._ticksLeft=20,this._ticksEnabled=!1,this._created=new Date}e=i.base||(i.base={}),Object.defineProperty(t.prototype,"started",{get:function(){return""!==this.text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ticks",{get:function(){return this._ticksEnabled},enumerable:!1,configurable:!0}),t.prototype.setLevel=function(e){for(var t=0;t<Math.abs(this.level-e);t++)this.text+=e>this.level?i.devstat.strChildOn:i.devstat.strChildOff;this.level=e},t.prototype.append=function(e,t){var r;e&&""!==e&&(!this.ticks||0<(r=this._ticksOver())&&this._append((1<r?r.toString():"")+this._tickStr,this.level),this._append(e,t))},t.prototype._append=function(e,t){var r,n;this.level===t?(r=this.text.length,n=this.text[r-1],0===r||n===i.devstat.strChildOff||n===i.devstat.strChildOn||(this.text+=i.devstat.strComma)):this.setLevel(t),this.text+=e},t.prototype._ticksOver=function(){if(!this.ticks||this._ticksLeft<=0)return 0;var e=new Date,t=e.getTime()-this._ticksLast.getTime();this._ticksLast=e;t=Math.round(t/this._tickSize);return this._ticksLeft-=t,t},t.prototype.ticksEnable=function(e,t,r){this._tickStr=e||this._tickStr,this._tickSize=t||this._tickSize,this._ticksLeft=r||this._ticksLeft,this._ticksLast=new Date,this._ticksEnabled=!0},e.ADevstatObject=t}(advark=advark||{}),function(o){var i,n;function e(){var e=null!==n&&n.apply(this,arguments)||this;return e._devstatObjects={},e}i=o.base||(o.base={}),n=i.ALogWriter,__extends(e,n),e.prototype._devstatSender=function(){return this.name},Object.defineProperty(e.prototype,"_devstatIsTracker",{get:function(){return!this.parent},enumerable:!1,configurable:!0}),e.prototype.devstatIsStarted=function(e,t){var r;return this._devstatIsTracker?(r=this._devstatGet(t))&&r.started:this.parent.devstatIsStarted(e,t)},e.prototype.devstatWrite=function(e,t,r,n){var i=this.parent;i&&!this._devstatIsTracker?i.devstatWrite(e,t,r,n):this._devstatWrite(e,t,r,n)},e.prototype.devstatSend=function(e,t,r,n,i){var o=this.parent;o&&!this._devstatIsTracker?o.devstatSend(e,t,r,n,i):this._devstatSend(e,t,r,n,i)},e.prototype.devstatSendIfStarted=function(e,t,r,n,i){this.devstatIsStarted(e,t)&&this.devstatSend(e,t,r,n,i)},e.prototype._devstatTransmit=function(e,t,r,n){r=r||this._devstatSender();n={c:0,l:o.catcher.MessageTypeEnum.Trace,m:t,s:e,se:{c:r,t:"",i:0,p:"",a:0,ca:""},d:n};o.devstat.sendLogger(n)},e.prototype._dispose=function(e){if(this._disposed)return o.spromise.rejected(i.errors.Disposed);for(var t in this._devstatObjects){var r=this._devstatObjects[t];r&&""!==r.text&&(0!==r.count&&!r.multiply||(this._devstatTransmit(t+o.devstat.strSelector+r.count,r.text,void 0,r.data),r.text="",r.count++))}return delete this._devstatObjects,n.prototype._dispose.call(this,e)},e.prototype._devstatCreate=function(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=!1),this._devstatIsTracker&&!this._devstatObjects[e]){var n=new i.ADevstatObject;return n.name=e,n.multiply=t,r&&n.ticksEnable(),n=this._devstatSet(e,n)}},e.prototype._devstatDelete=function(e){return!!this._devstatIsTracker&&(!!this._devstatObjects[e]&&(delete this._devstatObjects[e],!0))},e.prototype._devstatGet=function(e){if(this._devstatObjects&&this._devstatObjects[e])return this._devstatObjects[e]},e.prototype._devstatSet=function(e,t){return this._devstatObjects[e]=t,this._devstatObjects[e]},e.prototype._devstatWrite=function(e,t,r,n){t=this._devstatGet(t);t&&(e=e.level-this.level,r&&t.append(r,e),n&&!t.data&&(t.data=n))},e.prototype._devstatSend=function(e,t,r,n,i){this._devstatWrite(e,t,r,n);n=this._devstatGet(t);n&&(0<(e=e.level-this.level)?n.setLevel(e):0!==n.count&&!n.multiply||(this._devstatTransmit(t+o.devstat.strSelector+n.count,n.text,i,n.data),n.text="",n.count++))},i.ADevstatWriter=e}(advark=advark||{}),function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.base||(e.base={}),t=e.ADevstatWriter,__extends(r,t),r.prototype._devstatSender=function(){return this.pathStr},e.ADebugableObject=r}(advark=advark||{}),function(i){!function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.factory||(e.factory={}),r=e.ADebugableObject,__extends(n,r),n.prototype.setClass=function(e){return this._class=e,this},n.prototype.setTargetParent=function(e){return this._targetParent=e,this},n.prototype.build=function(){var t=this;return this._checkCache().catch(function(){return t._construct().then(function(e){return t._targetParent&&e.setParent(t._targetParent),t._beforeBuild(e),e.build(),t._afterBuild(e),e})})},n.prototype._checkCache=function(){return i.spromise.rejected(e.errors.NotImplemented)},n.prototype._beforeBuild=function(e){},n.prototype._afterBuild=function(e){},t.ABuilder=n}(i.base||(i.base={}))}(advark=advark||{}),function(e){!function(e){var t,r;function n(){var e=null!==r&&r.apply(this,arguments)||this;return e._builded=!1,e}t=e.factory||(e.factory={}),r=e.ADebugableObject,__extends(n,r),n.prototype.build=function(){return this._builded=!0,this},t.ABuildableItem=n}(e.base||(e.base={}))}(advark=advark||{}),function(n){!function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.cache||(e.cache={}),t=n.base.factory.ABuildableItem,__extends(r,t),r.prototype._normSize=function(e){var t=this._size;return{width:e&&0<=e.width?e.width:t&&t.width,height:e&&0<=e.height?e.height:t&&t.height,viewMode:e&&e.viewMode?e.viewMode:t&&t.viewMode}},Object.defineProperty(r.prototype,"size",{get:function(){return this._normSize(this._getSize())},set:function(e){this.size!==e&&this._setSize(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this.size.width},set:function(e){var t=this.size;t.width=e,this.size=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.size.height},set:function(e){var t=this.size;t.height=e,this.size=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"viewMode",{get:function(){return this.size.viewMode},set:function(e){var t=this.size;t.viewMode=e,this.size=t},enumerable:!1,configurable:!0}),r.prototype.setSizeSetter=function(e){return this._sizeSetter=e,this},r.prototype.setSizeGetter=function(e){return this._sizeGetter=e,this},r.prototype._getSize=function(){var e=this._sizeGetter&&this._sizeGetter();return e="object"!=typeof e||!e?this._size:e},r.prototype._setSize=function(e){"object"==typeof(this._size=e)&&e&&this._sizeSetter&&this._sizeSetter(e)},e.Size=r}(n.module||(n.module={}))}(advark=advark||{}),function(n){!function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.cache||(e.cache={}),t=e.Size,__extends(r,t),r.prototype._normVolume=function(e){return"number"==typeof e&&!isNaN(e)&&e>=n.vpaid.VolumeMin&&e<=n.vpaid.VolumeMax?e:n.vpaid.CodeNotImplemented},Object.defineProperty(r.prototype,"volume",{get:function(){return this._getMuted()?n.vpaid.VolumeMin:this._normVolume(this._getVolume())},set:function(e){this.volume!==e&&(e===n.vpaid.VolumeMin?this._setMuted(!0):(this.muted&&this._setMuted(!1),this._setVolume(e)))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"muted",{get:function(){return this._getMuted()},set:function(e){this.volume=e?n.vpaid.VolumeMin:void 0===this._volume?n.vpaid.VolumeMax:this._volume},enumerable:!1,configurable:!0}),r.prototype._getVolume=function(){var e=this._volumeGetter&&this._volumeGetter();return e="number"!=typeof e?this._volume:e},r.prototype._setVolume=function(e){(this._volume=e)>n.vpaid.VolumeMin&&this._volumeSetter&&this._volumeSetter(e)},r.prototype._getMuted=function(){var e,t=this._mutedGetter&&this._mutedGetter();return t="boolean"!=typeof(t="boolean"==typeof t?t:this._muted)?"number"==typeof(e=this._getVolume())&&e>=n.vpaid.VolumeMin&&e<=n.vpaid.VolumeMax?e===n.vpaid.VolumeMin:void 0:t},r.prototype._setMuted=function(e){this._muted=e,this._mutedSetter&&this._mutedSetter(e)||this._volumeSetter&&(e?(this._volume=this._getVolume(),this._volumeSetter(n.vpaid.VolumeMin)):(e=this._normVolume(this._volume),this._volumeSetter(e)))},r.prototype.setMutedGetter=function(e){return this._mutedGetter=e,this},r.prototype.setMutedSetter=function(e){return this._mutedSetter=e,this},r.prototype.setVolumeGetter=function(e){return this._volumeGetter=e,this},r.prototype.setVolumeSetter=function(e){return this._volumeSetter=e,this},e.Volume=r}(n.module||(n.module={}))}(advark=advark||{}),function(e){!function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.cache||(e.cache={}),r=t.Volume,__extends(n,r),Object.defineProperty(n.prototype,"progress",{get:function(){return e.progress.norm(this._getProgress(),this._progress)},set:function(e){this.progress!==e&&this._setProgress(e)},enumerable:!1,configurable:!0}),n.prototype._getProgress=function(){var e=this._progressGetter&&this._progressGetter();return e="object"!=typeof e||!e?this._progress:e},n.prototype._setProgress=function(e){this._progress=e,this._progressSetter&&this._progressSetter(e)},n.prototype.setProgressGetter=function(e){return this._progressGetter=e,this},n.prototype.setProgressSetter=function(e){return this._progressSetter=e,this},t.Progress=n}(e.module||(e.module={}))}(advark=advark||{}),function(e){!function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.cache||(e.cache={}),t=e.Progress,__extends(r,t),Object.defineProperty(r.prototype,"breakType",{get:function(){return this._getBreakType()},set:function(e){this.breakType!==e&&this._setBreakType(e)},enumerable:!1,configurable:!0}),r.prototype.setBreakTypeSetter=function(e){return this._breakTypeSetter=e,this},r.prototype.setBreakTypeGetter=function(e){return this._breakTypeGetter=e,this},r.prototype._getBreakType=function(){if(!this._breakTypeGetter)return this._breakType;var e=this._breakTypeGetter();return void 0!==e&&(this._breakType=e),this._breakType},r.prototype._setBreakType=function(e){this._breakType=e,this._breakTypeSetter&&this._breakTypeSetter(e)},e.BreakType=r}(e.module||(e.module={}))}(advark=advark||{}),function(e){!function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.cache||(e.cache={}),t=e.BreakType,__extends(r,t),e.Cache=r}(e.module||(e.module={}))}(advark=advark||{}),function(l){var e,t;function r(){var e=null!==t&&t.apply(this,arguments)||this;return e._listenerRecs={},e}e=l.module||(l.module={}),t=l.base.factory.ABuildableItem,__extends(r,t),r.prototype.subscribe=function(e,t,r){this._listenerRecs[t]||(this._listenerRecs[t]=[]),this._listenerRecs[t].push({listener:e,scope:r||window})},r.prototype.unsubscribe=function(e,t){var r=this._listenerRecs[t];if(r)for(var n=0;r&&r.length>n;)r[n].listener==e?r.splice(n,1):n++},r.prototype._resetListeners=function(){this._listenerRecs={}},r.prototype._dispatch=function(t){for(var r=this,n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var i=this._listenerRecs[t];if(!i||0===i.length)return l.spromise.resolved(l.base.errors.NoListeners);for(var o=l.spromise.resolved(),s=0,a=i;s<a.length;s++)!function(e){o=o.then(function(){return r._callListener(t,e,n)})}(a[s]);return o=o.catch(function(){return l.spromise.resolved()})},r.prototype._callListener=function(t,r,n){var i;try{i=r.listener.apply(r.scope,n)||l.spromise.resolved()}catch(e){r={eventName:t,name:this.name,path:this.pathStr,args:n,listener:r.listener.toString()};l.catcher.gen("dispatcher")(e,r),i=l.spromise.resolved()}return i},e.AEventDispatcher=r}(advark=advark||{}),function(s){var e,n;function t(){var e=null!==n&&n.apply(this,arguments)||this;return e._eventTimeoutIds={},e._eventTimes={},e._eventParams={},e._eventHandlers={},e}e=s.module||(s.module={}),n=e.AEventDispatcher,__extends(t,n),t.prototype._getHandlingEvents=function(){return[]},Object.defineProperty(t.prototype,"eventDispatcher",{get:function(){},enumerable:!1,configurable:!0}),t.prototype._clearEventTimeout=function(e){this._eventTimeoutIds&&this._eventTimeoutIds[e]&&(clearTimeout(this._eventTimeoutIds[e]),delete this._eventTimeoutIds[e])},t.prototype._setEventTimeout=function(e,t,r){this._eventTimeoutIds&&(this._clearEventTimeout(e),this._eventTimeoutIds[e]=setTimeout(t,r))},t.prototype._subscribeEvents=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,i=s.filter(this._getHandlingEvents(),function(e,t,r){return r.indexOf(e)==t});n<i.length;n++){var o=i[n];this._subscribeEvent(o,e,t)}return s.spromise.resolved()},t.prototype._handleEvent=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return this._disposing?s.spromise.rejected(s.base.errors.Disposing):this._handleEventEnd.apply(this,[e].concat(t))},t.prototype._handleEventEnd=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return this._clearEventTimeout(e),this._eventTimes[e]=new Date,this._eventParams[e]=t,this._dispatch.apply(this,[e].concat(t))},t.prototype._reset=function(){if(this._disposed)return s.spromise.rejected(s.base.errors.Disposed);for(var e in this._eventTimeoutIds)this._clearEventTimeout(e);this._eventTimeoutIds={};for(var t=0,r=this._getHandlingEvents();t<r.length;t++){var n=r[t];this._unsubscribeEvent(n)}return this._eventHandlers={},this._eventTimes={},this._eventParams={},s.spromise.resolved()},t.prototype._dispose=function(t){var r=this;return this._reset().then(function(e){return n.prototype._dispose.call(r,t)})},t.prototype._createEventHandler=function(r,n){var i=this;return this._eventHandlers[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i._handleEvent.apply(i,[r].concat(n).concat(e))},this._eventHandlers[r]},t.prototype._subscribeEvent=function(e,t,r){null!==(t=t||this.eventDispatcher)&&void 0!==t&&t.subscribe(this._createEventHandler(e,r),e)},t.prototype._unsubscribeEvent=function(e){var t;this._eventHandlers[e]&&(null!==(t=this.eventDispatcher)&&void 0!==t&&t.unsubscribe(this._eventHandlers[e],e),delete this._eventHandlers[e])},e.AEventReceiver=t}(advark=advark||{}),function(c){var e,s;function t(){var e=null!==s&&s.apply(this,arguments)||this;return e._awaitRecs=[],e}e=c.module||(c.module={}),s=e.AEventReceiver,__extends(t,s),t.prototype._handleEvent=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(this._disposing)return c.spromise.rejected(c.base.errors.Disposing);var i,o=this._awaitIdx(e);return(o<0?c.spromise.resolved():(i=this._awaitRecs[o][e],this._awaitRecs.splice(o,1),i.apply(this,r))).then(function(){return s.prototype._handleEvent.apply(t,[e].concat(r))},function(){return s.prototype._handleEvent.apply(t,[e].concat(r))})},t.prototype._waitEvents=function(e,t){for(var r=c.spromise.deffer(),n={},i=0,o=e;i<o.length;i++)!function(e){n[e]=function(){return r.resolve(e)}}(l=o[i]);if(t)for(var s=0,a=t;s<a.length;s++){var l=a[s];n[l]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.reject(e[0])}}return this._awaitRecs[this._freeAwaitIdx()]=n,r.promise},t.prototype._freeAwaitIdx=function(){for(var e=0;this._awaitRecs[e];)e++;return e},t.prototype._awaitIdx=function(e){for(var t=this._awaitRecs.length;0<=t&&(!this._awaitRecs[--t]||!this._awaitRecs[t][e]););return t},e.AEventAwaiter=t}(advark=advark||{}),function(i){var e,o;function t(){var e=null!==o&&o.apply(this,arguments)||this;return e._reducingRecs=[],e}e=i.module||(i.module={}),o=e.AEventAwaiter,__extends(t,o),t.prototype._reduce=function(e){return this._reduceIdx([e])<0?i.spromise.resolved("passed"):i.spromise.rejected("reduced")},t.prototype._reduceEvents=function(e,t){var r=this,n=this._reduceNew();return this._reducingRecs[n]=e,t().inspect(function(){return r._reducingRecs.splice(r._reduceIdx(e),1)})},t.prototype._handleEvent=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return this._reduce(e).then(function(){return o.prototype._handleEvent.apply(t,[e].concat(r))},function(e){return i.spromise.resolved(e)})},t.prototype._reduceNew=function(){for(var e=0;this._reducingRecs[e];)e++;return e},t.prototype._reduceIdx=function(e){for(var t=this._reducingRecs.length;0<=t;)if(this._reducingRecs[--t]){var r=this._reducingRecs[t],n=0<r.length;if(n){for(var i=0,o=e;i<o.length;i++){var s=o[i];if(-1===r.indexOf(s)){n=!1;break}}if(n)break}}return t},e.AEventReducer=t}(advark=advark||{}),function(n){var i,t;function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._strict=!0,e._loaded=!1,e._started=!1,e._stopped=!1,e._resumed=!1,e._paused=!1,e._loading=!1,e._starting=!1,e._stopping=!1,e._resuming=!1,e._pausing=!1,e}i=n.module||(n.module={}),t=n.base.factory.ABuildableItem,__extends(e,t),e.prototype.setStrict=function(e){return this._strict=e,this},Object.defineProperty(e.prototype,"strict",{get:function(){return this._strict},enumerable:!1,configurable:!0}),e.prototype._assert=function(e){var t,r=this;return this._disposing&&(t=t||i.AdError.Build(n.base.errors.Disposing)),this._strict&&(this["_"+e]&&(t=t||i.errors.StateErrorDuplicate(e)),(this._stopped||this._stopping&&"stopped"!==e)&&(t=t||i.errors.StateErrorStopping(e)),function(){switch(e){case"loading":return r._loaded||r._starting||r._started;case"loaded":return!r._loading||r._starting||r._started;case"starting":return!r._loaded||r._started;case"started":return!r._starting;case"pausing":return!r._started||r._paused;case"paused":return!r._started;case"resuming":return!r._started||!r._paused;case"resumed":return!r._started;default:return!1}}()&&(t=t||i.errors.StateErrorSequence(e))),t&&n.catcher.gen("states")(t,{path:this.pathList.join(".")}),t},e.prototype.setState=function(e){var t=this._assert(e);if(!t)switch(e){case"loaded":this._loaded=!0;break;case"started":this._starting=!1,this._started=!0;break;case"stopped":this._loading=!1,this._pausing=!1,this._resuming=!1,this._starting=!1,this._stopping=!1,this._stopped=!0;break;case"resumed":this._resuming=!1,this._pausing=!1,this._resumed=!0,this._paused=!1;break;case"paused":this._resuming=!1,this._pausing=!1,this._resumed=!1,this._paused=!0;break;case"loading":this._loaded=!1,this._started=!1,this._stopped=!1,this._resumed=!1,this._paused=!1,this._loading=!0,this._starting=!1,this._stopping=!1,this._resuming=!1,this._pausing=!1;break;case"starting":this._starting=!0;break;case"stopping":this._loading=!1,this._pausing=!1,this._resuming=!1,this._starting=!1,this._stopping=!0;break;case"resuming":this._resuming=!0,this._pausing=!1;break;case"pausing":this._resuming=!1,this._pausing=!0}return t},Object.defineProperty(e.prototype,"loaded",{get:function(){return this._loaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"started",{get:function(){return this._started},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stopped",{get:function(){return this._stopped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resumed",{get:function(){return this._resumed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"starting",{get:function(){return this._starting},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stopping",{get:function(){return this._stopping},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resuming",{get:function(){return this._resuming},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pausing",{get:function(){return this._pausing},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this._loaded=!1,this._started=!1,this._stopped=!1,this._resumed=!1,this._paused=!1,this._loading=!1,this._starting=!1,this._stopping=!1,this._resuming=!1,this._pausing=!1},i.AdStates=e}(advark=advark||{}),function(s){var a,l;function e(){return null!==l&&l.apply(this,arguments)||this}a=s.module||(s.module={}),l=a.AEventReducer,__extends(e,l),e.prototype.build=function(){return l.prototype.build.call(this),this._states=(new a.AdStates).setParent(this).build(),this},e.prototype.initAd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this._states.setState("loading");return r?s.spromise.rejected(r):s.spromise.resolved()},e.prototype.startAd=function(){var e=this._states.setState("starting");return e?s.spromise.rejected(e):s.spromise.resolved()},e.prototype.stopAd=function(){var e=this._states.setState("stopping");return e?s.spromise.rejected(e):s.spromise.resolved()},e.prototype.pauseAd=function(){var e=this._states.setState("pausing");return e?s.spromise.rejected(e):s.spromise.resolved()},e.prototype.resumeAd=function(){var e=this._states.setState("resuming");return e?s.spromise.rejected(e):s.spromise.resolved()},e.prototype._handleEvent=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];switch(e){case s.vpaid.events.AdLoaded:this._states.setState("loaded");break;case s.vpaid.events.AdStarted:this._states.setState("started");break;case s.vpaid.events.AdError:t[0]=a.AdError.Build(t[0]),this._states.setState("stopped");break;case s.vpaid.events.AdStopped:this._states.setState("stopped");break;case s.vpaid.events.AdPaused:this._states.setState("paused");break;case s.vpaid.events.AdPlaying:this._states.setState("resumed")}return l.prototype._handleEvent.apply(this,[e].concat(t))},e.prototype._handleEventEnd=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!(o=this._disposed?s.spromise.rejected(s.base.errors.Disposed):void 0))switch(e){case s.vpaid.events.AdStopped:o=this._dispatch.apply(this,[s.vpaid.events.AdStopped].concat(r)).inspect(function(){return t._states.strict?t.dispose(s.base.errors.Stopped):void 0}).catch(function(){return s.spromise.resolved()});break;case s.vpaid.events.AdError:var i=a.AdError.Build(r[0]),o=this._dispatch.apply(this,[s.vpaid.events.AdError].concat(r)).inspect(function(){return t._states.strict?t.dispose(i):void 0}).catch(function(){return s.spromise.resolved()})}return o||l.prototype._handleEventEnd.apply(this,[e].concat(r))},e.prototype._dispose=function(e){return this._states&&this._states.dispose(e),l.prototype._dispose.call(this,e)},a.AManager=e}(advark=advark||{}),function(i){var t,o;function e(){return null!==o&&o.apply(this,arguments)||this}t=i.module||(i.module={}),o=t.AManager,__extends(e,o),e.prototype.initAd=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return i.spromise.all([this._waitEvents([i.vpaid.events.AdLoaded],[i.vpaid.events.AdError]),o.prototype.initAd.apply(this,t).then(function(){return e._init.apply(e,t)})])},e.prototype.startAd=function(){var e=this;return i.spromise.all([this._waitEvents([i.vpaid.events.AdStarted,t.events.spec.waitUser],[i.vpaid.events.AdError]),o.prototype.startAd.call(this).then(function(){return e._start()})])},e.prototype.stopAd=function(){var e=this;return i.spromise.all([this._waitEvents([i.vpaid.events.AdStopped],[i.vpaid.events.AdError]),o.prototype.stopAd.call(this).then(function(){return e._stop()})])},e.prototype.pauseAd=function(){var e=this;return i.spromise.all([this._waitEvents([i.vpaid.events.AdPaused],[i.vpaid.events.AdError]),o.prototype.pauseAd.call(this).then(function(){return e._pause()})])},e.prototype.resumeAd=function(){var e=this;return i.spromise.all([this._waitEvents([i.vpaid.events.AdPlaying],[i.vpaid.events.AdError]),o.prototype.resumeAd.call(this).then(function(){return e._resume()})])},e.prototype._init=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.eventDispatcher;null!=r&&r.initAd?r.initAd.apply(r,e):(i.catcher.gen("module","info: module")({message:"AAwaitManager._init()->AdLoaded",name:""}),this._handleEvent(i.vpaid.events.AdLoaded))},e.prototype._start=function(){var e=this.eventDispatcher;null!=e&&e.startAd?e.startAd():this._handleEvent(i.vpaid.events.AdStarted)},e.prototype._stop=function(){var e=this.eventDispatcher;null!=e&&e.stopAd?e.stopAd():this._handleEvent(i.vpaid.events.AdStopped)},e.prototype._pause=function(){var e=this.eventDispatcher;null!=e&&e.pauseAd?e.pauseAd():this._handleEvent(i.vpaid.events.AdPaused)},e.prototype._resume=function(){var e=this.eventDispatcher;null!=e&&e.resumeAd?e.resumeAd():this._handleEvent(i.vpaid.events.AdPlaying)},e.prototype._handleEvent=function(t){for(var r=this,n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return this._reduce(t).then(function(e){return o.prototype._handleEvent.apply(r,[t].concat(n))},function(e){return i.spromise.resolved(e)})},t.AAwaitManager=e}(advark=advark||{}),function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.module||(e.module={}),r=t.AAwaitManager,__extends(n,r),n.prototype.setStartupData=function(e){return this._startupData=e,this},n.prototype._devstatSender=function(){return e.devstat.sender(r.prototype._devstatSender.call(this),this._startupData)},t.AStartupDataOwner=n}(advark=advark||{}),function(t){var e,r;function n(){return null!==r&&r.apply(this,arguments)||this}e=t.module||(t.module={}),r=e.AStartupDataOwner,__extends(n,r),n.prototype.setSetupData=function(e){return this._setupData=e,this},Object.defineProperty(n.prototype,"_publisherId",{get:function(){var e;return null===(e=this._setupData)||void 0===e?void 0:e.publisherId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_targetId",{get:function(){var e;return null===(e=this._setupData)||void 0===e?void 0:e.targetId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_typeId",{get:function(){var e;return null===(e=this._setupData)||void 0===e?void 0:e.typeId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_labelId",{get:function(){var e;return null!==(e=null===(e=this._setupData)||void 0===e?void 0:e.labelId)&&void 0!==e?e:0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_uid",{get:function(){var e;return null===(e=this._setupData)||void 0===e?void 0:e.uid},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_referer",{get:function(){var e;return null!==(e=null===(e=this._setupData)||void 0===e?void 0:e.referer)&&void 0!==e?e:t.loc.referer()},enumerable:!1,configurable:!0}),n.prototype._devstatSender=function(){return t.devstat.sender(r.prototype._devstatSender.call(this),void 0,this._setupData)},e.ASetupDataOwner=n}(advark=advark||{}),function(n){var t,r;function e(){var e=null!==r&&r.apply(this,arguments)||this;return e._cache=(new t.cache.Cache).setParent(e),e}t=n.module||(n.module={}),r=t.ASetupDataOwner,__extends(e,r),e.prototype._cacheSizeSubGetter=function(){},e.prototype._cacheSizeSubSetter=function(e){return!1},e.prototype._cacheVolumeSubGetter=function(){},e.prototype._cacheVolumeSubSetter=function(e){return!1},e.prototype._cacheMutedSubGetter=function(){},e.prototype._cacheMutedSubSetter=function(e){return!1},e.prototype._cacheProgressSubGetter=function(){},e.prototype._cacheBreakTypeSubGetter=function(){},e.prototype._cacheSizeGetter=function(){var e;return e=this._cacheCond(!0)?this._cacheSizeSubGetter():e},e.prototype._cacheSizeSetter=function(e){var t=!1;return t=this._cacheCond(!1)?this._cacheSizeSubSetter(e):t},e.prototype._cacheVolumeGetter=function(){var e;return e=this._cacheCond(!0)?this._cacheVolumeSubGetter():e},e.prototype._cacheVolumeSetter=function(e){var t=!1,r=this._cacheCond(!1);return t="number"==typeof e&&e>=n.vpaid.VolumeMin&&e<=n.vpaid.VolumeMax&&r?this._cacheVolumeSubSetter(e):t},e.prototype._cacheMutedGetter=function(){var e;return e=this._cacheCond(!0)?this._cacheMutedSubGetter():e},e.prototype._cacheMutedSetter=function(e){var t=!1,r=this._cacheCond(!1);return t="boolean"==typeof e&&r?this._cacheMutedSubSetter(e):t},e.prototype._cacheProgressGetter=function(){var e;return e=this._cacheCond(!0)?this._cacheProgressSubGetter():e},e.prototype._cacheBreakTypeGetter=function(){var e;return e=this._cacheCond(!0)?this._cacheBreakTypeSubGetter():e},e.prototype._cacheCond=function(e){return(!e&&this._states.starting||this._states.started)&&!this._states.stopped},e.prototype.build=function(){var t=this;return r.prototype.build.call(this),this._cache.setSizeGetter(function(){return t._cacheSizeGetter()}).setSizeSetter(function(e){return t._cacheSizeSetter(e)}).setVolumeGetter(function(){return t._cacheVolumeGetter()}).setVolumeSetter(function(e){return t._cacheVolumeSetter(e)}).setMutedGetter(function(){return t._cacheMutedGetter()}).setMutedSetter(function(e){return t._cacheMutedSetter(e)}).setProgressGetter(function(){return t._cacheProgressGetter()}).setBreakTypeGetter(function(){return t._cacheBreakTypeGetter()}).build(),this},t.ACacheOwner=e}(advark=advark||{}),function(n){!function(t){var e;function r(){this._timeout=n.context.timeouts.request}e=t.load||(t.load={}),r.prototype.setCode=function(e){return this._code=e,this},Object.defineProperty(r.prototype,"code",{get:function(){return this._code},enumerable:!1,configurable:!0}),r.prototype.setUri=function(e){return this._uri=e,this},Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),r.prototype.setTimeout=function(e){return this._timeout=e,this},Object.defineProperty(r.prototype,"timeout",{get:function(){return this._timeout},enumerable:!1,configurable:!0}),r.prototype.setDocsource=function(e){return this._docsource=e,this},Object.defineProperty(r.prototype,"docsource",{get:function(){return this._docsource},enumerable:!1,configurable:!0}),r.prototype.load=function(){return n.html.load.script(this._code,this._uri,this._timeout,this._docsource).catch(function(e){return n.spromise.rejected(t.errors.UndefinedVpaidError(e))})},e.Script=r}(n.module||(n.module={}))}(advark=advark||{}),function(r){!function(e){function t(){this._timeout=r.context.timeouts.request}e=e.load||(e.load={}),t.prototype.setAttrs=function(e){return this._attrs=e,this},Object.defineProperty(t.prototype,"attrs",{get:function(){return this._attrs},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e){return this._style=e,this},Object.defineProperty(t.prototype,"style",{get:function(){return this._style},enumerable:!1,configurable:!0}),t.prototype.setUri=function(e){return this._uri=e,this},Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),t.prototype.setTimeout=function(e){return this._timeout=e,this},Object.defineProperty(t.prototype,"timeout",{get:function(){return this._timeout},enumerable:!1,configurable:!0}),t.prototype.setTargetParent=function(e){return this._targetParent=e,this},Object.defineProperty(t.prototype,"targetParent",{get:function(){return this._targetParent},enumerable:!1,configurable:!0}),t.prototype.load=function(){return r.html.load.iframe(this._attrs,this._style,this._uri,this._timeout,this._targetParent)},e.Frame=t}(r.module||(r.module={}))}(advark=advark||{}),function(e){(e=(e=(e=e.gateway||(e.gateway={})).access||(e.access={})).EAccess||(e.EAccess={}))[e.all=7]="all",e[e.read=4]="read",e[e.write=2]="write",e[e.call=1]="call",e[e.none=0]="none"}(advark=advark||{}),function(e){var i,o;function s(e){e=o[e];return e.callback.bind(e.context)}e=e.gateway||(e.gateway={}),e=(i=e.json||(e.json={})).callback||(i.callback={}),o=[],e.serialize=function(e,t){void 0===t&&(t=window);for(var r=-1,n=0;n<o.length;n++)if(o[n].callback===e&&o[n].context===t){r=n;break}if(-1==r){for(r=0;o[r];)r++;o[r]={callback:e,context:t}}return r},e.serializedCall=function(e,t,r,n){return n=i.deserializeMany(e,t,n),s(r).apply(window,n)},e.deserialize=s}(advark=advark||{}),function(t){var e,r;function o(e){return null==e?{t:"v"}:e instanceof Node?{t:"x",v:t.xml.serialize(e)}:e instanceof Error?{t:"e",v:e.message}:"function"==typeof(null===e||void 0===e?void 0:e.then)?{t:"p",v:r.callback.serialize(e.then,e)}:e instanceof Array?{t:"a",v:function(e){for(var t=[],r=0;r<e.length;r++)t[r]=o(e[r]);return t}(e)}:"object"==typeof e?{t:"o",v:function(e){for(var t={},r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];e[i]==e||e instanceof Window||e instanceof Node||(t[i]=o(e[i]))}return t}(e)}:"function"==typeof e?{t:"f",v:r.callback.serialize(e)}:"number"==typeof e&&isNaN(e)?{t:"n"}:"number"==typeof e||"boolean"==typeof e||"string"==typeof e?{t:"v",v:e}:{t:"v",v:e.toString()}}e=t.gateway||(t.gateway={}),(r=e.json||(e.json={})).serialize=o,r.serializeMany=function(e){var t=[];if(e)for(var r=0,n=e;r<n.length;r++){var i=n[r];t.push(o(i))}return t}}(advark=advark||{}),function(n){var e,i;function o(e,t,r){return t?e.callback.bind(e,r):i.callback.deserialize(r)}function a(e,t,r){switch(null==r?void 0:r.t){case"n":return NaN;case"v":return r.v;case"f":return o(e,t,r.v);case"p":return n.spromise.lazywrap({then:o(e,t,r.v)});case"x":return n.xml.parse(r.v);case"e":return new Error(r.v);case"o":return function(e,t,r){var n,i,o={};for(n in r)r.hasOwnProperty&&!r.hasOwnProperty(n)||void 0!==(i=a(e,t,r[n]))&&(o[n]=i);return o}(e,t,r.v);case"a":return function(e,t,r){for(var n=[],i=0;i<r.length;i++){var o=a(e,t,r[i]);void 0!==o&&(n[i]=o)}return n}(e,t,r.v)}}e=n.gateway||(n.gateway={}),(i=e.json||(e.json={})).deserialize=a,i.deserializeMany=function(e,t,r){var n=[];if(r)for(var i=0,o=r;i<o.length;i++){var s=o[i];n.push(a(e,t,s))}return n}}(advark=advark||{}),function(n){var i;function e(){this._queue=[],this.conveyor=new n.Conveyor,this._connecting=!1,this._disposing=!1,this._whenConnect=n.spromise.deffer()}i=n.gateway||(n.gateway={}),Object.defineProperty(e.prototype,"whenConnect",{get:function(){return this._whenConnect.promise},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"Gateway"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetWin",{get:function(){return this._targetWin},enumerable:!1,configurable:!0}),e.prototype.setTargetWin=function(e){if(!e)throw new Error("Empty _targetWin");return this._targetWin=e,this},e.prototype.setOrigin=function(e){return this._origin=e,this},e.prototype.build=function(){return this._onMessageBound=this._onMessage.bind(this),window.addEventListener("message",this._onMessageBound),this},e.prototype._send=function(e,t){var r=this;this._disposing||(this._queue.push({c:e,d:t}),1===this._queue.length&&this.conveyor.append(function(){return r._transmit()}))},e.prototype.callback=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.connect();var n=i.json.serializeMany(t);this._send("callback",{i:e,p:n})},e.prototype._transmit=function(){var e;!this._disposing&&this._queue.length&&(e=JSON.stringify(this._queue),this._queue=[],this.targetWin?this.targetWin.postMessage(e,this._origin):n.catcher.gen("gateway")(new Error("No target win"),{message:e,origin:this._origin}))},e.prototype._onMessage=function(e){var t=this;if(!this._disposing&&-1!==[e.origin,n.loc.any].indexOf(this._origin)&&e.source===this.targetWin&&e.data){var r=[];if("string"==typeof e.data)try{r=n.filter(JSON.parse(e.data),function(e){return!!e.c})}catch(e){return}0<r.length&&this.conveyor.append(function(){return t._receive(r)})}},e.prototype._receive=function(e){if(!this._disposing)for(var t=0;t<e.length;t++)this._process(e[t].c,e[t].d)},e.prototype._process=function(e,t){"callback"===e&&i.json.callback.serializedCall(this,!0,t.i,t.p)},e.prototype.dispose=function(e){return this._disposing=!0,this._dispose(e)},e.prototype._dispose=function(e){return window.removeEventListener("message",this._onMessageBound),delete this._origin,delete this._targetWin,delete this._onMessageBound,n.spromise.resolved()},i.AGateway=e}(advark=advark||{}),function(n){var e,t;function i(e){return(0<=e.indexOf("r")?t.EAccess.read:t.EAccess.none)+(0<=e.indexOf("w")?t.EAccess.write:t.EAccess.none)+(0<=e.indexOf("x")?t.EAccess.call:t.EAccess.none)}e=n.gateway||(n.gateway={}),(t=e.access||(e.access={})).parseConfig=function(e){var t=[];return e&&n.each(e,function(e){e={name:e[0],target:e[1],access:i(e[2]),props:function t(e){var r;return e&&(r=[],n.each(e,function(e){e={name:e[0],access:i(e[1]),props:t(e[2])},r.push(e)})),r}(e[3])};t.push(e)}),t}}(advark=advark||{}),function(s){var e,a;e=s.gateway||(s.gateway={}),(a=e.access||(e.access={})).get=function(e,t,r){for(var n=function(e,n){var i;if(s.processlist(e.getRules(),function(e){e.name===n[0]&&(i=e)}),void 0===i)throw new EvalError("No access for root target: "+n[0]);for(var e=i.target,o=i.access,t=1;t<n.length;t++)!function(t){if(null!=i&&i.props){var r=!1;if(s.processlist(i.props,function(e){e.name===n[t]&&(i=e,r=!0)}),!r)throw new EvalError("Access denied: "+n.join("."));o&=i.access}else i=null}(t);if(!o)throw new EvalError("Access denied: "+n.join("."));return e}(e,t),i=r===a.EAccess.read?t.length:t.length-1,o=1;o<i;o++)if(void 0===(n=n[t[o]]))throw new EvalError("Undefined property: "+t.join("."));return n}}(advark=advark||{}),function(e){var f;((f=e.gateway||(e.gateway={})).query||(f.query={})).process=function(e,t,r){var n,i,o,s,a,l,c,u,d,p,h,v={};try{switch(r.t){case"g":v={sv:(h=r.c,f.json.serialize(f.access.get(e,h,f.access.EAccess.read)))};break;case"s":l=e,c=t,u=r.c,d=r.sp[0],p=f.access.get(l,u,f.access.EAccess.write),d=f.json.deserialize(l,c,d),p[u[u.length-1]]=d;break;case"c":v={sv:(n=e,i=t,o=r.c,s=r.sp,a=f.access.get(n,o,f.access.EAccess.call),s=f.json.deserializeMany(n,i,s),o=a&&a[o[o.length-1]],f.json.serialize(o.apply(a,s)))}}}catch(e){v={e:!0,m:e.message}}return v}}(advark=advark||{}),function(r){var n,i;function e(){var e=null!==i&&i.apply(this,arguments)||this;return e._frameStyle=r.html.load.iframeStyleHidden,e._parentNode=window.document.documentElement,e}n=r.gateway||(r.gateway={}),i=n.AGateway,__extends(e,i),e.prototype.setSrc=function(e){return this._src=e,this},e.prototype.setFrameStyle=function(e){return this._frameStyle=e,this},e.prototype.setParentNode=function(e){return this._parentNode=e,this},e.prototype.getRules=function(){return this._rules},e.prototype.setRules=function(e){return this._rules=e,this},e.prototype.setRawRules=function(e){return this._rules=n.access.parseConfig(e),this},Object.defineProperty(e.prototype,"element",{get:function(){return this._frame},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetWin",{get:function(){var e;return null===(e=this._frame)||void 0===e?void 0:e.contentWindow},enumerable:!1,configurable:!0}),e.prototype.connect=function(){if(!this._connecting){if(!this._src)throw new Error("No frame source passed");var e=r.html.createElement("iframe",void 0,this._frameStyle,this._parentNode),t={origin:r.loc.origin()};e.src=this._src+"?"+r.str.query.serialize(r.str.toMap(t)),this.setOrigin(r.loc.uri2origin(e.src||this._src,r.loc.any)),this._frame=e,this._connecting=!0}return this.whenConnect},e.prototype._process=function(e,t){switch(e){case"frame-loaded":this._send("client-connected"),this._whenConnect.resolve();break;case"query-req":var r=n.query.process(this,!0,t.p),r={e:r.e,m:r.m,sv:r.sv};t.n&&this._send("query-resp",{i:t.i,p:r});break;default:i.prototype._process.call(this,e,t)}},e.prototype._dispose=function(e){return this._frame&&(r.xml.removeNode(this._frame),delete this._frame),i.prototype._dispose.call(this,e)},n.ClientGateway=e}(advark=advark||{}),function(r){!function(e){function t(){}e=e.query||(e.query={}),t.prototype.build=function(){return this._deffer=r.spromise.deffer(),this},Object.defineProperty(t.prototype,"promise",{get:function(){return this._deffer.promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"accessChain",{get:function(){return this._chain},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actionType",{get:function(){return this._action},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"args",{get:function(){return this._args},enumerable:!1,configurable:!0}),t.prototype.setChain=function(e){return this._chain=e,this},t.prototype.setAction=function(e){return this._action=e,this},t.prototype.setArgs=function(e){return this._args=e,this},Object.defineProperty(t.prototype,"pending",{get:function(){return this._deffer.pending},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){return this._deffer.resolve(e)},t.prototype.reject=function(e){throw new Error("Unexpected call")},e.QueryDeffer=t}(r.gateway||(r.gateway={}))}(advark=advark||{}),function(r){!function(e){var n;function t(e,t){this._resp=!0,this._gateway=e,this._chain=t}n=e.query||(e.query={}),t.prototype.resp=function(e){return this._resp=e,this},t.prototype.select=function(e){return new t(this._gateway,this._chain.concat(e)).resp(this._resp)},t.prototype.get=function(){var t=this;return n.send(this._gateway,{t:"g",c:this._chain},this._resp).then(function(e){return t._handle(e)})},t.prototype.set=function(e){var t=this;return n.send(this._gateway,{t:"s",c:this._chain,lp:[e]},this._resp).then(function(e){return t._handle()})},t.prototype.call=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n.send(this._gateway,{t:"c",c:this._chain,lp:e},this._resp).then(function(e){return t._handle(e)})},t.prototype.apply=function(e){return this.call.apply(this,e)},t.prototype._handle=function(e){return e?e.e?r.spromise.rejected(e.m):r.spromise.resolved(e.lv):r.spromise.resolved()},n.Query=t}(r.gateway||(r.gateway={}))}(advark=advark||{}),function(e){var o,s,a;function l(e,t){var r;null!==(r=a[e])&&void 0!==r&&r.resolve(t),delete a[e]}o=e.gateway||(e.gateway={}),s=o.query||(o.query={}),a=[],s.send=function(e,t,r){var n=(new s.QueryDeffer).build(),i=function(e){var t=a.indexOf(e);if(-1==t){for(t=0;a[t];)t++;a[t]=e}return t}(n);return t.sp=o.json.serializeMany(t.lp),e.query(i,t,r),r||l(i),n.promise},s.receive=function(e,t,r,n){n.lv=o.json.deserialize(e,t,n.sv),l(r,n)}}(advark=advark||{}),function(e){var r,n;function t(){return null!==n&&n.apply(this,arguments)||this}r=e.gateway||(e.gateway={}),n=r.AGateway,__extends(t,n),t.prototype.build=function(){return n.prototype.build.call(this),this.setTargetWin(window.parent),this},t.prototype.connect=function(){return this._connecting||(this._send("frame-loaded"),this._connecting=!0),this.whenConnect},t.prototype.query=function(e,t,r){this.connect();t={c:t.c,t:t.t,sp:t.sp};this._send("query-req",{i:e,p:t,n:r})},t.prototype._process=function(e,t){switch(e){case"client-connected":this._whenConnect.resolve();break;case"query-resp":r.query.receive(this,!0,t.i,t.p);break;default:n.prototype._process.call(this,e,t)}},r.FrameGateway=t}(advark=advark||{}),function(e){var o;function t(){}o=e.gateway||(e.gateway={}),t.prototype.setGateway=function(e){return this._gateway=e,this},t.prototype.setChain=function(e){return this._chain=e,this},t.prototype._query=function(e){for(var t=0,r=e?this._chain.concat([e]):this._chain;t<r.length;t++)var n=r[t],i=i?i.select(n):new o.query.Query(this._gateway,[n]);return i},o.AWrapper=t}(advark=advark||{}),function(r){!function(e){function t(){this._callbacks={}}e=e.wrapper||(e.wrapper={}),t.prototype.registerCallback=function(e,t){this._callbacks[e]=t},t.prototype.setupAd=function(e){return this._callbacks.setupAd(e),r.spromise.resolved()},t.prototype.initAd=function(e,t){return this._callbacks.initAd(e,t),r.spromise.resolved()},t.prototype.startAd=function(){return this._callbacks.startAd(),r.spromise.resolved()},t.prototype.stopAd=function(){return this._callbacks.stopAd(),r.spromise.resolved()},t.prototype.pauseAd=function(){return this._callbacks.pauseAd(),r.spromise.resolved()},t.prototype.resumeAd=function(){return this._callbacks.resumeAd(),r.spromise.resolved()},e.FrameWrapper=t}(r.module||(r.module={}))}(advark=advark||{}),function(i){!function(e){var t,r;function n(){var e=null!==r&&r.apply(this,arguments)||this;return e._customVideoSlot=!1,e._vsWrapperMaster=!1,e}t=e.client||(e.client={}),r=e.ACacheOwner,__extends(n,r),Object.defineProperty(n.prototype,"_slot",{get:function(){var e;return null===(e=this._slotVars)||void 0===e?void 0:e.slot},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_slotDoc",{get:function(){var e;return null===(e=this._slot)||void 0===e?void 0:e.ownerDocument},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_videoWrapper",{get:function(){var e;return this._slotVars&&!this._slotVars.videoWrapper&&(this._vsWrapperMaster?this._slotVars.videoWrapper=(new i.lib.video.Wrapper).setTarget(this._slotVars.videoSlot):i.catcher.gen("ASlotWarsOwner")(new Error("videoWrapper is not created"))),null===(e=this._slotVars)||void 0===e?void 0:e.videoWrapper},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_videoSlot",{get:function(){var e;return(null===(e=this._videoWrapper)||void 0===e?void 0:e.target)||(null===(e=this._slotVars)||void 0===e?void 0:e.videoSlot)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_videoSlotAutoplay",{get:function(){var e;return null===(e=this._slotVars)||void 0===e?void 0:e.videoSlotCanAutoPlay},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"slotVars",{get:function(){return{slot:this._slot,videoSlot:this._videoSlot,videoSlotCanAutoPlay:this._videoSlotAutoplay,videoWrapper:this._videoWrapper}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"muted",{get:function(){return this._cache.muted},set:function(e){this._cache.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"progress",{get:function(){function e(e){return"number"!=typeof e||e<0||isNaN(e)}var t=this._cache.progress;return t=!t||e(t.time)&&e(t.remainingTime)&&e(t.duration)?this._videoWrapper?this._videoWrapper.progress:{}:t},enumerable:!1,configurable:!0}),n.prototype.getVolume=function(){var e=this._cache.volume;return e=e===i.vpaid.CodeNotImplemented?this._videoWrapper?this._videoWrapper.volume:i.vpaid.CodeNotImplemented:e},n.prototype.setVolume=function(e){this._cache.volume=e},n.prototype.getSize=function(){return this._cache.size},n.prototype.setSize=function(e){this._cache.size=e},n.prototype.setSlotVars=function(e){return this._removeSlotVars(i.base.errors.New),this._slotVars={slot:e.slot,videoSlot:e.videoSlot,videoSlotCanAutoPlay:e.videoSlotCanAutoPlay,videoWrapper:e.videoWrapper},this._originalSize=i.vpaid.sizeByElement(this._slot),this._slotVars.videoSlot||(this._customVideoSlot=!0,this._slotVars.videoSlot=i.html.createElement("video",void 0,{width:"100%",height:"100%",position:"absolute"},this._slot,this._slotDoc)),this},n.prototype._cacheCond=function(e){return r.prototype._cacheCond.call(this,e)&&!!this._videoWrapper},n.prototype._cacheSizeSubGetter=function(){return i.vpaid.sizeByElement(this._slot)},n.prototype._cacheSizeSubSetter=function(e){e=i.vpaid.sizeToStyle(e);return i.html.setStyle(this._slot,e),i.html.setStyle(this._videoWrapper.target,e),!0},n.prototype._cacheVolumeSubGetter=function(){return this._videoWrapper.volume},n.prototype._cacheVolumeSubSetter=function(e){return this._videoWrapper.volume=e,!0},n.prototype._cacheMutedSubGetter=function(){return this._videoWrapper.muted},n.prototype._cacheMutedSubSetter=function(e){return this._videoWrapper.muted=e,!0},n.prototype._cacheProgressSubGetter=function(){return this._videoWrapper.progress},n.prototype._removeCustomVideoSlot=function(e){this._slotVars&&this._customVideoSlot&&(this._removeVsWrapper(e),i.xml.removeNode(this._videoSlot),delete this._slotVars.videoSlot)},n.prototype._removeSlotVars=function(e){this._slotVars&&(this._removeCustomVideoSlot(e),this._vsWrapperMaster&&this._removeVsWrapper(e),this._videoSlot&&this.setSize(this._originalSize),delete this._slotVars)},n.prototype._removeVsWrapper=function(e){var t;null!==(t=this._slotVars)&&void 0!==t&&t.videoWrapper&&(this._slotVars.videoWrapper.dispose(e),delete this._slotVars.videoWrapper)},n.prototype._vsWrapperListen=function(){var r=this,e=i.spromise.rejected(i.base.errors.NotReady);return this._videoWrapper&&(this._videoWrapper.initPause(!1),e=this._videoWrapper.listen().inspect(function(e,t){return r._slotVars&&(r._slotVars.videoSlotCanAutoPlay=t)})),e},n.prototype._vsWrapperUnlisten=function(){this._videoWrapper&&this._videoWrapper.initPause(!0)},n.prototype._dispose=function(e){var t=this;return r.prototype._dispose.call(this,e).anycase(function(){return t._removeSlotVars(e)})},Object.defineProperty(n.prototype,"_devstatIsTracker",{get:function(){return!0},enumerable:!1,configurable:!0}),t.ASlotVarsOwner=n}(i.module||(i.module={}))}(advark=advark||{}),function(l){!function(s){var e,a;function t(){var e=null!==a&&a.apply(this,arguments)||this;return e._finalDelay=s.context.timeouts.disposeVpaid,e._vsWrapperMaster=!0,e}e=s.client||(s.client={}),a=e.ASlotVarsOwner,__extends(t,a),t.prototype.getAdLinear=function(){return"linear"===this._cache.breakType},t.prototype.getAdWidth=function(){return this._cache.width},t.prototype.getAdHeight=function(){return this._cache.height},t.prototype.getAdVolume=function(){return this._cache.volume},t.prototype.setAdVolume=function(e){this._cache.volume=e},t.prototype.getAdExpanded=function(){return"thumbnail"!==this._cache.viewMode},t.prototype.getAdSkippableState=function(){return!1},t.prototype.getAdRemainingTime=function(){return this._cache.progress.remainingTime},t.prototype.getAdDuration=function(){return this._cache.progress.duration},t.prototype.getAdCompanions=function(){return""},t.prototype.getAdIcons=function(){return!1},t.prototype.handshakeVersion=function(e){return"2.0"},t.prototype.initAd=function(e,t,r,n,i,o){return o&&this.setSlotVars(o),i&&this._useCreativeData(i),this.resizeAd(e,t,r),a.prototype.initAd.call(this)},t.prototype.startAd=function(){return a.prototype.startAd.call(this)},t.prototype.resizeAd=function(e,t,r){this._cache.size=this._getValidSize({width:e,height:t,viewMode:r},this.slotVars)},t.prototype.expandAd=function(){this._cache.viewMode="linear"===this._cache.breakType?"fullscreen":"normal"},t.prototype.collapseAd=function(){this._cache.viewMode="linear"===this._cache.breakType?"normal":"thumbnail"},t.prototype.skipAd=function(){},t.prototype._getHandlingEvents=function(){return l.vpaid.events.All},t.prototype._getValidSize=function(e,t){var r,n,i=Math.floor(Number(null==e?void 0:e.width)),o=Math.floor(Number(null==e?void 0:e.height));return i&&o||(i=(null==(n=null!==(r=null===(r=t.slot)||void 0===r?void 0:r.getBoundingClientRect())&&void 0!==r?r:null===(n=t.videoSlot)||void 0===n?void 0:n.getBoundingClientRect())?void 0:n.width)||0,o=(null==n?void 0:n.height)||0),{width:i,height:o,viewMode:e.viewMode}},t.prototype._useCreativeData=function(e){e&&(this._paramsData=l.str.query.parse(e.AdParameters))},t.prototype._handleEventEnd=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!(o=this._disposed&&l.spromise.rejected(l.base.errors.Disposed)))switch(e){case l.vpaid.events.AdStopped:o=l.spromise.resolved(),this.dispose(l.base.errors.Stopped).anycase(function(){return t._waitFinal()}).anycase(function(){return t._dispatch(l.vpaid.events.AdStopped)});break;case l.vpaid.events.AdError:var i=s.AdError.Build(r[0]),o=l.spromise.resolved();this.dispose(i).anycase(function(){return t._waitFinal()}).anycase(function(){return t._dispatch(l.vpaid.events.AdError,i)})}return o||a.prototype._handleEventEnd.apply(this,[e].concat(r))},t.prototype._dispatch=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=r[0];switch(i&&(delete i.breakType,delete i.timeOffset,delete i.offerId),e){case l.vpaid.events.AdError:t=a.prototype._dispatch.call(this,e,s.AdError.Build(i).stringLine);break;case l.vpaid.events.AdClickThru:case l.vpaid.events.AdInteraction:case l.vpaid.events.AdLog:t=a.prototype._dispatch.apply(this,[e].concat([i]));break;default:t=a.prototype._dispatch.call(this,e)}return t},t.prototype._waitFinal=function(){return this._finalDelay?l.spromise.after(this._finalDelay,!0,l.base.errors.Timeout):l.spromise.resolved()},e.AVpaidModule=t}(l.module||(l.module={}))}(advark=advark||{}),function(l){!function(a){var e,t;function r(){var e=null!==t&&t.apply(this,arguments)||this;return e._listeners={},e}e=a.client||(a.client={}),t=l.base.factory.ABuildableItem,__extends(r,t),Object.defineProperty(r.prototype,"name",{get:function(){return"Wrapper"},enumerable:!1,configurable:!0}),r.prototype.setTarget=function(e){return this._target=e,this},r.prototype.setConveyor=function(e){return this._conveyor=e,this},r.prototype.handshakeVersion=function(e){return this._target.handshakeVersion(e)},r.prototype.initAd=function(e,t,r,n,i,o){this._target.initAd(e,t,r,n,i,o)},r.prototype.resizeAd=function(e,t,r){this._target&&this._target.resizeAd&&this._target.resizeAd(e,t,r)},r.prototype.startAd=function(){this._target&&this._target.startAd()},r.prototype.stopAd=function(){this._target&&this._target.stopAd()},r.prototype.pauseAd=function(){this._target&&this._target.pauseAd()},r.prototype.resumeAd=function(){this._target&&this._target.resumeAd()},r.prototype.expandAd=function(){this._target&&this._target.expandAd()},r.prototype.collapseAd=function(){this._target&&this._target.collapseAd()},r.prototype.skipAd=function(){this._target&&this._target.skipAd()},r.prototype.getAdLinear=function(){return this._target&&this._target.getAdLinear()},r.prototype.getAdWidth=function(){var e=this._target&&this._target.getAdWidth();return!isNaN(e)&&e},r.prototype.getAdHeight=function(){var e=this._target&&this._target.getAdHeight();return!isNaN(e)&&e},r.prototype.getAdExpanded=function(){return this._target&&this._target.getAdExpanded()},r.prototype.getAdSkippableState=function(){return this._target&&this._target.getAdSkippableState()},r.prototype.getAdRemainingTime=function(){var e=this._target&&this._target.getAdRemainingTime();return!isNaN(e)&&e},r.prototype.getAdDuration=function(){var e=this._target&&this._target.getAdDuration();return!isNaN(e)&&e},r.prototype.getAdVolume=function(){var e=this._target&&this._target.getAdVolume();return!isNaN(e)&&e},r.prototype.setAdVolume=function(e){this._target&&this._target.setAdVolume(e)},r.prototype.getAdCompanions=function(){return this._target&&this._target.getAdCompanions()},r.prototype.getAdIcons=function(){return this._target&&this._target.getAdIcons()},r.prototype.subscribe=function(i,o,e){var s=this;this._listeners[o]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o===l.vpaid.events.AdError&&(e=[a.errors.ExternalVpaid(e[0]&&(e[0].data||e[0]))]);function r(){return l.spromise.complete(i.apply(s,e),n)}var n=l.spromise.deffer();return s._conveyor&&s._conveyor.empty?s._conveyor.append(r):r(),n.promise},this._subscribe(o,e)},r.prototype.unsubscribe=function(e,t){this._listeners&&this._listeners[t]&&this._target&&this._unsubscribe(t),delete this._listeners[t]},r.prototype._subscribe=function(e,t){this._target.subscribe(this._listeners[e],e,t)},r.prototype._unsubscribe=function(e){this._target.unsubscribe(this._listeners[e],e)},e.VpaidWrapper=r}(l.module||(l.module={}))}(advark=advark||{}),function(e){var t;function i(){this._method="GET",this._timeout=e.context.timeouts.request}t=e.request||(e.request={}),i.SetConveyor=function(e){i._Conveyor=e},i.prototype.setMethod=function(e){return this._method=e,this},Object.defineProperty(i.prototype,"method",{get:function(){return this._method},enumerable:!1,configurable:!0}),i.prototype.setUri=function(e){return this._uri=e,this},Object.defineProperty(i.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),i.prototype.setCredentials=function(e){return this._credentrials=e,this},Object.defineProperty(i.prototype,"credentials",{get:function(){return this._credentrials},enumerable:!1,configurable:!0}),i.prototype.setHeaders=function(e){return this._headers=e,this},Object.defineProperty(i.prototype,"headers",{get:function(){return this._headers},enumerable:!1,configurable:!0}),i.prototype.setTimeout=function(e){return this._timeout=e,this},Object.defineProperty(i.prototype,"timeout",{get:function(){return this._timeout},enumerable:!1,configurable:!0}),i.prototype.send=function(){var n=e.spromise.deffer();return this._send(function(e){function t(){return e.succeed?n.resolve(e):n.reject(e)}var r;null!==(r=i._Conveyor)&&void 0!==r&&r.empty?i._Conveyor.append(t):t()}),n.promise},i.prototype._send=function(e){t.send(this._method,this._uri,this._credentrials,this._timeout,this._headers,this._data,e)},t.Request=i}(advark=advark||{}),function(a){!function(e){var o,s;function t(){var e=null!==s&&s.apply(this,arguments)||this;return e.players={},e}o=e.client||(e.client={}),s=o.ASlotVarsOwner,__extends(t,s),Object.defineProperty(t.prototype,"player",{get:function(){return this.players.linear||this.players.nonlinear},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakType",{get:function(){return this.players.linear?"linear":this.players.nonlinear?"nonlinear":void 0},enumerable:!1,configurable:!0}),t.prototype.setSlotVars=function(e){return s.prototype.setSlotVars.call(this,e),this._styleTag=a.html.createStylesTable(t._CssStyles,this._slot),a.html.addClass(this._slot,"advark-controls"),a.html.addClass(this._videoSlot,"advark-videoslot"),this},t.prototype._cacheCond=function(e){return!!this.player},t.prototype._cacheSizeSubGetter=function(){return this.player.getSize()},t.prototype._cacheSizeSubSetter=function(e){return this.player.setSize(e),!0},t.prototype._cacheVolumeSubGetter=function(){return this.player.getVolume()},t.prototype._cacheVolumeSubSetter=function(e){return this.player.setVolume(e),!0},t.prototype._cacheMutedSubGetter=function(){return this.player.muted},t.prototype._cacheMutedSubSetter=function(e){return this.player.muted=e,!0},t.prototype._cacheProgressSubGetter=function(){return this.player.progress},t.prototype.build=function(){return s.prototype.build.call(this),this._states.setStrict(!1),this},t.prototype.buildPlayer=function(e,t,r){var n,i=(new o.player.Builder).setParent(this).setTargetParent(this).setSlotVars(this.slotVars).setSetupData(this._setupData).setFiles(t).setSettings(r);switch(e){case"showBanner":n="nonlinear",i.setClass(o.player.Banner);break;case"showNonlinearHTML":n="nonlinear",i.setClass(o.player.NonlinearHTML);break;case"showTeaser":n="nonlinear",i.setClass(o.player.Teaser);break;case"showLinearInteractive":n="linear",i.setClass(o.player.vpaidpl.Default);break;case"showNonLinearInteractive":n="nonlinear",i.setClass(o.player.vpaidnl.Default);break;case"showVideo":n="linear",i.setClass(o.player.videopl.Default)}return this._spawnPlayer(i,n)},t.prototype._spawnPlayer=function(e,t){var r=this;return this._removePlayer(t,a.base.errors.New).then(function(){return e.build().then(function(e){return r.players[t]=e,r.players[t].setSize(r._cache.size),r.players[t].setVolume(r._cache.volume),r.players[t]})})},t.prototype._removePlayer=function(e,t){var r=this;return(this.players[e]?this.players[e].dispose(t):a.spromise.resolved()).anycase(function(){delete r.players[e]})},t.prototype._handleEventEnd=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=s.prototype._handleEventEnd.apply(this,[e].concat(r));switch(e){case a.vpaid.events.AdStopped:case a.vpaid.events.AdError:var o=r[0];i.then(function(){return o.breakType&&t._removePlayer(o.breakType,o.message||a.base.errors.Stopped)})}return i},t.prototype._dispose=function(e){return a.xml.removeNode(this._styleTag),delete this._styleTag,this._removePlayer("linear",e),this._removePlayer("nonlinear",e),a.html.removeClass(this._slot,"advark-controls"),a.html.removeClass(this._videoSlot,"advark-videoslot"),s.prototype._dispose.call(this,e)},t.prototype.devstatSend=function(e,t,r,n,i){i=this._devstatSender()+(i?":"+i:""),this._devstatTransmit(t,r,i,n)},t._CssStyles=".advark-controls{font-size:16px!important;font-family:Tahoma!important;color:#fff!important;width:100%;height:100%;position:absolute;top:0;left:0;overflow:hidden}.advark-controls *{box-sizing:border-box}.advark-controls a{text-decoration:none}.advark-controls .advark-linear *{position:absolute;color:#fff}.advark-controls .advark-hidden{display:none}.advark-controls .advark-tl{left:10px;top:10px}.advark-controls .advark-tc{left:50%;top:10px}.advark-controls .advark-tr{right:10px;top:10px}.advark-control-container.advark-bl,.advark-controls .advark-bl{left:10px;bottom:11px}.advark-controls .advark-bc{left:50%;bottom:11px}.advark-controls .advark-br{right:10px;bottom:11px}.advark-videoslot{background-color:#000}.advark-controls .advark-container{width:100%;height:100%;position:absolute;top:0;left:0;border:0}.advark-controls .advark-linear{width:100%;height:100%;font-size:16px!important;font-family:tahoma!important;cursor:pointer}.advark-controls .advark-video{position:absolute}.advark-controls .advark-linear .advark-play:hover{width:100%;height:100%;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI8AAACNCAMAAAC5ddmqAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAP+8Pf7/fHy9fn2/Pr0+PS/cV4wAABRlJREFUeAG81YexxDAIBFBAOdn0X+2ffOGfEsZ+FezsSCzIIVrrnOc33jlrEeFpWHLlgZoLwkNiap4X+JbiA2Eqb6i3RjKDMINIBu6RPIv4BDcoxGJUQJexxJeQNYppCvFlVLQSoWcVHkFBcKzGBc1nrICKfjn6FamWQ+4N3VmRybOBshjhS0Q7m7dsZHEqD+RiRgci80CVBIrEPTVHmIq5cg9F2JX6zSAswn5LCfYU7mgHbDgadxTYYfm3M8CmcPJv9nI7JPsYJpO8ocHbaQGEQhO+oUEcj/qTnORxLFxkpYGQ/6sRLouV/0PRGWygogkOo/GyVqUvwRsYcvyNENTg//IdjJzSqZGP4gl9x/8+A6gKnr8d0GNI3o68ITLQ4eRxxIEGT6iI48gDDZYskCCOyi+jsHSuDrjJsXJwcfARtZ0Lu+HVRkIwHX54y+eHPBYQGMxSmp0ehBHkinAFTo7QH7PmlV0hDAPRIyPTy/53m/+LObzJOIWvVLhPXWOSwfN+u2voGUJJ89Bb7x+vLN08RgOxFMZn5q5zL4+hKAK2fnYzz2mVKfZcoKbPP1w5v93qn8svysEqGNtQdNangjeo5oHzc+hioOGhFq5yMI6nZyDURGwis8BjOW3GVtW2W/3WklbST7GJ7tKXRm+jbj/5QKEUeFzFobQyTIhm8NhOQ0S37n1qPLj2cCI67q29KM3HV3NHNnkG+aHw+IL3xdRmTG0Kj++0k86hC2efR2r7t6cvJPR5lFmtsgIlw8fnEWY1PD4JmBqP77STAb2z+vg8yqw2saUyoHwere2zQvN7n0eb1SpmMg7VPo82qx3oGIwnjcd3Wv4Gj9D2E/nENdnn0Wa1E/UG33bg0Wa1+BseOu3Pedj2/56Hs9rf84zxr3jyz/2FsijzHD6P2jYS47Jfn71ZqH+/8GbFCzz+vOHN0hXzV08efUHkfMr1K0wefRfjesOFoytPSW2Dr5QYLp9HE2AWiitJwG48Y8iKS95u7fNoquuO8KV6GD6PInDi6VNDgvF5BNV+4XpDD+4+jyJvHAzn29nOYPDIpz4DxKeGhreZPJI8trQE6FF3WHSSD4/WdrwC0uDZwzlRWZunXynyGPLz1paaUVZFHkOex7EkvCj01Oh6fMFh+ZQNFGJ3eDEPtbmCX8g8dfJfKymPh/O7wGOc6e4o6sg7JYKC3aHD238T6pKiiof/7iaD5MD9pRoU7A7+C62BrUPSfUPvDrhmZgQfIIV0sOQYwdyeA6vksUB3sL1VG/YTBtfQuwP//y0+VuWFrRhP+3UtdnZcX8Wc12LsIAxEsSRMN/r/n01u8pSmLHiUu+d122w3RmeYNj5CzAGhr4yMitqhfalr0/DdvporomvvRAYmw6Ep8WwFBwIBcWRjWr0FZ9rOxHqijfBOGgalrYF1ne6DtDsHfw3W6zYFwLYvbfQUXEj9hmrC3T5bgXHRLZOQT+iEhQVP3bFTPpDIXbcyhCtKgFk5GXlxAMvSCAQcfwmB0mc+HYsHinFnGdNs3jkb76r81j0l4LfiAzQPXg5zTNIPIL9pHNWC1izUNEktIuNHcR8Zkh6EkaE2FTg0sIjmG8fHjPobDTORbHqVcvDHJEVsrRvXlHioO4OfX+fg2FSSonObA0whdYKKU3mLuiCeB5owlYMjeSjEyMGZVElvQjWFPyC1qjeozSONffhgAB2gAFxyLoeR6z81kEXSB1As+fkNbR7tbGCDXY0fqHB73StxU86QEAnJwgAAAABJRU5ErkJggg==) 50% 50% no-repeat}.advark-controls .advark-linear .advark-play{width:100%;height:100%;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI8AAACNCAMAAAC5ddmqAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEXRSTlMAvy+zC1+PpxcjR3dTm4M7a1agxm4AAAUaSURBVHgBvNWFscQwDARQgZmS/qv9wwf/TIqSV8HOjq0FOSJrnfP4xjtnLRE8jUquOFBzIXhITM3jAt9SfCBMxQ311khmEGYQycA9kkcRn+AGhVGMC+gylvEStkYxTWG8jItWIvKowhMoCA7VuKD5jBVw0S9HvyLVcti94TsrMnk2UJYifIlkZ/OWjSxOxYFczOhAZByokkCRsafmCFMxV+zhCLtSvxmCRdRvKcGegh3tgA1Hw44COyz+dgbYFE78zV5uh2Ufw2SWNzR4Oy2AUGjCNzSI40l/kpM8joWLrDQQ4X81wmWx4n8kOoMNVDTBYTRe1qr0JXgDQw6/MYEa+l++g5FTOjXyUTyh7/jfZwBVweO3A3oMy9uRN8QGOpw8jjjQ4AkVcRx5oMGSBRbEUfllHJbO1QE3OVYOLg0+orZzYTe82kgIpsMPb/n8kMcCAoNZSrPTQzBCWAmuoMkR+iPWzJYlBYEgGlFauKP//7XzftCw8yYx9tNd8TSV1JJ0vouHy11jTwklt+c9Wnx7w9ovYtggpsL4bbvL0iliTIqALT8vZgStPB8xJqj59zc3nH8u9c/pF+lgEzbbcHS2p4Q3itvD4OfYZYPGh1y4yWKcTm+DkBMxiSwSjxG0BVPV/b6VPw1pQ/pHbGa4tKHRn6jvn1yRKAUe13EY7k4Y1azyGEGDou/WPjUevI5wFB1taR+U4uO7uROLPEVeHR7d8L54tKmp3eHRg3YyOAzh4vNIZb95+kpCn0fp1QozUFI+Po/Qq+HxScD0ePSgnRT0wezj8yi92sySSkH5PFrZZ4bm9z6P1qsV9GRsqn0erVerqBjQk8mjBy3/B49Q9hPniWOyz6P1aifyDb7twyP0avEND4P2OQ/L/vc87NW+56GsP+bJ7+PFtCjyVJdHLxuJdtnPz14v1L9eeL3iBR6/3/B66YL+qz+PNCCiP+X4FT6POIthvOHA0ZdnSG2CL7QYLo9HN2BWmisJQItHN6g2pEMu7fHorusB+dI9DINHNzj59Lm1YBwe3bVfOd4wgofDo9sbFXJu73ZGm0e49RlpPrUG0G7wyPbY2sqHAjoMHtk+rHfT8QZIg+cI50Zlu739SpHHsJ/3e6sZaVXkMex5XEsiikJNjb7XF2iWT6ys87A6iNtDb27ALwQe4/rrhPoeL+cPgce40z2Q1HnuBAVFWx0s9TDPVG7dO4/92U2IpGJ9KQcFq4P/gdbg1KH4voHqoL8Wngg+QJJ0IOW4Ym77wCJFLFgd3GiVt/0jMHn06oD/f9PHv2LOa7F1GIahoknK2tb/f21fervZSAZ7c16zEDt2NADUHcPWcV6udq1qD9WWfkIiAaGvWEaVbNG+1DU3fLef5orS2pnIgDMccolnSzggCJCjG271FpxpO471xBvinWIYnLYM6zTdjbQ7g78Gx+s2A4BtP7TRU3Ah9RtRE+n2agXGxbeShHJCCxYWMmk3nWJcZNZQBw9ccQKSlcghkgmkLA1BwPhLGQx95tOxeKAYb5aBmM0/zia7UX7rnRJwr/gAz0OWxRyT6QPIPU0iWfBcerM0mSyi4KO4jwxND8ToIJsKDA0s4jzEPE2RfqNhSSSbXrUc8lFJUTvWjceUZJA7Q/zrHJ7YVJKic5sDTGFygkvwQJRcUM+BJkyV4EgeBDFycCZVpptwTeEPSK3SDWpzUmMMHwyAAQrEpeeyGL3+UwNZZHoAx5Kf1dDm384GNNjV+IEKt9e9AM9bNszIA5eUAAAAAElFTkSuQmCC) 50% 50% no-repeat}@-moz-keyframes show{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes show{0%{opacity:0}100%{opacity:1}}@keyframes show{0%{opacity:0}100%{opacity:1}}.advark-controls div.advark-vpaid{position:absolute;pointer-events:none;z-index:32000}.advark-controls div.advark-vpaid *{pointer-events:all}.advark-controls .advark-image{width:100%;height:100%}.advark-controls .advark-linear .advark-timer{font-size:18px;cursor:default}.advark-controls .advark-linear .advark-timer.advark-bl,.advark-controls .advark-linear .advark-timer.advark-tl{text-align:left}.advark-controls .advark-linear .advark-timer.advark-br,.advark-controls .advark-linear .advark-timer.advark-tr{text-align:right}.advark-controls .advark-logo{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAaCAQAAAAZf2TLAAAA7klEQVR4AY2SqbaGIBRG7XY63f53uw9Ap9vtdLqdBzgvuC/reJfjcWA7uxk/mq3Q4fTeN++FQKbFI3TvcqpaIiBMn+RKRChf5USouDe5R/7pyIQndUBWAgVhvFNHZMdA1nvBv6iVWL95AqmSCUrELWHIBb8PS1m+kA05GXNqG36Wel46zbW/jrdYYTNprswn2Rmq0z9zY4/VzuCbPNlypl2VlqjjXx3dPisTueJU6JiXnvBrr8RVTIhBz7DmitPORwpiMjPuUqXXDt+YqmoFblBw26KXF9UfsjdaN5Zzv6pW+3FVLxXCbrJFN/yu/AF6NyCszDn7iAAAAABJRU5ErkJggg==);background-repeat:no-repeat;width:150px;height:26px;padding:7px 6px 6px 32px;color:rgba(255,255,255,.7);font-family:tahoma,sans-serif;font-size:11px;text-transform:uppercase;overflow:hidden}.advark-controls .advark-logo:hover{font-size:0}.advark-controls .advark-logo:hover:before{left:28px;opacity:1;transition:opacity .5s,left .5s}.advark-controls .advark-logo:before{content:'';background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAAAUCAMAAAC54OMXAAAAM1BMVEX///8AAAD///////////////////////////////////////////////////////////+Q8lQ3AAAAEXRSTlOyAFksC6abbyFChTeQZE0Weq3WdUoAAAIfSURBVHgBbZQLluQ6CEMx+O/89r/aeVSkY/qdaKa7SdlwQXZK0k/50qsnKOtPw+xOrtvM/iwOpOhK1FLXMrMEXaojJ1dXD0Gq8p9u7Dll68wpNQ9QtBd/8Gh6oEi5ZevpP5CHw6PhKSW9pCGuC2kqQROrR9o7H0eKqyDFJGqxiHKjLJAeYTGStlrK4nIn9nzctL5IJW9Srh6c6SVl7OiB1FTnIS40smAzBjlgVSBVVW10h6QTxiShJSCTJIaz8Gi9s9GKxoCjgjS3vSShhUzS9Cf/+T/pxLEWLl6c7kSKjEiiP5Mk9w5eCS+O8aNIogWNiw/N8wpXpX0kucTF1LabETRaU6VDH6TFi0Tz3r5+de6PmQ6kHtwPkj+f6WS7H6RU3kILK9i8cPqRdEX3QCXpfq3pOIIPEuxzAM4LBhRU2nfvEdBJKvcmXRimePY3CW1gesw2cP1vkLaOHGZam+Tp08ymE79IHOLE9BhxmJ20jySCAql0krpEjU8SfBs0r0hQjSQMHW9EySCdEvV8kWjfxNOSP+ogHaaszFTljE6q8kc5ksK7yW03zYtD8O7lwqHY5CO8lLI8bOZS1OX3nj5gM5M3zYNirgX7QEoXuyHpLnylBK+/6w6vwpYmLvL4B23mF62BxNGfYLwxTQpvHLfdJO0hUJPtPttTzE8SC9smodpKwuESm1X/Q9Urk7RYLO9jx00p/gfn09AeavGTkv8BIn4PP40csxEAAAAASUVORK5CYII=);padding:0;width:105px;height:20px;position:absolute;top:3px;left:-120px;opacity:0}.advark-controls .advark-logo.advark-br,.advark-controls .advark-logo.advark-tr{background-position-x:right;padding:7px 27px 6px 6px;width:130px;text-align:right}.advark-controls .advark-logo.advark-br:before,.advark-controls .advark-logo.advark-tr:before{left:128px;opacity:0}.advark-controls .advark-logo.advark-br:hover:before,.advark-controls .advark-logo.advark-tr:hover:before{left:0;opacity:1;transition:opacity .5s,left .5s}.advark-controls .advark-progress{width:100%;height:6px;overflow:hidden;background:#333;bottom:0;left:0}.advark-controls .advark-progress *{height:100%;background:#0daec0;-moz-transition-property:width;-o-transition-property:width;-webkit-transition-property:width;transition-property:width;-moz-transition-duration:.3s;-o-transition-duration:.3s;-webkit-transition-duration:.3s;transition-duration:.3s;-moz-transition-timing-function:linear;-o-transition-timing-function:linear;-webkit-transition-timing-function:linear;transition-timing-function:linear}.advark-controls .advark-linear .advark-close{font-size:0;border-radius:2px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAAAhUlEQVR4AW3QaQGDMBAFYRxEChIqoRKQUAlIQAISKmWlRMLLAbln/3B9hDBbGjl9Nxjt2supk0k6gHj5xApRZjMp93WqzQVE8unG3bF7Je++RoYkMxPMQMr2mTBDUthnQCeQYbvQDcnAoMt/ykvpIC+nm5iOkUBeS5e/QrCbyZXFC5lZJgEHcXSAMYstvQAAAABJRU5ErkJggg==) no-repeat 12px 50%;background-color:rgba(66,66,66,.7);width:43px;height:43px;-moz-animation-name:show;-o-animation-name:show;-webkit-animation-name:show;animation-name:show;-moz-animation-duration:.5s;-o-animation-duration:.5s;-webkit-animation-duration:.5s;animation-duration:.5s;-moz-animation-iteration-count:1;-o-animation-iteration-count:1;-webkit-animation-iteration-count:1;animation-iteration-count:1}.advark-controls .advark-linear .advark-close.advark-br:hover,.advark-controls .advark-linear .advark-close.advark-tr:hover{font-size:18px;padding:10px 30px 11px 15px;background-color:rgba(0,0,0,.7);width:130px;background-position:99px 50%}.advark-controls .advark-linear .advark-close.advark-bl:hover,.advark-controls .advark-linear .advark-close.advark-tl:hover{font-size:18px;padding:10px 5px 11px 35px;background-color:rgba(0,0,0,.7);width:130px;background-position:12px 50%}.advark-controls .advark-linear .advark-close.advark-br:hover:before,.advark-controls .advark-linear .advark-close.advark-tr:hover:before{position:absolute;color:#fff;top:10px;left:15px;font-size:18px}.advark-controls .advark-linear .advark-close.advark-bl:hover:before,.advark-controls .advark-linear .advark-close.advark-tl:hover:before{position:absolute;color:#fff;top:10px;right:15px;font-size:18px}.advark-controls .advark-nonlinear .advark-close{cursor:pointer;position:absolute;width:24px;height:24px;top:8px;right:8px;background-size:25px;background-position:center center;background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAE9SURBVHgB1ZXBTsIwGMf/LVOPvoEnwQSzhDGSGV7FB/ER5MlEEtYSQA7Eiz6BepHOkMpHMhgdox1hB36XLWv3/3Vdv5b9KvXIgB4Yu8Yp0fpTA89sodR0FX6DCtBaf7NFkvygQjgqxjMfvLwOMJnOELZb6LQDuDB+m0HEAo1GHd2HaKct9wXz+fv6GosRhkLCBvXp9wdQyd96YCY5QRhsR22TUBv1SekELbvA95s7HYsk+8LDMLALCOp4SOIaTngoIH1hKEcbSVboEk5Y6yCO5UZiYgsnrHVgTleZcCcBoZnbs6ME5g9Nca0TXiacpsVlCWfxyoRn59xcXUXbCj8m3FYnBwWuRbRPMp447EVlisiUCCntAv++iavLC3SjyGmdZyV39dtc+/mfaJwOZlTHB+e12hPd4PR86eWy9w8y37y9ij6gcgAAAABJRU5ErkJggg==)}.advark-controls .advark-skip{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAQCAQAAABT0/yuAAAAYklEQVR4AWPABf7b/1//v56BGABUCALzESL4TP1PvOJ4qOJ+UhTHk6QY5qp6PPA8XPF/+f9EApCZRAKQA/LxOmA9kYH2X///exopPE9IoTxM4X9+QkrnwxUSjiegqfuRFQIAKXDyi7/ctMgAAAAASUVORK5CYII=) 185px 50% no-repeat rgba(66,66,66,.7);font-size:18px;padding:10px 35px 11px 10px;border-radius:3px;width:215px;-moz-animation-name:show;-o-animation-name:show;-webkit-animation-name:show;animation-name:show;-moz-animation-duration:.5s;-o-animation-duration:.5s;-webkit-animation-duration:.5s;animation-duration:.5s;-moz-animation-iteration-count:1;-o-animation-iteration-count:1;-webkit-animation-iteration-count:1;animation-iteration-count:1}.advark-controls .advark-skip:hover{background-color:rgba(0,0,0,.7)}.advark-controls .advark-skip.advark-bc,.advark-controls .advark-skip.advark-tc{margin-left:-105px}.advark-controls.advark-extra-small .advark-skip{display:none}.advark-controls .advark-volume{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAABYCAMAAAC56eXkAAAATlBMVEVCQkJBQUEAAABCQkJ/f3/29vaxsbFiYmKZmZlTU1Pt7e1xcXG8vLyMjIzS0tKmpqbHx8c+Pj5BQUHb29vk5ORBQUFAQEBAQEBCQkL///+keCy+AAAAGXRSTlOyhQBZxfrYu8629cDdyubT4iF66/A3byxNK+ugMQAAAOJJREFUeAHt1WVyw0AYg2EZlihMuv9By9yvMyrT6veT2DHkxXo/STsdxxH6Dq/BQ8e/CofFLGPvqOI5kyIOW1LEyZN3OLyEg78YkHmPi6s2Xl4JgPc4OXI2sXuO0ciViWlg7Oh0XMki40bOMo6vwZVMMs7cQcWVXJrYO+umuGTg++V7jLBr0oP0/kfUXMs6Fl4r4YUV9qW4482IzaBuPf6jdnfc2w213QY22i1gZ+FaAMQo1Wqma4h0ScFYkiuyQMK4oIwQcSRd0UO/utDqD4ziDzQundFuvbDZxr3dHf+Cdp8DBgMxrsD6jfMAAAAASUVORK5CYII=);width:44px;height:44px;cursor:pointer}.advark-controls .advark-volume.advark-mute{background-position:0 100%}.advark-controls .advark-redirect{width:200px;text-align:center;font-size:12px;padding:7px;border-radius:3px;background:rgba(66,66,66,.7);margin-left:-100px}.advark-controls .advark-redirect:hover{background:rgba(0,0,0,.7)}.advark-controls.advark-extra-small .advark-redirect,.advark-controls.advark-extra-small.advark-skippable .advark-redirect,.advark-controls.advark-small.advark-skippable .advark-redirect,.advark-controls.advark-very-small.advark-no-volume .advark-redirect,.advark-controls.advark-very-small.advark-skippable .advark-redirect{display:none}.advark-controls .advark-teaser{overflow:hidden;cursor:pointer;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;background:linear-gradient(to bottom,rgba(0,0,0,.34),rgba(212,212,212,.34));-moz-transition:width linear .15s,height linear .15s,left linear .15s,right linear .15s;-o-transition:width linear .15s,height linear .15s,left linear .15s,right linear .15s;-webkit-transition:width linear .15s,height linear .15s,left linear .15s,right linear .15s;transition:width linear .15s,height linear .15s,left linear .15s,right linear .15s;border:1px solid transparent;background-repeat:no-repeat;text-align:left;z-index:1}.advark-controls .advark-teaser:hover{border:1px solid #565656;background:rgba(0,0,0,.74)}.advark-controls .advark-teaser.advark-normal{height:65px;left:10px;right:10px;bottom:10px;position:absolute}.advark-controls .advark-teaser.advark-normal .advark-image{width:55px;height:55px;position:absolute;left:4px;top:4px}.advark-controls .advark-teaser.advark-normal .advark-text{top:4px;left:70px;right:20px;position:absolute;font-size:12px;overflow:hidden;height:55px}.advark-controls .advark-teaser.advark-minimized{height:25px;left:0;right:0;bottom:0;position:absolute}.advark-controls .advark-teaser.advark-minimized .advark-image{display:none}.advark-controls .advark-teaser.advark-minimized .advark-text{top:4px;left:4px;right:20px;position:absolute;font-size:12px;overflow:hidden;height:16px}.advark-controls .advark-banner{position:absolute;cursor:pointer;z-index:1}.advark-controls .advark-banner .advark-image{position:absolute;width:100%;height:100%}.advark-controls .advark-banner .advark-bc{bottom:10px;left:50%}.advark-controls .advark-banner .advark-br{bottom:10px;right:10px}.advark-controls .advark-vpaid .advark-label{cursor:default}.advark-controls .advark-external-slot{overflow:hidden}.advark-controls .advark-overlay{width:100%;height:100%}.advark-controls .advark-linear .advark-control-videoframe{margin:auto;left:0;right:0;top:0;bottom:0;pointer-events:none}.advark-controls .advark-linear .advark-control-videoframe *{pointer-events:all}",o.APlayersOwner=t}(a.module||(a.module={}))}(advark=advark||{}),function(o){!function(n){var e,i;function t(){var r=i.call(this)||this;return r._gateway=new o.gateway.ClientGateway,r._frame=new n.wrapper.FrameWrapper,o.request.Request.SetConveyor(r._gateway.conveyor),o.spromise.asyncWrapper=function(e){var t;return null!==(t=null===(t=r._gateway)||void 0===t?void 0:t.conveyor)&&void 0!==t&&t.empty?r._gateway.conveyor.append(e):e()},r}e=n.client||(n.client={}),i=e.APlayersOwner,__extends(t,i),t.prototype.registerCallback=function(e,t){this._frame.registerCallback(e,t)},t.prototype.setGatewayRules=function(e){return this._gateway.setRawRules(e),this},t.prototype.setSlotVars=function(e){var t;return i.prototype.setSlotVars.call(this,e),this._gateway&&null!==(t=this._videoWrapper)&&void 0!==t&&t.setConveyor(this._gateway.conveyor),this},t.prototype._spawnPlayer=function(e,t){return e.setConveyor(this._gateway.conveyor),i.prototype._spawnPlayer.call(this,e,t)},t.prototype._loadFrame=function(e){var t=this;this._gateway.setSrc(e).build().connect().catch(function(e){return t._handleEvent(o.vpaid.events.AdError,n.errors.FrameConnectTimeout(e))})},t.prototype._dispose=function(e){return this._gateway&&(this._gateway.dispose(e),delete this._gateway),i.prototype._dispose.call(this,e)},e.AGatewayOwner=t}(o.module||(o.module={}))}(advark=advark||{}),function(s){!function(i){var t,n;function o(){var e=null!==n&&n.apply(this,arguments)||this;return e._connected=s.spromise.deffer(),e._needFrameSetup=!1,e._vsWrapperMaster=!0,e}t=i.client||(i.client={}),n=t.AGatewayOwner,__extends(o,n),Object.defineProperty(o.prototype,"name",{get:function(){return"Client"},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"startupData",{get:function(){return this._startupData},enumerable:!1,configurable:!0}),o.prototype.setStartupData=function(e){return n.prototype.setStartupData.call(this,e),this._startupData.gitHash=s.context.settings.gitHash,this._startupData.interactiveTypes=t.MimeTypesController.GetInteractiveTypes(),s.catcher.startupData=this._startupData,this},o.prototype.setSetupData=function(e){return n.prototype.setSetupData.call(this,e),s.catcher.setupData=this._setupData,this},o.prototype.build=function(){var r=this;n.prototype.build.call(this),s.spromise.after(i.context.timeouts.frameConnect,!1,i.errors.FrameConnectTimeout()).catch(function(e){return r._connected.reject(e)}),this._connected.promise.inspect(function(e,t){t||(s.catcher.gen("client","frameConnect",{timeout:i.context.timeouts.frameConnect})(e),r._handleEvent(s.vpaid.events.AdError,e))});var e=o._FrameSrc;return this.setGatewayRules([["client",this,"rx",[["buildPlayer","x"],["registerCallback","x"],["connect","x"],["event","x"],["getSize","x"],["request","x"],["track","x"],["startupData","r"],["players","rx",[["linear","rx"],["nonlinear","rx"]]]]],["catcher",s.catcher,"w",[["campaignData","w"]]]])._loadFrame(e),this},o.prototype.connect=function(){this._connected.resolve()},o.prototype.setupAd=function(e,t,r){var n=this;this._setupData.publisherId=e,this._setupData.targetId=t,this._setupData.typeId=r,s.catcher.setupData=this._setupData,s.request.makeAsync=3===this._targetId?s.setImmediate:function(e){return e()},this._needFrameSetup=!0,this._connected.promise.then(function(){return n._dispatch(i.events.spec.ready)})},o.prototype.initAd=function(e,t){var r=this,n=this._needFrameSetup,i=this._connected.promise.then(function(){return n?r._frame.setupAd(r._setupData):s.spromise.resolved()}).then(function(){return r._frame.initAd(e,t)});return this._needFrameSetup=!1,i},o.prototype.startAd=function(){return this._frame.startAd()},o.prototype.stopAd=function(){return this._frame.stopAd()},o.prototype.pauseAd=function(){return this._frame.pauseAd()},o.prototype.resumeAd=function(){return this._frame.resumeAd()},o.prototype.expandAd=function(){return this.player?this.player.expandAd():s.spromise.rejected(s.base.errors.NotReady)},o.prototype.collapseAd=function(){return this.player?this.player.collapseAd():s.spromise.rejected(s.base.errors.NotReady)},o.prototype.skipAd=function(){return this.player?this.player.skipAd():s.spromise.rejected(s.base.errors.NotReady)},o.prototype.event=function(e,t){this._handleEvent.apply(this,[e].concat(t))},o.prototype.track=function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];s.track.send(n)}},o.prototype.request=function(e,t,r,n){return(new s.request.Request).setMethod("GET").setUri(e).setCredentials(r).setHeaders(t).send().inspect(function(e){return n&&n(e)})},o._FrameSrc="//s3.advarkads.com/modules/advarkmanager.html",t.Client=o}(s.module||(s.module={}))}(advark=advark||{}),function(e){!function(e){var t;function r(){}t=e.client||(e.client={}),r.GetInteractiveTypes=function(){return r._InteractiveTypes=!r._InteractiveTypes?[].concat(t.player.vpaidpl.ABase.GetSupportedTypes()):r._InteractiveTypes},r.CanPlay=function(e){return-1!==r.GetInteractiveTypes().indexOf(e)},t.MimeTypesController=r}(e.module||(e.module={}))}(advark=advark||{}),function(l){var e;(function(e){var r;function t(){var e=null!==r&&r.apply(this,arguments)||this;return e._conf={},e._ready=l.spromise.deffer(),e._classHidden="advark-hidden",e}e=e.control||(e.control={}),r=l.base.factory.ABuildableItem,__extends(t,r),t.prototype.setConveyor=function(e){return this._conveyor=e,this},Object.defineProperty(t.prototype,"status",{get:function(){return this._status||this._conf.status||"0"},set:function(e){this._status=e&&"-1"!==e?e:"0"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return"0"!==this.status},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return"1"===this.status?this._conf.positions?this._conf.positions[0]:void 0:this.status},enumerable:!1,configurable:!0}),t.prototype.setPlayer=function(e){return this.player=e,this},Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"conf",{get:function(){return this._conf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){return this._ready.promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hidden",{get:function(){return l.html.hasClass(this._element,this._classHidden)},enumerable:!1,configurable:!0}),t.prototype._place=function(){for(var e,t=this.player.controls.freePlaces,r=0,n=[this.position].concat(this._conf.positions);r<n.length;r++){var i=n[r],i=t.indexOf(i);if(-1<i){e=t.splice(i,1)[0];break}}this.status=e||"0"},t.prototype.build=function(){var t=this;return this.enabled?(this._conf.positions&&this._place(),this.enabled?(this._conf.parentElement||(this._conf.parentControl=this._conf.parentControl||this.player.controls.container,this._conf.createAfter=this._conf.createAfter||this._conf.parentControl.ready,this._conf.parentElement=this._conf.createAfter&&(this._conf.parentControl&&this._conf.parentControl.element||this.player.slot)),l.spromise.complete((this._conf.createAfter?this._conf.createAfter.then(function(e){t._conf.parentElement=e}):l.spromise.resolved()).then(function(){return t._build()}),this._ready)):this._ready.reject(l.base.errors.NotAllowed)):this._ready.reject(l.base.errors.NotAllowed),r.prototype.build.call(this)},t.prototype._build=function(){var r=this,e=this._conf.tagName||"div",t=this._conf.attrs||{};if(this._conf.classes=this._conf.classes||[],"1"!==this.status&&this._conf.classes.push("advark-"+this.status),this._conf.hidden&&this._conf.classes.push(this._classHidden),this._element=l.html.createElement(e,t,this._conf.style,void 0,this._conf.parentElement),this._conf.handlers){var n,i=this;for(n in this._conf.handlers)!function(e){var t;"string"==typeof e&&"function"==typeof i._conf.handlers[e]&&(t=i._conf.handlers[e],i._element.addEventListener(e,function(e){return r._conveyor&&r._conveyor.empty?r._conveyor.append(function(){return t(e)}):t(e)}))}(n)}if(this._conf.classes)for(var o=0,s=this._conf.classes;o<s.length;o++){var a=s[o];l.html.addClass(this._element,a)}return this._conf.innerHtml&&(this._element.innerHTML=this._conf.innerHtml),this._conf.textContent&&(this._element.textContent=this._conf.textContent),this._conf.parentElement.appendChild(this._element),l.spromise.resolved(this._element)},t.prototype.show=function(){l.html.removeClass(this._element,this._classHidden)},t.prototype.hide=function(){l.html.addClass(this._element,this._classHidden)},t.prototype.dispose=function(e){return l.xml.removeNode(this._element),r.prototype.dispose.call(this,e)},e.AControl=t})((e=l.module||(l.module={})).client||(e.client={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),Object.defineProperty(r.prototype,"text",{get:function(){return this._conf.innerHtml},set:function(e){"string"==typeof e&&""!==e.trim()?this._conf.innerHtml=e:delete this._conf.innerHtml},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.element.innerHTML=this.text},e.AText=r})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.handlers={click:function(){e.enabled&&!e._disposed&&(e.uri?e.player.event(n.vpaid.events.AdClickThru,{playerHandles:!0,url:e._uri,id:e._vpaidEventId}):e.player.event(n.vpaid.events.AdInteraction,{id:e._vpaidEventId}))}},e}e=e.control||(e.control={}),t=e.AText,__extends(r,t),Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},set:function(e){"string"==typeof e&&""!==e.trim()?this._uri=e:delete this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"vpaidEventId",{get:function(){return this._vpaidEventId},set:function(e){this._vpaidEventId=e},enumerable:!1,configurable:!0}),e.ARedirectable=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.control||(e.control={}),t=e.ARedirectable,__extends(r,t),Object.defineProperty(r.prototype,"timeout",{get:function(){return this._timeout},set:function(e){this._timeout="number"!=typeof e||isNaN(e)?void 0:e},enumerable:!1,configurable:!0}),r.prototype.build=function(){return isNaN(this.timeout)&&delete this.timeout,"number"!=typeof this.timeout&&(this.status="0"),this._conf.hidden=0<this.timeout,t.prototype.build.call(this)},r.prototype.update=function(e){this.enabled&&!this._disposed&&this._timeout&&e.time>=this._timeout&&(delete this._timeout,this.show())},e.AShownOnTimeout=r})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.classes=["advark-control-container"],e._conf.hidden=!0,e._conf.handlers={},e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),r.prototype.build=function(){return"startMuted"===this.volumeMode&&(this.player.muted=!0),this._conf.parentElement=this.player.slot,t.prototype.build.call(this)},r.prototype.resize=function(e){var t=n.vpaid.sizeToStyle(e),e=e.height<100?(t["margin-left"]="-"+Math.floor(e.width/2)+"px","advark-bc"):"advark-br";n.html.setStyle(this.element,t),n.html.addClass(this.element,e)},e.Container=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e.conf.classes=["advark-progress"],e.conf.innerHtml="<div></div>",e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),Object.defineProperty(r.prototype,"percent",{get:function(){var e=n.xml.childElement(this.element);return parseInt(e.style.width.replace(/\D/g,""))},set:function(e){var t;"number"!=typeof e||(t=n.xml.childElement(this.element))&&(e=Math.min(Math.max(e,0),1),t.style.width=Math.round(100*e)+"%")},enumerable:!1,configurable:!0}),r.prototype.update=function(e){this.percent=e.time/e.duration},e.Progress=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var i;(function(e){var t;function r(){var e=t.call(this)||this;return e.frameAsSlot=!1,e._conf.classes=["advark-control-vpaidframe"],e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),r.prototype.build=function(){return this.frameAsSlot?this._conf.classes.push("advark-container"):this._conf.style=n.html.load.iframeStyleHidden,t.prototype.build.call(this)},r.prototype._build=function(){var r=this;return(new i.load.Frame).setStyle(this._conf.style).setAttrs({class:this._conf.classes&&this._conf.classes.join(" ")}).setTargetParent(this._conf.parentElement).load().inspect(function(e,t){return t&&(r._element=e)}).catch(function(e){return n.spromise.rejected(i.errors.UndefinedVpaidError(e))})},e.VpaidFrame=r})((i=n.module||(n.module={})).client||(i.client={}))}(advark=advark||{}),function(e){(function(e){var r;function t(){var e=r.call(this)||this;return e._conf.classes=["advark-external-slot"],e._conf.hidden=!0,e._conf.handlers={},e}e=e.control||(e.control={}),r=e.AControl,__extends(t,r),t.prototype.build=function(){var t=this.player.controls.vpaidFrame;return t.frameAsSlot?this._conf.createAfter=t.ready.then(function(){var e=t.element.contentDocument;return e.head.innerHTML="<style>body {overflow:hidden;margin:0;padding:0;} body > div {width:100%;height:100%;border:0;margin:0;padding:0;position:absolute;}.advark-external-slot{height:100%; width:100%;}</style>",e.body.innerHTML="<div></div>",e.getElementsByTagName("div")[0]}):(this._conf.classes=this._conf.classes||[],this._conf.classes.push("advark-container"),this._conf.parentElement=this.player.slot),r.prototype.build.call(this),this},e.VpaidSlot=t})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.classes=["advark-image"],e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},set:function(e){this._uri=e,this._preload()},enumerable:!1,configurable:!0}),r.prototype.load=function(){var r=this;return this._preload().inspect(function(e,t){return t&&r._restyle()})},r.prototype._preload=function(){var r=this;return this._uri?(this._img&&this._img.src===this._uri||(this._preloaded=n.spromise.deffer(),this._img=this._img||n.html.createElement("img"),n.html.load.detect(this._img,!0).inspect(function(e,t){return t?r._preloaded.resolve(e):r._preloaded.reject(e)}),this._img.src=this._uri),this._preloaded.promise):n.spromise.rejected(n.base.errors.NotReady)},r.prototype._restyle=function(){var e={"background-image":this._uri?"url("+this._uri+")":void 0,"background-size":"contain","background-position":"left center","background-repeat":"no-repeat"};n.html.setStyle(this._element,e)},Object.defineProperty(r.prototype,"naturalWidth",{get:function(){var e;return null===(e=this._img)||void 0===e?void 0:e.naturalWidth},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"naturalHeight",{get:function(){var e;return null===(e=this._img)||void 0===e?void 0:e.naturalHeight},enumerable:!1,configurable:!0}),e.Image=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e._classMute="advark-mute",e._conf.classes=["advark-volume"],e._conf.positions=["bl","br"],e._conf.handlers={click:function(){e.player.muted=!e.player.muted}},e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),Object.defineProperty(r.prototype,"muted",{get:function(){return n.html.hasClass(this._element,this._classMute)},set:function(e){e?n.html.addClass(this._element,this._classMute):n.html.removeClass(this._element,this._classMute)},enumerable:!1,configurable:!0}),r.prototype._build=function(){var r=this;return t.prototype._build.call(this).inspect(function(e,t){return t&&(r.muted=r.player.muted)})},e.Volume=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.classes=["advark-timer"],e._conf.positions=["tr","tc"],e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),Object.defineProperty(r.prototype,"remainingTime",{get:function(){return this._element&&n.str.duration.deserialize(this._element.textContent)},set:function(e){this._element&&(this._element.innerHTML=0<=e?this.text.replace("{0}",n.str.duration.serialize(e)).replace("{s}",Math.floor(e).toString()):"")},enumerable:!1,configurable:!0}),r.prototype._maxTime=function(e){if("end"===this.mode)return e.duration;var t=[],r=this.player.controls.skip,n=this.player.controls.close;return 0<e.duration&&t.push(e.duration),r.enabled&&t.push(r.timeout),n.enabled&&t.push(n.timeout),0<t.length&&t.sort(function(e,t){return e-t})[0]},r.prototype.update=function(e){var t;!this.text||0<(t=this._maxTime(e))&&(e.time>=t?(delete this.text,this.hide()):this.remainingTime=t-(0<=e.time?e.time:0))},e.Timer=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.classes=["advark-play"],e._conf.hidden=!0,e._conf.handlers={click:function(){e.player.resumeAd()}},e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),e.Play=r})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(e){var n;(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.tagName="a",e._conf.classes=["advark-logo"],e._conf.positions=["tl"],e.uri=n.context.settings.logoRedirectUri,e}e=e.control||(e.control={}),t=e.ARedirectable,__extends(r,t),Object.defineProperty(r.prototype,"timeout",{get:function(){return this._timeout},set:function(e){this._timeout="number"!=typeof e||isNaN(e)?void 0:e},enumerable:!1,configurable:!0}),r.prototype.update=function(e){this.enabled&&!this._disposed&&this._timeout&&e.time>=this._timeout&&(delete this._timeout,this.hide())},e.Logo=r})((n=e.module||(e.module={})).client||(n.client={}))}(advark=advark||{}),function(n){var e;(function(e){var r;function t(){var e=r.call(this)||this;return e._conf.classes=["advark-close"],e._conf.positions=["tr","br","tl","bl"],e._conf.handlers={click:function(){e.enabled&&!e._disposed&&e.player.event(n.vpaid.events.AdUserClose)}},e}e=e.control||(e.control={}),r=e.AShownOnTimeout,__extends(t,r),t.prototype._place=function(){var e=this.player.controls.timer,t=this.player.controls.skip;"1"===this.status&&e.enabled&&"default"===e.mode&&!t.enabled?this.status=e.position:r.prototype._place.call(this)},e.Close=t})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.classes=["advark-skip"],e._conf.positions=["tr","bc","br","tc"],e._conf.handlers={click:function(){e.enabled&&!e._disposed&&e.player.event(n.vpaid.events.AdSkipped)}},e}e=e.control||(e.control={}),t=e.AShownOnTimeout,__extends(r,t),r.prototype._place=function(){var e=this.player.controls.timer;"1"===this.status&&e.enabled&&"default"===e.mode?this.status=e.position:t.prototype._place.call(this)},r.prototype.show=function(){var e=this.hidden;t.prototype.show.call(this),this._useClose()&&t.prototype.hide.call(this),e&&this.player.event(n.vpaid.events.AdSkippableStateChange)},r.prototype.hide=function(){var e=this.hidden;t.prototype.hide.call(this),e||this.player.event(n.vpaid.events.AdSkippableStateChange)},r.prototype._useClose=function(){return!(this.element.clientWidth<this.player.getSize().width/2)&&(this.player.controls.close.status=this.status,this.player.controls.freePlaces.push(this.position),this.status="0",this.player.controls.close.timeout=0,this.player.controls.close.build(),this.player.controls.close.show(),!0)},e.Skip=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.classes=["advark-label"],e._conf.positions=["tl"],e}e=e.control||(e.control={}),t=e.AText,__extends(r,t),e.Label=r})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.tagName="a",e._conf.classes=["advark-overlay"],e}e=e.control||(e.control={}),t=e.ARedirectable,__extends(r,t),e.Overlay=r})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.tagName="a",e._conf.classes=["advark-redirect"],e._conf.positions=["bc","tc"],e.timeout=0,e}e=e.control||(e.control={}),t=e.AShownOnTimeout,__extends(r,t),r.prototype.build=function(){return this.uri&&this.text||(this.status="0"),t.prototype.build.call(this)},e.Redirect=r})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.classes=["advark-text"],e}e=e.control||(e.control={}),t=e.AText,__extends(r,t),e.Details=r})((e=e.module||(e.module={})).client||(e.client={}))}(advark=advark||{}),function(i){var e;(function(e){var t,r;function n(){var e=r.call(this)||this;return e.fixed=!1,e._image=(new t.Image).setParent(e),e.timeout=0,e._conf.tagName="a",e._conf.classes=["advark-control-banner"],e._conf.positions=["br","bc","tc"],e._conf.handlers={click:function(){e.enabled&&!e._disposed&&(e._file&&e._file.link?e.player.event(i.vpaid.events.AdClickThru,{playerHandles:!0,url:e._file.link}):e.player.event(i.vpaid.events.AdInteraction))}},e}t=e.control||(e.control={}),r=t.AShownOnTimeout,__extends(n,r),Object.defineProperty(n.prototype,"file",{get:function(){return this._file},set:function(e){e&&(this._file=e)},enumerable:!1,configurable:!0}),n.prototype._build=function(){var t=this;return r.prototype._build.call(this).then(function(e){return t._image.status="1",t._image.conf.parentElement=t.element,t._image.uri=t._file.path,t._image.build(),t._image.load(),t.resize(),e})},n.prototype.resize=function(){var e,t;this.fixed||(e=this._fileSize,t=i.vpaid.sizeToStyle(e),-1<["bc","tc"].indexOf(this.status)&&(t["margin-left"]="-"+Math.floor(e.width/2)+"px"),i.html.setStyle(this.element,t))},Object.defineProperty(n.prototype,"_fileSize",{get:function(){var e,t=this.player&&this.player.getSize(),r=this._file,n={width:i.vpaid.CodeUnknown,height:i.vpaid.CodeUnknown,viewMode:"normal"};return t&&r&&(e=.85,n.width=Math.min(r.width,.85*t.width),n.height=Math.min(r.height,.85*t.height),e=Math.min(n.width/r.width,n.height/r.height),n.width=e*r.width,n.height=e*r.height),n},enumerable:!1,configurable:!0}),t.Banner=n})((e=i.module||(i.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){var e=t.call(this)||this;return e._conf.tagName="div",e._conf.classes=["advark-control-videoframe"],e}e=e.control||(e.control={}),t=e.AControl,__extends(r,t),r.prototype._build=function(){var r=this;return t.prototype._build.call(this).inspect(function(e,t){t&&r.resize()})},r.prototype._calcSize=function(){var e=this.player&&this.player.getSize(),t=this.player&&this.player.videoSize,r=e;return t.height&&t.width&&!isNaN(t.height)&&!isNaN(t.width)&&(e=Math.min(r.width/t.width,r.height/t.height),r.width=e*t.width,r.height=e*t.height),r},r.prototype.resize=function(){var e=n.vpaid.sizeToStyle(this._calcSize());n.html.setStyle(this._element,e)},e.VideoFrame=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(i){var e;(function(e){var t,n;function r(){var e=null!==n&&n.apply(this,arguments)||this;return e.freePlaces=["tr","br","bc","tc","tl","bl"],e.container=new t.Container,e.vpaidFrame=new t.VpaidFrame,e.vpaidSlot=new t.VpaidSlot,e.image=new t.Image,e.overlay=new t.Overlay,e.play=new t.Play,e.progress=new t.Progress,e.timer=new t.Timer,e.volume=new t.Volume,e.label=new t.Label,e.details=new t.Details,e.logo=new t.Logo,e.close=new t.Close,e.skip=new t.Skip,e.redirect=new t.Redirect,e.banner=new t.Banner,e.videoFrame=new t.VideoFrame,e.others={},e._ready=i.spromise.deffer(),e}t=e.control||(e.control={}),n=i.base.factory.ABuildableItem,__extends(r,n),r.prototype.setConveyor=function(e){return this._conveyor=e,this},Object.defineProperty(r.prototype,"ready",{get:function(){return this._ready.promise},enumerable:!1,configurable:!0}),r.prototype.setSettings=function(e){for(var t in e)"string"==typeof t&&"string"==typeof e[t]&&this[t]&&(this[t].status=e[t]);return this},r.prototype.setPlayer=function(e){return this._player=e,this},r.prototype.build=function(){var t=this;n.prototype.build.call(this);var r=[];this.forControls(function(e){return r.push(e.setPlayer(t._player).setParent(t).setConveyor(t._conveyor).build().ready)});var e=i.spromise.join(r);return i.spromise.complete(e,this._ready),this},r.prototype.update=function(t){this.forControls(function(e){return e.enabled&&e.update&&e.update(t)})},r.prototype._dispose=function(t){return this.forControls(function(e){return e.dispose(t)}),n.prototype._dispose.call(this,t)},Object.defineProperty(r.prototype,"_list",{get:function(){return[this.container,this.vpaidFrame,this.vpaidSlot,this.image,this.overlay,this.videoFrame,this.play,this.progress,this.redirect,this.timer,this.volume,this.label,this.details,this.logo,this.skip,this.close,this.banner]},enumerable:!1,configurable:!0}),r.prototype.forControls=function(e){for(var t,r=0,n=this._list;r<n.length;r++)e(n[r]);for(t in this.others)e(this.others[t])},r.prototype.addOtherControl=function(e,t){return this.others[e]=t,this},t.Controls=r})((e=i.module||(i.module={})).client||(e.client={}))}(advark=advark||{}),function(s){var a;(function(e){var o,t;function r(){return null!==t&&t.apply(this,arguments)||this}o=e.player||(e.player={}),t=s.base.factory.ABuilder,__extends(r,t),r.prototype.setSlotVars=function(e){return this._slotVars=e,this},r.prototype.setFiles=function(e){return this._files=e,this},r.prototype.setSettings=function(e){return this._settings=e,this},r.prototype.setSetupData=function(e){return this._setupData=e,this},r.prototype.setConveyor=function(e){return this._conveyor=e,this},r.prototype._construct=function(){var t=this;if(this._class)switch(this._class){case o.videopl.Default:var e=this._files,r=s.filter(e,function(e){return 0===e.type.indexOf("video/")}),n=s.filter(e,function(e){return 0===e.type.indexOf("image/")}),i=s.filter(e,function(e){return""!==t._slotVars.videoWrapper.canPlayType(e.type).replace(/no/i,"")}),e=this._settings.hangAfter?o.videopl.HangAfter:o.videopl.Default;return i&&0<i.length?(this._files=i,s.spromise.resolved(new e)):n&&0<n.length?(this._files=n,s.spromise.resolved(new o.Image)):r&&0<r.length?(this._files=r,s.spromise.resolved(new e)):s.spromise.rejected(a.AdError.Build("Matching source not found",s.vast.errors.LinearNoSupportedFile));case o.vpaidpl.Default:return s.spromise.resolved(new o.vpaidpl.Default);case o.vpaidnl.Default:return s.spromise.resolved(new o.vpaidnl.Default);case o.NonlinearHTML:return s.spromise.resolved(new o.NonlinearHTML);case o.Banner:return s.spromise.resolved(new o.Banner);case o.Teaser:return s.spromise.resolved(new o.Teaser);default:return s.spromise.rejected("Unknown class: "+this._class)}return s.spromise.rejected("Unknown build method")},r.prototype._beforeBuild=function(e){e.setSlotVars(this._slotVars).setFiles(this._files).setSettings(this._settings).setSetupData(this._setupData).setConveyor(this._conveyor)},o.Builder=r})((a=s.module||(s.module={})).client||(a.client={}))}(advark=advark||{}),function(p){var e,o,s;function a(e){for(var t=[],r=o.exec(e);r;){var n=r[0].split(":"),i={name:n[0]},n=n[1].split(",");n.length&&n.pop(),n.length&&(i.args=n),t.unshift(i),r=o.exec(e)}return t}function h(e){for(var t=[],r=s.exec(e);r;){for(var n={entry:r[0],mods:a(r[1]),name:r[2].toLowerCase()},i=0;i<t.length;i++)if(t[i].entry===n.entry){n=null;break}n&&t.push(n),r=s.exec(e)}return t}e=(e=p.lib||(p.lib={})).prepr||(e.prepr={}),o=/(?:(?:[a-z0-9-]+)\:(?:[^\[\]:,]+,)*)/gi,s=/\[((?:(?:[a-z0-9-]+)\:(?:[^\[\]:,]+,)*)*)([a-z][a-z0-9_]*)\]/gi,e.parseMods=a,e.parseSub=h,e.process=function(e,t){var r,n={};for(r in t)"string"==typeof r&&(n[r.toLowerCase()]=t[r]);for(var i=0,o=h(e);i<o.length;i++){var s=o[i],a=n[s.name];"number"==typeof(a="function"==typeof a?a():a)&&(a=a.toString());for(var l=0,c=s.mods;l<c.length;l++){var u=c[l];if(a instanceof Array)switch(u.name){case"at":a=a[u.args[0]];break;case"join":a=a.join(u.args[0]);break;case"join-p":a=a.join("&"+encodeURIComponent(u.args[0])+"=");break;case"e":case"d":case"t256":a=a.join(",")}if("string"==typeof a)switch(u.name){case"e":a=encodeURIComponent(a);break;case"d":a=decodeURIComponent(a);break;case"t256":a=a.substr(0,256)}}"string"==typeof(a=a instanceof Array?a.join(","):a)&&(e=e.split(s.entry).join(a))}var d=h(e);return d.length&&p.catcher.gen("prepr")(new EvalError("Missed substitutions"),{source:e,missed:d}),e}}(advark=advark||{}),function(i){var o;(function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.player||(e.player={}),r=e.ASlotVarsOwner,__extends(n,r),n.prototype.setSettings=function(e){return this._settings=e,this},n.prototype.setFiles=function(e){return this._files=this._sortFiles(e),this._fileIdx=0,this._file=this._files[this._fileIdx],this},n.prototype.setConveyor=function(e){return this._conveyor=e,this},n.prototype.build=function(){try{if(r.prototype.build.call(this),!this._slot)throw new Error("No slot specified");if(!this._files)throw new Error("No files specified")}catch(e){var t={name:this.name,path:this.pathStr,files:this._files,settings:this._settings,referer:this._referer};throw o.errors.PlayerBuild(e.message,e.data||t)}return this},n.prototype.event=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this._handleEvent.apply(this,[e].concat(t))},n.prototype.reloadAd=function(){return i.spromise.rejected(i.base.errors.NotImplemented)},n.prototype.skipAd=function(){return this._handleEvent(i.vpaid.events.AdSkipped)},n.prototype.expandAd=function(){return i.spromise.rejected(i.base.errors.NotImplemented)},n.prototype.collapseAd=function(){return i.spromise.rejected(i.base.errors.NotImplemented)},n.prototype.getSkippableState=function(){return!1},n.prototype._sortFiles=function(e){return e},t.APlayer=n})((o=i.module||(i.module={})).client||(o.client={}))}(advark=advark||{}),function(u){var d;(function(e){var c;function t(){return null!==c&&c.apply(this,arguments)||this}e=e.player||(e.player={}),c=e.APlayer,__extends(t,c),t.GetSupportedTypes=function(){return[]},t.prototype._cacheUpdate=function(){try{var e=this.getSize(),t=this.getVolume();this._cache.size=void 0,this._cache.volume=void 0,this.setSize(e),this.setVolume(t)}catch(e){u.catcher.gen("cache","update")(e,{},3)}},t.prototype.startAd=function(){return c.prototype.startAd.call(this)},t.prototype._start=function(){this._cacheUpdate(),c.prototype._start.call(this)},t.prototype._cacheSizeSubSetter=function(e){var t=c.prototype._cacheSizeSubSetter.call(this,e);return t&&this._states.loaded&&this._onSizeChange(e),t},t.prototype._onSizeChange=function(e){this._states.started&&!this._states.stopped&&this._waitRespEvent(u.vpaid.events.AdSizeChange,e)},Object.defineProperty(t.prototype,"progress",{get:function(){var e={time:0,duration:this._settings&&this._settings.duration&&!isNaN(this._settings.duration)?this._settings.duration/1e3:void 0};return this._states.starting||this._states.started?d.progress.norm(this._cache.progress,d.progress.norm(this._videoWrapper.progress,e)):e},enumerable:!1,configurable:!0}),t.prototype._waitRespEvent=function(e,t){var r=this;u.catcher.gen("module.client.player","info: module.client.player")({message:"ABase._waitRespEvent()",name:""}),u.spromise.timeout(this._waitEvents([e]),d.context.timeouts.vpaidResp,u.base.errors.Timeout).inspect(function(e,t){return u.catcher.gen("module.client.player",(t?"warming":"info")+": module.client.player")({message:"ABase._waitRespEvent() "+(t?"err":"ok"),name:""})}).catch(function(){return r._handleEvent(e,t)})},t.prototype._handleEventEnd=function(e){for(var t,r,n,i=this,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];if(this._disposing)return u.spromise.rejected(u.base.errors.Disposing);switch(e){case u.vpaid.events.AdStarted:var a=null===(t=this._file)||void 0===t?void 0:t.path;a&&(o[0]=null!==(t=o[0])&&void 0!==t&&t.assetUri?o[0]:{assetUri:a});break;case u.vpaid.events.AdSizeChange:this._states.started?(n=(n=o[0])&&n.height&&n.width?n:this._cache.size,(l=this._eventParams[e]?this._eventParams[e][0]:void 0)&&l.width===n.width&&l.height===n.height&&l.viewMode===n.viewMode?r=u.spromise.rejected(u.base.errors.Duplicate):o[0]=n):r=u.spromise.rejected(u.base.errors.NotAllowed);break;case u.vpaid.events.AdClickThru:case u.vpaid.events.AdInteraction:if(this._eventTimes[u.vpaid.events.AdStarted])if((new Date).getTime()-this._eventTimes[u.vpaid.events.AdStarted].getTime()<this._settings.unclickableTimeout)r=u.spromise.rejected(u.base.errors.NotAllowed);else{var l=o[0];switch((l=!l||"object"!=typeof l?{url:o[0],id:o[1],playerHandles:o[2]}:l).url=l.url||this._settings.redirectUrl,null===(n=this._settings)||void 0===n?void 0:n.onClickThru){case"pause":this.pauseAd();break;case"end":this.stopAd()}l.url&&(l.playerHandles&&(window.open(l.url,d.context.settings.clickTarget),l.playerHandles=!1),o=[l])}}switch(o[0]&&(o[0].offerId=this._settings.offerId),r=r||c.prototype._handleEventEnd.apply(this,[e].concat(o)),e){case u.vpaid.events.AdSkipped:case u.vpaid.events.AdUserClose:r=r.then(function(){return i.stopAd()})}return r},e.ABase=t})((d=u.module||(u.module={})).client||(d.client={}))}(advark=advark||{}),function(i){var e;(function(e){var n;function t(){var e=null!==n&&n.apply(this,arguments)||this;return e._waitingViewableImpression=!1,e}e=e.player||(e.player={}),n=e.ABase,__extends(t,n),t.prototype._isAllowedViewabliltyEvents=function(){return!(!this._eventTimes[i.vpaid.events.AdImpression]||this._eventTimes[i.vast.events.v4.viewability.NotViewable]||this._eventTimes[i.vast.events.v4.viewability.Viewable]||this._eventTimes[i.vast.events.v4.viewability.ViewUndetermined])},t.prototype._dispatch=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];switch(e){case i.vpaid.events.AdImpression:case i.vpaid.events.AdPlaying:this._waitViewableImpression();break;case i.vpaid.events.AdPaused:this._unwaitViewableImpression();break;case i.vpaid.events.AdStopped:case i.vpaid.events.AdError:this._tryViewabilityEvent(i.vast.events.v4.viewability.NotViewable)}return n.prototype._dispatch.apply(this,[e].concat(t))},t.prototype._dispose=function(e){return this._tryViewabilityEvent(i.vast.events.v4.viewability.NotViewable),n.prototype._dispose.call(this,e)},t.prototype._tryViewabilityEvent=function(e){this._isAllowedViewabliltyEvents()&&(e===i.vast.events.v4.viewability.Viewable&&!this._waitingViewableImpression||(this._waitingViewableImpression=!1,this._handleEvent(e)))},t.prototype._waitViewableImpression=function(){var r=this;this._isAllowedViewabliltyEvents()&&(this._waitingViewableImpression=!0,i.openvv.wait([this._videoSlot,this._slot]).inspect(function(e,t){return r._tryViewabilityEvent(t?i.vast.events.v4.viewability.Viewable:i.vast.events.v4.viewability.ViewUndetermined)}))},t.prototype._unwaitViewableImpression=function(){this._waitingViewableImpression=!1},e.AViewable=t})((e=i.module||(i.module={})).client||(e.client={}))}(advark=advark||{}),function(a){var e;(function(e){var s;function t(){return null!==s&&s.apply(this,arguments)||this}e=e.player||(e.player={}),s=e.AViewable,__extends(t,s),t.prototype._cacheVolumeSubSetter=function(e){var t=s.prototype._cacheVolumeSubSetter.call(this,e);return t&&this._states.loaded&&this._onVolumeChange(e),t},t.prototype._cacheMutedSubSetter=function(e){var t=s.prototype._cacheMutedSubSetter.call(this,e);return t&&this._states.loaded&&this._onVolumeChange(e?a.vpaid.VolumeMin:this._cache.volume),t},t.prototype._onVolumeChange=function(e){this._states.started&&!this._states.stopped&&this._waitRespEvent(a.vpaid.events.AdVolumeChange,{volume:e})},t.prototype._handleEventEnd=function(e){for(var t,r,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return e===a.vpaid.events.AdVolumeChange&&(this._states.started?(r=(r=i[0])&&r.volume?r:{volume:this._cache.volume},(n=this._eventParams[e]?this._eventParams[e][0]:void 0)&&n.volume===r.volume?t=a.spromise.rejected(a.base.errors.Duplicate):i[0]=r):t=a.spromise.rejected(a.base.errors.NotAllowed)),t||s.prototype._handleEventEnd.apply(this,[e].concat(i))},e.AVolumeable=t})((e=a.module||(a.module={})).client||(e.client={}))}(advark=advark||{}),function(f){var m;(function(e){var h;function v(){var e=null!==h&&h.apply(this,arguments)||this;return e._currentTime=0,e._progressEvents=[{event:f.vpaid.events.AdVideoStart,frac:0},{event:f.vpaid.events.AdVideoFirstQuartile,frac:.25},{event:f.vpaid.events.AdVideoMidpoint,frac:.5},{event:f.vpaid.events.AdVideoThirdQuartile,frac:.75},{event:f.vpaid.events.AdVideoComplete,frac:1}],e}e=e.player||(e.player={}),h=e.AVolumeable,__extends(v,h),v.prototype._cacheProgressSubGetter=function(){return{time:this._currentTime,duration:this._settings&&this._settings.duration&&this._settings.duration/1e3}},v.prototype._handleEventEnd=function(e){for(var t,r=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(this._disposing)return f.spromise.rejected(f.base.errors.Disposing);switch(e){case f.vpaid.events.AdStopped:case f.vpaid.events.AdPaused:this._updateCurrentTime(),clearInterval(this._currentTimeUpdateIntervalId);break;case m.events.spec.progress:case f.vpaid.events.AdRemainingTimeChange:case f.vpaid.events.AdDurationChange:e=m.events.spec.progress;var o,s=m.progress.norm(n[0],this._cache.progress),a=this._eventParams[e]?this._eventParams[e][0]:void 0;a&&(a.duration===s.duration||s.duration<=0)&&s.time-a.time<1&&(t=f.spromise.rejected(f.base.errors.Duplicate)),!this._states.started&&0<s.duration&&(o=1e3*s.duration,(a=this._settings)&&a.duration!==o?a.duration=o:t=f.spromise.rejected(f.base.errors.NotReady)),n[0]=s}switch(t=t||h.prototype._handleEventEnd.apply(this,[e].concat(n)),e){case f.vpaid.events.AdStarted:case f.vpaid.events.AdPlaying:t=t.inspect(function(){r._updateCurrentTime(),clearInterval(r._currentTimeUpdateIntervalId),r._currentTimeUpdateIntervalId=window.setInterval(r._updateCurrentTime.bind(r),v._UpdateTime)});break;case m.events.spec.progress:var l=n[0];if(this._states.started&&!this._states.stopped&&0<this._progressEvents.length&&0<l.duration&&0<=l.time)for(var c=l.time/l.duration,u=this,d=0,p=this._progressEvents;d<p.length;d++)!function(e){!u._eventTimes[e.event]&&c>=e.frac&&(u._eventTimes[e.event]=new Date,t=t.anycase(function(){return r._handleEvent(e.event)}))}(p[d])}return t},v.prototype._dispose=function(e){return clearInterval(this._currentTimeUpdateIntervalId),delete this._currentTimeUpdateIntervalId,h.prototype._dispose.call(this,e)},v.prototype._updateCurrentTime=function(){function e(){var e,t=new Date;!r._states.started||r._states.stopped||r._states.paused||(r._currentTimeUpdateLastDate&&(r._currentTime+=(t.getTime()-r._currentTimeUpdateLastDate.getTime())/1e3),e=r._cache.progress,r._handleEvent(m.events.spec.progress,e)),r._currentTimeUpdateLastDate=t}var r=this;this._conveyor&&this._conveyor.empty?this._conveyor.append(e):e()},v._UpdateTime=m.context.timeouts.playerUpdate,e.AProgressable=v})((m=f.module||(f.module={})).client||(m.client={}))}(advark=advark||{}),function(s){var a;(function(t){var e,o;function r(){var e=null!==o&&o.apply(this,arguments)||this;return e._controls=(new t.control.Controls).setParent(e),e}e=t.player||(t.player={}),o=e.AProgressable,__extends(r,o),r.prototype._trySetStyle=function(e){var t;null===(t=this._settings)||void 0===t||!t.style||(t=this._settings.style[e])&&(void 0===this._styleOffset||e>this._styleOffset)&&(this._styleTag&&s.xml.removeNode(this._styleTag),this._styleTag=s.html.createStylesTable(t,this._slot))},r.prototype._unsetStyle=function(){s.xml.removeNode(this._styleTag),delete this._styleTag,delete this._styleOffset},Object.defineProperty(r.prototype,"controls",{get:function(){return this._controls},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"muted",{get:function(){return this._cache.muted},set:function(e){this.controls.volume.muted=e,this._cache.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"slot",{get:function(){return this._slot},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"videoSize",{get:function(){var e;return null===(e=this._videoWrapper)||void 0===e?void 0:e.videoSize},enumerable:!1,configurable:!0}),r.prototype.getSkippableState=function(){var e;return!1===(null===(e=null===(e=this._controls)||void 0===e?void 0:e.skip)||void 0===e?void 0:e.hidden)},r.prototype.initAd=function(){var e=this;return this._controls.setPlayer(this).setConveyor(this._conveyor).setSettings(this._settings.controls).build(),this._controls.ready.then(function(){return o.prototype.initAd.call(e)})},r.prototype.startAd=function(){return this.controls.skip.enabled&&s.html.addClass(this._slot,"advark-skippable"),this._controls.container.show(),this._controls.vpaidSlot.show(),this._trySetStyle(0),o.prototype.startAd.call(this)},r.prototype.setSize=function(e){o.prototype.setSize.call(this,e),s.html.removeClass(this._slot,"advark-extra-small"),s.html.removeClass(this._slot,"advark-very-small"),s.html.removeClass(this._slot,"advark-small"),e.width<320?s.html.addClass(this._slot,"advark-extra-small"):e.width<420?s.html.addClass(this._slot,"advark-very-small"):e.width<620&&s.html.addClass(this._slot,"advark-small"),s.html.removeClass(this._slot,"advark-skippable"),s.html.removeClass(this._slot,"advark-no-volume"),s.html.removeClass(this._slot,"advark-extra-small"),s.html.removeClass(this._slot,"advark-very-small"),s.html.removeClass(this._slot,"advark-small")},r.prototype._handleEvent=function(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return e===a.events.spec.progress&&(this._controls.update(n[0]),this._settings.style&&(t=n[0],r=Object.keys(this._settings.style).map(function(e){return Number(e)}).sort(function(e,t){return e<t?-1:1}),this._trySetStyle(s.filter(r,function(e){return e<1e3*t.time}).pop()))),o.prototype._handleEvent.apply(this,[e].concat(n))},r.prototype._handleEventEnd=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];switch(e){case a.events.spec.waitUser:case s.vpaid.events.AdPaused:this._controls.play.show();break;case s.vpaid.events.AdStarted:case s.vpaid.events.AdPlaying:this._controls.play.hide(),this._controls.videoFrame.enabled&&this._controls.videoFrame.resize();break;case s.vpaid.events.AdStopped:this._controls.container.hide();break;case s.vpaid.events.AdVolumeChange:this._controls.volume.muted=this.muted}return o.prototype._handleEventEnd.apply(this,[e].concat(t))},r.prototype._dispose=function(e){var t;return null!==(t=this._controls)&&void 0!==t&&t.dispose(e),this._unsetStyle(),o.prototype._dispose.call(this,e)},e.AControlable=r})((a=s.module||(s.module={})).client||(a.client={}))}(advark=advark||{}),function(s){var e;(function(e){var o;function t(){return null!==o&&o.apply(this,arguments)||this}e=e.player||(e.player={}),o=e.AControlable,__extends(t,o),t.prototype.build=function(){var e;return o.prototype.build.call(this),this.controls.container.status="1",this.controls.container.conf.classes.push("advark-nonlinear"),this.controls.overlay.status="1",this.controls.close.conf.status="1",this.controls.close.timeout=(null!==(e=this._settings)&&void 0!==e&&e.closeTimeout?this._settings.closeTimeout:0)/1e3,this.controls.image.status="1",this.controls.image.conf.parentControl=this.controls.overlay,this},t.prototype._pause=function(){this.controls.container.hide(),o.prototype._pause.call(this)},t.prototype._resume=function(){this.controls.container.show(),o.prototype._resume.call(this)},t.prototype._handleEventEnd=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.prototype._handleEventEnd.apply(this,[e].concat(r));return i=e===s.vpaid.events.AdStarted?i.then(function(){return t._handleEvent(s.vpaid.events.AdImpression)}):i},e.ANonLinear=t})((e=s.module||(s.module={})).client||(e.client={}))}(advark=advark||{}),function(n){var i;(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.player||(e.player={}),t=e.ANonLinear,__extends(r,t),Object.defineProperty(r.prototype,"name",{get:function(){return"NonlinearHTML"},enumerable:!1,configurable:!0}),r.prototype.build=function(){var r=this;return t.prototype.build.call(this),this._promise=this._load(this._files[0]).inspect(function(e,t){t&&(t={width:(t=r._settings.attributes).width+"px",height:t.height+"px",position:"absolute",left:"50%","margin-left":-Math.round(t.width/2)+"px"},n.html.setStyle(r.controls.container.element,t),t.left="",t["margin-left"]="",n.html.setStyle(r.controls.overlay.element,t),n.html.setStyle(r.controls.details.element,t))}),this._promise.catch(function(e){r._handleEvent(n.vpaid.events.AdError,e)}),this.controls.image.status="0",this.controls.container.status="bc",this.controls.details.status="1",this.controls.details.conf.parentControl=this.controls.overlay,this.controls.close.status="1",this.controls.container.hide(),this},r.prototype._load=function(e){return this._disposing?n.spromise.rejected(i.AdError.Build(n.base.errors.Disposed)):(this.devstatWrite(this,n.devstat.msgToVastLoad,n.devstat.mthLoad+n.devstat.strCalled),(new n.request.Request).setCredentials(!1).setUri(n.lib.prepr.process(e,[])).send().then(function(e){return n.spromise.resolved(e.text)},function(e){return n.spromise.rejected(i.errors.AdNonLinearNoSupported(e.error,e))}))},r.prototype.setPlayerParams=function(e){return this._params=e,this},r.prototype._cacheSizeSubGetter=function(){var e=n.html.hasClass(this.controls.container.element,"advark-minimized")?"thumbnail":"normal";return n.vpaid.sizeByElement(this._slot,e)},r.prototype._start=function(){this._startCycle(),t.prototype._start.call(this)},r.prototype._stop=function(){this._stopCycle(),t.prototype._stop.call(this)},r.prototype._pause=function(){this._stopCycle(),t.prototype._pause.call(this)},r.prototype._resume=function(){this._startCycle(),t.prototype._resume.call(this)},r.prototype._startCycle=function(){this._showCurrent()},r.prototype._stopCycle=function(){},r.prototype._switchNext=function(){this._fileIdx++,this._fileIdx>=this._files.length&&this._settings.repeat&&(this._fileIdx=0),this._fileIdx>=this._files.length?this._dispatch(i.events.spec.teaserEnd):(this._file=this._files[this._fileIdx],this._showCurrent())},r.prototype._showCurrent=function(){var r=this;this._promise.then(function(e){var t={frameborder:"0",width:""+r._settings.attributes.width,height:""+r._settings.attributes.height,scrolling:"0"},t=n.html.createElement("iframe",t,void 0,r.controls.details.element);t.contentWindow.document.open(),t.contentWindow.document.write(e),t.contentWindow.document.close(),r.controls.container.show()})},r.prototype._dispose=function(e){return this._stopCycle(),t.prototype._dispose.call(this,e)},r.prototype.setSize=function(e){t.prototype.setSize.call(this,e)},e.NonlinearHTML=r})((i=n.module||(n.module={})).client||(i.client={}))}(advark=advark||{}),function(i){var n;(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.player||(e.player={}),t=e.ANonLinear,__extends(r,t),Object.defineProperty(r.prototype,"name",{get:function(){return"Banner"},enumerable:!1,configurable:!0}),r.prototype.build=function(){return this._settings=this._settings||{},this._settings.duration=this._file.duration<0||isNaN(this._file.duration)?void 0:this._file.duration,this._settings.closeTimeout=this._file.closeTimeout||n.context.timeouts.controlShowClose,t.prototype.build.call(this),this.controls.container.conf.classes.push("advark-banner"),this.controls.overlay.uri=this._file.link,this.controls.image.uri=this._file.path,this},r.prototype._start=function(){var r=this;this.controls.container.resize(this._bannerSize),this.controls.image.load().inspect(function(e,t){return t?r._handleEvent(i.vpaid.events.AdStarted):r._handleEvent(i.vpaid.events.AdError,n.errors.BannerFileLoadError(e))}),t.prototype._start.call(this)},r.prototype._onSizeChange=function(e){this.controls.container.resize(this._bannerSize),t.prototype._onSizeChange.call(this,e)},Object.defineProperty(r.prototype,"_bannerSize",{get:function(){var e,t=this._cache.size,r=this._file,n={width:i.vpaid.CodeUnknown,height:i.vpaid.CodeUnknown,viewMode:"normal"};return t&&r&&(e=.95,n.width=Math.min(r.width,.95*t.width),n.height=Math.min(r.height,.95*t.height),e=Math.min(n.width/r.width,n.height/r.height),n.width=e*r.width,n.height=e*r.height),n},enumerable:!1,configurable:!0}),e.Banner=r})((n=i.module||(i.module={})).client||(n.client={}))}(advark=advark||{}),function(n){var i;(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.player||(e.player={}),t=e.ANonLinear,__extends(r,t),Object.defineProperty(r.prototype,"name",{get:function(){return"Teaser"},enumerable:!1,configurable:!0}),r.prototype.build=function(){var e=this;return t.prototype.build.call(this),this.controls.container.conf.classes.push("advark-teaser","advark-normal"),this.controls.container.conf.handlers.mouseenter=function(){return e._unwaitCollapse()},this.controls.container.conf.handlers.mousemove=function(){return e._waitExpand()},this.controls.container.conf.handlers.mouseout=function(){return e._waitCollapse()},this.controls.details.status="1",this.controls.details.conf.parentControl=this.controls.overlay,this},r.prototype._cacheSizeSubGetter=function(){var e=n.html.hasClass(this.controls.container.element,"advark-minimized")?"thumbnail":"normal";return n.vpaid.sizeByElement(this._slot,e)},r.prototype._start=function(){this._startCycle(),t.prototype._start.call(this)},r.prototype._stop=function(){this._stopCycle(),t.prototype._stop.call(this)},r.prototype._pause=function(){this._stopCycle(),t.prototype._pause.call(this)},r.prototype._resume=function(){this._startCycle(),t.prototype._resume.call(this)},r.prototype._startCycle=function(){this._showCurrent(),this._waitNext(),this._waitCollapse()},r.prototype._stopCycle=function(){this._clearEventTimeout(n.vast.events.v2.nonlinear.creativeView),this._clearEventTimeout(n.vpaid.events.AdExpandedChange)},r.prototype.collapseAd=function(){return"thumbnail"!==this._cache.viewMode&&(this._cache.viewMode="thumbnail",n.html.removeClass(this.controls.container.element,"advark-normal"),n.html.addClass(this.controls.container.element,"advark-minimized"),this._showCurrent(),this._dispatch(n.vpaid.events.AdExpandedChange),this._waitNext()),n.spromise.resolved()},r.prototype.expandAd=function(){return"thumbnail"===this._cache.viewMode&&(this._cache.viewMode="normal",n.html.removeClass(this.controls.container.element,"advark-minimized"),n.html.addClass(this.controls.container.element,"advark-normal"),this._showCurrent(),this._dispatch(n.vpaid.events.AdExpandedChange),this._waitNext()),n.spromise.resolved()},r.prototype._waitExpand=function(){var e=this;"thumbnail"===this._cache.viewMode&&this._setEventTimeout(n.vpaid.events.AdExpandedChange,function(){return e.expandAd()},i.context.timeouts.teaserExpand)},r.prototype._waitCollapse=function(){var e=this;"thumbnail"!==this._cache.viewMode&&this._setEventTimeout(n.vpaid.events.AdExpandedChange,function(){return e.collapseAd()},i.context.timeouts.teaserCollapse)},r.prototype._unwaitCollapse=function(){"thumbnail"!==this._cache.viewMode&&this._clearEventTimeout(n.vpaid.events.AdExpandedChange)},r.prototype._waitNext=function(){var e=this;this._setEventTimeout(n.vast.events.v2.nonlinear.creativeView,function(){return e._switchNext()},i.context.timeouts.teaserNext)},r.prototype._switchNext=function(){this._fileIdx++,this._fileIdx>=this._files.length&&this._settings.repeat&&(this._fileIdx=0),this._fileIdx>=this._files.length?this._dispatch(i.events.spec.teaserEnd):(this._file=this._files[this._fileIdx],this._showCurrent(),this._waitNext())},r.prototype._showCurrent=function(){if(this._states.starting){if(this.controls.image.uri=this._file.image,this.controls.image.load(),"normal"===this._cache.viewMode)this.controls.details.text=(this._file.title?this._file.title+"<br/><br/>":"")+this._file.description;else switch(this._settings.minimizedText){case"title":this.controls.details.text=this._file.title||this._file.description;break;case"description":this.controls.details.text=this._file.description||this._file.title}this.controls.overlay.uri=this._file.link,this.controls.details.reset()}},r.prototype._dispose=function(e){return this._stopCycle(),t.prototype._dispose.call(this,e)},r.prototype.setSize=function(e){t.prototype.setSize.call(this,e),e.width<i.context.settings.teaserMinWidth?this.collapseAd():(this.expandAd(),this._waitCollapse())},e.Teaser=r})((i=n.module||(n.module={})).client||(i.client={}))}(advark=advark||{}),function(i){var e;(function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.vpaidnl||(e.vpaidnl={}),r=e.ANonLinear,__extends(n,r),n.GetSupportedTypes=function(){return n._TypesJs},Object.defineProperty(n.prototype,"name",{get:function(){return"Vpaid"},enumerable:!1,configurable:!0}),n.prototype._getHandlingEvents=function(){return i.vpaid.events.All},n.prototype._sortFiles=function(e){return e.sort(function(e,t){return(-1===n._TypesJs.indexOf(e.type)?1:0)-(-1===n._TypesJs.indexOf(t.type)?1:0)})},n.prototype._dispose=function(e){return this.controls.vpaidFrame.dispose(e),r.prototype._dispose.call(this,e)},n._TypesJs=["application/javascript","application/x-javascript"],t.ABase=n})((e=(e=i.module||(i.module={})).client||(e.client={})).player||(e.player={}))}(advark=advark||{}),function(i){var o,s;o=i.module||(i.module={}),function(e){var t,n;function r(){return null!==n&&n.apply(this,arguments)||this}t=e.vpaidnl||(e.vpaidnl={}),n=t.ABase,__extends(r,n),Object.defineProperty(r.prototype,"eventDispatcher",{get:function(){return this._vpaid},enumerable:!1,configurable:!0}),r.prototype.build=function(){var r=this;n.prototype.build.call(this),this._progressEvents=[],this.controls.container.conf.classes.push("advark-vpaid");this.controls.container.conf.style=i.extend(this.controls.container.conf.style,{width:"100%",height:"100%"}),this.controls.vpaidFrame.status="bc",this.controls.vpaidFrame.frameAsSlot=this._settings.frameAsSlot,this.controls.vpaidSlot.status="1",this.controls.play.status=this._settings.playButton?"1":"0",this.controls.logo.timeout=o.context.timeouts.controlHideLogo/1e3,this.controls.label.text="Реклама",this.controls.overlay.status="0",this.controls.redirect.conf.status="0",this.controls.close.conf.status="0",this.controls.skip.conf.status="0",this.controls.timer.conf.status="0",this.controls.volume.conf.status="0";this._file.size.width,this._file.size.height;return this.controls.vpaidFrame.ready.then(function(){var e,t;r._file.size&&((t={width:r._file.size.width,height:r._file.size.height,viewMode:void 0}).width>r.slot.clientWidth&&(e=r.slot,t.height=t.height*e.clientWidth/t.width,t.width=e.clientWidth),t={top:"inherit",bottom:"0",width:t.width.toString()+"px",height:t.height.toString()+"px",position:"absolute",left:"50%","max-width":"100%;","margin-left":(-Math.round(t.width/2)).toString()+"px"},i.html.setStyle(r.controls.vpaidFrame.element,t))}),this._loadVpaid(),this},r.prototype._init=function(){var e=this;this._loadVpaid().then(function(){e._vsWrapperUnlisten(),e._initVpaid()})},r.prototype._start=function(){"startMuted"==this._settings.volumeMode&&(this._videoWrapper.muted=!0),n.prototype._start.call(this)},r.prototype._wrapJs=function(){var t=this;return(new o.load.Script).setUri(this._file.path).setDocsource(this.controls.vpaidFrame.element.contentDocument).load().then(function(){var e=t.controls.vpaidFrame.element.contentWindow.getVPAIDAd;return"function"==typeof e?(new s.VpaidWrapper).setParent(t).setConveyor(t._conveyor).setTarget(e()).build():i.spromise.rejected(o.errors.AdLinearFeedError("Function getVPAIDAd() not found"))})},r.prototype._createWrapper=function(){return-1<t.ABase._TypesJs.indexOf(this._file.type)?this._wrapJs():i.spromise.rejected(o.errors.AdLinearNoSupported(this._file.type))},r.prototype._loadVpaid=function(){var r=this;return this._load||(this._load=i.spromise.all([this.controls.vpaidSlot.ready,this.controls.vpaidFrame.ready]).then(function(){return r._createWrapper().then(function(e){r._vpaid=e})}).inspect(function(e,t){return!t&&r._handleEvent(i.vpaid.events.AdError,e)})),this._load},r.prototype._initVpaid=function(){var e;this._vpaid.handshakeVersion("2.0");var t=this._cache.size,r={slot:this.controls.vpaidSlot.element,videoSlot:this._videoSlot,videoSlotCanAutoPlay:this._videoSlotAutoplay};null!==(e=this._file.size)&&void 0!==e&&e.width&&(t.width=this._file.size.width),null!==(e=this._file.size)&&void 0!==e&&e.height&&(t.height=this._file.size.height),this._subscribeEvents(),this._vpaid.initAd(t.width,t.height,t.viewMode||"normal",1400,this._settings.creativeData,r)},t.AInitiable=r}((s=o.client||(o.client={})).player||(s.player={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.vpaidnl||(e.vpaidnl={}),t=e.AInitiable,__extends(r,t),r.prototype._cacheCond=function(e){return(!e&&this._states.starting||this._states.started)&&!this._states.stopped},r.prototype._cacheSizeSubGetter=function(){return{width:this._vpaid.getAdWidth(),height:this._vpaid.getAdHeight(),viewMode:this._vpaid.getAdExpanded()?"fullscreen":"normal"}},r.prototype._cacheSizeSubSetter=function(e){return this._vpaid.resizeAd(e.width,e.height,e.viewMode),!0},r.prototype._cacheVolumeSubGetter=function(){return this._vpaid.getAdVolume()},r.prototype._cacheVolumeSubSetter=function(e){return this._vpaid.setAdVolume(e),!0},r.prototype._cacheMutedSubGetter=function(){},r.prototype._cacheMutedSubSetter=function(e){return!1},r.prototype._cacheProgressSubGetter=function(){return{remainingTime:this._vpaid.getAdRemainingTime(),duration:this._vpaid.getAdDuration()}},r.prototype.build=function(){return this._progressEvents=[],t.prototype.build.call(this),this},e.Default=r})((e=(e=e.module||(e.module={})).client||(e.client={})).player||(e.player={}))}(advark=advark||{}),function(n){var e;(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.player||(e.player={}),t=e.AControlable,__extends(r,t),r.prototype.build=function(){t.prototype.build.call(this),this.controls.container.status="1",this.controls.videoFrame.conf.status="1",this.controls.container.conf.classes.push("advark-linear"),this.controls.container.volumeMode=this._settings.volumeMode,this.controls.vpaidSlot.volumeMode=this._settings.volumeMode,this.controls.close.timeout=this._settings.closeTimeout/1e3,this.controls.close.text=this._settings.closeText,this.controls.skip.timeout=this._settings.skipTimeout/1e3,this.controls.skip.text=this._settings.skipText,this._settings.bannerTimeout&&(this.controls.banner.timeout=this._settings.bannerTimeout/1e3),this.controls.redirect.uri=this._settings.redirectUrl,this.controls.redirect.text=this._settings.redirectText,this.controls.timer.mode=this._settings.timerMode,this.controls.timer.text=this._settings.timerTextTemplate,this.controls.logo.status=this._settings.showLogo?"1":"0",this.controls.logo.text=this._settings.logoText,this.controls.label.text=this._settings.labelText;var e=this._settings.bannerFiles&&this._settings.bannerFiles[0];return e&&(this.controls.banner.conf.status="1",this.controls.banner.file=e),"videoFrame"===this._settings.bannerMode&&(this.controls.banner.conf.parentControl=this.controls.videoFrame,this.controls.banner.fixed=!0),this._vsNextSave(),this._vsAttrsSave(),this},r.prototype.startAd=function(){return n.xml.removeAttr(this._videoSlot,n.lib.video.attrs.controls),this._settings.inlineVideo&&(n.xml.setAttr(this._videoSlot,n.lib.video.attrs.playsinline,n.lib.video.attrs.playsinline),n.xml.setAttr(this._videoSlot,n.lib.video.attrs.webkitPlaysinline,n.lib.video.attrs.webkitPlaysinline)),t.prototype.startAd.call(this)},r.prototype._dispose=function(e){return this._vsNextResume(),this._vsAttrsResume(),t.prototype._dispose.call(this,e)},r.prototype._vsNextSave=function(){this._vsNext=this._videoSlot&&this._videoSlot.nextSibling},r.prototype._vsNextResume=function(){var e;!this._videoSlot||(e=this._vsNext)&&e!==this._videoSlot.nextSibling&&e.parentNode&&e.parentNode.insertBefore(this._videoSlot,e)},r.prototype._vsAttrsSave=function(){this._vsAttrs={};for(var e=0,t=n.lib.video.attrs.All;e<t.length;e++){var r=t[e];this._vsAttrs[r]=n.xml.getAttr(this._videoSlot,r)}},r.prototype._vsAttrsResume=function(){var r=this;n.processobj(this._vsAttrs,function(e,t){n.xml.removeAttr(r._videoSlot,t),"string"==typeof e&&n.xml.setAttr(r._videoSlot,t,e)})},e.ALinear=r})((e=n.module||(n.module={})).client||(e.client={}))}(advark=advark||{}),function(o){var e;(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.player||(e.player={}),t=e.ALinear,__extends(r,t),r.prototype.build=function(){return t.prototype.build.call(this),this.controls.container.conf.classes.push("advark-video"),this.controls.overlay.conf.status="1",this.controls.overlay.uri=this._settings.redirectUrl,this.controls.redirect.conf.status="1",this.controls.close.conf.status="1",this.controls.skip.conf.status="1",this.controls.timer.conf.status="1",this.controls.volume.conf.status="1",this.controls.play.conf.status="1",this.controls.progress.conf.status="1","14-3-11"===this._publisherId&&(this.controls.close.status="0",this.controls.skip.status="0",this.controls.volume.status="0"),this},r.prototype.setSize=function(e){t.prototype.setSize.call(this,e),this.controls.banner.enabled&&this.controls.banner.resize()},r.prototype._sortFiles=function(e){var t,n,i;return this._slot&&(n=this._slot.clientWidth,i=this._slot.clientHeight,e=(null===(t=o.lib.network.connection)||void 0===t?void 0:t.type)==o.lib.network.ConnectionType.cellular||(null===(t=o.lib.network.connection)||void 0===t?void 0:t.type)==o.lib.network.ConnectionType.wifi?e.sort(function(e,t){return e.width*e.height-t.width*t.height}):e.sort(function(e,t){function r(e,t,r,n){var i=(e=e<=0?1:e)/(t=t<=0?1:t),o=t/e,s=(r=r<=0?1:r)/(n=n<=0?1:n),a=n/r,l=e*t,c=r*n;return Math.abs(e-r)/r+Math.abs(t-n)/n+Math.abs((i-s)/s+s)+Math.abs((o-a)/a+a)+Math.abs(l/c-1.3)}return r(e.width,e.height,n,i)-r(t.width,t.height,n,i)})),e},e.AStatic=r})((e=o.module||(o.module={})).client||(e.client={}))}(advark=advark||{}),function(s){var e;(function(e){var o;function t(){return null!==o&&o.apply(this,arguments)||this}e=e.player||(e.player={}),o=e.AStatic,__extends(t,o),Object.defineProperty(t.prototype,"name",{get:function(){return"Image"},enumerable:!1,configurable:!0}),t.prototype.build=function(){return o.prototype.build.call(this),this.controls.image.status="1",this.controls.image.uri=this._file.path,s.html.addClass(this._slot,"advark-no-volume"),this},t.prototype._handleEventEnd=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.prototype._handleEventEnd.apply(this,[e].concat(r));return i=e===s.vpaid.events.AdStarted?i.then(function(){return t._handleEvent(s.vpaid.events.AdImpression)}):i},t.prototype._dispose=function(e){return s.html.removeClass(this._slot,"advark-no-volume"),o.prototype._dispose.call(this,e)},e.Image=t})((e=s.module||(s.module={})).client||(e.client={}))}(advark=advark||{}),function(l){var c,e;c=l.module||(l.module={}),function(e){var t,a;function r(){return null!==a&&a.apply(this,arguments)||this}t=e.videopl||(e.videopl={}),a=e.AStatic,__extends(r,a),Object.defineProperty(r.prototype,"name",{get:function(){return"Video"},enumerable:!1,configurable:!0}),r.prototype._cacheProgressSubGetter=function(){return this._videoWrapper.progress},Object.defineProperty(r.prototype,"eventDispatcher",{get:function(){return this._videoWrapper},enumerable:!1,configurable:!0}),r.prototype._getHandlingEvents=function(){return l.lib.video.EventsAll},r.prototype._startWrapper=function(n){var i=this,o={src:n||this._videoWrapper.src};return l.catcher.gen("module.client.player.videopl","info: module.client.player.videopl")({message:"ABase._startWrapper()",name:""}),l.spromise.timeout(this._videoWrapper.start(n),c.context.timeouts.videoStart,c.errors.VideoFileLoadTimeout(void 0,o)).inspect(function(e,t){return l.catcher.gen("module.client.player.videopl",(t?"warming":"info")+": module.client.player.videopl")({message:"ABase._startWrapper() "+(t?"err":"ok"),name:""})}).inspect(function(e,t){var r;i._disposing||i._disposed||t||(null===(t=i._videoWrapper)||void 0===t?void 0:t.src.indexOf(n))<0||-1==(null===(r=null==(e=e||(null===(r=i._videoWrapper)||void 0===r?void 0:r.error))?void 0:e.message)||void 0===r?void 0:r.search(/https\:\/\/goo.gl\/xX8pDD/))&&l.catcher.gen("video","play:reject",o)(e)})},r.prototype._start=function(){var t=this;this._subscribeEvents(),this._cacheUpdate(),this._startWrapper(this._file.path).catch(function(e){return t._handleEvent(l.vpaid.events.AdError,e)})},r.prototype._stop=function(){this._videoWrapper.stop(),a.prototype._stop.call(this)},r.prototype._pause=function(){this._videoWrapper.pause()},r.prototype._resume=function(){this._videoWrapper.play()},r.prototype._handleEvent=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n,i,o=this._disposing&&l.spromise.rejected(l.base.errors.Disposing),s=t[0];if(!o)if(null!=s&&s.type)if(this._states.stopped)o=l.spromise.rejected(l.base.errors.NotAllowed);else{switch(e){case"playing":this._states.starting?o=this._handleEvent(l.vpaid.events.AdStarted):this._states.started&&this._states.paused&&(o=this._handleEvent(l.vpaid.events.AdPlaying));break;case"pause":this._states.started&&(this._states.stopping||this._videoSlot.ended?o=this._handleEvent(l.vpaid.events.AdVideoComplete):this._states.paused||(o=this._handleEvent(l.vpaid.events.AdPaused)));break;case"ended":case"emptied":this._states.started&&(o=this._handleEvent(l.vpaid.events.AdVideoComplete));break;case"error":this._states.stopping||(i=null===(n=this._videoWrapper)||void 0===n?void 0:n.error,n=null===(n=this._videoWrapper)||void 0===n?void 0:n.src,i=c.errors.VideoElementError(l.lib.video.AElement.MediaErrorMessage(i),{src:n,mediaError:{code:null==i?void 0:i.code,message:null==i?void 0:i.message}}),l.catcher.gen("video","error")(i),o=this._handleEvent(l.vpaid.events.AdError,i));break;case"volumechange":o=this._handleEvent(l.vpaid.events.AdVolumeChange)}o=o||l.spromise.rejected(l.base.errors.NotImplemented)}else o=a.prototype._handleEvent.apply(this,[e].concat(t));return o},r.prototype._dispose=function(e){var t;return null!==(t=this._videoWrapper)&&void 0!==t&&t.stop(),a.prototype._dispose.call(this,e)},t.ABase=r}((e=c.client||(c.client={})).player||(e.player={}))}(advark=advark||{}),function(o){var s,e;s=o.module||(o.module={}),function(n){var e,i;function t(){var e=null!==i&&i.apply(this,arguments)||this;return e._waitUserTime=0,e}e=n.videopl||(n.videopl={}),i=e.ABase,__extends(t,i),Object.defineProperty(t.prototype,"_pendingVideoSlotInit",{get:function(){var e;return!this._videoSlotAutoplay&&(null===(e=this._videoWrapper)||void 0===e?void 0:e.initDeffer.pending)},enumerable:!1,configurable:!0}),t.prototype._start=function(){var t=this;this._cacheUpdate();function e(){var e=o.spromise.rejected(o.base.errors.NotReady);return t._videoWrapper&&(t._subscribeEvents(),e=t._startWrapper(t._file.path)),e}(this._videoSlotAutoplay?o.spromise.resolved():this._videoWrapper.init().catch(function(e){return"tryUnmuted"==t._settings.volumeMode?(t._videoWrapper.muted=!0,t._videoWrapper.init().catch(function(e){return t._handleEvent(s.events.spec.waitUser).then(function(){return t._vsWrapperListen()})})):t._handleEvent(s.events.spec.waitUser).then(function(){return t._vsWrapperListen()})})).then(function(){return t._conveyor?t._conveyor.append(e):e()}).catch(function(e){return t._handleEvent(o.vpaid.events.AdError,e)})},t.prototype._handleEvent=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=t[0];return null!=n&&n.type&&this._pendingVideoSlotInit?o.spromise.rejected(o.base.errors.Skipped):i.prototype._handleEvent.apply(this,[e].concat(t))},t.prototype._handleEventEnd=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];switch(e){case o.vpaid.events.AdStarted:clearInterval(this._waitUserIntervalId);break;case s.events.spec.waitUser:clearInterval(this._waitUserIntervalId),this._waitUserIntervalId=window.setInterval(this._onWaitUser.bind(this),n.AProgressable._UpdateTime)}return i.prototype._handleEventEnd.apply(this,[e].concat(t))},t.prototype._dispose=function(e){return clearInterval(this._waitUserIntervalId),i.prototype._dispose.call(this,e)},t.prototype._onWaitUser=function(){var e,t;this._disposing||(this._waitUserTime+=n.AProgressable._UpdateTime,s.context.timeouts.videoInit-this._waitUserTime<0&&(t=null===(e=this._videoWrapper)||void 0===e?void 0:e.error,e=null===(e=this._videoWrapper)||void 0===e?void 0:e.src,t=s.errors.UserActionTimeout(o.lib.video.AElement.MediaErrorMessage(t),{src:e,mediaError:{code:null==t?void 0:t.code,message:null==t?void 0:t.message}}),o.catcher.gen("video","init:timeout")(t),this._handleEvent(o.vpaid.events.AdError,t)))},e.AInitiable=t}((e=s.client||(s.client={})).player||(e.player={}))}(advark=advark||{}),function(s){var e;(function(e){var o;function t(){return null!==o&&o.apply(this,arguments)||this}e=e.videopl||(e.videopl={}),o=e.AInitiable,__extends(t,o),t.prototype.build=function(){return o.prototype.build.call(this),/\/r.mradx.net\/.+.mp4$/.test(this._file.path)&&(delete this._settings.controls,delete this._settings.onClickThru),this},t.prototype._handleEventEnd=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.prototype._handleEventEnd.apply(this,[e].concat(r));switch(e){case s.vpaid.events.AdVideoStart:i=i.then(function(){return t._handleEvent(s.vpaid.events.AdImpression)});break;case s.vpaid.events.AdVideoComplete:i=i.then(function(){return t._handleEvent(s.vpaid.events.AdStopped)})}return i},e.Default=t})((e=(e=s.module||(s.module={})).client||(e.client={})).player||(e.player={}))}(advark=advark||{}),function(s){var e;(function(e){var o;function t(){return null!==o&&o.apply(this,arguments)||this}e=e.videopl||(e.videopl={}),o=e.AInitiable,__extends(t,o),Object.defineProperty(t.prototype,"name",{get:function(){return"HangAfter"},enumerable:!1,configurable:!0}),t.prototype.build=function(){return this._settings.closeTimeout=Math.min(this._settings.closeTimeout||this._settings.duration,this._settings.duration),o.prototype.build.call(this),/\/r.mradx.net\/.+.mp4$/.test(this._file.path)&&(delete this._settings.controls,delete this._settings.onClickThru),this},t.prototype._handleEventEnd=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.prototype._handleEventEnd.apply(this,[e].concat(r));switch(e){case s.vpaid.events.AdVideoStart:i=i.then(function(){return t._handleEvent(s.vpaid.events.AdImpression)});break;case s.vpaid.events.AdVideoComplete:this.controls.close.show()}return i},e.HangAfter=t})((e=(e=s.module||(s.module={})).client||(e.client={})).player||(e.player={}))}(advark=advark||{}),function(i){var e;(function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.vpaidpl||(e.vpaidpl={}),r=e.ALinear,__extends(n,r),n.GetSupportedTypes=function(){return n._TypesJs},Object.defineProperty(n.prototype,"name",{get:function(){return"Vpaid"},enumerable:!1,configurable:!0}),n.prototype._getHandlingEvents=function(){return i.vpaid.events.All},n.prototype._sortFiles=function(e){return e.sort(function(e,t){return(-1===n._TypesJs.indexOf(e.type)?1:0)-(-1===n._TypesJs.indexOf(t.type)?1:0)})},n.prototype._dispose=function(e){return this.controls.vpaidFrame.dispose(e),r.prototype._dispose.call(this,e)},n._TypesJs=["application/javascript","application/x-javascript"],t.ABase=n})((e=(e=i.module||(i.module={})).client||(e.client={})).player||(e.player={}))}(advark=advark||{}),function(i){var o,s;o=i.module||(i.module={}),function(e){var t,r;function n(){return null!==r&&r.apply(this,arguments)||this}t=e.vpaidpl||(e.vpaidpl={}),r=t.ABase,__extends(n,r),Object.defineProperty(n.prototype,"eventDispatcher",{get:function(){return this._vpaid},enumerable:!1,configurable:!0}),n.prototype.build=function(){return r.prototype.build.call(this),this._progressEvents=[],this.controls.container.conf.classes.push("advark-vpaid"),this.controls.vpaidFrame.status="1",this.controls.vpaidFrame.frameAsSlot=this._settings.frameAsSlot,this.controls.vpaidSlot.status="1",this.controls.play.status=this._settings.playButton?"1":"0",this.controls.logo.timeout=o.context.timeouts.controlHideLogo/1e3,this.controls.label.text="Реклама",this.controls.redirect.conf.status="0",this.controls.close.conf.status="0",this.controls.skip.conf.status="0",this.controls.timer.conf.status="0",this.controls.volume.conf.status="0",this._loadVpaid(),this},n.prototype._init=function(){var e=this;this._loadVpaid().then(function(){e._vsWrapperUnlisten(),e._initVpaid()})},n.prototype._start=function(){var e=this;"startMuted"==this._settings.volumeMode&&(this._videoWrapper.muted=!0),i.catcher.gen("module.client.player.vpaidpl","info: module.client.player.vpaidpl")({message:"AInitiable._start()",name:""}),i.spromise.timeout(this._waitEvents([i.vpaid.events.AdStarted]),o.context.timeouts.vpaidStartTimeout,i.base.errors.Timeout).inspect(function(e,t){return i.catcher.gen("module.client.player.vpaidpl",(t?"warming":"info")+": module.client.player.vpaidpl")({message:"AInitiable._startWrapper() "+(t?"err":"ok"),name:""})}).catch(function(){return e._handleEvent(i.vpaid.events.AdError,o.errors.VpaidStartTimeout)}),r.prototype._start.call(this)},n.prototype._wrapJs=function(){var t=this;return(new o.load.Script).setUri(this._file.path).setDocsource(this.controls.vpaidFrame.element.contentDocument).load().then(function(){var e=t.controls.vpaidFrame.element.contentWindow.getVPAIDAd;return"function"==typeof e?(new s.VpaidWrapper).setParent(t).setConveyor(t._conveyor).setTarget(e()).build():i.spromise.rejected(o.errors.AdLinearFeedError("Function getVPAIDAd() not found"))})},n.prototype._createWrapper=function(){return-1<t.ABase._TypesJs.indexOf(this._file.type)?this._wrapJs():i.spromise.rejected(o.errors.AdLinearNoSupported(this._file.type))},n.prototype._loadVpaid=function(){var r=this;return this._load||(this._load=i.spromise.all([this.controls.vpaidSlot.ready,this.controls.vpaidFrame.ready]).then(function(){return r._createWrapper().then(function(e){r._vpaid=e})}).inspect(function(e,t){return!t&&r._handleEvent(i.vpaid.events.AdError,e)})),this._load},n.prototype._initVpaid=function(){this._vpaid.handshakeVersion("2.0");var e=this._cache.size,t={slot:this.controls.vpaidSlot.element,videoSlot:this._videoSlot,videoSlotCanAutoPlay:this._videoSlotAutoplay};this._subscribeEvents(),this._vpaid.initAd(e.width,e.height,e.viewMode||"normal",1400,this._settings.creativeData,t)},t.AInitiable=n}((s=o.client||(o.client={})).player||(s.player={}))}(advark=advark||{}),function(e){(function(e){var t;function r(){return null!==t&&t.apply(this,arguments)||this}e=e.vpaidpl||(e.vpaidpl={}),t=e.AInitiable,__extends(r,t),r.prototype._cacheCond=function(e){return(!e&&this._states.starting||this._states.started)&&!this._states.stopped},r.prototype._cacheSizeSubGetter=function(){return{width:this._vpaid.getAdWidth(),height:this._vpaid.getAdHeight(),viewMode:this._vpaid.getAdExpanded()?"fullscreen":"normal"}},r.prototype._cacheSizeSubSetter=function(e){return this._vpaid.resizeAd(e.width,e.height,e.viewMode),!0},r.prototype._cacheVolumeSubGetter=function(){return this._vpaid.getAdVolume()},r.prototype._cacheVolumeSubSetter=function(e){return this._vpaid.setAdVolume(e),!0},r.prototype._cacheMutedSubGetter=function(){},r.prototype._cacheMutedSubSetter=function(e){return!1},r.prototype._cacheProgressSubGetter=function(){return{remainingTime:this._vpaid.getAdRemainingTime(),duration:this._vpaid.getAdDuration()}},r.prototype.build=function(){return this._progressEvents=[],/\/r.mradx.net\/.+.js$/.test(this._file.path)&&(this._settings.playButton="clickable"),/cdn.webturn.ru\/-\/VPAIDNivea\/base\/alx.js\?\d+$/.test(this._file.path)&&(this._settings.frameAsSlot=!0),t.prototype.build.call(this),this},e.Default=r})((e=(e=e.module||(e.module={})).client||(e.client={})).player||(e.player={}))}(advark=advark||{}),function(l){!function(s){var e,a;function t(){return null!==a&&a.apply(this,arguments)||this}e=s.client||(s.client={}),a=e.AVpaidModule,__extends(t,a),t.prototype._getHandlingEvents=function(){return a.prototype._getHandlingEvents.call(this).concat([s.events.spec.empty,s.events.spec.progress])},Object.defineProperty(t.prototype,"paramsData",{get:function(){return this._paramsData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"eventDispatcher",{get:function(){return this._child},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_publisherId",{get:function(){var e;return null!==(e=null===(e=this._paramsData)||void 0===e?void 0:e.id)&&void 0!==e?e:null===(e=this._setupData)||void 0===e?void 0:e.publisherId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_targetId",{get:function(){var e;return parseInt(null===(e=this.paramsData)||void 0===e?void 0:e.target_id)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_typeId",{get:function(){var e;return parseInt(null===(e=this.paramsData)||void 0===e?void 0:e.type_id)||null},enumerable:!1,configurable:!0}),t.prototype.setSetupData=function(e){return a.prototype.setSetupData.call(this,e),null!==(e=this._child)&&void 0!==e&&e.setSetupData(this._setupData),this},t.prototype._cacheCond=function(e){return!!this._child},t.prototype._cacheSizeSubGetter=function(){return this._child.getSize()},t.prototype._cacheSizeSubSetter=function(e){return this._child.setSize(e),!0},t.prototype._cacheVolumeSubGetter=function(){return this._child.getVolume()},t.prototype._cacheVolumeSubSetter=function(e){return this._child.setVolume(e),!0},t.prototype._cacheMutedSubGetter=function(){return this._child.muted},t.prototype._cacheMutedSubSetter=function(e){return this._child.muted=e,!0},t.prototype._cacheProgressSubGetter=function(){return this._child.progress},t.prototype._cacheBreakTypeSubGetter=function(){return this._child.breakType},t.prototype.getAdSkippableState=function(){var e;return null===(e=null===(e=this._child)||void 0===e?void 0:e.player)||void 0===e?void 0:e.getSkippableState()},t.prototype.build=function(){return a.prototype.build.call(this),this._states.setStrict(!1),this},t.prototype.initAd=function(e,t,r,n,i,o){return this._states.setState("loading"),this._avaliableTypes=["linear","nonlinear"],a.prototype.initAd.call(this,e,t,r,n,i,o)},t.prototype._init=function(){this._spawn(),a.prototype._init.call(this)},t.prototype.startAd=function(){l.catcher.gen("module.client","info: module.client")({message:"AClientOwner.startAd()",name:""});var e=null===(e=this._child)||void 0===e?void 0:e.startAd();return e.inspect(function(e,t){return l.catcher.gen("module.client",(t?"warming":"info")+": module.client")({message:"AVpaidModule.startAd() "+(t?"err":"ok"),name:""})}),e},t.prototype.stopAd=function(){var e;return null===(e=this._child)||void 0===e?void 0:e.stopAd()},t.prototype.pauseAd=function(){var e;return null===(e=this._child)||void 0===e?void 0:e.pauseAd()},t.prototype.resumeAd=function(){var e;return null===(e=this._child)||void 0===e?void 0:e.resumeAd()},t.prototype.expandAd=function(){var e;null!==(e=this._child)&&void 0!==e&&e.expandAd()},t.prototype.collapseAd=function(){var e;null!==(e=this._child)&&void 0!==e&&e.collapseAd()},t.prototype.skipAd=function(){var e;null!==(e=this._child)&&void 0!==e&&e.skipAd()},t.prototype._spawn=function(){this._child||(this._child=(new e.Client).setParent(this).setSetupData(this._setupData).setSlotVars(this.slotVars).setStartupData(this._startupData).build(),this._subscribeEvents(),this._child.setSize(this._cache.size),this._child.setVolume(this._cache.volume)),this._child.setupAd(this._publisherId,this._targetId,this._typeId)},t.prototype._handleEvent=function(e){for(var t,r,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return this._disposing?l.spromise.rejected(l.base.errors.Disposing):(this._states.loading&&e===l.vpaid.events.AdError&&(r=i[0],s.AdError.Build(r).stringLine===s.errors.SeqEmpty().stringLine&&(this._avaliableTypes=l.filter(this._avaliableTypes,function(e){return e!==r.breakType}),0<this._avaliableTypes.length&&(t=l.spromise.resolved()))),!this._states.loaded&&!this._states.stopped||null!=(n=i[0])&&n.breakType&&n.breakType!==this._cache.breakType&&(t=l.spromise.resolved()),t||a.prototype._handleEvent.apply(this,[e].concat(i)))},t.prototype._handleEventEnd=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(t=e===s.events.spec.empty?this._handleEvent(l.vpaid.events.AdError,s.errors.ClientNoAd()):t)||a.prototype._handleEventEnd.apply(this,[e].concat(r))},t.prototype._dispose=function(e){return this._child&&(this._child.dispose(e),delete this._child),a.prototype._dispose.call(this,e)},e.AClientOwner=t}(l.module||(l.module={}))}(advark=advark||{}),function(t){var e;function n(e){switch(typeof e){case"undefined":return;case"string":if("true"===(e=e.trim().toLowerCase()))return!0;if("false"===e)return!1;if("1"===e)return 1;if("0"===e)return 0}for(var t=0,r=[!0,!1,0,1];t<r.length;t++)if(r[t]===e)return e}(e=(e=t.module||(t.module={})).converters||(e.converters={})).toWideAutoplay=n,e.toAutoplay=function(e){switch(e=n(e)){case!0:e=1;break;case!1:e=0}for(var t=0,r=[0,1];t<r.length;t++)if(r[t]===e)return e},e.toCategoryId=function(e){switch(typeof e){case"string":return parseInt(e)||null;case"number":return e}},e.toLabelId=function(e){switch(typeof e){case"string":return parseInt(e)||0;case"number":return e}return 0},e.toDuration=function(e){switch(typeof e){case"string":return parseInt(e)||null;case"number":return Math.round(e)}},e.setupData=function(e){return e.referer=t.loc.referer()||t.loc.origin(),e.origin=t.loc.origin(),e.domain=t.loc.domain(),e.toporigin=t.loc.toporigin(),e.topdomain=t.loc.topdomain(),e.origins=t.loc.origins(),e.domains=t.loc.domains(),e.videoPageUrl=e.videoPageUrl||e.toporigin,e.videoUrl=e.videoUrl||e.videoPageUrl||e.referer,e.pubreferer=e.pubreferer||e.videoPageUrl,e.labelId=e.labelId||0,e}}(advark=advark||{}),function(e){var t;e=e.module||(e.module={}),(t=e.converters||(e.converters={})).contentDataByVpaid=function(e){return t.setupData({autoplay:t.toAutoplay(e.autoplay),duration:t.toDuration(e.duration),labelId:t.toLabelId(e.label_id),categoryId:t.toCategoryId(e.category_id),publisherId:e.id,targetId:parseInt(e.target_id)||null,typeId:parseInt(e.type_id)||null,ipBasedData:e.ip_based_data,api:e.test?"test":"default",videoId:e.video_id,videoTitle:e.video_title,videoUrl:e.video_url,videoPageUrl:e.video_page_url,referer:e.referer,publisher:e.publisher})}}(advark=advark||{}),function(e){!function(t){var e,r;function n(){var e=r.call(this)||this;return e.setStartupData({intType:5}),e}e=t.intvpaid||(t.intvpaid={}),r=t.client.AClientOwner,__extends(n,r),n.prototype._useCreativeData=function(e){r.prototype._useCreativeData.call(this,e),this.setSetupData(t.converters.contentDataByVpaid(this._paramsData))},Object.defineProperty(n.prototype,"name",{get:function(){return"Vpaid"},enumerable:!1,configurable:!0}),e.Module=n}(e.module||(e.module={}))}(advark=advark||{});
// 7180c4c6
// 2021-12-03 15:55:55