Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iabtcf/cmpapi

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iabtcf/cmpapi - npm Package Compare versions

Comparing version 1.0.0-beta.18 to 1.0.0-beta.19

3

lib/callback/DisabledCallback.js

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=DisabledCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=ErrorCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=FailCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=InAppTCDataCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=index.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=PingCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=RemoveListenerCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=TCDataCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=VendorListCallback.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
import { CustomCommands } from './CustomCommands';
import { TCModel } from '@iabtcf/core';
export declare type PageCallHandler = (command: string, version: number, callback: (response?: any, success?: any) => void, param?: any) => void;
export declare type PageCallHandler = (command: string, version: number, callback: (response?: any, success?: any) => void, ...param: any) => void;
/**

@@ -13,3 +13,3 @@ * Consent Management Platform API

private win;
private stubQueue;
private queuedCalls;
/**

@@ -27,5 +27,3 @@ * Constructor

private throwIfCmpApiIsDisabled;
private get tcfapi();
private set tcfapi(value);
private purgeStubQueue;
private purgeQueuedCalls;
/**

@@ -59,4 +57,11 @@ * On may choose to either set the TCModel directly (tcModel) or set an

disable(): void;
private wrapPageCallHandler;
/**
* Checks to see if the command exists in either the set of TCF Commands or
* if custom commands
*
* @param {string} command - command to check
* @return {boolean} - whether or not this command is known
*/
private isKnownCommand;
/**
* Handler for all page call commands

@@ -63,0 +68,0 @@ * @param {string} command

@@ -1,2 +0,1 @@

"use strict";var __read=this&&this.__read||function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var o,r,p=i.call(e),n=[];try{for(;(void 0===t||t-- >0)&&!(o=p.next()).done;)n.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}return n},__spread=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e};Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("./CmpApiModel"),CommandMap_1=require("./command/CommandMap"),DisabledCommand_1=require("./command/DisabledCommand"),CmpApi=function(){function e(e,t,i){this.API_FUNCTION_NAME="__tcfapi",this.win=window,this.throwIfInvalidInt(e,"cmpId",2),this.throwIfInvalidInt(t,"cmpVersion",0),CmpApiModel_1.CmpApiModel.cmpId=e,CmpApiModel_1.CmpApiModel.cmpVersion=t,i&&(this.customCommands=i);try{this.stubQueue=this.tcfapi()}catch(e){}finally{this.tcfapi=this.wrapPageCallHandler()}}return e.prototype.throwIfInvalidInt=function(e,t,i){if(!("number"==typeof e&&Number.isInteger(e)&&e>=i))throw new Error("Invalid "+t+": "+e)},e.prototype.throwIfCmpApiIsDisabled=function(){if(CmpApiModel_1.CmpApiModel.disabled)throw new Error("CmpApi Disabled")},Object.defineProperty(e.prototype,"tcfapi",{get:function(){return window[this.API_FUNCTION_NAME]},set:function(e){window[this.API_FUNCTION_NAME]=e},enumerable:!0,configurable:!0}),e.prototype.purgeStubQueue=function(){var e=this;this.stubQueue&&(this.stubQueue.forEach((function(t){e.wrapPageCallHandler().apply(void 0,__spread(t))})),delete this.stubQueue)},Object.defineProperty(e.prototype,"tcString",{set:function(e){this.throwIfCmpApiIsDisabled(),CmpApiModel_1.CmpApiModel.tcString=e,this.purgeStubQueue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tcModel",{set:function(e){this.throwIfCmpApiIsDisabled(),CmpApiModel_1.CmpApiModel.tcModel=e,this.purgeStubQueue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uiVisible",{set:function(e){this.throwIfCmpApiIsDisabled(),CmpApiModel_1.CmpApiModel.uiVisible=e},enumerable:!0,configurable:!0}),e.prototype.disable=function(){CmpApiModel_1.CmpApiModel.disabled=!0},e.prototype.wrapPageCallHandler=function(){var e=this;return function(t,i,o){for(var r=[],p=3;p<arguments.length;p++)r[p-3]=arguments[p];var n=e;n.pageCallHandler.apply(n,__spread([t,i,o],r))}},e.prototype.pageCallHandler=function(e,t,i){for(var o,r=[],p=3;p<arguments.length;p++)r[p-3]=arguments[p];if("string"==typeof e)if(2===t){if("function"!=typeof i)throw new Error("invalid callback function");CmpApiModel_1.CmpApiModel.disabled?new DisabledCommand_1.DisabledCommand(i):this.customCommands&&this.customCommands[e]?(o=this.customCommands)[e].apply(o,__spread([i],r)):CommandMap_1.CommandMap[e]?new CommandMap_1.CommandMap[e](i,r[0]):i('CmpApi does not support the "'+e+'" command',!1)}else i("unsupported version: "+t,!1);else i("invalid command: "+e,!1)},e}();exports.CmpApi=CmpApi;
//# sourceMappingURL=CmpApi.js.map
"use strict";var __read=this&&this.__read||function(e,o){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var t,n,p=i.call(e),r=[];try{for(;(void 0===o||o-- >0)&&!(t=p.next()).done;)r.push(t.value)}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}return r},__spread=this&&this.__spread||function(){for(var e=[],o=0;o<arguments.length;o++)e=e.concat(__read(arguments[o]));return e};Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("./CmpApiModel"),CommandMap_1=require("./command/CommandMap"),TCFCommands_1=require("./command/TCFCommands"),DisabledCommand_1=require("./command/DisabledCommand"),CmpApi=function(){function e(e,o,i){this.API_FUNCTION_NAME="__tcfapi",this.win=window,this.throwIfInvalidInt(e,"cmpId",2),this.throwIfInvalidInt(o,"cmpVersion",0),CmpApiModel_1.CmpApiModel.cmpId=e,CmpApiModel_1.CmpApiModel.cmpVersion=o,i&&(this.customCommands=i);try{this.queuedCalls=window[this.API_FUNCTION_NAME]()}catch(e){}finally{window[this.API_FUNCTION_NAME]=this.pageCallHandler.bind(this)}}return e.prototype.throwIfInvalidInt=function(e,o,i){if(!("number"==typeof e&&Number.isInteger(e)&&e>=i))throw new Error("Invalid "+o+": "+e)},e.prototype.throwIfCmpApiIsDisabled=function(){if(CmpApiModel_1.CmpApiModel.disabled)throw new Error("CmpApi Disabled")},e.prototype.purgeQueuedCalls=function(){if(this.queuedCalls){var e=this.pageCallHandler.bind(this);this.queuedCalls.forEach((function(o){var i=__read(o,4),t=i[0],n=i[1],p=i[2],r=i[3];void 0!==r?e.apply(void 0,__spread([t,n,p],r)):e(t,n,p)})),delete this.queuedCalls}},Object.defineProperty(e.prototype,"tcString",{set:function(e){this.throwIfCmpApiIsDisabled(),CmpApiModel_1.CmpApiModel.tcString=e,this.purgeQueuedCalls()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tcModel",{set:function(e){this.throwIfCmpApiIsDisabled(),CmpApiModel_1.CmpApiModel.tcModel=e,this.purgeQueuedCalls()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uiVisible",{set:function(e){this.throwIfCmpApiIsDisabled(),CmpApiModel_1.CmpApiModel.uiVisible=e},enumerable:!0,configurable:!0}),e.prototype.disable=function(){CmpApiModel_1.CmpApiModel.disabled=!0},e.prototype.isKnownCommand=function(e){return void 0!==this.customCommands&&void 0!==this.customCommands[e]||void 0!==CommandMap_1.CommandMap[e]},e.prototype.pageCallHandler=function(e,o,i){for(var t,n=[],p=3;p<arguments.length;p++)n[p-3]=arguments[p];if("string"!=typeof e)i("invalid command: "+e,!1);else if(2!=o)i("unsupported version: "+o,!1);else{if("function"!=typeof i)throw new Error("invalid callback function");if(CmpApiModel_1.CmpApiModel.disabled)new DisabledCommand_1.DisabledCommand(i);else if(this.isKnownCommand(e))if(e===TCFCommands_1.TCFCommands.PING)new CommandMap_1.CommandMap[e](i,n[0]);else if(void 0===CmpApiModel_1.CmpApiModel.tcModel)this.queuedCalls.push([e,o,i,n]);else if(this.customCommands&&this.customCommands[e])(t=this.customCommands)[e].apply(t,__spread([i],n));else{if(!CommandMap_1.CommandMap[e])throw new Error("unknown error");new CommandMap_1.CommandMap[e](i,n[0])}else i('CmpApi does not support the "'+e+'" command',!1)}},e}();exports.CmpApi=CmpApi;

@@ -12,2 +12,3 @@ import { CmpStatus, DisplayStatus, EventStatus } from './status';

static tcfPolicyVersion: number;
static eventStatus: EventStatus;
static cmpStatus: CmpStatus;

@@ -18,3 +19,2 @@ static displayStatus: DisplayStatus;

static gdprApplies: boolean;
static eventStatus: EventStatus;
static eventQueue: EventListenerQueue;

@@ -21,0 +21,0 @@ private static uiVisible_;

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var status_1=require("./status"),EventListenerQueue_1=require("./EventListenerQueue"),core_1=require("@iabtcf/core"),CmpApiModel=function(){function t(){}return Object.defineProperty(t,"disabled",{get:function(){return this.disabled_},set:function(t){t&&(this.cmpStatus=status_1.CmpStatus.ERROR),this.disabled_=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"uiVisible",{get:function(){return this.uiVisible_},set:function(t){t?(this.displayStatus=status_1.DisplayStatus.VISIBLE,this.eventStatus=status_1.EventStatus.CMP_UI_SHOWN):(this.displayStatus=status_1.DisplayStatus.DISABLED,this.eventStatus=status_1.EventStatus.TC_LOADED),this.uiVisible_=t},enumerable:!0,configurable:!0}),t.cacheTCString=function(t){this.tcString_=t},Object.defineProperty(t,"tcString",{get:function(){return this.tcString_},set:function(t){this.tcModel=core_1.TCString.decode(t),this.cacheTCString(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"tcModel",{get:function(){return this.tcModel_},set:function(t){if(null===t)this.gdprApplies=!1,this.displayStatus=status_1.DisplayStatus.DISABLED,this.tcModel_=null;else{if(!this.isTCModel(t))throw this.cmpStatus=status_1.CmpStatus.ERROR,new Error("Invalid value ("+t+") passed for tcModel");switch(this.gdprApplies=!0,this.displayStatus=status_1.DisplayStatus.HIDDEN,this.eventStatus){case void 0:this.eventStatus=status_1.EventStatus.TC_LOADED;break;case status_1.EventStatus.TC_LOADED:this.eventStatus=status_1.EventStatus.CMP_UI_SHOWN;break;case status_1.EventStatus.CMP_UI_SHOWN:this.eventStatus=status_1.EventStatus.USER_ACTION_COMPLETE}this.tcModel_=t.clone(),this.tcString_=""}this.cmpStatus=status_1.CmpStatus.LOADED,this.eventQueue.exec()},enumerable:!0,configurable:!0}),t.isPurposeRestrictionVector=function(t){var e=t;return"function"==typeof e.add&&"function"==typeof e.getVendors&&"function"==typeof e.getRestrictionType&&"function"==typeof e.vendorHasRestriction&&"function"==typeof e.getMaxVendorId&&"function"==typeof e.getRestrictions&&"function"==typeof e.getPurposes&&"function"==typeof e.isEmpty&&"function"==typeof e.isEncodable},t.isVector=function(t){var e=t;return"number"==typeof e.maxId&&"function"==typeof e.has&&"function"==typeof e.set&&"function"==typeof e.empty&&"function"==typeof e.forEach&&"number"==typeof e.size&&"function"==typeof e.setAll},t.isTCModel=function(t){var e=t;return"boolean"==typeof e.isServiceSpecific&&"boolean"==typeof e.useNonStandardStacks&&"boolean"==typeof e.purposeOneTreatment&&"string"==typeof e.publisherCountryCode&&this.isVector(e.vendorsAllowed)&&this.isVector(e.vendorsDisclosed)&&this.isVector(e.purposeConsents)&&this.isVector(e.purposeLegitimateInterests)&&this.isVector(e.vendorConsents)&&this.isVector(e.vendorLegitimateInterests)&&this.isVector(e.specialFeatureOptIns)&&this.isVector(e.publisherConsents)&&this.isVector(e.publisherLegitimateInterests)&&this.isVector(e.publisherCustomConsents)&&this.isVector(e.publisherCustomLegitimateInterests)&&this.isPurposeRestrictionVector(e.publisherRestrictions)},t.reset=function(){delete this.tcModel_,delete this.tcString_,delete this.cmpId,delete this.cmpVersion,delete this.gdprApplies,delete this.eventStatus,this.uiVisible_=!1,this.disabled_=!1,this.cmpStatus=status_1.CmpStatus.LOADING,this.displayStatus=status_1.DisplayStatus.HIDDEN,this.eventQueue.clear()},t.apiVersion="2",t.tcfPolicyVersion=2,t.cmpStatus=status_1.CmpStatus.LOADING,t.displayStatus=status_1.DisplayStatus.HIDDEN,t.eventQueue=new EventListenerQueue_1.EventListenerQueue,t.uiVisible_=!1,t.disabled_=!1,t}();exports.CmpApiModel=CmpApiModel;
//# sourceMappingURL=CmpApiModel.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var status_1=require("./status"),EventListenerQueue_1=require("./EventListenerQueue"),core_1=require("@iabtcf/core"),CmpApiModel=function(){function t(){}return Object.defineProperty(t,"disabled",{get:function(){return this.disabled_},set:function(t){t&&(this.cmpStatus=status_1.CmpStatus.ERROR),this.disabled_=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"uiVisible",{get:function(){return this.uiVisible_},set:function(t){this.displayStatus=t?status_1.DisplayStatus.VISIBLE:status_1.DisplayStatus.DISABLED,this.uiVisible_=t},enumerable:!0,configurable:!0}),t.cacheTCString=function(t){this.tcString_=t},Object.defineProperty(t,"tcString",{get:function(){return this.tcString_},set:function(t){this.tcModel=core_1.TCString.decode(t),this.cacheTCString(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"tcModel",{get:function(){return this.tcModel_},set:function(t){if(null===t)this.gdprApplies=!1,this.displayStatus=status_1.DisplayStatus.DISABLED,this.tcModel_=null;else{if(!this.isTCModel(t))throw this.cmpStatus=status_1.CmpStatus.ERROR,new Error("Invalid value ("+t+") passed for tcModel");switch(this.gdprApplies=!0,this.displayStatus=status_1.DisplayStatus.HIDDEN,this.eventStatus){case void 0:this.eventStatus=status_1.EventStatus.TC_LOADED;break;case status_1.EventStatus.TC_LOADED:this.eventStatus=status_1.EventStatus.CMP_UI_SHOWN;break;case status_1.EventStatus.CMP_UI_SHOWN:this.eventStatus=status_1.EventStatus.USER_ACTION_COMPLETE}this.tcModel_=t.clone(),this.tcString_=""}this.cmpStatus=status_1.CmpStatus.LOADED,this.eventQueue.exec()},enumerable:!0,configurable:!0}),t.isPurposeRestrictionVector=function(t){var e=t;return"function"==typeof e.add&&"function"==typeof e.getVendors&&"function"==typeof e.getRestrictionType&&"function"==typeof e.vendorHasRestriction&&"function"==typeof e.getMaxVendorId&&"function"==typeof e.getRestrictions&&"function"==typeof e.getPurposes&&"function"==typeof e.isEmpty&&"function"==typeof e.isEncodable},t.isVector=function(t){var e=t;return"number"==typeof e.maxId&&"function"==typeof e.has&&"function"==typeof e.set&&"function"==typeof e.empty&&"function"==typeof e.forEach&&"number"==typeof e.size&&"function"==typeof e.setAll},t.isTCModel=function(t){var e=t;return"boolean"==typeof e.isServiceSpecific&&"boolean"==typeof e.useNonStandardStacks&&"boolean"==typeof e.purposeOneTreatment&&"string"==typeof e.publisherCountryCode&&this.isVector(e.vendorsAllowed)&&this.isVector(e.vendorsDisclosed)&&this.isVector(e.purposeConsents)&&this.isVector(e.purposeLegitimateInterests)&&this.isVector(e.vendorConsents)&&this.isVector(e.vendorLegitimateInterests)&&this.isVector(e.specialFeatureOptIns)&&this.isVector(e.publisherConsents)&&this.isVector(e.publisherLegitimateInterests)&&this.isVector(e.publisherCustomConsents)&&this.isVector(e.publisherCustomLegitimateInterests)&&this.isPurposeRestrictionVector(e.publisherRestrictions)},t.reset=function(){delete this.tcModel_,delete this.tcString_,delete this.cmpId,delete this.cmpVersion,delete this.gdprApplies,delete this.eventStatus,this.uiVisible_=!1,this.disabled_=!1,this.cmpStatus=status_1.CmpStatus.LOADING,this.displayStatus=status_1.DisplayStatus.HIDDEN,this.eventQueue.clear()},t.apiVersion="2",t.tcfPolicyVersion=2,t.cmpStatus=status_1.CmpStatus.LOADING,t.displayStatus=status_1.DisplayStatus.HIDDEN,t.eventQueue=new EventListenerQueue_1.EventListenerQueue,t.uiVisible_=!1,t.disabled_=!1,t}();exports.CmpApiModel=CmpApiModel;

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var GetTCDataCommand_1=require("./GetTCDataCommand"),CmpApiModel_1=require("../CmpApiModel"),AddEventListenerCommand=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.success=function(){var t=CmpApiModel_1.CmpApiModel.eventQueue.add(this.callback);void 0!==CmpApiModel_1.CmpApiModel.tcModel&&new GetTCDataCommand_1.GetTCDataCommand(this.callback,void 0,t)},e}(GetTCDataCommand_1.GetTCDataCommand);exports.AddEventListenerCommand=AddEventListenerCommand;
//# sourceMappingURL=AddEventListenerCommand.js.map
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var GetTCDataCommand_1=require("./GetTCDataCommand"),CmpApiModel_1=require("../CmpApiModel"),AddEventListenerCommand=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.success=function(){var t=CmpApiModel_1.CmpApiModel.eventQueue.add(this.callback);void 0!==CmpApiModel_1.CmpApiModel.tcModel&&new GetTCDataCommand_1.GetTCDataCommand(this.callback,void 0,t)},e}(GetTCDataCommand_1.GetTCDataCommand);exports.AddEventListenerCommand=AddEventListenerCommand;

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Command=function(){function t(t,i,s){this.callback=t,this.param=i,this.listenerId=s,this.isValid()?this.success():this.fail()}return t.prototype.isValid=function(){return!0},t.prototype.fail=function(){(0,this.callback)(null,!1)},t}();exports.Command=Command;
//# sourceMappingURL=Command.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Command=function(){function t(t,i,s){this.callback=t,this.param=i,this.listenerId=s,this.isValid()?this.success():this.fail()}return t.prototype.isValid=function(){return!0},t.prototype.fail=function(){(0,this.callback)(null,!1)},t}();exports.Command=Command;

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var PingCommand_1=require("./PingCommand"),GetTCDataCommand_1=require("./GetTCDataCommand"),GetInAppTCDataCommand_1=require("./GetInAppTCDataCommand"),GetVendorListCommand_1=require("./GetVendorListCommand"),AddEventListenerCommand_1=require("./AddEventListenerCommand"),RemoveEventListenerCommand_1=require("./RemoveEventListenerCommand"),TCFCommands_1=require("./TCFCommands"),CommandMap=function(){function m(){}var n,e,C,a,d,o;return n=TCFCommands_1.TCFCommands.PING,e=TCFCommands_1.TCFCommands.GET_TC_DATA,C=TCFCommands_1.TCFCommands.GET_IN_APP_TC_DATA,a=TCFCommands_1.TCFCommands.GET_VENDOR_LIST,d=TCFCommands_1.TCFCommands.ADD_EVENT_LISTENER,o=TCFCommands_1.TCFCommands.REMOVE_EVENT_LISTENER,m[n]=PingCommand_1.PingCommand,m[e]=GetTCDataCommand_1.GetTCDataCommand,m[C]=GetInAppTCDataCommand_1.GetInAppTCDataCommand,m[a]=GetVendorListCommand_1.GetVendorListCommand,m[d]=AddEventListenerCommand_1.AddEventListenerCommand,m[o]=RemoveEventListenerCommand_1.RemoveEventListenerCommand,m}();exports.CommandMap=CommandMap;
//# sourceMappingURL=CommandMap.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var PingCommand_1=require("./PingCommand"),GetTCDataCommand_1=require("./GetTCDataCommand"),GetInAppTCDataCommand_1=require("./GetInAppTCDataCommand"),GetVendorListCommand_1=require("./GetVendorListCommand"),AddEventListenerCommand_1=require("./AddEventListenerCommand"),RemoveEventListenerCommand_1=require("./RemoveEventListenerCommand"),TCFCommands_1=require("./TCFCommands"),CommandMap=function(){function m(){}var n,e,C,a,d,o;return n=TCFCommands_1.TCFCommands.PING,e=TCFCommands_1.TCFCommands.GET_TC_DATA,C=TCFCommands_1.TCFCommands.GET_IN_APP_TC_DATA,a=TCFCommands_1.TCFCommands.GET_VENDOR_LIST,d=TCFCommands_1.TCFCommands.ADD_EVENT_LISTENER,o=TCFCommands_1.TCFCommands.REMOVE_EVENT_LISTENER,m[n]=PingCommand_1.PingCommand,m[e]=GetTCDataCommand_1.GetTCDataCommand,m[C]=GetInAppTCDataCommand_1.GetInAppTCDataCommand,m[a]=GetVendorListCommand_1.GetVendorListCommand,m[d]=AddEventListenerCommand_1.AddEventListenerCommand,m[o]=RemoveEventListenerCommand_1.RemoveEventListenerCommand,m}();exports.CommandMap=CommandMap;

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var e=function(t,n){return(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])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var response_1=require("../response"),Command_1=require("./Command"),DisabledCommand=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.success=function(){(0,this.callback)(new response_1.Disabled,!1)},t}(Command_1.Command);exports.DisabledCommand=DisabledCommand;
//# sourceMappingURL=DisabledCommand.js.map
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,n){return(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])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var response_1=require("../response"),Command_1=require("./Command"),DisabledCommand=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.success=function(){(0,this.callback)(new response_1.Disabled,!1)},t}(Command_1.Command);exports.DisabledCommand=DisabledCommand;

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var GetTCDataCommand_1=require("./GetTCDataCommand"),response_1=require("../response"),GetInAppTCDataCommand=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.success=function(){(0,this.callback)(new response_1.InAppTCData(this.param),!0)},e}(GetTCDataCommand_1.GetTCDataCommand);exports.GetInAppTCDataCommand=GetInAppTCDataCommand;
//# sourceMappingURL=GetInAppTCDataCommand.js.map
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var GetTCDataCommand_1=require("./GetTCDataCommand"),response_1=require("../response"),GetInAppTCDataCommand=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.success=function(){(0,this.callback)(new response_1.InAppTCData(this.param),!0)},e}(GetTCDataCommand_1.GetTCDataCommand);exports.GetInAppTCDataCommand=GetInAppTCDataCommand;

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Command_1=require("./Command"),core_1=require("@iabtcf/core"),response_1=require("../response"),GetTCDataCommand=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.sendData=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=CmpApiModel_1.CmpApiModel.tcModel,null===CmpApiModel_1.CmpApiModel.tcModel||e.gvl||CmpApiModel_1.CmpApiModel.tcString?[3,2]:(e.gvl=new core_1.GVL(e.vendorListVersion),[4,e.gvl.readyPromise]);case 1:t.sent(),t.label=2;case 2:return(0,this.callback)(new response_1.TCData(this.param,this.listenerId),!0),[2]}}))}))},t.prototype.success=function(){this.sendData()},t.prototype.isValid=function(){var e=!0;return void 0!==this.param&&(e=(e=Array.isArray(this.param))&&this.param.every((function(e){return Number.isInteger(e)}))),e},t}(Command_1.Command);exports.GetTCDataCommand=GetTCDataCommand;
//# sourceMappingURL=GetTCDataCommand.js.map
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Command_1=require("./Command"),core_1=require("@iabtcf/core"),response_1=require("../response"),GetTCDataCommand=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.sendData=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=CmpApiModel_1.CmpApiModel.tcModel,null===CmpApiModel_1.CmpApiModel.tcModel||e.gvl||CmpApiModel_1.CmpApiModel.tcString?[3,2]:(e.gvl=new core_1.GVL(e.vendorListVersion),[4,e.gvl.readyPromise]);case 1:t.sent(),t.label=2;case 2:return(0,this.callback)(new response_1.TCData(this.param,this.listenerId),!0),[2]}}))}))},t.prototype.success=function(){this.sendData()},t.prototype.isValid=function(){var e=!0;return void 0!==this.param&&(e=(e=Array.isArray(this.param))&&this.param.every((function(e){return Number.isInteger(e)}))),e},t}(Command_1.Command);exports.GetTCDataCommand=GetTCDataCommand;

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Command_1=require("./Command"),core_1=require("@iabtcf/core"),GetVendorListCommand=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.success=function(){var t,e=this,r=this.callback;if(this.param){var o=function(){e.fail()};(t=new core_1.GVL(this.param)).readyPromise.then((function(){r(t.getJson(),!0)}),o).catch(o)}else{var n=CmpApiModel_1.CmpApiModel.tcModel;n.gvl?r(n.gvl.getJson(),!0):(n.gvl=new core_1.GVL(n.vendorListVersion),n.gvl.readyPromise.then((function(){r(n.gvl.getJson(),!0)}),this.fail).catch(this.fail))}},e.prototype.isValid=function(){var t=!0;return void 0!==this.param&&(t=("string"==typeof this.param||"number"==typeof this.param)&&(Number.isInteger(+this.param)&&+this.param>0||"LATEST"===this.param)),t},e}(Command_1.Command);exports.GetVendorListCommand=GetVendorListCommand;
//# sourceMappingURL=GetVendorListCommand.js.map
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Command_1=require("./Command"),core_1=require("@iabtcf/core"),GetVendorListCommand=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.success=function(){var t,e=this,r=this.callback;if(this.param){var o=function(){e.fail()};(t=new core_1.GVL(this.param)).readyPromise.then((function(){r(t.getJson(),!0)}),o).catch(o)}else{var n=CmpApiModel_1.CmpApiModel.tcModel;n.gvl?r(n.gvl.getJson(),!0):(n.gvl=new core_1.GVL(n.vendorListVersion),n.gvl.readyPromise.then((function(){r(n.gvl.getJson(),!0)}),this.fail).catch(this.fail))}},e.prototype.isValid=function(){var t=!0;return void 0!==this.param&&(t=("string"==typeof this.param||"number"==typeof this.param)&&(Number.isInteger(+this.param)&&+this.param>0||"LATEST"===this.param)),t},e}(Command_1.Command);exports.GetVendorListCommand=GetVendorListCommand;

@@ -1,2 +0,1 @@

"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./TCFCommands"));
//# sourceMappingURL=index.js.map
"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./TCFCommands"));

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(t,e)};return function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var response_1=require("../response"),Command_1=require("./Command"),PingCommand=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.success=function(){(0,this.callback)(new response_1.Ping)},t}(Command_1.Command);exports.PingCommand=PingCommand;
//# sourceMappingURL=PingCommand.js.map
"use strict";var __extends=this&&this.__extends||function(){var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(t,e)};return function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var response_1=require("../response"),Command_1=require("./Command"),PingCommand=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.success=function(){(0,this.callback)(new response_1.Ping)},t}(Command_1.Command);exports.PingCommand=PingCommand;

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var e=function(t,n){return(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])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var Command_1=require("./Command"),CmpApiModel_1=require("../CmpApiModel"),RemoveEventListenerCommand=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.success=function(){(0,this.callback)(!0)},t.prototype.fail=function(){(0,this.callback)(!1)},t.prototype.isValid=function(){return"number"==typeof this.param&&CmpApiModel_1.CmpApiModel.eventQueue.remove(this.param)},t}(Command_1.Command);exports.RemoveEventListenerCommand=RemoveEventListenerCommand;
//# sourceMappingURL=RemoveEventListenerCommand.js.map
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,n){return(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])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var Command_1=require("./Command"),CmpApiModel_1=require("../CmpApiModel"),RemoveEventListenerCommand=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.success=function(){(0,this.callback)(!0)},t.prototype.fail=function(){(0,this.callback)(!1)},t.prototype.isValid=function(){return"number"==typeof this.param&&CmpApiModel_1.CmpApiModel.eventQueue.remove(this.param)},t}(Command_1.Command);exports.RemoveEventListenerCommand=RemoveEventListenerCommand;

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var TCFCommands=function(){function e(){}return e.PING="ping",e.GET_TC_DATA="getTCData",e.GET_IN_APP_TC_DATA="getInAppTCData",e.GET_VENDOR_LIST="getVendorList",e.ADD_EVENT_LISTENER="addEventListener",e.REMOVE_EVENT_LISTENER="removeEventListener",e}();exports.TCFCommands=TCFCommands;
//# sourceMappingURL=TCFCommands.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var TCFCommands=function(){function e(){}return e.PING="ping",e.GET_TC_DATA="getTCData",e.GET_IN_APP_TC_DATA="getInAppTCData",e.GET_VENDOR_LIST="getVendorList",e.ADD_EVENT_LISTENER="addEventListener",e.REMOVE_EVENT_LISTENER="removeEventListener",e}();exports.TCFCommands=TCFCommands;

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=CustomCommands.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var GetTCDataCommand_1=require("./command/GetTCDataCommand"),EventListenerQueue=function(){function e(){this.eventQueue=new Map,this.queueNumber=0}return e.prototype.add=function(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++},e.prototype.remove=function(e){return this.eventQueue.delete(e)},e.prototype.exec=function(){this.eventQueue.forEach((function(e,t){new GetTCDataCommand_1.GetTCDataCommand(e,void 0,t)}))},e.prototype.clear=function(){this.eventQueue.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this.eventQueue.size},enumerable:!0,configurable:!0}),e}();exports.EventListenerQueue=EventListenerQueue;
//# sourceMappingURL=EventListenerQueue.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var GetTCDataCommand_1=require("./command/GetTCDataCommand"),EventListenerQueue=function(){function e(){this.eventQueue=new Map,this.queueNumber=0}return e.prototype.add=function(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++},e.prototype.remove=function(e){return this.eventQueue.delete(e)},e.prototype.exec=function(){this.eventQueue.forEach((function(e,t){new GetTCDataCommand_1.GetTCDataCommand(e,void 0,t)}))},e.prototype.clear=function(){this.eventQueue.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this.eventQueue.size},enumerable:!0,configurable:!0}),e}();exports.EventListenerQueue=EventListenerQueue;

@@ -1,2 +0,1 @@

"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./command")),__export(require("./response")),__export(require("./status")),__export(require("./CmpApi"));
//# sourceMappingURL=index.js.map
"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./command")),__export(require("./response")),__export(require("./status")),__export(require("./CmpApi"));

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=BooleanVector.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=Booleany.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var Response_1=require("./Response"),status_1=require("../status"),Disabled=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cmpStatus=status_1.CmpStatus.ERROR,e}return __extends(e,t),e}(Response_1.Response);exports.Disabled=Disabled;
//# sourceMappingURL=Disabled.js.map
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var Response_1=require("./Response"),status_1=require("../status"),Disabled=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cmpStatus=status_1.CmpStatus.ERROR,e}return __extends(e,t),e}(Response_1.Response);exports.Disabled=Disabled;

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function n(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),__read=this&&this.__read||function(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,a=e.call(t),i=[];try{for(;(void 0===r||r-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return i},__spread=this&&this.__spread||function(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(__read(arguments[r]));return t};Object.defineProperty(exports,"__esModule",{value:!0});var TCData_1=require("./TCData"),InAppTCData=function(t){function r(r){var e=t.call(this,r)||this;return delete e.outOfBand,e}return __extends(r,t),r.prototype.createVectorField=function(t){return __spread(t).reduce((function(t,r){return t+=r[1]?"1":"0"}),"")},r.prototype.createRestrictions=function(t){var r={};if(t.numRestrictions>0){var e=t.getMaxVendorId();t.getRestrictions().forEach((function(t){r[t.purposeId.toString()]="_".repeat(e)}));for(var n=function(e){var n=e+1;t.getRestrictions(n).forEach((function(t){var n=t.restrictionType.toString(),o=t.purposeId.toString(),a=r[o].substr(0,e),i=r[o].substr(e+1);r[o]=a+n+i}))},o=0;o<e;o++)n(o)}return r},r}(TCData_1.TCData);exports.InAppTCData=InAppTCData;
//# sourceMappingURL=InAppTCData.js.map
"use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function n(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),__read=this&&this.__read||function(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,a=e.call(t),i=[];try{for(;(void 0===r||r-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return i},__spread=this&&this.__spread||function(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(__read(arguments[r]));return t};Object.defineProperty(exports,"__esModule",{value:!0});var TCData_1=require("./TCData"),InAppTCData=function(t){function r(r){var e=t.call(this,r)||this;return delete e.outOfBand,e}return __extends(r,t),r.prototype.createVectorField=function(t){return __spread(t).reduce((function(t,r){return t+=r[1]?"1":"0"}),"")},r.prototype.createRestrictions=function(t){var r={};if(t.numRestrictions>0){var e=t.getMaxVendorId();t.getRestrictions().forEach((function(t){r[t.purposeId.toString()]="_".repeat(e)}));for(var n=function(e){var n=e+1;t.getRestrictions(n).forEach((function(t){var n=t.restrictionType.toString(),o=t.purposeId.toString(),a=r[o].substr(0,e),i=r[o].substr(e+1);r[o]=a+n+i}))},o=0;o<e;o++)n(o)}return r},r}(TCData_1.TCData);exports.InAppTCData=InAppTCData;

@@ -1,2 +0,1 @@

"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./Disabled")),__export(require("./InAppTCData")),__export(require("./Ping")),__export(require("./Response")),__export(require("./TCData"));
//# sourceMappingURL=index.js.map
"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./Disabled")),__export(require("./InAppTCData")),__export(require("./Ping")),__export(require("./Response")),__export(require("./TCData"));

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var e=function(o,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var t in o)o.hasOwnProperty(t)&&(e[t]=o[t])})(o,t)};return function(o,t){function p(){this.constructor=o}e(o,t),o.prototype=null===t?Object.create(t):(p.prototype=t.prototype,new p)}}();Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Response_1=require("./Response"),Ping=function(e){function o(){var o=e.call(this)||this;return o.cmpLoaded=!0,o.cmpStatus=CmpApiModel_1.CmpApiModel.cmpStatus,o.displayStatus=CmpApiModel_1.CmpApiModel.displayStatus,o.apiVersion=""+CmpApiModel_1.CmpApiModel.apiVersion,CmpApiModel_1.CmpApiModel.tcModel&&CmpApiModel_1.CmpApiModel.tcModel.vendorListVersion&&(o.gvlVersion=+CmpApiModel_1.CmpApiModel.tcModel.vendorListVersion),o}return __extends(o,e),o}(Response_1.Response);exports.Ping=Ping;
//# sourceMappingURL=Ping.js.map
"use strict";var __extends=this&&this.__extends||function(){var e=function(o,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var t in o)o.hasOwnProperty(t)&&(e[t]=o[t])})(o,t)};return function(o,t){function p(){this.constructor=o}e(o,t),o.prototype=null===t?Object.create(t):(p.prototype=t.prototype,new p)}}();Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Response_1=require("./Response"),Ping=function(e){function o(){var o=e.call(this)||this;return o.cmpLoaded=!0,o.cmpStatus=CmpApiModel_1.CmpApiModel.cmpStatus,o.displayStatus=CmpApiModel_1.CmpApiModel.displayStatus,o.apiVersion=""+CmpApiModel_1.CmpApiModel.apiVersion,CmpApiModel_1.CmpApiModel.tcModel&&CmpApiModel_1.CmpApiModel.tcModel.vendorListVersion&&(o.gvlVersion=+CmpApiModel_1.CmpApiModel.tcModel.vendorListVersion),o}return __extends(o,e),o}(Response_1.Response);exports.Ping=Ping;

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Response=function(){this.cmpId=CmpApiModel_1.CmpApiModel.cmpId,this.cmpVersion=CmpApiModel_1.CmpApiModel.cmpVersion,this.gdprApplies=CmpApiModel_1.CmpApiModel.gdprApplies,this.tcfPolicyVersion=CmpApiModel_1.CmpApiModel.tcfPolicyVersion};exports.Response=Response;
//# sourceMappingURL=Response.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var CmpApiModel_1=require("../CmpApiModel"),Response=function(){this.cmpId=CmpApiModel_1.CmpApiModel.cmpId,this.cmpVersion=CmpApiModel_1.CmpApiModel.cmpVersion,this.gdprApplies=CmpApiModel_1.CmpApiModel.gdprApplies,this.tcfPolicyVersion=CmpApiModel_1.CmpApiModel.tcfPolicyVersion};exports.Response=Response;

@@ -1,2 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
//# sourceMappingURL=Restrictions.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

@@ -1,2 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return s},__spread=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e};Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@iabtcf/core"),CmpApiModel_1=require("../CmpApiModel"),Response_1=require("./Response"),TCData=function(e){function t(t,r){var o=e.call(this)||this;if(o.eventStatus=CmpApiModel_1.CmpApiModel.eventStatus,o.cmpStatus=CmpApiModel_1.CmpApiModel.cmpStatus,o.listenerId=r,CmpApiModel_1.CmpApiModel.gdprApplies){var n=CmpApiModel_1.CmpApiModel.tcModel;CmpApiModel_1.CmpApiModel.tcString?o.tcString=CmpApiModel_1.CmpApiModel.tcString:(o.tcString=core_1.TCString.encode(n),CmpApiModel_1.CmpApiModel.cacheTCString(o.tcString)),o.isServiceSpecific=n.isServiceSpecific,o.useNonStandardStacks=n.useNonStandardStacks,o.purposeOneTreatment=n.purposeOneTreatment,o.publisherCC=n.publisherCountryCode,o.outOfBand={allowedVendors:o.createVectorField(n.vendorsAllowed,t),disclosedVendors:o.createVectorField(n.vendorsDisclosed,t)},o.purpose={consents:o.createVectorField(n.purposeConsents),legitimateInterests:o.createVectorField(n.purposeLegitimateInterests)},o.vendor={consents:o.createVectorField(n.vendorConsents,t),legitimateInterests:o.createVectorField(n.vendorLegitimateInterests,t)},o.specialFeatureOptins=o.createVectorField(n.specialFeatureOptIns),o.publisher={consents:o.createVectorField(n.publisherConsents),legitimateInterests:o.createVectorField(n.publisherLegitimateInterests),customPurpose:{consents:o.createVectorField(n.publisherCustomConsents),legitimateInterests:o.createVectorField(n.publisherCustomLegitimateInterests)},restrictions:o.createRestrictions(n.publisherRestrictions)}}return o}return __extends(t,e),t.prototype.createRestrictions=function(e){var t={};if(e.numRestrictions>0)for(var r=e.getMaxVendorId(),o=function(r){var o=r.toString();e.getRestrictions(r).forEach((function(e){var r=e.purposeId.toString();t[r]||(t[r]={}),t[r][o]=e.restrictionType}))},n=1;n<=r;n++)o(n);return t},t.prototype.createVectorField=function(e,t){return t?t.reduce((function(t,r){return t[r+""]=e.has(+r),t}),{}):__spread(e).reduce((function(e,t){return e[t[0].toString(10)]=t[1],e}),{})},t}(Response_1.Response);exports.TCData=TCData;
//# sourceMappingURL=TCData.js.map
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return s},__spread=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e};Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@iabtcf/core"),CmpApiModel_1=require("../CmpApiModel"),Response_1=require("./Response"),TCData=function(e){function t(t,r){var o=e.call(this)||this;if(o.eventStatus=CmpApiModel_1.CmpApiModel.eventStatus,o.cmpStatus=CmpApiModel_1.CmpApiModel.cmpStatus,o.listenerId=r,CmpApiModel_1.CmpApiModel.gdprApplies){var n=CmpApiModel_1.CmpApiModel.tcModel;CmpApiModel_1.CmpApiModel.tcString?o.tcString=CmpApiModel_1.CmpApiModel.tcString:(o.tcString=core_1.TCString.encode(n),CmpApiModel_1.CmpApiModel.cacheTCString(o.tcString)),o.isServiceSpecific=n.isServiceSpecific,o.useNonStandardStacks=n.useNonStandardStacks,o.purposeOneTreatment=n.purposeOneTreatment,o.publisherCC=n.publisherCountryCode,o.outOfBand={allowedVendors:o.createVectorField(n.vendorsAllowed,t),disclosedVendors:o.createVectorField(n.vendorsDisclosed,t)},o.purpose={consents:o.createVectorField(n.purposeConsents),legitimateInterests:o.createVectorField(n.purposeLegitimateInterests)},o.vendor={consents:o.createVectorField(n.vendorConsents,t),legitimateInterests:o.createVectorField(n.vendorLegitimateInterests,t)},o.specialFeatureOptins=o.createVectorField(n.specialFeatureOptIns),o.publisher={consents:o.createVectorField(n.publisherConsents),legitimateInterests:o.createVectorField(n.publisherLegitimateInterests),customPurpose:{consents:o.createVectorField(n.publisherCustomConsents),legitimateInterests:o.createVectorField(n.publisherCustomLegitimateInterests)},restrictions:o.createRestrictions(n.publisherRestrictions)}}return o}return __extends(t,e),t.prototype.createRestrictions=function(e){var t={};if(e.numRestrictions>0)for(var r=e.getMaxVendorId(),o=function(r){var o=r.toString();e.getRestrictions(r).forEach((function(e){var r=e.purposeId.toString();t[r]||(t[r]={}),t[r][o]=e.restrictionType}))},n=1;n<=r;n++)o(n);return t},t.prototype.createVectorField=function(e,t){return t?t.reduce((function(t,r){return t[r+""]=e.has(+r),t}),{}):__spread(e).reduce((function(e,t){return e[t[0].toString(10)]=t[1],e}),{})},t}(Response_1.Response);exports.TCData=TCData;

@@ -1,2 +0,1 @@

"use strict";var CmpStatus;Object.defineProperty(exports,"__esModule",{value:!0}),function(t){t.STUB="stub",t.LOADING="loading",t.LOADED="loaded",t.ERROR="error"}(CmpStatus=exports.CmpStatus||(exports.CmpStatus={}));
//# sourceMappingURL=CmpStatus.js.map
"use strict";var CmpStatus;Object.defineProperty(exports,"__esModule",{value:!0}),function(t){t.STUB="stub",t.LOADING="loading",t.LOADED="loaded",t.ERROR="error"}(CmpStatus=exports.CmpStatus||(exports.CmpStatus={}));

@@ -1,2 +0,1 @@

"use strict";var DisplayStatus;Object.defineProperty(exports,"__esModule",{value:!0}),function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"}(DisplayStatus=exports.DisplayStatus||(exports.DisplayStatus={}));
//# sourceMappingURL=DisplayStatus.js.map
"use strict";var DisplayStatus;Object.defineProperty(exports,"__esModule",{value:!0}),function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"}(DisplayStatus=exports.DisplayStatus||(exports.DisplayStatus={}));

@@ -1,2 +0,1 @@

"use strict";var EventStatus;Object.defineProperty(exports,"__esModule",{value:!0}),function(t){t.TC_LOADED="tcloaded",t.CMP_UI_SHOWN="cmpuishown",t.USER_ACTION_COMPLETE="useractioncomplete"}(EventStatus=exports.EventStatus||(exports.EventStatus={}));
//# sourceMappingURL=EventStatus.js.map
"use strict";var EventStatus;Object.defineProperty(exports,"__esModule",{value:!0}),function(t){t.TC_LOADED="tcloaded",t.CMP_UI_SHOWN="cmpuishown",t.USER_ACTION_COMPLETE="useractioncomplete"}(EventStatus=exports.EventStatus||(exports.EventStatus={}));

@@ -1,2 +0,1 @@

"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./CmpStatus")),__export(require("./DisplayStatus")),__export(require("./EventStatus"));
//# sourceMappingURL=index.js.map
"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./CmpStatus")),__export(require("./DisplayStatus")),__export(require("./EventStatus"));
{
"name": "@iabtcf/cmpapi",
"version": "1.0.0-beta.18",
"version": "1.0.0-beta.19",
"description": "Ensures other in-page digital marketing technologies have access to CMP transparency and consent information for the iab. Transparency and Consent Framework (TCF).",

@@ -14,4 +14,2 @@ "author": "Chris Paterson <tcf@chrispaterson.io>",

"scripts": {
"docs": "typedoc --ignoreCompilerErrors --tsconfig ./tsconfig.json src",
"prepack": "yarn run build",
"build": "../build",

@@ -27,7 +25,7 @@ "lint": "eslint `find test src -name '*.ts'`",

"dependencies": {
"@iabtcf/core": "1.0.0-beta.18"
"@iabtcf/core": "1.0.0-beta.19"
},
"devDependencies": {
"@iabtcf/stub": "1.0.0-beta.18",
"@iabtcf/testing": "1.0.0-beta.18",
"@iabtcf/stub": "1.0.0-beta.19",
"@iabtcf/testing": "1.0.0-beta.19",
"@istanbuljs/nyc-config-typescript": "^0.1.3",

@@ -34,0 +32,0 @@ "@types/mocha": "^5.2.7",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc