New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@didomi/iabtcf-core

Package Overview
Dependencies
Maintainers
7
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@didomi/iabtcf-core - npm Package Compare versions

Comparing version 1.5.8 to 1.5.9

2

lib/cjs/encoder/BitLength.d.ts

@@ -18,3 +18,3 @@ import { Fields } from '../model/index.js';

static readonly [Fields.specialFeatureOptins]: number;
static readonly [Fields.useNonStandardStacks]: number;
static readonly [Fields.useNonStandardTexts]: number;
static readonly [Fields.vendorListVersion]: number;

@@ -21,0 +21,0 @@ static readonly [Fields.version]: number;

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BitLength=void 0;var index_js_1=require("../model/index.js"),BitLength=function(){function e(){}var s,i,n,d,t,r,_,o,l,p,x,u,j,a,c,F,g,m;return s=index_js_1.Fields.cmpId,i=index_js_1.Fields.cmpVersion,n=index_js_1.Fields.consentLanguage,d=index_js_1.Fields.consentScreen,t=index_js_1.Fields.created,r=index_js_1.Fields.isServiceSpecific,_=index_js_1.Fields.lastUpdated,o=index_js_1.Fields.policyVersion,l=index_js_1.Fields.publisherCountryCode,p=index_js_1.Fields.publisherLegitimateInterests,x=index_js_1.Fields.publisherConsents,u=index_js_1.Fields.purposeConsents,j=index_js_1.Fields.purposeLegitimateInterests,a=index_js_1.Fields.purposeOneTreatment,c=index_js_1.Fields.specialFeatureOptins,F=index_js_1.Fields.useNonStandardStacks,g=index_js_1.Fields.vendorListVersion,m=index_js_1.Fields.version,e[s]=12,e[i]=12,e[n]=12,e[d]=6,e[t]=36,e[r]=1,e[_]=36,e[o]=6,e[l]=12,e[p]=24,e[x]=24,e[u]=24,e[j]=24,e[a]=1,e[c]=12,e[F]=1,e[g]=12,e[m]=6,e.anyBoolean=1,e.encodingType=1,e.maxId=16,e.numCustomPurposes=6,e.numEntries=12,e.numRestrictions=12,e.purposeId=6,e.restrictionType=2,e.segmentType=3,e.singleOrRange=1,e.vendorId=16,e}();exports.BitLength=BitLength;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BitLength=void 0;var index_js_1=require("../model/index.js"),BitLength=function(){function e(){}var s,i,n,d,t,r,_,o,l,p,x,u,j,a,F,c,g,m;return s=index_js_1.Fields.cmpId,i=index_js_1.Fields.cmpVersion,n=index_js_1.Fields.consentLanguage,d=index_js_1.Fields.consentScreen,t=index_js_1.Fields.created,r=index_js_1.Fields.isServiceSpecific,_=index_js_1.Fields.lastUpdated,o=index_js_1.Fields.policyVersion,l=index_js_1.Fields.publisherCountryCode,p=index_js_1.Fields.publisherLegitimateInterests,x=index_js_1.Fields.publisherConsents,u=index_js_1.Fields.purposeConsents,j=index_js_1.Fields.purposeLegitimateInterests,a=index_js_1.Fields.purposeOneTreatment,F=index_js_1.Fields.specialFeatureOptins,c=index_js_1.Fields.useNonStandardTexts,g=index_js_1.Fields.vendorListVersion,m=index_js_1.Fields.version,e[s]=12,e[i]=12,e[n]=12,e[d]=6,e[t]=36,e[r]=1,e[_]=36,e[o]=6,e[l]=12,e[p]=24,e[x]=24,e[u]=24,e[j]=24,e[a]=1,e[F]=12,e[c]=1,e[g]=12,e[m]=6,e.anyBoolean=1,e.encodingType=1,e.maxId=16,e.numCustomPurposes=6,e.numEntries=12,e.numRestrictions=12,e.purposeId=6,e.restrictionType=2,e.segmentType=3,e.singleOrRange=1,e.vendorId=16,e}();exports.BitLength=BitLength;

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldEncoderMap=void 0;var index_js_1=require("../../model/index.js"),BooleanEncoder_js_1=require("./BooleanEncoder.js"),DateEncoder_js_1=require("./DateEncoder.js"),FixedVectorEncoder_js_1=require("./FixedVectorEncoder.js"),IntEncoder_js_1=require("./IntEncoder.js"),LangEncoder_js_1=require("./LangEncoder.js"),PurposeRestrictionVectorEncoder_js_1=require("./PurposeRestrictionVectorEncoder.js"),VendorVectorEncoder_js_1=require("./VendorVectorEncoder.js");function FieldEncoderMap(){var e;return(e={})[index_js_1.Fields.version]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.created]=DateEncoder_js_1.DateEncoder,e[index_js_1.Fields.lastUpdated]=DateEncoder_js_1.DateEncoder,e[index_js_1.Fields.cmpId]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.cmpVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.consentScreen]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.consentLanguage]=LangEncoder_js_1.LangEncoder,e[index_js_1.Fields.vendorListVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.policyVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.isServiceSpecific]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.useNonStandardStacks]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.specialFeatureOptins]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeOneTreatment]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.publisherCountryCode]=LangEncoder_js_1.LangEncoder,e[index_js_1.Fields.vendorConsents]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.vendorLegitimateInterests]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.publisherRestrictions]=PurposeRestrictionVectorEncoder_js_1.PurposeRestrictionVectorEncoder,e.segmentType=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.vendorsDisclosed]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.vendorsAllowed]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.publisherConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.publisherLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.numCustomPurposes]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.publisherCustomConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.publisherCustomLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e}exports.FieldEncoderMap=FieldEncoderMap;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldEncoderMap=void 0;var index_js_1=require("../../model/index.js"),BooleanEncoder_js_1=require("./BooleanEncoder.js"),DateEncoder_js_1=require("./DateEncoder.js"),FixedVectorEncoder_js_1=require("./FixedVectorEncoder.js"),IntEncoder_js_1=require("./IntEncoder.js"),LangEncoder_js_1=require("./LangEncoder.js"),PurposeRestrictionVectorEncoder_js_1=require("./PurposeRestrictionVectorEncoder.js"),VendorVectorEncoder_js_1=require("./VendorVectorEncoder.js");function FieldEncoderMap(){var e;return(e={})[index_js_1.Fields.version]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.created]=DateEncoder_js_1.DateEncoder,e[index_js_1.Fields.lastUpdated]=DateEncoder_js_1.DateEncoder,e[index_js_1.Fields.cmpId]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.cmpVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.consentScreen]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.consentLanguage]=LangEncoder_js_1.LangEncoder,e[index_js_1.Fields.vendorListVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.policyVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.isServiceSpecific]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.useNonStandardTexts]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.specialFeatureOptins]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeOneTreatment]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.publisherCountryCode]=LangEncoder_js_1.LangEncoder,e[index_js_1.Fields.vendorConsents]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.vendorLegitimateInterests]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.publisherRestrictions]=PurposeRestrictionVectorEncoder_js_1.PurposeRestrictionVectorEncoder,e.segmentType=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.vendorsDisclosed]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.vendorsAllowed]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.publisherConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.publisherLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.numCustomPurposes]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.publisherCustomConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.publisherCustomLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e}exports.FieldEncoderMap=FieldEncoderMap;

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PurposeRestrictionVectorEncoder=void 0;var BitLength_js_1=require("../BitLength.js"),BooleanEncoder_js_1=require("./BooleanEncoder.js"),index_js_1=require("../../errors/index.js"),IntEncoder_js_1=require("./IntEncoder.js"),index_js_2=require("../../model/index.js"),PurposeRestrictionVectorEncoder=function(){function e(){}return e.encode=function(e){var n=IntEncoder_js_1.IntEncoder.encode(e.numRestrictions,BitLength_js_1.BitLength.numRestrictions);if(!e.isEmpty()){var t=Array.from(e.gvl.vendorIds),r=function(e,n){var r=t.indexOf(e);return t.indexOf(n)-r>1};e.getRestrictions().forEach((function(t){n+=IntEncoder_js_1.IntEncoder.encode(t.purposeId,BitLength_js_1.BitLength.purposeId),n+=IntEncoder_js_1.IntEncoder.encode(t.restrictionType,BitLength_js_1.BitLength.restrictionType);for(var o=e.getVendors(t),i=o.length,s=0,d=0,_="",c=0;c<i;c++){var g=o[c];if(0===d&&(s++,d=g),c===i-1||r(g,o[c+1])){var B=!(g===d);_+=BooleanEncoder_js_1.BooleanEncoder.encode(B),_+=IntEncoder_js_1.IntEncoder.encode(d,BitLength_js_1.BitLength.vendorId),B&&(_+=IntEncoder_js_1.IntEncoder.encode(g,BitLength_js_1.BitLength.vendorId)),d=0}}n+=IntEncoder_js_1.IntEncoder.encode(s,BitLength_js_1.BitLength.numEntries),n+=_}))}return n},e.decode=function(e){var n=0,t=new index_js_2.PurposeRestrictionVector,r=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.numRestrictions),BitLength_js_1.BitLength.numRestrictions);n+=BitLength_js_1.BitLength.numRestrictions;for(var o=0;o<r;o++){var i=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.purposeId),BitLength_js_1.BitLength.purposeId);n+=BitLength_js_1.BitLength.purposeId;var s=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.restrictionType),BitLength_js_1.BitLength.restrictionType);n+=BitLength_js_1.BitLength.restrictionType;var d=new index_js_2.PurposeRestriction(i,s),_=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.numEntries),BitLength_js_1.BitLength.numEntries);n+=BitLength_js_1.BitLength.numEntries;for(var c=function(r){var o=BooleanEncoder_js_1.BooleanEncoder.decode(e.substr(n,BitLength_js_1.BitLength.anyBoolean));n+=BitLength_js_1.BitLength.anyBoolean;var i=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.vendorId),BitLength_js_1.BitLength.vendorId);if(n+=BitLength_js_1.BitLength.vendorId,o){var s=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.vendorId),BitLength_js_1.BitLength.vendorId);if(n+=BitLength_js_1.BitLength.vendorId,s<i)throw new index_js_1.DecodingError("Invalid RangeEntry: endVendorId ".concat(s," is less than ").concat(i));var _=Array.from({length:s-i+1},(function(e,n){return i+n}));t.restrictPurposeToLegalBasis(d,_)}else t.restrictPurposeToLegalBasis(d,[i])},g=0;g<_;g++)c()}return t.bitLength=n,t},e}();exports.PurposeRestrictionVectorEncoder=PurposeRestrictionVectorEncoder;
"use strict";var __read=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PurposeRestrictionVectorEncoder=void 0;var BitLength_js_1=require("../BitLength.js"),BooleanEncoder_js_1=require("./BooleanEncoder.js"),index_js_1=require("../../errors/index.js"),IntEncoder_js_1=require("./IntEncoder.js"),index_js_2=require("../../model/index.js"),PurposeRestrictionVectorEncoder=function(){function e(){}return e.encode=function(e){var t=IntEncoder_js_1.IntEncoder.encode(e.numRestrictions,BitLength_js_1.BitLength.numRestrictions);if(!e.isEmpty()){var n=__spreadArray([],__read(e.gvl.vendorIds),!1),r=function(e,t){var r=n.indexOf(e);return n.indexOf(t)-r>1};e.getRestrictions().forEach((function(n){t+=IntEncoder_js_1.IntEncoder.encode(n.purposeId,BitLength_js_1.BitLength.purposeId),t+=IntEncoder_js_1.IntEncoder.encode(n.restrictionType,BitLength_js_1.BitLength.restrictionType);for(var o=e.getVendors(n),i=o.length,s=0,d=0,_="",c=0;c<i;c++){var h=o[c];if(0===d&&(s++,d=h),c===i-1||r(h,o[c+1])){var g=!(h===d);_+=BooleanEncoder_js_1.BooleanEncoder.encode(g),_+=IntEncoder_js_1.IntEncoder.encode(d,BitLength_js_1.BitLength.vendorId),g&&(_+=IntEncoder_js_1.IntEncoder.encode(h,BitLength_js_1.BitLength.vendorId)),d=0}}t+=IntEncoder_js_1.IntEncoder.encode(s,BitLength_js_1.BitLength.numEntries),t+=_}))}return t},e.decode=function(e){var t=0,n=new index_js_2.PurposeRestrictionVector,r=IntEncoder_js_1.IntEncoder.decode(e.substr(t,BitLength_js_1.BitLength.numRestrictions),BitLength_js_1.BitLength.numRestrictions);t+=BitLength_js_1.BitLength.numRestrictions;for(var o=0;o<r;o++){var i=IntEncoder_js_1.IntEncoder.decode(e.substr(t,BitLength_js_1.BitLength.purposeId),BitLength_js_1.BitLength.purposeId);t+=BitLength_js_1.BitLength.purposeId;var s=IntEncoder_js_1.IntEncoder.decode(e.substr(t,BitLength_js_1.BitLength.restrictionType),BitLength_js_1.BitLength.restrictionType);t+=BitLength_js_1.BitLength.restrictionType;var d=new index_js_2.PurposeRestriction(i,s),_=IntEncoder_js_1.IntEncoder.decode(e.substr(t,BitLength_js_1.BitLength.numEntries),BitLength_js_1.BitLength.numEntries);t+=BitLength_js_1.BitLength.numEntries;for(var c=function(r){var o=BooleanEncoder_js_1.BooleanEncoder.decode(e.substr(t,BitLength_js_1.BitLength.anyBoolean));t+=BitLength_js_1.BitLength.anyBoolean;var i=IntEncoder_js_1.IntEncoder.decode(e.substr(t,BitLength_js_1.BitLength.vendorId),BitLength_js_1.BitLength.vendorId);if(t+=BitLength_js_1.BitLength.vendorId,o){var s=IntEncoder_js_1.IntEncoder.decode(e.substr(t,BitLength_js_1.BitLength.vendorId),BitLength_js_1.BitLength.vendorId);if(t+=BitLength_js_1.BitLength.vendorId,s<i)throw new index_js_1.DecodingError("Invalid RangeEntry: endVendorId ".concat(s," is less than ").concat(i));var _=Array.from({length:s-i+1},(function(e,t){return i+t}));n.restrictPurposeToLegalBasis(d,_)}else n.restrictPurposeToLegalBasis(d,[i])},h=0;h<_;h++)c()}return n.bitLength=t,n},e}();exports.PurposeRestrictionVectorEncoder=PurposeRestrictionVectorEncoder;

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldSequence=void 0;var index_js_1=require("../../model/index.js"),FieldSequence=function(){var e,s;this[1]=((e={})[index_js_1.Segment.CORE]=[index_js_1.Fields.version,index_js_1.Fields.created,index_js_1.Fields.lastUpdated,index_js_1.Fields.cmpId,index_js_1.Fields.cmpVersion,index_js_1.Fields.consentScreen,index_js_1.Fields.consentLanguage,index_js_1.Fields.vendorListVersion,index_js_1.Fields.purposeConsents,index_js_1.Fields.vendorConsents],e),this[2]=((s={})[index_js_1.Segment.CORE]=[index_js_1.Fields.version,index_js_1.Fields.created,index_js_1.Fields.lastUpdated,index_js_1.Fields.cmpId,index_js_1.Fields.cmpVersion,index_js_1.Fields.consentScreen,index_js_1.Fields.consentLanguage,index_js_1.Fields.vendorListVersion,index_js_1.Fields.policyVersion,index_js_1.Fields.isServiceSpecific,index_js_1.Fields.useNonStandardStacks,index_js_1.Fields.specialFeatureOptins,index_js_1.Fields.purposeConsents,index_js_1.Fields.purposeLegitimateInterests,index_js_1.Fields.purposeOneTreatment,index_js_1.Fields.publisherCountryCode,index_js_1.Fields.vendorConsents,index_js_1.Fields.vendorLegitimateInterests,index_js_1.Fields.publisherRestrictions],s[index_js_1.Segment.PUBLISHER_TC]=[index_js_1.Fields.publisherConsents,index_js_1.Fields.publisherLegitimateInterests,index_js_1.Fields.numCustomPurposes,index_js_1.Fields.publisherCustomConsents,index_js_1.Fields.publisherCustomLegitimateInterests],s[index_js_1.Segment.VENDORS_ALLOWED]=[index_js_1.Fields.vendorsAllowed],s[index_js_1.Segment.VENDORS_DISCLOSED]=[index_js_1.Fields.vendorsDisclosed],s)};exports.FieldSequence=FieldSequence;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldSequence=void 0;var index_js_1=require("../../model/index.js"),FieldSequence=function(){var e,s;this[1]=((e={})[index_js_1.Segment.CORE]=[index_js_1.Fields.version,index_js_1.Fields.created,index_js_1.Fields.lastUpdated,index_js_1.Fields.cmpId,index_js_1.Fields.cmpVersion,index_js_1.Fields.consentScreen,index_js_1.Fields.consentLanguage,index_js_1.Fields.vendorListVersion,index_js_1.Fields.purposeConsents,index_js_1.Fields.vendorConsents],e),this[2]=((s={})[index_js_1.Segment.CORE]=[index_js_1.Fields.version,index_js_1.Fields.created,index_js_1.Fields.lastUpdated,index_js_1.Fields.cmpId,index_js_1.Fields.cmpVersion,index_js_1.Fields.consentScreen,index_js_1.Fields.consentLanguage,index_js_1.Fields.vendorListVersion,index_js_1.Fields.policyVersion,index_js_1.Fields.isServiceSpecific,index_js_1.Fields.useNonStandardTexts,index_js_1.Fields.specialFeatureOptins,index_js_1.Fields.purposeConsents,index_js_1.Fields.purposeLegitimateInterests,index_js_1.Fields.purposeOneTreatment,index_js_1.Fields.publisherCountryCode,index_js_1.Fields.vendorConsents,index_js_1.Fields.vendorLegitimateInterests,index_js_1.Fields.publisherRestrictions],s[index_js_1.Segment.PUBLISHER_TC]=[index_js_1.Fields.publisherConsents,index_js_1.Fields.publisherLegitimateInterests,index_js_1.Fields.numCustomPurposes,index_js_1.Fields.publisherCustomConsents,index_js_1.Fields.publisherCustomLegitimateInterests],s[index_js_1.Segment.VENDORS_ALLOWED]=[index_js_1.Fields.vendorsAllowed],s[index_js_1.Segment.VENDORS_DISCLOSED]=[index_js_1.Fields.vendorsDisclosed],s)};exports.FieldSequence=FieldSequence;

@@ -22,3 +22,3 @@ export declare class Fields {

static readonly specialFeatureOptins: 'specialFeatureOptins';
static readonly useNonStandardStacks: 'useNonStandardStacks';
static readonly useNonStandardTexts: 'useNonStandardTexts';
static readonly vendorConsents: 'vendorConsents';

@@ -25,0 +25,0 @@ static readonly vendorLegitimateInterests: 'vendorLegitimateInterests';

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Fields=void 0;var Fields=function(){function e(){}return e.cmpId="cmpId",e.cmpVersion="cmpVersion",e.consentLanguage="consentLanguage",e.consentScreen="consentScreen",e.created="created",e.supportOOB="supportOOB",e.isServiceSpecific="isServiceSpecific",e.lastUpdated="lastUpdated",e.numCustomPurposes="numCustomPurposes",e.policyVersion="policyVersion",e.publisherCountryCode="publisherCountryCode",e.publisherCustomConsents="publisherCustomConsents",e.publisherCustomLegitimateInterests="publisherCustomLegitimateInterests",e.publisherLegitimateInterests="publisherLegitimateInterests",e.publisherConsents="publisherConsents",e.publisherRestrictions="publisherRestrictions",e.purposeConsents="purposeConsents",e.purposeLegitimateInterests="purposeLegitimateInterests",e.purposeOneTreatment="purposeOneTreatment",e.specialFeatureOptins="specialFeatureOptins",e.useNonStandardStacks="useNonStandardStacks",e.vendorConsents="vendorConsents",e.vendorLegitimateInterests="vendorLegitimateInterests",e.vendorListVersion="vendorListVersion",e.vendorsAllowed="vendorsAllowed",e.vendorsDisclosed="vendorsDisclosed",e.version="version",e}();exports.Fields=Fields;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Fields=void 0;var Fields=function(){function e(){}return e.cmpId="cmpId",e.cmpVersion="cmpVersion",e.consentLanguage="consentLanguage",e.consentScreen="consentScreen",e.created="created",e.supportOOB="supportOOB",e.isServiceSpecific="isServiceSpecific",e.lastUpdated="lastUpdated",e.numCustomPurposes="numCustomPurposes",e.policyVersion="policyVersion",e.publisherCountryCode="publisherCountryCode",e.publisherCustomConsents="publisherCustomConsents",e.publisherCustomLegitimateInterests="publisherCustomLegitimateInterests",e.publisherLegitimateInterests="publisherLegitimateInterests",e.publisherConsents="publisherConsents",e.publisherRestrictions="publisherRestrictions",e.purposeConsents="purposeConsents",e.purposeLegitimateInterests="purposeLegitimateInterests",e.purposeOneTreatment="purposeOneTreatment",e.specialFeatureOptins="specialFeatureOptins",e.useNonStandardTexts="useNonStandardTexts",e.vendorConsents="vendorConsents",e.vendorLegitimateInterests="vendorLegitimateInterests",e.vendorListVersion="vendorListVersion",e.vendorsAllowed="vendorsAllowed",e.vendorsDisclosed="vendorsDisclosed",e.version="version",e}();exports.Fields=Fields;

@@ -1,1 +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)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__values=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],o=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PurposeRestrictionVector=void 0;var PurposeRestriction_js_1=require("./PurposeRestriction.js"),RestrictionType_js_1=require("./RestrictionType.js"),Cloneable_js_1=require("../Cloneable.js"),PurposeRestrictionVector=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bitLength=0,e.map=new Map,e}return __extends(e,t),e.prototype.has=function(t){return this.map.has(t)},e.prototype.isOkToHave=function(t,e,r){var o,i=!0;if(null===(o=this.gvl)||void 0===o?void 0:o.vendors){var n=this.gvl.vendors[r];if(n)if(t===RestrictionType_js_1.RestrictionType.NOT_ALLOWED)i=n.legIntPurposes.includes(e)||n.purposes.includes(e);else if(n.flexiblePurposes.length)switch(t){case RestrictionType_js_1.RestrictionType.REQUIRE_CONSENT:i=n.flexiblePurposes.includes(e)&&n.legIntPurposes.includes(e);break;case RestrictionType_js_1.RestrictionType.REQUIRE_LI:i=n.flexiblePurposes.includes(e)&&n.purposes.includes(e)}else i=!1;else i=!1}return i},e.prototype.add=function(t,e){if(this.isOkToHave(e.restrictionType,e.purposeId,t)){var r=e.hash;this.has(r)||(this.map.set(r,new Set),this.bitLength=0),this.map.get(r).add(t)}},e.prototype.restrictPurposeToLegalBasis=function(t,e){var r,o;void 0===e&&(e=Array.from(this.gvl.vendorIds));var i=t.hash;if(this.has(i)){var n=this.map.get(i);try{for(var s=__values(e),a=s.next();!a.done;a=s.next()){var u=a.value;n.add(u)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}else this.map.set(i,new Set(e)),this.bitLength=0},e.prototype.getVendors=function(t){var e=[];if(t){var r=t.hash;this.has(r)&&(e=Array.from(this.map.get(r)))}else{var o=new Set;this.map.forEach((function(t){Array.from(t).forEach((function(t){o.add(t)}))})),e=Array.from(o)}return e.sort((function(t,e){return t-e}))},e.prototype.getRestrictionType=function(t,e){var r;return this.getRestrictions(t).forEach((function(t){t.purposeId===e&&(void 0===r||r>t.restrictionType)&&(r=t.restrictionType)})),r},e.prototype.vendorHasRestriction=function(t,e){for(var r=!1,o=this.getRestrictions(t),i=0;i<o.length&&!r;i++)r=e.isSameAs(o[i]);return r},e.prototype.getMaxVendorId=function(){var t=0;return this.map.forEach((function(e){var r=Array.from(e);t=Math.max(r[r.length-1],t)})),t},e.prototype.getRestrictions=function(t){var e=[];return this.map.forEach((function(r,o){t?r.has(t)&&e.push(PurposeRestriction_js_1.PurposeRestriction.unHash(o)):e.push(PurposeRestriction_js_1.PurposeRestriction.unHash(o))})),e},e.prototype.getPurposes=function(){var t=new Set;return this.map.forEach((function(e,r){t.add(PurposeRestriction_js_1.PurposeRestriction.unHash(r).purposeId)})),Array.from(t)},e.prototype.remove=function(t,e){var r=e.hash,o=this.map.get(r);o&&(o.delete(t),0==o.size&&(this.map.delete(r),this.bitLength=0))},Object.defineProperty(e.prototype,"gvl",{get:function(){return this.gvl_},set:function(t){var e=this;this.gvl_||(this.gvl_=t,this.map.forEach((function(t,r){var o=PurposeRestriction_js_1.PurposeRestriction.unHash(r);Array.from(t).forEach((function(r){e.isOkToHave(o.restrictionType,o.purposeId,r)||t.delete(r)}))})))},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return 0===this.map.size},Object.defineProperty(e.prototype,"numRestrictions",{get:function(){return this.map.size},enumerable:!1,configurable:!0}),e}(Cloneable_js_1.Cloneable);exports.PurposeRestrictionVector=PurposeRestrictionVector;
"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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");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},__spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))},__values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PurposeRestrictionVector=void 0;var PurposeRestriction_js_1=require("./PurposeRestriction.js"),RestrictionType_js_1=require("./RestrictionType.js"),Cloneable_js_1=require("../Cloneable.js"),PurposeRestrictionVector=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.bitLength=0,t.map=new Map,t}return __extends(t,e),t.prototype.has=function(e){return this.map.has(e)},t.prototype.isOkToHave=function(e,t,r){var o,n=!0;if(null===(o=this.gvl)||void 0===o?void 0:o.vendors){var i=this.gvl.vendors[r];if(i)if(e===RestrictionType_js_1.RestrictionType.NOT_ALLOWED)n=i.legIntPurposes.includes(t)||i.purposes.includes(t);else if(i.flexiblePurposes.length)switch(e){case RestrictionType_js_1.RestrictionType.REQUIRE_CONSENT:n=i.flexiblePurposes.includes(t)&&i.legIntPurposes.includes(t);break;case RestrictionType_js_1.RestrictionType.REQUIRE_LI:n=i.flexiblePurposes.includes(t)&&i.purposes.includes(t)}else n=!1;else n=!1}return n},t.prototype.add=function(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){var r=t.hash;this.has(r)||(this.map.set(r,new Set),this.bitLength=0),this.map.get(r).add(e)}},t.prototype.restrictPurposeToLegalBasis=function(e,t){var r,o;void 0===t&&(t=__spreadArray([],__read(this.gvl.vendorIds),!1));var n=e.hash;if(this.has(n)){var i=this.map.get(n);try{for(var s=__values(t),a=s.next();!a.done;a=s.next()){var p=a.value;i.add(p)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}else this.map.set(n,new Set(t)),this.bitLength=0},t.prototype.getVendors=function(e){var t=[];if(e){var r=e.hash;this.has(r)&&(t=__spreadArray([],__read(this.map.get(r)),!1))}else{var o=new Set;this.map.forEach((function(e){__spreadArray([],__read(e),!1).forEach((function(e){o.add(e)}))})),t=__spreadArray([],__read(o),!1)}return t.sort((function(e,t){return e-t}))},t.prototype.getRestrictionType=function(e,t){var r;return this.getRestrictions(e).forEach((function(e){e.purposeId===t&&(void 0===r||r>e.restrictionType)&&(r=e.restrictionType)})),r},t.prototype.vendorHasRestriction=function(e,t){for(var r=!1,o=this.getRestrictions(e),n=0;n<o.length&&!r;n++)r=t.isSameAs(o[n]);return r},t.prototype.getMaxVendorId=function(){var e=0;return this.map.forEach((function(t){var r=__spreadArray([],__read(t),!1);e=Math.max(r[r.length-1],e)})),e},t.prototype.getRestrictions=function(e){var t=[];return this.map.forEach((function(r,o){e?r.has(e)&&t.push(PurposeRestriction_js_1.PurposeRestriction.unHash(o)):t.push(PurposeRestriction_js_1.PurposeRestriction.unHash(o))})),t},t.prototype.getPurposes=function(){var e=new Set;return this.map.forEach((function(t,r){e.add(PurposeRestriction_js_1.PurposeRestriction.unHash(r).purposeId)})),__spreadArray([],__read(e),!1)},t.prototype.remove=function(e,t){var r=t.hash,o=this.map.get(r);o&&(o.delete(e),0==o.size&&(this.map.delete(r),this.bitLength=0))},Object.defineProperty(t.prototype,"gvl",{get:function(){return this.gvl_},set:function(e){var t=this;this.gvl_||(this.gvl_=e,this.map.forEach((function(e,r){var o=PurposeRestriction_js_1.PurposeRestriction.unHash(r);__spreadArray([],__read(e),!1).forEach((function(r){t.isOkToHave(o.restrictionType,o.purposeId,r)||e.delete(r)}))})))},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.map.size},Object.defineProperty(t.prototype,"numRestrictions",{get:function(){return this.map.size},enumerable:!1,configurable:!0}),t}(Cloneable_js_1.Cloneable);exports.PurposeRestrictionVector=PurposeRestrictionVector;

@@ -14,3 +14,3 @@ import { Cloneable } from './Cloneable.js';

private supportOOB_;
private useNonStandardStacks_;
private useNonStandardTexts_;
private purposeOneTreatment_;

@@ -219,4 +219,4 @@ private publisherCountryCode_;

*/
set useNonStandardStacks(bool: boolean);
get useNonStandardStacks(): boolean;
set useNonStandardTexts(bool: boolean);
get useNonStandardTexts(): boolean;
/**

@@ -223,0 +223,0 @@ * Whether or not this publisher supports OOB signaling. On Global TC String

@@ -1,1 +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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.TCModel=void 0;var Cloneable_js_1=require("./Cloneable.js"),index_js_1=require("./errors/index.js"),GVL_js_1=require("./GVL.js"),index_js_2=require("./model/index.js"),TCModel=function(e){function t(t){var n=e.call(this)||this;return n.isServiceSpecific_=!1,n.supportOOB_=!0,n.useNonStandardStacks_=!1,n.purposeOneTreatment_=!1,n.publisherCountryCode_="AA",n.version_=2,n.consentScreen_=0,n.policyVersion_=2,n.consentLanguage_="EN",n.cmpId_=0,n.cmpVersion_=0,n.vendorListVersion_=0,n.numCustomPurposes_=0,n.specialFeatureOptins=new index_js_2.Vector,n.purposeConsents=new index_js_2.Vector,n.purposeLegitimateInterests=new index_js_2.Vector,n.publisherConsents=new index_js_2.Vector,n.publisherLegitimateInterests=new index_js_2.Vector,n.publisherCustomConsents=new index_js_2.Vector,n.publisherCustomLegitimateInterests=new index_js_2.Vector,n.vendorConsents=new index_js_2.Vector,n.vendorLegitimateInterests=new index_js_2.Vector,n.vendorsDisclosed=new index_js_2.Vector,n.vendorsAllowed=new index_js_2.Vector,n.publisherRestrictions=new index_js_2.PurposeRestrictionVector,t&&(n.gvl=t),n.updated(),n}return __extends(t,e),Object.defineProperty(t.prototype,"gvl",{get:function(){return this.gvl_},set:function(e){GVL_js_1.GVL.isInstanceOf(e)||(e=new GVL_js_1.GVL(e)),this.gvl_=e,this.publisherRestrictions.gvl=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cmpId",{get:function(){return this.cmpId_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>1))throw new index_js_1.TCModelError("cmpId",e);this.cmpId_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cmpVersion",{get:function(){return this.cmpVersion_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new index_js_1.TCModelError("cmpVersion",e);this.cmpVersion_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"consentScreen",{get:function(){return this.consentScreen_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new index_js_1.TCModelError("consentScreen",e);this.consentScreen_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"consentLanguage",{get:function(){return this.consentLanguage_},set:function(e){this.consentLanguage_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"publisherCountryCode",{get:function(){return this.publisherCountryCode_},set:function(e){if(!/^([A-z]){2}$/.test(e))throw new index_js_1.TCModelError("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vendorListVersion",{get:function(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_},set:function(e){if((e=Number(e)>>0)<0)throw new index_js_1.TCModelError("vendorListVersion",e);this.vendorListVersion_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"policyVersion",{get:function(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_},set:function(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new index_js_1.TCModelError("policyVersion",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.version_},set:function(e){this.version_=parseInt(e,10)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isServiceSpecific",{get:function(){return this.isServiceSpecific_},set:function(e){this.isServiceSpecific_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useNonStandardStacks",{get:function(){return this.useNonStandardStacks_},set:function(e){this.useNonStandardStacks_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportOOB",{get:function(){return this.supportOOB_},set:function(e){this.supportOOB_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"purposeOneTreatment",{get:function(){return this.purposeOneTreatment_},set:function(e){this.purposeOneTreatment_=e},enumerable:!1,configurable:!0}),t.prototype.setAllVendorConsents=function(){this.vendorConsents.set(this.gvl.vendors)},t.prototype.unsetAllVendorConsents=function(){this.vendorConsents.empty()},t.prototype.setAllVendorsDisclosed=function(){this.vendorsDisclosed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsDisclosed=function(){this.vendorsDisclosed.empty()},t.prototype.setAllVendorsAllowed=function(){this.vendorsAllowed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsAllowed=function(){this.vendorsAllowed.empty()},t.prototype.setAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.set(this.gvl.vendors)},t.prototype.unsetAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.empty()},t.prototype.setAllPurposeConsents=function(){this.purposeConsents.set(this.gvl.purposes)},t.prototype.unsetAllPurposeConsents=function(){this.purposeConsents.empty()},t.prototype.setAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.set(this.gvl.purposes)},t.prototype.unsetAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.empty()},t.prototype.setAllSpecialFeatureOptins=function(){this.specialFeatureOptins.set(this.gvl.specialFeatures)},t.prototype.unsetAllSpecialFeatureOptins=function(){this.specialFeatureOptins.empty()},t.prototype.setAll=function(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()},t.prototype.unsetAll=function(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()},Object.defineProperty(t.prototype,"numCustomPurposes",{get:function(){var e=this.numCustomPurposes_;if("object"==typeof this.customPurposes){var t=Object.keys(this.customPurposes).sort((function(e,t){return Number(e)-Number(t)}));e=parseInt(t.pop(),10)}return e},set:function(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new index_js_1.TCModelError("numCustomPurposes",e)},enumerable:!1,configurable:!0}),t.prototype.updated=function(){var e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t},t.consentLanguages=GVL_js_1.GVL.consentLanguages,t}(Cloneable_js_1.Cloneable);exports.TCModel=TCModel;
"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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.TCModel=void 0;var Cloneable_js_1=require("./Cloneable.js"),index_js_1=require("./errors/index.js"),GVL_js_1=require("./GVL.js"),index_js_2=require("./model/index.js"),TCModel=function(e){function t(t){var n=e.call(this)||this;return n.isServiceSpecific_=!1,n.supportOOB_=!0,n.useNonStandardTexts_=!1,n.purposeOneTreatment_=!1,n.publisherCountryCode_="AA",n.version_=2,n.consentScreen_=0,n.policyVersion_=2,n.consentLanguage_="EN",n.cmpId_=0,n.cmpVersion_=0,n.vendorListVersion_=0,n.numCustomPurposes_=0,n.specialFeatureOptins=new index_js_2.Vector,n.purposeConsents=new index_js_2.Vector,n.purposeLegitimateInterests=new index_js_2.Vector,n.publisherConsents=new index_js_2.Vector,n.publisherLegitimateInterests=new index_js_2.Vector,n.publisherCustomConsents=new index_js_2.Vector,n.publisherCustomLegitimateInterests=new index_js_2.Vector,n.vendorConsents=new index_js_2.Vector,n.vendorLegitimateInterests=new index_js_2.Vector,n.vendorsDisclosed=new index_js_2.Vector,n.vendorsAllowed=new index_js_2.Vector,n.publisherRestrictions=new index_js_2.PurposeRestrictionVector,t&&(n.gvl=t),n.updated(),n}return __extends(t,e),Object.defineProperty(t.prototype,"gvl",{get:function(){return this.gvl_},set:function(e){GVL_js_1.GVL.isInstanceOf(e)||(e=new GVL_js_1.GVL(e)),this.gvl_=e,this.publisherRestrictions.gvl=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cmpId",{get:function(){return this.cmpId_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>1))throw new index_js_1.TCModelError("cmpId",e);this.cmpId_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cmpVersion",{get:function(){return this.cmpVersion_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new index_js_1.TCModelError("cmpVersion",e);this.cmpVersion_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"consentScreen",{get:function(){return this.consentScreen_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new index_js_1.TCModelError("consentScreen",e);this.consentScreen_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"consentLanguage",{get:function(){return this.consentLanguage_},set:function(e){this.consentLanguage_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"publisherCountryCode",{get:function(){return this.publisherCountryCode_},set:function(e){if(!/^([A-z]){2}$/.test(e))throw new index_js_1.TCModelError("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vendorListVersion",{get:function(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_},set:function(e){if((e=Number(e)>>0)<0)throw new index_js_1.TCModelError("vendorListVersion",e);this.vendorListVersion_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"policyVersion",{get:function(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_},set:function(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new index_js_1.TCModelError("policyVersion",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.version_},set:function(e){this.version_=parseInt(e,10)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isServiceSpecific",{get:function(){return this.isServiceSpecific_},set:function(e){this.isServiceSpecific_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useNonStandardTexts",{get:function(){return this.useNonStandardTexts_},set:function(e){this.useNonStandardTexts_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportOOB",{get:function(){return this.supportOOB_},set:function(e){this.supportOOB_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"purposeOneTreatment",{get:function(){return this.purposeOneTreatment_},set:function(e){this.purposeOneTreatment_=e},enumerable:!1,configurable:!0}),t.prototype.setAllVendorConsents=function(){this.vendorConsents.set(this.gvl.vendors)},t.prototype.unsetAllVendorConsents=function(){this.vendorConsents.empty()},t.prototype.setAllVendorsDisclosed=function(){this.vendorsDisclosed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsDisclosed=function(){this.vendorsDisclosed.empty()},t.prototype.setAllVendorsAllowed=function(){this.vendorsAllowed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsAllowed=function(){this.vendorsAllowed.empty()},t.prototype.setAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.set(this.gvl.vendors)},t.prototype.unsetAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.empty()},t.prototype.setAllPurposeConsents=function(){this.purposeConsents.set(this.gvl.purposes)},t.prototype.unsetAllPurposeConsents=function(){this.purposeConsents.empty()},t.prototype.setAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.set(this.gvl.purposes)},t.prototype.unsetAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.empty()},t.prototype.setAllSpecialFeatureOptins=function(){this.specialFeatureOptins.set(this.gvl.specialFeatures)},t.prototype.unsetAllSpecialFeatureOptins=function(){this.specialFeatureOptins.empty()},t.prototype.setAll=function(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()},t.prototype.unsetAll=function(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()},Object.defineProperty(t.prototype,"numCustomPurposes",{get:function(){var e=this.numCustomPurposes_;if("object"==typeof this.customPurposes){var t=Object.keys(this.customPurposes).sort((function(e,t){return Number(e)-Number(t)}));e=parseInt(t.pop(),10)}return e},set:function(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new index_js_1.TCModelError("numCustomPurposes",e)},enumerable:!1,configurable:!0}),t.prototype.updated=function(){var e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t},t.consentLanguages=GVL_js_1.GVL.consentLanguages,t}(Cloneable_js_1.Cloneable);exports.TCModel=TCModel;

@@ -18,3 +18,3 @@ import { Fields } from '../model/index.js';

static readonly [Fields.specialFeatureOptins]: number;
static readonly [Fields.useNonStandardStacks]: number;
static readonly [Fields.useNonStandardTexts]: number;
static readonly [Fields.vendorListVersion]: number;

@@ -21,0 +21,0 @@ static readonly [Fields.version]: number;

@@ -18,3 +18,3 @@ import { Fields } from '../model/index.js';

static [Fields.specialFeatureOptins] = 12;
static [Fields.useNonStandardStacks] = 1;
static [Fields.useNonStandardTexts] = 1;
static [Fields.vendorListVersion] = 12;

@@ -21,0 +21,0 @@ static [Fields.version] = 6;

@@ -21,3 +21,3 @@ import { Fields } from '../../model/index.js';

[Fields.isServiceSpecific]: BooleanEncoder,
[Fields.useNonStandardStacks]: BooleanEncoder,
[Fields.useNonStandardTexts]: BooleanEncoder,
[Fields.specialFeatureOptins]: FixedVectorEncoder,

@@ -24,0 +24,0 @@ [Fields.purposeConsents]: FixedVectorEncoder,

@@ -12,3 +12,3 @@ import { BitLength } from '../BitLength.js';

if (!prVector.isEmpty()) {
const gvlVendorIds = Array.from(prVector.gvl.vendorIds);
const gvlVendorIds = [...prVector.gvl.vendorIds];
const gvlHasVendorBetween = (vendorId, nextVendorId) => {

@@ -15,0 +15,0 @@ const firstIndex = gvlVendorIds.indexOf(vendorId);

@@ -29,3 +29,3 @@ import { Segment, Fields } from '../../model/index.js';

Fields.isServiceSpecific,
Fields.useNonStandardStacks,
Fields.useNonStandardTexts,
Fields.specialFeatureOptins,

@@ -32,0 +32,0 @@ Fields.purposeConsents,

@@ -22,3 +22,3 @@ export declare class Fields {

static readonly specialFeatureOptins: 'specialFeatureOptins';
static readonly useNonStandardStacks: 'useNonStandardStacks';
static readonly useNonStandardTexts: 'useNonStandardTexts';
static readonly vendorConsents: 'vendorConsents';

@@ -25,0 +25,0 @@ static readonly vendorLegitimateInterests: 'vendorLegitimateInterests';

@@ -22,3 +22,3 @@ export class Fields {

static specialFeatureOptins = 'specialFeatureOptins';
static useNonStandardStacks = 'useNonStandardStacks';
static useNonStandardTexts = 'useNonStandardTexts';
static vendorConsents = 'vendorConsents';

@@ -25,0 +25,0 @@ static vendorLegitimateInterests = 'vendorLegitimateInterests';

@@ -99,3 +99,3 @@ import { PurposeRestriction } from './PurposeRestriction.js';

*/
restrictPurposeToLegalBasis(purposeRestriction, vendorsIds = Array.from(this.gvl.vendorIds)) {
restrictPurposeToLegalBasis(purposeRestriction, vendorsIds = [...this.gvl.vendorIds]) {
const hash = purposeRestriction.hash;

@@ -133,3 +133,3 @@ if (!this.has(hash)) {

if (this.has(hash)) {
vendorIds = Array.from(this.map.get(hash));
vendorIds = [...this.map.get(hash)];
}

@@ -140,7 +140,7 @@ }

this.map.forEach((vendorIds) => {
Array.from(vendorIds).forEach((vendorId) => {
[...vendorIds].forEach((vendorId) => {
vendorSet.add(vendorId);
});
});
vendorIds = Array.from(vendorSet);
vendorIds = [...vendorSet];
}

@@ -186,3 +186,3 @@ return vendorIds.sort((a, b) => a - b);

this.map.forEach((purposeRestrictionVendorIds) => {
const vendorIds = Array.from(purposeRestrictionVendorIds);
const vendorIds = [...purposeRestrictionVendorIds];
result = Math.max(vendorIds[vendorIds.length - 1], result);

@@ -211,3 +211,3 @@ });

});
return Array.from(purposeIds);
return [...purposeIds];
}

@@ -248,3 +248,3 @@ /**

const purposeRestriction = PurposeRestriction.unHash(hash);
const vendors = Array.from(vendorIds);
const vendors = [...vendorIds];
vendors.forEach((vendorId) => {

@@ -251,0 +251,0 @@ if (!this.isOkToHave(purposeRestriction.restrictionType, purposeRestriction.purposeId, vendorId)) {

@@ -14,3 +14,3 @@ import { Cloneable } from './Cloneable.js';

private supportOOB_;
private useNonStandardStacks_;
private useNonStandardTexts_;
private purposeOneTreatment_;

@@ -219,4 +219,4 @@ private publisherCountryCode_;

*/
set useNonStandardStacks(bool: boolean);
get useNonStandardStacks(): boolean;
set useNonStandardTexts(bool: boolean);
get useNonStandardTexts(): boolean;
/**

@@ -223,0 +223,0 @@ * Whether or not this publisher supports OOB signaling. On Global TC String

@@ -12,3 +12,3 @@ import { Cloneable } from './Cloneable.js';

supportOOB_ = true;
useNonStandardStacks_ = false;
useNonStandardTexts_ = false;
purposeOneTreatment_ = false;

@@ -318,7 +318,7 @@ publisherCountryCode_ = 'AA';

*/
set useNonStandardStacks(bool) {
this.useNonStandardStacks_ = bool;
set useNonStandardTexts(bool) {
this.useNonStandardTexts_ = bool;
}
get useNonStandardStacks() {
return this.useNonStandardStacks_;
get useNonStandardTexts() {
return this.useNonStandardTexts_;
}

@@ -325,0 +325,0 @@ /**

{
"name": "@didomi/iabtcf-core",
"version": "1.5.8",
"version": "1.5.9",
"description": "Ensures consistent encoding and decoding of TC Signals for the iab. Transparency and Consent Framework (TCF).",

@@ -5,0 +5,0 @@ "author": "Chris Paterson <tcf@chrispaterson.io>",

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