!function(e){if(typeof exports==="object"&&typeof module!=="undefined")module.exports=e();else if(typeof define==="function"&&define.amd)define([],e);else{var t;typeof window!=="undefined"?(t=window):typeof global!=="undefined"?(t=global):typeof self!=="undefined"?(t=self):(t=this);t.sirdata=e()}}(function(){return(function(){function e(t,n,r){function o(i,a){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!a&&s)return s(i,!0);if(u)return u(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[i]={exports:{}};t[i][0].call(l.exports,function(e){var n=t[i][1][e];return o(n||e)},l,l.exports,e,t,n,r)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}return e})()({1:[function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new (n||(n=Promise))(function(n,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function a(e){try{s(r["throw"](e))}catch(e){u(e)}}function s(e){e.done?n(e.value):o(e.value).then(i,a)}s((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,o,u,i;return i={next:a(0),"throw":a(1),"return":a(2)}, typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}), i;function a(e){return function(t){return s([e,t])}}function s(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1, o&&(u=i[0]&2?o["return"]:i[0]?o["throw"]||((u=o["return"])&&u.call(o), 0):o.next)&&!(u=u.call(o,i[1])).done)return u;(o=0, u)&&(i=[i[0]&2,u.value]);switch(i[0]){case 0:;case 1:u=i;break;case 4:n.label++;return{value:i[1],done:!1};case 5:n.label++;o=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(u=n.trys, u=u.length>0&&u[u.length-1])&&(i[0]===6||i[0]===2)){n=0;continue};if(i[0]===3&&(!u||i[1]>u[0]&&i[1]<u[3])){n.label=i[1];break};if(i[0]===6&&n.label<u[1]){n.label=u[1];u=i;break};if(u&&n.label<u[2]){n.label=u[2];n.ops.push(i);break};u[2]&&n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e],o=0}finally{r=u=0};if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var u=e("./http"),i=e("./rest/contextual"),a=e("./models/page_categorization_response");n.apiUrl="https://contextual-content.sirdata.io/api/v1";var s=new Map,c=new Map;function l(e){s.get(e)===void 0&&s.set(e,new p(e));return s.get(e)}n.NewContextual=l;var p=(function(){function e(e){this._restContextual=null;this._currentPagePromise=null;this._http=new u.HttpClient(e)}e.prototype.setApiUrl=function(e){this._http.setApiUrl(e);return this};e.prototype.setTimeout=function(e){this._http.setTimeout(e);return this};Object.defineProperty(e.prototype,"rest",{get:function(){return this._restContextual!==null?this._restContextual:this._restContextual=new i.RestContextual(this._http)},enumerable:!0,configurable:!0});e.prototype.categorizeCurrentPage=function(e){e===void 0&&(e=!0);return r(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this._currentPagePromise===null&&(this._currentPagePromise=this.rest.categorizePageFromTextContent());return[4,this._currentPagePromise];case 1:return[2,n.sent()];case 2:t=n.sent();if(e){return[2,new a.PageCategorizationResponse]};throw t;case 3:return[2]}})})};e.SetCategorizeUrlCache=function(e,t){c.set(e,t)};e.GetCategorizeFromCache=function(e){if(c.has(e)){var t=new a.PageCategorizationResponse;t.load(c.get(e));return t}return null};e.minRelevancy=.5;e.minBrandSafetyRelevancy=.2;e.minModeledRelevancy=.3;return e}());n.Contextual=p},{"./http":2,"./models/page_categorization_response":6,"./rest/contextual":9}],2:[function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new (n||(n=Promise))(function(n,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function a(e){try{s(r["throw"](e))}catch(e){u(e)}}function s(e){e.done?n(e.value):o(e.value).then(i,a)}s((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,o,u,i;return i={next:a(0),"throw":a(1),"return":a(2)}, typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}), i;function a(e){return function(t){return s([e,t])}}function s(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1, o&&(u=i[0]&2?o["return"]:i[0]?o["throw"]||((u=o["return"])&&u.call(o), 0):o.next)&&!(u=u.call(o,i[1])).done)return u;(o=0, u)&&(i=[i[0]&2,u.value]);switch(i[0]){case 0:;case 1:u=i;break;case 4:n.label++;return{value:i[1],done:!1};case 5:n.label++;o=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(u=n.trys, u=u.length>0&&u[u.length-1])&&(i[0]===6||i[0]===2)){n=0;continue};if(i[0]===3&&(!u||i[1]>u[0]&&i[1]<u[3])){n.label=i[1];break};if(i[0]===6&&n.label<u[1]){n.label=u[1];u=i;break};if(u&&n.label<u[2]){n.label=u[2];n.ops.push(i);break};u[2]&&n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e],o=0}finally{r=u=0};if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(n,"__esModule",{value:!0});var i=e("./contextual"),a=u(e("axios")),s=e("./rest/error"),c=(function(){function e(e){this._token=e;this._api_url=i.apiUrl;this.httpClient=a.default.create({baseURL:this._api_url,maxRedirects:1})}e.prototype.setTimeout=function(e){this.httpClient.defaults.timeout=e};e.prototype.setHeaders=function(e){e=e==void 0?{}:e;e.headers=e.headers!==void 0?e.headers:{};e.headers['Content-Type']="application/json";this._token!==void 0&&(e.headers.authorization=this._token);return e};e.prototype.setApiUrl=function(e){this._api_url=e};e.prototype.get=function(e,t,n){return r(this,void 0,void 0,function(){var r,u;return o(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4,this.httpClient.get(t,this.setHeaders(n))];case 1:r=o.sent();e.load(r.data);return[2,e];case 2:u=o.sent();throw new s.ErrorResponse(u);case 3:return[2]}})})};e.prototype.post=function(e,t,n,u){return r(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4,this.httpClient.post(t,n.toJson(),this.setHeaders(u))];case 1:r=o.sent();e.load(r.data);return[2,e];case 2:i=o.sent();throw new s.ErrorResponse(i);case 3:return[2]}})})};return e}());n.HttpClient=c},{"./contextual":1,"./rest/error":10,"axios":13}],3:[function(e,t,n){"use strict";var r=this&&this.__extends||(function(){var e=function(t,n){e=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype, new r)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=e("./model"),u=(function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(o.Model));n.Category=u},{"./model":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=(function(){function e(e){e!==void 0&&this.load(e)}e.prototype.load=function(e){for(var t in e)this[t]=e[t]};e.prototype.toJson=function(){return JSON.stringify(this.getJsonParameters())};e.prototype.getJsonParameters=function(){return this};return e}());n.Model=r},{}],5:[function(e,t,n){"use strict";var r=this&&this.__extends||(function(){var e=function(t,n){e=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype, new r)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=e("./model"),u=(function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(o.Model));n.ModeledCategory=u},{"./model":4}],6:[function(e,t,n){"use strict";var r=this&&this.__extends||(function(){var e=function(t,n){e=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype, new r)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=e("./virtual_keyword"),u=e("./model"),i=e("./category"),a=e("../contextual"),s=e("./modeled_category"),c=(function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;t._brand_safety_categories=null;t._iab_categories=null;t._custom_categories=null;t._modeled_categories=null;t._virtual_keywords=null;return t}Object.defineProperty(t.prototype,"brand_safety_categories",{get:function(){return this._brand_safety_categories?this._brand_safety_categories:[]},set:function(e){if(!e){return}var t=[];for(var n in e)t.push(new i.Category(e[n]));this._brand_safety_categories=t},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"iab_categories",{get:function(){return this._iab_categories?this._iab_categories:[]},set:function(e){if(!e){return}var t=[];for(var n in e)t.push(new i.Category(e[n]));this._iab_categories=t},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"custom_categories",{get:function(){return this._custom_categories?this._custom_categories:[]},set:function(e){if(!e){return}var t=[];for(var n in e)t.push(new i.Category(e[n]));this._custom_categories=t},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"modeled_categories",{get:function(){return this._modeled_categories?this._modeled_categories:[]},set:function(e){if(!e){return}var t=[];for(var n in e)t.push(new s.ModeledCategory(e[n]));this._modeled_categories=t},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"virtual_keywords",{get:function(){return this._virtual_keywords?this._virtual_keywords:[]},set:function(e){if(!e){return}var t=[];for(var n in e)t.push(new o.VirtualKeyword(e[n]));this._virtual_keywords=t},enumerable:!0,configurable:!0});t.prototype.getIABCategoryIds=function(){var e=[];if(this.iab_categories==null){return[]}for(var t in this.iab_categories)this.iab_categories[t].relevancy>=a.Contextual.minRelevancy&&e.push(this.iab_categories[t].unique_id);return e};t.prototype.getCustomCategoryIds=function(){var e=[];if(this.custom_categories==null){return[]}for(var t in this.custom_categories)this.custom_categories[t].relevancy>=a.Contextual.minRelevancy&&e.push(this.custom_categories[t].unique_id);return e};t.prototype.getBrandSafetyCategoryIds=function(){var e=[];if(this.brand_safety_categories==null){return[]}for(var t in this.brand_safety_categories)this.brand_safety_categories[t].relevancy>=a.Contextual.minBrandSafetyRelevancy&&e.push(this.brand_safety_categories[t].unique_id);return e};t.prototype.getCategoryIds=function(){var e=[];if(this.iab_categories){for(var t in this.iab_categories)this.iab_categories[t].relevancy>=a.Contextual.minRelevancy&&e.push(String(this.iab_categories[t].unique_id))}if(this.custom_categories){for(t in this.custom_categories)this.custom_categories[t].relevancy>=a.Contextual.minRelevancy&&e.push("sd_"+String(this.custom_categories[t].unique_id))}if(this.brand_safety_categories){for(t in this.brand_safety_categories)this.brand_safety_categories[t].relevancy>=a.Contextual.minBrandSafetyRelevancy&&e.push("bs_"+String(this.brand_safety_categories[t].unique_id))}if(this.modeled_categories){for(t in this.modeled_categories)this.modeled_categories[t].relevancy>=a.Contextual.minModeledRelevancy&&e.push("mc_"+String(this.modeled_categories[t].unique_id))}return e};t.prototype.getKeywords=function(){var e=[];if(this.virtual_keywords==null){return[]}for(var t in this.virtual_keywords)this.virtual_keywords[t].relevancy>=a.Contextual.minRelevancy&&e.push(this.virtual_keywords[t].name);return e};return t}(u.Model));n.PageCategorizationResponse=c},{"../contextual":1,"./category":3,"./model":4,"./modeled_category":5,"./virtual_keyword":8}],7:[function(e,t,n){"use strict";var r=this&&this.__extends||(function(){var e=function(t,n){e=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype, new r)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=e("./model"),u=(function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.setContent=function(e){this.content=e;return this};return t}(o.Model));n.PageContent=u},{"./model":4}],8:[function(e,t,n){"use strict";var r=this&&this.__extends||(function(){var e=function(t,n){e=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype, new r)}})();Object.defineProperty(n,"__esModule",{value:!0});var o=e("./model"),u=(function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(o.Model));n.VirtualKeyword=u},{"./model":4}],9:[function(e,t,n){"use strict";var r=this&&this.__extends||(function(){var e=function(t,n){e=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype, new r)}})(),o=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new (n||(n=Promise))(function(n,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function a(e){try{s(r["throw"](e))}catch(e){u(e)}}function s(e){e.done?n(e.value):o(e.value).then(i,a)}s((r=r.apply(e,t||[])).next())})},u=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,o,u,i;return i={next:a(0),"throw":a(1),"return":a(2)}, typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}), i;function a(e){return function(t){return s([e,t])}}function s(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1, o&&(u=i[0]&2?o["return"]:i[0]?o["throw"]||((u=o["return"])&&u.call(o), 0):o.next)&&!(u=u.call(o,i[1])).done)return u;(o=0, u)&&(i=[i[0]&2,u.value]);switch(i[0]){case 0:;case 1:u=i;break;case 4:n.label++;return{value:i[1],done:!1};case 5:n.label++;o=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(u=n.trys, u=u.length>0&&u[u.length-1])&&(i[0]===6||i[0]===2)){n=0;continue};if(i[0]===3&&(!u||i[1]>u[0]&&i[1]<u[3])){n.label=i[1];break};if(i[0]===6&&n.label<u[1]){n.label=u[1];u=i;break};if(u&&n.label<u[2]){n.label=u[2];n.ops.push(i);break};u[2]&&n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e],o=0}finally{r=u=0};if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var i=e("./rest"),a=e("../models/page_categorization_response"),s=e("../models/page_content"),c=e("../utils/page_sanetizer"),l=(function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.categorizePageFromHTMLContent=function(e,t){return o(this,void 0,void 0,function(){return u(this,function(n){return[2,this.categorizePageFromTextContent(c.PageSanetizer.getTextFromDocument(e?e:document.body),t)]})})};t.prototype.categorizePageFromTextContent=function(e,n){return o(this,void 0,void 0,function(){var r,o;return u(this,function(u){switch(u.label){case 0:n=!n&&document.location.href.length>10?document.location.href:n;e=e?e:c.PageSanetizer.getTextFromDocument();if(e.length<300){return[2,this.categorizePageByUrl()]};r=new s.PageContent;r.setContent(e);return[4,this.conf.post(new a.PageCategorizationResponse,t.contextualPath+(n?"?url="+n:""),r)];case 1:o=u.sent();if(!o){return[2,new a.PageCategorizationResponse]};return[2,o]}})})};t.prototype.categorizePageByUrl=function(e){return o(this,void 0,void 0,function(){return u(this,function(n){e=e?e:document.location.href;window.top!==window.self&&document.referrer&&(e=document.referrer);if(e==""){throw new DOMException("window.location.href is empty. At least an url is mandatory, contact support.")}return[2,this.conf.get(new a.PageCategorizationResponse,t.contextualPath+"?url="+e)]})})};t.contextualPath='/content';return t}(i.Rest));n.RestContextual=l},{"../models/page_categorization_response":6,"../models/page_content":7,"../utils/page_sanetizer":12,"./rest":11}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=(function(){function e(e){this.error=e}Object.defineProperty(e.prototype,"message",{get:function(){return this.error.response?this.error.response.data.message:''},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"exception",{get:function(){return this.error.response?this.error.response.data.exception:''},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"path",{get:function(){return this.error.response?this.error.response.data.path:''},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"status",{get:function(){return this.error.response&&this.error.response.data.status?this.error.response.data.status:0},enumerable:!0,configurable:!0});return e}());n.ErrorResponse=r},{}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=(function(){function e(e){this.conf=e}e.params=function(e,t){for(var n in t){var r='{'+n+'}';e=e.replace(r,t[n])}return e};e.encodeQueryData=function(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+'='+encodeURIComponent(e[n]));return t.join('&')};return e}());n.Rest=r},{}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=300,o=["aside","iframe","footer","nav","form","script","input","ul",".GoogleActiveViewInnerContainer",".GoogleActiveViewElement",".sidebar","div[class=\"rte\"]","[class*='footer'i]","noscript"],u=(function(){function e(){}e.getTextFromDocument=function(e){if(!e&&window.top!==window.self){return""}var t=e?e.cloneNode(!0):(window.parent!==void 0&&window.parent.document&&window.parent.document.body&&window.parent.document.body.innerText.length>r?window.parent:window).document.body.cloneNode(!0),n=t.innerText;if(n.length<r){return n}for(var u in o){var i=t.querySelectorAll(o[u]);for(var a=0;a<i.length;a++)i.item(a).remove()}if(t.innerText.length<r){return t.innerText}var s=t.getElementsByTagName("article");if(s.length>0&&s[0].innerText.length>r&&s[0].getElementsByTagName('h1').length>0){return s[0].innerText}var c=t.getElementsByTagName('h1');if(c.length>0){var l=t.getElementsByTagName('p').length,p=c[0].parentElement;while(p.parentElement&&p.tagName.toLowerCase()!="body"){p=p.parentElement;if(p.tagName.toLowerCase()=="section"){if(p.innerText.length>r){return p.innerText}}}p=c[0].parentElement;var f=t.getElementsByTagName("p").length;while(p.parentElement&&p.tagName!="BODY"){p=p.parentElement;if(p.innerText.length>r&&(p.innerText.length>=l/2||p.getElementsByTagName("p").length>=f/3)){return p.innerText}}}return t.innerText.length<r?n:t.innerText};return e}());n.PageSanetizer=u},{}],13:[function(e,t,n){t.exports=e('./lib/axios')},{"./lib/axios":15}],14:[function(e,t,n){"use strict";var r=e('./../utils'),o=e('./../core/settle'),u=e('./../helpers/buildURL'),i=e('./../helpers/parseHeaders'),a=e('./../helpers/isURLSameOrigin'),s=e('../core/createError');t.exports=function(t){return new Promise(function(n,c){var l=t.data,p=t.headers;r.isFormData(l)&&delete p['Content-Type'];var f=new XMLHttpRequest;if(t.auth){var d=t.auth.username||'',g=t.auth.password||'';p.Authorization='Basic '+btoa(d+':'+g)}f.open(t.method.toUpperCase(),u(t.url,t.params,t.paramsSerializer),!0);f.timeout=t.timeout;f.onreadystatechange=function(){if(!f||f.readyState!==4){return}if(f.status===0&&!(f.responseURL&&f.responseURL.indexOf('file:')===0)){return}var e='getAllResponseHeaders' in f?i(f.getAllResponseHeaders()):null,r=!t.responseType||t.responseType==='text'?f.responseText:f.response,u={data:r,status:f.status,statusText:f.statusText,headers:e,config:t,request:f};o(n,c,u);f=null};f.onabort=function(){if(!f){return}c(s('Request aborted',t,'ECONNABORTED',f));f=null};f.onerror=function(){c(s('Network Error',t,null,f));f=null};f.ontimeout=function(){c(s('timeout of '+t.timeout+'ms exceeded',t,'ECONNABORTED',f));f=null};if(r.isStandardBrowserEnv()){var y=e('./../helpers/cookies'),_=(t.withCredentials||a(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;_&&(p[t.xsrfHeaderName]=_)}'setRequestHeader' in f&&r.forEach(p,function(e,t){typeof l==='undefined'&&t.toLowerCase()==='content-type'?delete p[t]:f.setRequestHeader(t,e)});t.withCredentials&&(f.withCredentials=!0);if(t.responseType){try{f.responseType=t.responseType}catch(e){if(t.responseType!=='json'){throw e}}}typeof t.onDownloadProgress==='function'&&f.addEventListener('progress',t.onDownloadProgress);typeof t.onUploadProgress==='function'&&f.upload&&f.upload.addEventListener('progress',t.onUploadProgress);t.cancelToken&&t.cancelToken.promise.then(function(e){if(!f){return}f.abort();c(e);f=null});l===void 0&&(l=null);f.send(l)})}},{"../core/createError":21,"./../core/settle":25,"./../helpers/buildURL":29,"./../helpers/cookies":31,"./../helpers/isURLSameOrigin":33,"./../helpers/parseHeaders":35,"./../utils":37}],15:[function(e,t,n){"use strict";var r=e('./utils'),o=e('./helpers/bind'),u=e('./core/Axios'),i=e('./core/mergeConfig'),a=e('./defaults');function s(e){var t=new u(e),n=o(u.prototype.request,t);r.extend(n,u.prototype,t);r.extend(n,t);return n}var c=s(a);c.Axios=u;c.create=function(e){return s(i(c.defaults,e))};c.Cancel=e('./cancel/Cancel');c.CancelToken=e('./cancel/CancelToken');c.isCancel=e('./cancel/isCancel');c.all=function(e){return Promise.all(e)};c.spread=e('./helpers/spread');t.exports=c;t.exports.default=c},{"./cancel/Cancel":16,"./cancel/CancelToken":17,"./cancel/isCancel":18,"./core/Axios":19,"./core/mergeConfig":24,"./defaults":27,"./helpers/bind":28,"./helpers/spread":36,"./utils":37}],16:[function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return'Cancel'+(this.message?': '+this.message:'')};r.prototype.__CANCEL__=!0;t.exports=r},{}],17:[function(e,t,n){"use strict";var r=e('./Cancel');function o(e){if(typeof e!=='function'){throw new TypeError('executor must be a function.')}var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){if(n.reason){return}n.reason=new r(e);t(n.reason)})}o.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};o.source=function(){var e,t=new o(function(t){e=t});return{token:t,cancel:e}};t.exports=o},{"./Cancel":16}],18:[function(e,t,n){"use strict";t.exports=function(e){return!!(e&&e.__CANCEL__)}},{}],19:[function(e,t,n){"use strict";var r=e('./../utils'),o=e('../helpers/buildURL'),u=e('./InterceptorManager'),i=e('./dispatchRequest'),a=e('./mergeConfig');function s(e){this.defaults=e;this.interceptors={request:new u,response:new u}}s.prototype.request=function(e){typeof e==='string'?(e=arguments[1]||{},e.url=arguments[0]):(e=e||{});e=a(this.defaults,e);e.method=e.method?e.method.toLowerCase():'get';var t=[i,void 0],n=Promise.resolve(e);this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)});this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});while(t.length)n=n.then(t.shift(),t.shift());return n};s.prototype.getUri=function(e){e=a(this.defaults,e);return o(e.url,e.params,e.paramsSerializer).replace(/^\?/,'')};r.forEach(['delete','get','head','options'],function(e){s.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}});r.forEach(['post','put','patch'],function(e){s.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}});t.exports=s},{"../helpers/buildURL":29,"./../utils":37,"./InterceptorManager":20,"./dispatchRequest":22,"./mergeConfig":24}],20:[function(e,t,n){"use strict";var r=e('./../utils');function o(){this.handlers=[]}o.prototype.use=function(e,t){this.handlers.push({fulfilled:e,rejected:t});return this.handlers.length-1};o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};o.prototype.forEach=function(e){r.forEach(this.handlers,function(t){t!==null&&e(t)})};t.exports=o},{"./../utils":37}],21:[function(e,t,n){"use strict";var r=e('./enhanceError');t.exports=function(e,t,n,o,u){var i=new Error(e);return r(i,t,n,o,u)}},{"./enhanceError":23}],22:[function(e,t,n){"use strict";var r=e('./../utils'),o=e('./transformData'),u=e('../cancel/isCancel'),i=e('../defaults'),a=e('./../helpers/isAbsoluteURL'),s=e('./../helpers/combineURLs');function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}t.exports=function(e){c(e);e.baseURL&&!a(e.url)&&(e.url=s(e.baseURL,e.url));e.headers=e.headers||{};e.data=o(e.data,e.headers,e.transformRequest);e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{});r.forEach(['delete','get','head','post','put','patch','common'],function(t){delete e.headers[t]});var t=e.adapter||i.adapter;return t(e).then(function(t){c(e);t.data=o(t.data,t.headers,e.transformResponse);return t},function(t){u(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse)));return Promise.reject(t)})}},{"../cancel/isCancel":18,"../defaults":27,"./../helpers/combineURLs":30,"./../helpers/isAbsoluteURL":32,"./../utils":37,"./transformData":26}],23:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,o){e.config=t;n&&(e.code=n);e.request=r;e.response=o;e.isAxiosError=!0;e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}};return e}},{}],24:[function(e,t,n){"use strict";var r=e('../utils');t.exports=function(e,t){t=t||{};var n={};r.forEach(['url','method','params','data'],function(e){typeof t[e]!=='undefined'&&(n[e]=t[e])});r.forEach(['headers','auth','proxy'],function(o){r.isObject(t[o])?(n[o]=r.deepMerge(e[o],t[o])):typeof t[o]!=='undefined'?(n[o]=t[o]):r.isObject(e[o])?(n[o]=r.deepMerge(e[o])):typeof e[o]!=='undefined'&&(n[o]=e[o])});r.forEach(['baseURL','transformRequest','transformResponse','paramsSerializer','timeout','withCredentials','adapter','responseType','xsrfCookieName','xsrfHeaderName','onUploadProgress','onDownloadProgress','maxContentLength','validateStatus','maxRedirects','httpAgent','httpsAgent','cancelToken','socketPath'],function(r){typeof t[r]!=='undefined'?(n[r]=t[r]):typeof e[r]!=='undefined'&&(n[r]=e[r])});return n}},{"../utils":37}],25:[function(e,t,n){"use strict";var r=e('./createError');t.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r('Request failed with status code '+n.status,n.config,null,n.request,n))}},{"./createError":21}],26:[function(e,t,n){"use strict";var r=e('./../utils');t.exports=function(e,t,n){r.forEach(n,function(n){e=n(e,t)});return e}},{"./../utils":37}],27:[function(e,t,n){(function(n){"use strict";var r=e('./utils'),o=e('./helpers/normalizeHeaderName'),u={'Content-Type':'application/x-www-form-urlencoded'};function i(e,t){!r.isUndefined(e)&&r.isUndefined(e['Content-Type'])&&(e['Content-Type']=t)}function a(){var t;typeof n!=='undefined'&&Object.prototype.toString.call(n)==='[object process]'?(t=e('./adapters/http')):typeof XMLHttpRequest!=='undefined'&&(t=e('./adapters/xhr'));return t}var s={adapter:a(),transformRequest:[function(e,t){o(t,'Accept');o(t,'Content-Type');if(r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)){return e}if(r.isArrayBufferView(e)){return e.buffer}if(r.isURLSearchParams(e)){i(t,'application/x-www-form-urlencoded;charset=utf-8');return e.toString()}if(r.isObject(e)){i(t,'application/json;charset=utf-8');return JSON.stringify(e)}return e}],transformResponse:[function(e){if(typeof e==='string'){try{e=JSON.parse(e)}catch(e){}}return e}],timeout:0,xsrfCookieName:'XSRF-TOKEN',xsrfHeaderName:'X-XSRF-TOKEN',maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{'Accept':'application/json, text/plain, */*'}};r.forEach(['delete','get','head'],function(e){s.headers[e]={}});r.forEach(['post','put','patch'],function(e){s.headers[e]=r.merge(u)});t.exports=s}).call(this,e('_process'))},{"./adapters/http":14,"./adapters/xhr":14,"./helpers/normalizeHeaderName":34,"./utils":37,"_process":39}],28:[function(e,t,n){"use strict";t.exports=function(e,t){return function(){var n=new Array(arguments.length);for(var r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},{}],29:[function(e,t,n){"use strict";var r=e('./../utils');function o(e){return encodeURIComponent(e).replace(/%40/gi,'@').replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',').replace(/%20/g,'+').replace(/%5B/gi,'[').replace(/%5D/gi,']')}t.exports=function(e,t,n){if(!t){return e}var u;if(n)u=n(t);else if(r.isURLSearchParams(t))u=t.toString();else{var i=[];r.forEach(t,function(e,t){if(e===null||typeof e==='undefined'){return}r.isArray(e)?(t+='[]'):(e=[e]);r.forEach(e,function(e){r.isDate(e)?(e=e.toISOString()):r.isObject(e)&&(e=JSON.stringify(e));i.push(o(t)+'='+o(e))})});u=i.join('&')}if(u){var a=e.indexOf('#');a!==-1&&(e=e.slice(0,a));e+=(e.indexOf('?')===-1?'?':'&')+u}return e}},{"./../utils":37}],30:[function(e,t,n){"use strict";t.exports=function(e,t){return t?e.replace(/\/+$/,'')+'/'+t.replace(/^\/+/,''):e}},{}],31:[function(e,t,n){"use strict";var r=e('./../utils');t.exports=r.isStandardBrowserEnv()?(function(){return{write:function(e,t,n,o,u,i){var a=[];a.push(e+'='+encodeURIComponent(t));r.isNumber(n)&&a.push('expires='+new Date(n).toGMTString());r.isString(o)&&a.push('path='+o);r.isString(u)&&a.push('domain='+u);i===!0&&a.push('secure');document.cookie=a.join('; ')},read:function(e){var t=document.cookie.match(new RegExp('(^|;\\s*)('+e+')=([^;]*)'));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,'',Date.now()-8.64e7)}}})():(function(){return{write:function(){},read:function(){return null},remove:function(){}}})()},{"./../utils":37}],32:[function(e,t,n){"use strict";t.exports=function(e){return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},{}],33:[function(e,t,n){"use strict";var r=e('./../utils');t.exports=r.isStandardBrowserEnv()?(function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement('a'),n;function o(n){var r=n;e&&(t.setAttribute('href',r),r=t.href);t.setAttribute('href',r);return{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,''):'',host:t.host,search:t.search?t.search.replace(/^\?/,''):'',hash:t.hash?t.hash.replace(/^#/,''):'',hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==='/'?t.pathname:'/'+t.pathname}}n=o(window.location.href);return function(e){var t=(r.isString(e))?o(e):e;return t.protocol===n.protocol&&t.host===n.host}})():(function(){return function(){return!0}})()},{"./../utils":37}],34:[function(e,t,n){"use strict";var r=e('../utils');t.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},{"../utils":37}],35:[function(e,t,n){"use strict";var r=e('./../utils'),o=['age','authorization','content-length','content-type','etag','expires','from','host','if-modified-since','if-unmodified-since','last-modified','location','max-forwards','proxy-authorization','referer','retry-after','user-agent'];t.exports=function(e){var t={},n,u,i;if(!e){return t}r.forEach(e.split('\n'),function(e){i=e.indexOf(':');n=r.trim(e.substr(0,i)).toLowerCase();u=r.trim(e.substr(i+1));if(n){if(t[n]&&o.indexOf(n)>=0){return}n==='set-cookie'?(t[n]=(t[n]?t[n]:[]).concat([u])):(t[n]=t[n]?t[n]+', '+u:u)}});return t}},{"./../utils":37}],36:[function(e,t,n){"use strict";t.exports=function(e){return function(t){return e.apply(null,t)}}},{}],37:[function(e,t,n){"use strict";var r=e('./helpers/bind'),o=e('is-buffer'),u=Object.prototype.toString;function i(e){return u.call(e)==='[object Array]'}function a(e){return u.call(e)==='[object ArrayBuffer]'}function s(e){return typeof FormData!=='undefined'&&e instanceof FormData}function c(e){var t;typeof ArrayBuffer!=='undefined'&&ArrayBuffer.isView?(t=ArrayBuffer.isView(e)):(t=e&&e.buffer&&e.buffer instanceof ArrayBuffer);return t}function l(e){return typeof e==='string'}function p(e){return typeof e==='number'}function f(e){return typeof e==='undefined'}function d(e){return e!==null&&typeof e==='object'}function g(e){return u.call(e)==='[object Date]'}function y(e){return u.call(e)==='[object File]'}function _(e){return u.call(e)==='[object Blob]'}function h(e){return u.call(e)==='[object Function]'}function m(e){return d(e)&&h(e.pipe)}function w(e){return typeof URLSearchParams!=='undefined'&&e instanceof URLSearchParams}function x(e){return e.replace(/^\s*/,'').replace(/\s*$/,'')}function b(){if(typeof navigator!=='undefined'&&(navigator.product==='ReactNative'||navigator.product==='NativeScript'||navigator.product==='NS')){return!1}return typeof window!=='undefined'&&typeof document!=='undefined'}function C(e,t){if(e===null||typeof e==='undefined'){return}typeof e!=='object'&&(e=[e]);if(i(e)){for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e)}else{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}}function P(){var e={};function t(t,n){typeof e[n]==='object'&&typeof t==='object'?(e[n]=P(e[n],t)):(e[n]=t)}for(var n=0,r=arguments.length;n<r;n++)C(arguments[n],t);return e}function T(){var e={};function t(t,n){typeof e[n]==='object'&&typeof t==='object'?(e[n]=T(e[n],t)):typeof t==='object'?(e[n]=T({},t)):(e[n]=t)}for(var n=0,r=arguments.length;n<r;n++)C(arguments[n],t);return e}function v(e,t,n){C(t,function(t,o){n&&typeof t==='function'?(e[o]=r(t,n)):(e[o]=t)});return e}t.exports={isArray:i,isArrayBuffer:a,isBuffer:o,isFormData:s,isArrayBufferView:c,isString:l,isNumber:p,isObject:d,isUndefined:f,isDate:g,isFile:y,isBlob:_,isFunction:h,isStream:m,isURLSearchParams:w,isStandardBrowserEnv:b,forEach:C,merge:P,deepMerge:T,extend:v,trim:x}},{"./helpers/bind":28,"is-buffer":38}],38:[function(e,t,n){t.exports=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==='function'&&e.constructor.isBuffer(e)}},{}],39:[function(e,t,n){var r=t.exports={},o,u;function i(){throw new Error('setTimeout has not been defined')}function a(){throw new Error('clearTimeout has not been defined')}!function(){try{typeof setTimeout==='function'?(o=setTimeout):(o=i)}catch(e){o=i};try{typeof clearTimeout==='function'?(u=clearTimeout):(u=a)}catch(e){u=a}}();function s(e){if(o===setTimeout){return setTimeout(e,0)}if((o===i||!o)&&setTimeout){o=setTimeout;return setTimeout(e,0)}try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}function c(e){if(u===clearTimeout){return clearTimeout(e)}if((u===a||!u)&&clearTimeout){u=clearTimeout;return clearTimeout(e)}try{return u(e)}catch(t){try{return u.call(null,e)}catch(t){return u.call(this,e)}}}var l=[],p=!1,f,d=-1;function g(){if(!p||!f){return}p=!1;f.length?(l=f.concat(l)):(d=-1);l.length&&y()}function y(){if(p){return}var e=s(g);p=!0;var t=l.length;while(t){f=l;l=[];while(++d<t)f&&f[d].run();d=-1;t=l.length}f=null;p=!1;c(e)}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n]}l.push(new _(e,t));l.length===1&&!p&&s(y)};function _(e,t){this.fun=e;this.array=t}_.prototype.run=function(){this.fun.apply(null,this.array)};r.title='browser';r.browser=!0;r.env={};r.argv=[];r.version='';r.versions={};function h(){}r.on=h;r.addListener=h;r.once=h;r.off=h;r.removeListener=h;r.removeAllListeners=h;r.emit=h;r.prependListener=h;r.prependOnceListener=h;r.listeners=function(e){return[]};r.binding=function(e){throw new Error('process.binding is not supported')};r.cwd=function(){return'/'};r.chdir=function(e){throw new Error('process.chdir is not supported')};r.umask=function(){return 0}},{}]},{},[1])(1)})
var sirdataContextualApi = sirdata.NewContextual(window.location.url);
sirdataContextualApi.setTimeout(2000);
sirdataContextualApi.categorizeCurrentPage().then((result)=> {}, (error)=>{})
