lpw
2025-03-18 bcf5da418199cecd2968f2f8bf2974c8dcc6e283
1
2
/*! Library version: 1.5.3. Commit hash: d2cc2d9 */
var GppModule;(()=>{"use strict";var e={968:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.compute=void 0;const i=n(651),r=n(227),s=n(124),o=n(923);function a(e,{state:t,transformers:n={default:e=>e}}){if(!e||"object"!=typeof e||!e.type)return;let a;switch(e.type){case i.PrivacySignalType.CONSTANT_VALUE:a=(0,s.compute)(e);break;case i.PrivacySignalType.VENDORS:a=(0,r.compute)(e,t);break;case i.PrivacySignalType.PURPOSES:a=(0,o.compute)(e,t)}let d=n.default||(e=>e);return e.transformer&&(d=n[e.transformer]||d),void 0!==e.default&&null==a?d(e.default):d(a)}t.compute=function e(t,n){return Array.isArray(t)?t.map((e=>a(e,n))):t&&"object"==typeof t&&t.type?a(t,n):t&&"object"==typeof t?Object.keys(t).reduce(((i,r)=>(Array.isArray(n.pick)&&!n.pick.includes(r)||(i[r]=e(t[r],n)),i)),{}):void 0}},613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.create=void 0;const i=n(651),r=n(124),s=n(923),o=n(227);t.create=function(e,t){switch(e){case i.PrivacySignalType.CONSTANT_VALUE:(0,r.validateParams)(t);break;case i.PrivacySignalType.VENDORS:(0,o.validateParams)(t);break;case i.PrivacySignalType.PURPOSES:(0,s.validateParams)(t);break;default:throw new Error(`Invalid privacy signal type: ${e}. Valid types are: ${Object.values(i.PrivacySignalType).join(", ")}`)}return Object.assign({type:e},t)}},349:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(635);i.__exportStar(n(968),t),i.__exportStar(n(613),t),i.__exportStar(n(651),t),i.__exportStar(n(603),t)},506:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0;const i=n(128);t.compute=function({value:e}){return(0,i.validOrUndefined)(e)},t.validateParams=function(e){if(!("value"in e))throw new Error("Missing required parameter: value");if("boolean"!=typeof e.value&&null!==e.value&&void 0!==e.value)throw new Error("Invalid parameter: value must be a boolean, null, or undefined");if(void 0!==e.transformer&&"string"!=typeof e.transformer)throw new Error("Invalid parameter: transformer must be a string, or undefined")}},710:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},124:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(635);i.__exportStar(n(506),t),i.__exportStar(n(710),t)},603:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(635);i.__exportStar(n(710),t),i.__exportStar(n(880),t),i.__exportStar(n(784),t)},923:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(635);i.__exportStar(n(220),t),i.__exportStar(n(880),t)},220:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0,t.compute=function({ids:e},t){return Array.isArray(e)?e.every((e=>{var n,i,r;return!0===(null===(r=null===(i=null===(n=null==t?void 0:t.userStatus)||void 0===n?void 0:n.purposes)||void 0===i?void 0:i[e])||void 0===r?void 0:r.enabled)})):void 0},t.validateParams=function(e){if(!("ids"in e))throw new Error("Missing required parameter: ids");if(!Array.isArray(e.ids))throw new Error("Invalid parameter: ids must be an array of strings");if(e.ids.some((e=>"string"!=typeof e)))throw new Error("Invalid parameter: ids must be an array of strings");if(void 0!==e.transformer&&"string"!=typeof e.transformer)throw new Error("Invalid parameter: transformer must be a string, or undefined")}},880:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},227:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(635);i.__exportStar(n(420),t),i.__exportStar(n(784),t)},420:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0,t.compute=function({ids:e},t){return Array.isArray(e)?e.every((e=>{var n,i,r;return!0===(null===(r=null===(i=null===(n=null==t?void 0:t.userStatus)||void 0===n?void 0:n.vendors)||void 0===i?void 0:i[e])||void 0===r?void 0:r.enabled)})):void 0},t.validateParams=function(e){if(!("ids"in e))throw new Error("Missing required parameter: ids");if(!Array.isArray(e.ids))throw new Error("Invalid parameter: ids must be an array of strings");if(e.ids.some((e=>"string"!=typeof e)))throw new Error("Invalid parameter: ids must be an array of strings");if(void 0!==e.transformer&&"string"!=typeof e.transformer)throw new Error("Invalid parameter: transformer must be a string, or undefined")}},784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},651:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(635);i.__exportStar(n(552),t),i.__exportStar(n(930),t)},552:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrivacySignalType=void 0,function(e){e.CONSTANT_VALUE="constant",e.VENDORS="vendors",e.PURPOSES="purposes"}(t.PrivacySignalType||(t.PrivacySignalType={}))},930:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},128:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validOrUndefined=void 0,t.validOrUndefined=function(e){return"boolean"==typeof e||null==e?e:void 0}},635:(e,t,n)=>{n.r(t),n.d(t,{__addDisposableResource:()=>U,__assign:()=>s,__asyncDelegator:()=>P,__asyncGenerator:()=>w,__asyncValues:()=>f,__await:()=>A,__awaiter:()=>h,__classPrivateFieldGet:()=>R,__classPrivateFieldIn:()=>b,__classPrivateFieldSet:()=>M,__createBinding:()=>p,__decorate:()=>a,__disposeResources:()=>y,__esDecorate:()=>c,__exportStar:()=>g,__extends:()=>r,__generator:()=>_,__importDefault:()=>V,__importStar:()=>D,__makeTemplateObject:()=>C,__metadata:()=>E,__param:()=>d,__propKey:()=>u,__read:()=>T,__rest:()=>o,__rewriteRelativeImportExtension:()=>L,__runInitializers:()=>l,__setFunctionName:()=>S,__spread:()=>I,__spreadArray:()=>v,__spreadArrays:()=>N,__values:()=>O,default:()=>F});var i=function(e,t){return i=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])},i(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)};function o(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function a(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function d(e,t){return function(n,i){t(n,i,e)}}function c(e,t,n,i,r,s){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,d=i.kind,c="getter"===d?"get":"setter"===d?"set":"value",l=!t&&e?i.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,i.name):{}),S=!1,E=n.length-1;E>=0;E--){var h={};for(var _ in i)h[_]="access"===_?{}:i[_];for(var _ in i.access)h.access[_]=i.access[_];h.addInitializer=function(e){if(S)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(e||null))};var p=(0,n[E])("accessor"===d?{get:u.get,set:u.set}:u[c],h);if("accessor"===d){if(void 0===p)continue;if(null===p||"object"!=typeof p)throw new TypeError("Object expected");(a=o(p.get))&&(u.get=a),(a=o(p.set))&&(u.set=a),(a=o(p.init))&&r.unshift(a)}else(a=o(p))&&("field"===d?r.unshift(a):u[c]=a)}l&&Object.defineProperty(l,i.name,u),S=!0}function l(e,t,n){for(var i=arguments.length>2,r=0;r<t.length;r++)n=i?t[r].call(e,n):t[r].call(e);return i?n:void 0}function u(e){return"symbol"==typeof e?e:"".concat(e)}function S(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function E(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{d(i.next(e))}catch(e){s(e)}}function a(e){try{d(i.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}d((i=i.apply(e,t||[])).next())}))}function _(e,t){var n,i,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(d){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}}var p=Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]};function g(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||p(t,e,n)}function O(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function T(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function I(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(T(arguments[t]));return e}function N(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i}function v(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function A(e){return this instanceof A?(this.v=e,this):new A(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),s=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),i[Symbol.asyncIterator]=function(){return this},i;function o(e,t){r[e]&&(i[e]=function(t){return new Promise((function(n,i){s.push([e,t,n,i])>1||a(e,t)}))},t&&(i[e]=t(i[e])))}function a(e,t){try{(n=r[e](t)).value instanceof A?Promise.resolve(n.value.v).then(d,c):l(s[0][2],n)}catch(e){l(s[0][3],e)}var n}function d(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function P(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,r){t[i]=e[i]?function(t){return(n=!n)?{value:A(e[i](t)),done:!1}:r?r(t):t}:r}}function f(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=O(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,r){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,r,(t=e[n](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var m=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return m(t,e),t}function V(e){return e&&e.__esModule?e:{default:e}}function R(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function M(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n}function b(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function U(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],n&&(r=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t}var G="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};function y(e){function t(t){e.error=e.hasError?new G(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,i=0;return function r(){for(;n=e.stack.pop();)try{if(!n.async&&1===i)return i=0,e.stack.push(n),Promise.resolve().then(r);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(r,(function(e){return t(e),r()}))}else i|=1}catch(e){t(e)}if(1===i)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function L(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,i,r,s){return n?t?".jsx":".js":!i||r&&s?i+r+"."+s.toLowerCase()+"js":e})):e}const F={__extends:r,__assign:s,__rest:o,__decorate:a,__param:d,__esDecorate:c,__runInitializers:l,__propKey:u,__setFunctionName:S,__metadata:E,__awaiter:h,__generator:_,__createBinding:p,__exportStar:g,__values:O,__read:T,__spread:I,__spreadArrays:N,__spreadArray:v,__await:A,__asyncGenerator:w,__asyncDelegator:P,__asyncValues:f,__makeTemplateObject:C,__importStar:D,__importDefault:V,__classPrivateFieldGet:R,__classPrivateFieldSet:M,__classPrivateFieldIn:b,__addDisposableResource:U,__disposeResources:y,__rewriteRelativeImportExtension:L}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i,r,s,o,a,d,c,l,u,S,E,h,_,p,g={};function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},O.apply(null,arguments)}n.r(g),n.d(g,{addGPPStringUpdateListener:()=>wn,cmpUIHiddenHandler:()=>Vn,cmpUIShownHandler:()=>Dn,getGPPVariables:()=>Un,getGppString:()=>Rn,initGPPCmpApi:()=>bn,updateGPP:()=>mn});class T{constructor(e){this.gppVersion=void 0,this.cmpStatus=void 0,this.cmpDisplayStatus=void 0,this.signalStatus=void 0,this.supportedAPIs=void 0,this.cmpId=void 0,this.sectionList=void 0,this.applicableSections=void 0,this.gppString=void 0,this.parsedSections=void 0,this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}class I{constructor(e,t,n){this.callback=void 0,this.parameter=void 0,this.success=!0,this.cmpApiContext=void 0,this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:n})}execute(){try{return this.respond()}catch(e){return this.invokeCallback(null),null}}invokeCallback(e){var t=null!==e;this.callback&&this.callback(e,t)}}!function(e){e.ADD_EVENT_LISTENER="addEventListener",e.GET_FIELD="getField",e.GET_SECTION="getSection",e.HAS_SECTION="hasSection",e.PING="ping",e.REMOVE_EVENT_LISTENER="removeEventListener"}(i||(i={}));class N{constructor(e,t,n,i){this.eventName=void 0,this.listenerId=void 0,this.data=void 0,this.pingData=void 0,this.eventName=e,this.listenerId=t,this.data=n,this.pingData=i}}r=i.ADD_EVENT_LISTENER,s=i.GET_FIELD,o=i.GET_SECTION,a=i.HAS_SECTION,d=i.PING,c=i.REMOVE_EVENT_LISTENER;class v{}v[r]=class extends I{respond(){var e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new N("listenerRegistered",e,!0,new T(this.cmpApiContext));this.invokeCallback(t)}},v[s]=class extends I{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("<section>.<field> parameter required");var e=this.parameter.split(".");if(2!=e.length)throw new Error("Field name must be in the format <section>.<fieldName>");var t=e[0],n=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,n);this.invokeCallback(i)}},v[o]=class extends I{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("<section> parameter required");var e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}},v[a]=class extends I{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("<section>[.version] parameter required");var e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}},v[d]=class extends I{respond(){var e=new T(this.cmpApiContext);this.invokeCallback(e)}},v[c]=class extends I{respond(){var e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new N("listenerRemoved",e,t,new T(this.cmpApiContext));this.invokeCallback(n)}},function(e){e.STUB="stub",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(l||(l={})),function(e){e.VISIBLE="visible",e.HIDDEN="hidden",e.DISABLED="disabled"}(u||(u={})),function(e){e.GPP_LOADED="gpploaded",e.CMP_UI_SHOWN="cmpuishown",e.USER_ACTION_COMPLETE="useractioncomplete"}(S||(S={})),function(e){e.NOT_READY="not ready",e.READY="ready"}(E||(E={}));class A{constructor(e,t){if(this.callQueue=void 0,this.customCommands=void 0,this.cmpApiContext=void 0,this.cmpApiContext=e,t){var n=i.ADD_EVENT_LISTENER;if(null!=t&&t[n])throw new Error("Built-In Custom Commmand for "+n+" not allowed");if(n=i.REMOVE_EVENT_LISTENER,null!=t&&t[n])throw new Error("Built-In Custom Commmand for "+n+" not allowed");this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch(e){this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,n,i){if("string"!=typeof e)t(null,!1);else{if(t&&"function"!=typeof t)throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,n):this.isBuiltInCommand(e)?new v[e](this.cmpApiContext,t,n).execute():t&&t(null,!1)}}purgeQueuedCalls(){var e=this.callQueue;this.callQueue=[],e.forEach((e=>{window.__gpp(...e)}))}isCustomCommand(e){return this.customCommands&&"function"==typeof this.customCommands[e]}isBuiltInCommand(e){return void 0!==v[e]}}class w{constructor(e){this.eventQueue=new Map,this.queueNumber=1e3,this.cmpApiContext=void 0,this.cmpApiContext=e;try{for(var t=window.__gpp("events")||[],n=0;n<t.length;n++){var i=t[n];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(e){console.log(e)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach(((n,i)=>{var r=new N(e,i,t,new T(this.cmpApiContext));n.callback(r,!0)}))}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class P extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class f{constructor(){this.segments=void 0,this.encodedString=null,this.dirty=!1,this.decoded=!0,this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(var t=0;t<this.segments.length;t++){var n=this.segments[t];if(n.getFieldNames().includes(e))return n.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(var t=0;t<this.segments.length;t++){var n=this.segments[t];if(n.hasField(e))return n.getFieldValue(e)}throw new P("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(var n=0;n<this.segments.length;n++){var i=this.segments[n];if(i.hasField(e))return void i.setFieldValue(e,t)}throw new P("Invalid field: '"+e+"'")}toObj(){for(var e={},t=0;t<this.segments.length;t++){var n=this.segments[t].toObj();for(var[i,r]of Object.entries(n))e[i]=r}return e}encode(){return(null==this.encodedString||0===this.encodedString.length||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class C extends Error{constructor(e){super(e),this.name="DecodingError"}}class m extends Error{constructor(e){super(e),this.name="EncodingError"}}class D{static encode(e,t){var n=[];if(e>=1)for(n.push(1);e>=2*n[0];)n.unshift(2*n[0]);for(var i="",r=0;r<n.length;r++){var s=n[r];e>=s?(i+="1",e-=s):i+="0"}if(i.length>t)throw new m("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new C("Undecodable FixedInteger '"+e+"'");for(var t=0,n=[],i=0;i<e.length;i++)n[e.length-(i+1)]=0===i?1:2*n[e.length-i];for(var r=0;r<e.length;r++)"1"===e.charAt(r)&&(t+=n[r]);return t}}class V{encode(e){if(!/^[0-1]*$/.test(e))throw new m("Unencodable Base64Url '"+e+"'");e=this.pad(e);for(var t="",n=0;n<=e.length-6;){var i=e.substring(n,n+6);try{var r=D.decode(i);t+=V.DICT.charAt(r),n+=6}catch(t){throw new m("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new C("Undecodable Base64URL string '"+e+"'");for(var t="",n=0;n<e.length;n++){var i=e.charAt(n),r=V.REVERSE_DICT.get(i);t+=D.encode(r,6)}return t}}V.DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",V.REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);class R extends V{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}h=R,R.instance=new h;class M{constructor(){}static getInstance(){return this.instance}encode(e,t){for(var n="",i=0;i<t.length;i++){var r=t[i];if(!e.containsKey(r))throw new Error("Field not found: '"+r+"'");n+=e.get(r).encode()}return n}decode(e,t,n){for(var i=0,r=0;r<t.length;r++){var s=t[r];if(!n.containsKey(s))throw new Error("Field not found: '"+s+"'");var o=n.get(s);try{var a=o.substring(e,i);o.decode(a),i+=a.length}catch(e){if("SubstringError"!==e.name||o.getHardFailIfMissing())throw new C("Unable to decode field '"+s+"'");return}}}}_=M,M.instance=new _;class b{static encode(e){var t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);for(var n=2;e>=t[n-1]+t[n-2];)t.push(t[n-1]+t[n-2]),n++}for(var i="1",r=t.length-1;r>=0;r--){var s=t[r];e>=s?(i="1"+i,e-=s):i="0"+i}return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new C("Undecodable FibonacciInteger '"+e+"'");for(var t=0,n=[],i=0;i<e.length-1;i++)0===i?n.push(1):1===i?n.push(2):n.push(n[i-1]+n[i-2]);for(var r=0;r<e.length-1;r++)"1"===e.charAt(r)&&(t+=n[r]);return t}}class U{static encode(e){if(!0===e)return"1";if(!1===e)return"0";throw new m("Unencodable Boolean '"+e+"'")}static decode(e){if("1"===e)return!0;if("0"===e)return!1;throw new C("Undecodable Boolean '"+e+"'")}}class G{static encode(e){e=e.sort(((e,t)=>e-t));for(var t=[],n=0,i=0;i<e.length;){for(var r=i;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(i,r+1)),i=r+1}for(var s=D.encode(t.length,12),o=0;o<t.length;o++)if(1==t[o].length){var a=t[o][0]-n;n=t[o][0],s+="0"+b.encode(a)}else{var d=t[o][0]-n;n=t[o][0];var c=t[o][t[o].length-1]-n;n=t[o][t[o].length-1],s+="1"+b.encode(d)+b.encode(c)}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new C("Undecodable FibonacciIntegerRange '"+e+"'");for(var t=[],n=D.decode(e.substring(0,12)),i=0,r=12,s=0;s<n;s++){var o=U.decode(e.substring(r,r+1));if(r++,!0===o){var a=e.indexOf("11",r),d=b.decode(e.substring(r,a+2))+i;i=d,r=a+2,a=e.indexOf("11",r);var c=b.decode(e.substring(r,a+2))+i;i=c,r=a+2;for(var l=d;l<=c;l++)t.push(l)}else{var u=e.indexOf("11",r),S=b.decode(e.substring(r,u+2))+i;i=S,t.push(S),r=u+2}}return t}}class y extends Error{constructor(e){super(e),this.name="ValidationError"}}class L{constructor(e){void 0===e&&(e=!0),this.hardFailIfMissing=void 0,this.validator=void 0,this.value=void 0,this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return void 0!==this.value&&null!==this.value}getValue(){return this.value}setValue(e){if(this.validator&&!this.validator.test(e))throw new y("Invalid value '"+e+"'");this.value=e}getHardFailIfMissing(){return this.hardFailIfMissing}}class F extends C{constructor(e){super(e),this.name="SubstringError"}}class x{static substring(e,t,n){if(n>e.length||t<0||t>n)throw new F("Invalid substring indexes "+t+":"+n+" for string of length "+e.length);return e.substring(t,n)}}class j extends L{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return G.encode(this.value)}catch(e){throw new m(e)}}decode(e){try{this.value=G.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{for(var n=D.decode(x.substring(e,t,t+12)),i=t+12,r=0;r<n;r++)i="1"===e.charAt(i)?e.indexOf("11",e.indexOf("11",i+1)+2)+2:e.indexOf("11",i+1)+2;return x.substring(e,t,i)}catch(e){throw new F(e)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort(((e,t)=>e-t)))}}class H extends L{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.bitStringLength=void 0,this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new m(e)}}decode(e){try{this.value=D.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{return x.substring(e,t,t+this.bitStringLength)}catch(e){throw new F(e)}}}class B{constructor(){this.fields=new Map}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach(((e,t)=>{this.fields.set(t,e)}))}}!function(e){e.ID="Id",e.VERSION="Version",e.SECTION_IDS="SectionIds"}(p||(p={}));var k,K=[p.ID,p.VERSION,p.SECTION_IDS];class z{constructor(){this.fields=void 0,this.encodedString=null,this.dirty=!1,this.decoded=!0,this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new P("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),!this.fields.containsKey(e))throw new P(e+" not found");this.fields.get(e).setValue(t),this.dirty=!0}toObj(){for(var e={},t=this.getFieldNames(),n=0;n<t.length;n++){var i=t[n],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(null==this.encodedString||0===this.encodedString.length||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Y extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return K}initializeFields(){var e=new B;return e.put(p.ID.toString(),new H(6,W.ID)),e.put(p.VERSION.toString(),new H(6,W.VERSION)),e.put(p.SECTION_IDS.toString(),new j([])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class W extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return W.ID}getName(){return W.NAME}getVersion(){return W.VERSION}initializeSegments(){var e=[];return e.push(new Y),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i]);return t}encodeSection(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(i.encode())}return t.join(".")}}W.ID=3,W.VERSION=1,W.NAME="header",function(e){e.VERSION="Version",e.CREATED="Created",e.LAST_UPDATED="LastUpdated",e.CMP_ID="CmpId",e.CMP_VERSION="CmpVersion",e.CONSENT_SCREEN="ConsentScreen",e.CONSENT_LANGUAGE="ConsentLanguage",e.VENDOR_LIST_VERSION="VendorListVersion",e.POLICY_VERSION="PolicyVersion",e.IS_SERVICE_SPECIFIC="IsServiceSpecific",e.USE_NON_STANDARD_STACKS="UseNonStandardStacks",e.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",e.PURPOSE_CONSENTS="PurposeConsents",e.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",e.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",e.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",e.VENDOR_CONSENTS="VendorConsents",e.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",e.PUBLISHER_RESTRICTIONS="PublisherRestrictions",e.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",e.PUBLISHER_CONSENTS="PublisherConsents",e.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",e.NUM_CUSTOM_PURPOSES="NumCustomPurposes",e.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",e.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",e.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",e.VENDORS_ALLOWED="VendorsAllowed",e.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",e.VENDORS_DISCLOSED="VendorsDisclosed"}(k||(k={}));var Q,X,q=[k.VERSION,k.CREATED,k.LAST_UPDATED,k.CMP_ID,k.CMP_VERSION,k.CONSENT_SCREEN,k.CONSENT_LANGUAGE,k.VENDOR_LIST_VERSION,k.POLICY_VERSION,k.IS_SERVICE_SPECIFIC,k.USE_NON_STANDARD_STACKS,k.SPECIAL_FEATURE_OPTINS,k.PURPOSE_CONSENTS,k.PURPOSE_LEGITIMATE_INTERESTS,k.PURPOSE_ONE_TREATMENT,k.PUBLISHER_COUNTRY_CODE,k.VENDOR_CONSENTS,k.VENDOR_LEGITIMATE_INTERESTS,k.PUBLISHER_RESTRICTIONS],$=[k.PUBLISHER_PURPOSES_SEGMENT_TYPE,k.PUBLISHER_CONSENTS,k.PUBLISHER_LEGITIMATE_INTERESTS,k.NUM_CUSTOM_PURPOSES,k.PUBLISHER_CUSTOM_CONSENTS,k.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],J=[k.VENDORS_ALLOWED_SEGMENT_TYPE,k.VENDORS_ALLOWED],Z=[k.VENDORS_DISCLOSED_SEGMENT_TYPE,k.VENDORS_DISCLOSED];class ee extends V{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}Q=ee,ee.instance=new Q;class te{static encode(e){e.sort(((e,t)=>e-t));for(var t=[],n=0;n<e.length;){for(var i=n;i<e.length-1&&e[i]+1===e[i+1];)i++;t.push(e.slice(n,i+1)),n=i+1}for(var r=D.encode(t.length,12),s=0;s<t.length;s++)1===t[s].length?r+="0"+D.encode(t[s][0],16):r+="1"+D.encode(t[s][0],16)+D.encode(t[s][t[s].length-1],16);return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new C("Undecodable FixedIntegerRange '"+e+"'");for(var t=[],n=D.decode(e.substring(0,12)),i=12,r=0;r<n;r++){var s=U.decode(e.substring(i,i+1));if(i++,!0===s){var o=D.decode(e.substring(i,i+16));i+=16;var a=D.decode(e.substring(i,i+16));i+=16;for(var d=o;d<=a;d++)t.push(d)}else{var c=D.decode(e.substring(i,i+16));t.push(c),i+=16}}return t}}class ne extends L{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return te.encode(this.value)}catch(e){throw new m(e)}}decode(e){try{this.value=te.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{for(var n=D.decode(x.substring(e,t,t+12)),i=t+12,r=0;r<n;r++)"1"===e.charAt(i)?i+=33:i+=17;return x.substring(e,t,i)}catch(e){throw new F(e)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort(((e,t)=>e-t)))}}class ie{constructor(e,t,n){this.key=void 0,this.type=void 0,this.ids=void 0,this.key=e,this.type=t,this.ids=n}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class re extends L{constructor(e,t,n,i){void 0===i&&(i=!0),super(i),this.keyBitStringLength=void 0,this.typeBitStringLength=void 0,this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(n)}encode(){try{var e=this.value,t="";t+=D.encode(e.length,12);for(var n=0;n<e.length;n++){var i=e[n];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=te.encode(i.getIds())}return t}catch(e){throw new m(e)}}decode(e){try{for(var t=[],n=D.decode(x.substring(e,0,12)),i=12,r=0;r<n;r++){var s=D.decode(x.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;var o=D.decode(x.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;var a=new ne([]).substring(e,i),d=te.decode(a);i+=a.length,t.push(new ie(s,o,d))}this.value=t}catch(e){throw new C(e)}}substring(e,t){try{var n="";n+=x.substring(e,t,t+12);for(var i=D.decode(n.toString()),r=t+n.length,s=0;s<i;s++){var o=x.substring(e,r,r+this.keyBitStringLength);r+=o.length,n+=o;var a=x.substring(e,r,r+this.typeBitStringLength);r+=a.length,n+=a;var d=new ne([]).substring(e,r);r+=d.length,n+=d}return n}catch(e){throw new F(e)}}}class se extends L{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return U.encode(this.value)}catch(e){throw new m(e)}}decode(e){try{this.value=U.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{return x.substring(e,t,t+1)}catch(e){throw new F(e)}}}class oe{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||36!==e.length)throw new C("Undecodable Datetime '"+e+"'");return new Date(100*D.decode(e))}}class ae extends L{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return oe.encode(this.value)}catch(e){throw new m(e)}}decode(e){try{this.value=oe.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{return x.substring(e,t,t+36)}catch(e){throw new F(e)}}}class de{static encode(e,t){if(e.length>t)throw new m("Too many values '"+e.length+"'");for(var n="",i=0;i<e.length;i++)n+=U.encode(e[i]);for(;n.length<t;)n+="0";return n}static decode(e){if(!/^[0-1]*$/.test(e))throw new C("Undecodable FixedBitfield '"+e+"'");for(var t=[],n=0;n<e.length;n++)t.push(U.decode(e.substring(n,n+1)));return t}}class ce extends L{constructor(e,t){void 0===t&&(t=!0),super(t),this.numElements=void 0,this.numElements=e.length,this.setValue(e)}encode(){try{return de.encode(this.value,this.numElements)}catch(e){throw new m(e)}}decode(e){try{this.value=de.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{return x.substring(e,t,t+this.numElements)}catch(e){throw new F(e)}}getValue(){return[...super.getValue()]}setValue(e){for(var t=[...e],n=t.length;n<this.numElements;n++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class le{static encode(e,t){for(;e.length<t;)e+=" ";for(var n="",i=0;i<e.length;i++){var r=e.charCodeAt(i);if(32===r)n+=D.encode(63,6);else{if(!(r>=65))throw new m("Unencodable FixedString '"+e+"'");n+=D.encode(e.charCodeAt(i)-65,6)}}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!=0)throw new C("Undecodable FixedString '"+e+"'");for(var t="",n=0;n<e.length;n+=6){var i=D.decode(e.substring(n,n+6));t+=63===i?" ":String.fromCharCode(i+65)}return t.trim()}}class ue extends L{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.stringLength=void 0,this.stringLength=e,this.setValue(t)}encode(){try{return le.encode(this.value,this.stringLength)}catch(e){throw new m(e)}}decode(e){try{this.value=le.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{return x.substring(e,t,t+6*this.stringLength)}catch(e){throw new F(e)}}}class Se extends L{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{var e=this.value.length>0?this.value[this.value.length-1]:0,t=te.encode(this.value),n=t.length,i=e;if(n<=i)return D.encode(e,16)+"1"+t;for(var r=[],s=0,o=0;o<e;o++)o===this.value[s]-1?(r[o]=!0,s++):r[o]=!1;return D.encode(e,16)+"0"+de.encode(r,i)}catch(e){throw new m(e)}}decode(e){try{if("1"===e.charAt(16))this.value=te.decode(e.substring(17));else{for(var t=[],n=de.decode(e.substring(17)),i=0;i<n.length;i++)!0===n[i]&&t.push(i+1);this.value=t}}catch(e){throw new C(e)}}substring(e,t){try{var n=D.decode(x.substring(e,t,t+16));return"1"===e.charAt(t+16)?x.substring(e,t,t+17)+new ne([]).substring(e,t+17):x.substring(e,t,t+17+n)}catch(e){throw new F(e)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort(((e,t)=>e-t)))}}class Ee extends z{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return q}initializeFields(){var e=new Date,t=new B;return t.put(k.VERSION.toString(),new H(6,Oe.VERSION)),t.put(k.CREATED.toString(),new ae(e)),t.put(k.LAST_UPDATED.toString(),new ae(e)),t.put(k.CMP_ID.toString(),new H(12,0)),t.put(k.CMP_VERSION.toString(),new H(12,0)),t.put(k.CONSENT_SCREEN.toString(),new H(6,0)),t.put(k.CONSENT_LANGUAGE.toString(),new ue(2,"EN")),t.put(k.VENDOR_LIST_VERSION.toString(),new H(12,0)),t.put(k.POLICY_VERSION.toString(),new H(6,2)),t.put(k.IS_SERVICE_SPECIFIC.toString(),new se(!1)),t.put(k.USE_NON_STANDARD_STACKS.toString(),new se(!1)),t.put(k.SPECIAL_FEATURE_OPTINS.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(k.PURPOSE_CONSENTS.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(k.PURPOSE_LEGITIMATE_INTERESTS.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(k.PURPOSE_ONE_TREATMENT.toString(),new se(!1)),t.put(k.PUBLISHER_COUNTRY_CODE.toString(),new ue(2,"AA")),t.put(k.VENDOR_CONSENTS.toString(),new Se([])),t.put(k.VENDOR_LEGITIMATE_INTERESTS.toString(),new Se([])),t.put(k.PUBLISHER_RESTRICTIONS.toString(),new re(6,2,[],!1)),t}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class he extends L{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.getLength=void 0,this.getLength=e,this.setValue(t)}encode(){try{return de.encode(this.value,this.getLength())}catch(e){throw new m(e)}}decode(e){try{this.value=de.decode(e)}catch(e){throw new C(e)}}substring(e,t){try{return x.substring(e,t,t+this.getLength())}catch(e){throw new F(e)}}getValue(){return[...super.getValue()]}setValue(e){for(var t=this.getLength(),n=[...e],i=n.length;i<t;i++)n.push(!1);n.length>t&&(n=n.slice(0,t)),super.setValue([...n])}}class _e extends z{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return $}initializeFields(){var e=new B;e.put(k.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new H(3,3)),e.put(k.PUBLISHER_CONSENTS.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(k.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));var t=new H(6,0);return e.put(k.NUM_CUSTOM_PURPOSES.toString(),t),e.put(k.PUBLISHER_CUSTOM_CONSENTS.toString(),new he((()=>t.getValue()),[])),e.put(k.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new he((()=>t.getValue()),[])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class pe extends z{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return J}initializeFields(){var e=new B;return e.put(k.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new H(3,2)),e.put(k.VENDORS_ALLOWED.toString(),new Se([])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class ge extends z{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Z}initializeFields(){var e=new B;return e.put(k.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new H(3,1)),e.put(k.VENDORS_DISCLOSED.toString(),new Se([])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class Oe extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Oe.ID}getName(){return Oe.NAME}getVersion(){return Oe.VERSION}initializeSegments(){var e=[];return e.push(new Ee),e.push(new _e),e.push(new pe),e.push(new ge),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),i=0;i<n.length;i++){var r=n[i];if(0!==r.length){var s=r.charAt(0);if(s>="A"&&s<="H")t[0].decode(n[i]);else if(s>="I"&&s<="P")t[3].decode(n[i]);else if(s>="Q"&&s<="X")t[2].decode(n[i]);else{if(!(s>="Y"&&s<="Z"||s>="a"&&s<="f"))throw new C("Unable to decode TcfEuV2 segment '"+r+"'");t[1].decode(n[i])}}}return t}encodeSection(e){var t=[];e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(k.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode())));return t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==k.CREATED&&e!==k.LAST_UPDATED){var n=new Date;super.setFieldValue(k.CREATED,n),super.setFieldValue(k.LAST_UPDATED,n)}}}Oe.ID=2,Oe.VERSION=2,Oe.NAME="tcfeuv2",function(e){e.VERSION="Version",e.CREATED="Created",e.LAST_UPDATED="LastUpdated",e.CMP_ID="CmpId",e.CMP_VERSION="CmpVersion",e.CONSENT_SCREEN="ConsentScreen",e.CONSENT_LANGUAGE="ConsentLanguage",e.VENDOR_LIST_VERSION="VendorListVersion",e.TCF_POLICY_VERSION="TcfPolicyVersion",e.USE_NON_STANDARD_STACKS="UseNonStandardStacks",e.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",e.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",e.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",e.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",e.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",e.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",e.PUB_RESTRICTIONS="PubRestrictions",e.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",e.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",e.NUM_CUSTOM_PURPOSES="NumCustomPurposes",e.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",e.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",e.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",e.DISCLOSED_VENDORS="DisclosedVendors"}(X||(X={}));var Te,Ie=[X.VERSION,X.CREATED,X.LAST_UPDATED,X.CMP_ID,X.CMP_VERSION,X.CONSENT_SCREEN,X.CONSENT_LANGUAGE,X.VENDOR_LIST_VERSION,X.TCF_POLICY_VERSION,X.USE_NON_STANDARD_STACKS,X.SPECIAL_FEATURE_EXPRESS_CONSENT,X.PURPOSES_EXPRESS_CONSENT,X.PURPOSES_IMPLIED_CONSENT,X.VENDOR_EXPRESS_CONSENT,X.VENDOR_IMPLIED_CONSENT,X.PUB_RESTRICTIONS],Ne=[X.PUB_PURPOSES_SEGMENT_TYPE,X.PUB_PURPOSES_EXPRESS_CONSENT,X.PUB_PURPOSES_IMPLIED_CONSENT,X.NUM_CUSTOM_PURPOSES,X.CUSTOM_PURPOSES_EXPRESS_CONSENT,X.CUSTOM_PURPOSES_IMPLIED_CONSENT],ve=[X.DISCLOSED_VENDORS_SEGMENT_TYPE,X.DISCLOSED_VENDORS];class Ae extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Ie}initializeFields(){var e=new Date,t=new B;return t.put(X.VERSION.toString(),new H(6,fe.VERSION)),t.put(X.CREATED.toString(),new ae(e)),t.put(X.LAST_UPDATED.toString(),new ae(e)),t.put(X.CMP_ID.toString(),new H(12,0)),t.put(X.CMP_VERSION.toString(),new H(12,0)),t.put(X.CONSENT_SCREEN.toString(),new H(6,0)),t.put(X.CONSENT_LANGUAGE.toString(),new ue(2,"EN")),t.put(X.VENDOR_LIST_VERSION.toString(),new H(12,0)),t.put(X.TCF_POLICY_VERSION.toString(),new H(6,2)),t.put(X.USE_NON_STANDARD_STACKS.toString(),new se(!1)),t.put(X.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(X.PURPOSES_EXPRESS_CONSENT.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(X.PURPOSES_IMPLIED_CONSENT.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(X.VENDOR_EXPRESS_CONSENT.toString(),new Se([])),t.put(X.VENDOR_IMPLIED_CONSENT.toString(),new Se([])),t.put(X.PUB_RESTRICTIONS.toString(),new re(6,2,[],!1)),t}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class we extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Ne}initializeFields(){var e=new B;e.put(X.PUB_PURPOSES_SEGMENT_TYPE.toString(),new H(3,3)),e.put(X.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(X.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new ce([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));var t=new H(6,0);return e.put(X.NUM_CUSTOM_PURPOSES.toString(),t),e.put(X.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new he((()=>t.getValue()),[])),e.put(X.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new he((()=>t.getValue()),[])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Pe extends z{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return ve}initializeFields(){var e=new B;return e.put(X.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new H(3,1)),e.put(X.DISCLOSED_VENDORS.toString(),new Se([])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class fe extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fe.ID}getName(){return fe.NAME}getVersion(){return fe.VERSION}initializeSegments(){var e=[];return e.push(new Ae),e.push(new we),e.push(new Pe),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),i=0;i<n.length;i++){var r=n[i];if(0!==r.length){var s=r.charAt(0);if(s>="A"&&s<="H")t[0].decode(n[i]);else if(s>="I"&&s<="P")t[2].decode(n[i]);else{if(!(s>="Y"&&s<="Z"||s>="a"&&s<="f"))throw new C("Unable to decode TcfCaV1 segment '"+r+"'");t[1].decode(n[i])}}}return t}encodeSection(e){var t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(X.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==X.CREATED&&e!==X.LAST_UPDATED){var n=new Date;super.setFieldValue(X.CREATED,n),super.setFieldValue(X.LAST_UPDATED,n)}}}fe.ID=5,fe.VERSION=1,fe.NAME="tcfcav1";class Ce{constructor(e,t){this.validator=void 0,this.value=null,this.validator=t||new class{test(e){return!0}},this.setValue(e)}hasValue(){return null!=this.value}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class me{constructor(e,t){this.validator=void 0,this.value=null,this.validator=t||new class{test(e){return!0}},this.setValue(e)}hasValue(){return null!=this.value}getValue(){return this.value}setValue(e){this.value=e}}class De{constructor(){this.fields=new Map}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach(((e,t)=>{this.fields.set(t,e)}))}}!function(e){e.VERSION="Version",e.NOTICE="Notice",e.OPT_OUT_SALE="OptOutSale",e.LSPA_COVERED="LspaCovered"}(Te||(Te={}));var Ve,Re=[Te.VERSION,Te.NOTICE,Te.OPT_OUT_SALE,Te.LSPA_COVERED];class Me extends z{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Re}initializeFields(){var e=new class{test(e){return"-"===e||"Y"===e||"N"===e}},t=new De;return t.put(Te.VERSION,new me(be.VERSION)),t.put(Te.NOTICE,new Ce("-",e)),t.put(Te.OPT_OUT_SALE,new Ce("-",e)),t.put(Te.LSPA_COVERED,new Ce("-",e)),t}encodeSegment(e){var t="";return t+=e.get(Te.VERSION).getValue(),t+=e.get(Te.NOTICE).getValue(),t+=e.get(Te.OPT_OUT_SALE).getValue(),t+=e.get(Te.LSPA_COVERED).getValue()}decodeSegment(e,t){if(null==e||4!=e.length)throw new C("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Te.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Te.NOTICE).setValue(e.charAt(1)),t.get(Te.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Te.LSPA_COVERED).setValue(e.charAt(3))}catch(t){throw new C("Unable to decode UspV1CoreSegment '"+e+"'")}}}class be extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return be.ID}getName(){return be.NAME}getVersion(){return be.VERSION}initializeSegments(){var e=[];return e.push(new Me),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i]);return t}encodeSection(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(i.encode())}return t.join(".")}}be.ID=6,be.VERSION=1,be.NAME="uspv1",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",e.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",e.SALE_OPT_OUT="SaleOptOut",e.SHARING_OPT_OUT="SharingOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.PERSONAL_DATA_CONSENTS="PersonalDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Ve||(Ve={}));var Ue,Ge=[Ve.VERSION,Ve.SHARING_NOTICE,Ve.SALE_OPT_OUT_NOTICE,Ve.SHARING_OPT_OUT_NOTICE,Ve.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Ve.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Ve.SENSITIVE_DATA_LIMIT_USE_NOTICE,Ve.SALE_OPT_OUT,Ve.SHARING_OPT_OUT,Ve.TARGETED_ADVERTISING_OPT_OUT,Ve.SENSITIVE_DATA_PROCESSING,Ve.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ve.PERSONAL_DATA_CONSENTS,Ve.MSPA_COVERED_TRANSACTION,Ve.MSPA_OPT_OUT_OPTION_MODE,Ve.MSPA_SERVICE_PROVIDER_MODE],ye=[Ve.GPC_SEGMENT_TYPE,Ve.GPC];class Le{static encode(e,t,n){if(e.length>n)throw new m("Too many values '"+e.length+"'");for(var i="",r=0;r<e.length;r++)i+=D.encode(e[r],t);for(;i.length<t*n;)i+="0";return i}static decode(e,t,n){if(!/^[0-1]*$/.test(e))throw new C("Undecodable FixedInteger '"+e+"'");if(e.length>t*n)throw new C("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new C("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*n;)e+="0";e.length>t*n&&(e=e.substring(0,t*n));for(var i=[],r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<n;)i.push(0);return i}}class Fe extends L{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.elementBitStringLength=void 0,this.numElements=void 0,this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return Le.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new m(e)}}decode(e){try{this.value=Le.decode(e,this.elementBitStringLength,this.numElements)}catch(e){throw new C(e)}}substring(e,t){try{return x.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(e){throw new F(e)}}getValue(){return[...super.getValue()]}setValue(e){for(var t=[...e],n=t.length;n<this.numElements;n++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class xe extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Ge}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(Ve.VERSION.toString(),new H(6,He.VERSION)),i.put(Ve.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ve.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ve.SHARING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ve.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ve.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ve.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ve.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Ve.SHARING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Ve.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Ve.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Ve.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0]).withValidator(n)),i.put(Ve.PERSONAL_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),i.put(Ve.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(Ve.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(Ve.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsNatCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(Ve.SHARING_NOTICE).getValue(),t=this.fields.get(Ve.SHARING_OPT_OUT_NOTICE).getValue(),n=this.fields.get(Ve.SHARING_OPT_OUT).getValue(),i=this.fields.get(Ve.SALE_OPT_OUT_NOTICE).getValue(),r=this.fields.get(Ve.SALE_OPT_OUT).getValue(),s=this.fields.get(Ve.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),o=this.fields.get(Ve.TARGETED_ADVERTISING_OPT_OUT).getValue(),a=this.fields.get(Ve.MSPA_SERVICE_PROVIDER_MODE).getValue(),d=this.fields.get(Ve.MSPA_OPT_OUT_OPTION_MODE).getValue(),c=this.fields.get(Ve.SENSITIVE_DATA_LIMIT_USE_NOTICE).getValue();if(0==e){if(0!=n)throw new y("Invalid usnat sharing notice / opt out combination: {"+e+" / "+n+"}")}else if(1==e){if(1!=n&&2!=n)throw new y("Invalid usnat sharing notice / opt out combination: {"+e+" / "+n+"}")}else if(2==e&&1!=n)throw new y("Invalid usnat sharing notice / opt out combination: {"+e+" / "+n+"}");if(0==t){if(0!=n)throw new y("Invalid usnat sharing notice / opt out combination: {"+t+" / "+n+"}")}else if(1==t){if(1!=n&&2!=n)throw new y("Invalid usnat sharing notice / opt out combination: {"+t+" / "+n+"}")}else if(2==t&&1!=n)throw new y("Invalid usnat sharing notice / opt out combination: {"+t+" / "+n+"}");if(0==i){if(0!=r)throw new y("Invalid usnat sale notice / opt out combination: {"+i+" / "+r+"}")}else if(1==i){if(1!=r&&2!=r)throw new y("Invalid usnat sale notice / opt out combination: {"+i+" / "+r+"}")}else if(2==i&&1!=r)throw new y("Invalid usnat sale notice / opt out combination: {"+i+" / "+r+"}");if(0==s){if(0!=o)throw new y("Invalid usnat targeted advertising notice / opt out combination: {"+s+" / "+o+"}")}else if(1==s){if(1!=r&&2!=r)throw new y("Invalid usnat targeted advertising notice / opt out combination: {"+s+" / "+o+"}")}else if(2==s&&1!=r)throw new y("Invalid usnat targeted advertising notice / opt out combination: {"+s+" / "+o+"}");if(0==a){if(0!=i)throw new y("Invalid usnat mspa service provider mode / sale opt out notice combination: {"+a+" / "+i+"}");if(0!=t)throw new y("Invalid usnat mspa service provider mode / sharing opt out notice combination: {"+a+" / "+t+"}");if(0!=c)throw new y("Invalid usnat mspa service provider mode / sensitive data limit use notice combination: {"+a+" / "+c+"}")}else if(1==a){if(2!=d)throw new y("Invalid usnat mspa service provider / opt out option modes combination: {"+a+" / "+a+"}");if(0!=i)throw new y("Invalid usnat mspa service provider mode / sale opt out notice combination: {"+a+" / "+i+"}");if(0!=t)throw new y("Invalid usnat mspa service provider mode / sharing opt out notice combination: {"+a+" / "+t+"}");if(0!=c)throw new y("Invalid usnat mspa service provider mode / sensitive data limit use notice combination: {"+a+" / "+c+"}")}else if(2==a&&1!=d)throw new y("Invalid usnat mspa service provider / opt out option modes combination: {"+a+" / "+d+"}")}}class je extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return ye}initializeFields(){var e=new B;return e.put(Ve.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Ve.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Ve.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsNatGpcSegment '"+e+"'")}}}class He extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return He.ID}getName(){return He.NAME}getVersion(){return He.VERSION}initializeSegments(){var e=[];return e.push(new xe),e.push(new je),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Ve.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Ve.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Ve.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}He.ID=7,He.VERSION=1,He.NAME="usnat",function(e){e.VERSION="Version",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",e.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",e.SALE_OPT_OUT="SaleOptOut",e.SHARING_OPT_OUT="SharingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.PERSONAL_DATA_CONSENTS="PersonalDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Ue||(Ue={}));var Be,ke=[Ue.VERSION,Ue.SALE_OPT_OUT_NOTICE,Ue.SHARING_OPT_OUT_NOTICE,Ue.SENSITIVE_DATA_LIMIT_USE_NOTICE,Ue.SALE_OPT_OUT,Ue.SHARING_OPT_OUT,Ue.SENSITIVE_DATA_PROCESSING,Ue.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ue.PERSONAL_DATA_CONSENTS,Ue.MSPA_COVERED_TRANSACTION,Ue.MSPA_OPT_OUT_OPTION_MODE,Ue.MSPA_SERVICE_PROVIDER_MODE],Ke=[Ue.GPC_SEGMENT_TYPE,Ue.GPC];class ze extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return ke}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(Ue.VERSION.toString(),new H(6,We.VERSION)),i.put(Ue.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ue.SHARING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ue.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ue.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Ue.SHARING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Ue.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Ue.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0]).withValidator(n)),i.put(Ue.PERSONAL_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),i.put(Ue.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(Ue.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(Ue.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsCaCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(Ue.SHARING_OPT_OUT_NOTICE).getValue(),t=this.fields.get(Ue.SHARING_OPT_OUT).getValue(),n=this.fields.get(Ue.SALE_OPT_OUT_NOTICE).getValue(),i=this.fields.get(Ue.SALE_OPT_OUT).getValue(),r=this.fields.get(Ue.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(Ue.MSPA_OPT_OUT_OPTION_MODE).getValue(),o=this.fields.get(Ue.SENSITIVE_DATA_LIMIT_USE_NOTICE).getValue();if(0==e){if(0!=t)throw new y("Invalid usca sharing notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usca sharing notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usca sharing notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usca sale notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=i&&2!=i)throw new y("Invalid usca sale notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=i)throw new y("Invalid usca sale notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=n)throw new y("Invalid usca mspa service provider mode / sale opt out notice combination: {"+r+" / "+n+"}");if(0!=e)throw new y("Invalid usca mspa service provider mode / sharing opt out notice combination: {"+r+" / "+e+"}");if(0!=o)throw new y("Invalid usca mspa service provider mode / sensitive data limit use notice combination: {"+r+" / "+o+"}")}else if(1==r){if(2!=s)throw new y("Invalid usca mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=n)throw new y("Invalid usca mspa service provider mode / sale opt out notice combination: {"+r+" / "+n+"}");if(0!=e)throw new y("Invalid usca mspa service provider mode / sharing opt out notice combination: {"+r+" / "+e+"}");if(0!=o)throw new y("Invalid usca mspa service provider mode / sensitive data limit use notice combination: {"+r+" / "+o+"}")}else if(2==r&&1!=s)throw new y("Invalid usca mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class Ye extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Ke}initializeFields(){var e=new B;return e.put(Ue.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Ue.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Ue.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsCaGpcSegment '"+e+"'")}}}class We extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return We.ID}getName(){return We.NAME}getVersion(){return We.VERSION}initializeSegments(){var e=[];return e.push(new ze),e.push(new Ye),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Ue.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Ue.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Ue.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}We.ID=8,We.VERSION=1,We.NAME="usca",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"}(Be||(Be={}));var Qe,Xe=[Be.VERSION,Be.SHARING_NOTICE,Be.SALE_OPT_OUT_NOTICE,Be.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Be.SALE_OPT_OUT,Be.TARGETED_ADVERTISING_OPT_OUT,Be.SENSITIVE_DATA_PROCESSING,Be.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Be.MSPA_COVERED_TRANSACTION,Be.MSPA_OPT_OUT_OPTION_MODE,Be.MSPA_SERVICE_PROVIDER_MODE];class qe extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Xe}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(Be.VERSION.toString(),new H(6,$e.VERSION)),i.put(Be.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Be.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Be.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Be.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Be.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Be.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Be.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),i.put(Be.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(Be.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(Be.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsVaCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(Be.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(Be.SALE_OPT_OUT).getValue(),n=this.fields.get(Be.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(Be.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(Be.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(Be.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usva sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usva sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usva sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usva targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usva targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usva targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usva mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usva mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usva mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usva mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class $e extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return $e.ID}getName(){return $e.NAME}getVersion(){return $e.VERSION}initializeSegments(){var e=[];return e.push(new qe),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i]);return t}encodeSection(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(i.encode())}return t.join(".")}}$e.ID=9,$e.VERSION=1,$e.NAME="usva",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Qe||(Qe={}));var Je,Ze=[Qe.VERSION,Qe.SHARING_NOTICE,Qe.SALE_OPT_OUT_NOTICE,Qe.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Qe.SALE_OPT_OUT,Qe.TARGETED_ADVERTISING_OPT_OUT,Qe.SENSITIVE_DATA_PROCESSING,Qe.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Qe.MSPA_COVERED_TRANSACTION,Qe.MSPA_OPT_OUT_OPTION_MODE,Qe.MSPA_SERVICE_PROVIDER_MODE],et=[Qe.GPC_SEGMENT_TYPE,Qe.GPC];class tt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Ze}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(Qe.VERSION.toString(),new H(6,it.VERSION)),i.put(Qe.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Qe.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Qe.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Qe.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Qe.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Qe.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0]).withValidator(n)),i.put(Qe.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),i.put(Qe.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(Qe.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(Qe.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsCoCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(Qe.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(Qe.SALE_OPT_OUT).getValue(),n=this.fields.get(Qe.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(Qe.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(Qe.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(Qe.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usco sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usco sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usco sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usco targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usco targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usco targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usco mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usco mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usco mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usco mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class nt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return et}initializeFields(){var e=new B;return e.put(Qe.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Qe.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Qe.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsCoGpcSegment '"+e+"'")}}}class it extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return it.ID}getName(){return it.NAME}getVersion(){return it.VERSION}initializeSegments(){var e=[];return e.push(new tt),e.push(new nt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Qe.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Qe.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Qe.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}it.ID=10,it.VERSION=1,it.NAME="usco",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"}(Je||(Je={}));var rt,st=[Je.VERSION,Je.SHARING_NOTICE,Je.SALE_OPT_OUT_NOTICE,Je.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Je.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Je.SALE_OPT_OUT,Je.TARGETED_ADVERTISING_OPT_OUT,Je.SENSITIVE_DATA_PROCESSING,Je.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Je.MSPA_COVERED_TRANSACTION,Je.MSPA_OPT_OUT_OPTION_MODE,Je.MSPA_SERVICE_PROVIDER_MODE];class ot extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return st}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(Je.VERSION.toString(),new H(6,at.VERSION)),i.put(Je.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Je.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Je.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Je.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Je.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Je.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Je.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Je.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),i.put(Je.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(Je.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(Je.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsUtCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(Je.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(Je.SALE_OPT_OUT).getValue(),n=this.fields.get(Je.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(Je.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(Je.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(Je.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usut sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usut sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usut sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usut targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usut targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usut targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usut mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usut mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usut mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usut mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class at extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return at.ID}getName(){return at.NAME}getVersion(){return at.VERSION}initializeSegments(){var e=[];return e.push(new ot),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i]);return t}encodeSection(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(i.encode())}return t.join(".")}}at.ID=11,at.VERSION=1,at.NAME="usut",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(rt||(rt={}));var dt,ct=[rt.VERSION,rt.SHARING_NOTICE,rt.SALE_OPT_OUT_NOTICE,rt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,rt.SALE_OPT_OUT,rt.TARGETED_ADVERTISING_OPT_OUT,rt.SENSITIVE_DATA_PROCESSING,rt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,rt.MSPA_COVERED_TRANSACTION,rt.MSPA_OPT_OUT_OPTION_MODE,rt.MSPA_SERVICE_PROVIDER_MODE],lt=[rt.GPC_SEGMENT_TYPE,rt.GPC];class ut extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return ct}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(rt.VERSION.toString(),new H(6,Et.VERSION)),i.put(rt.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(rt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(rt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(rt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(rt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(rt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(rt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(rt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(rt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(rt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsCtCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(rt.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(rt.SALE_OPT_OUT).getValue(),n=this.fields.get(rt.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(rt.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(rt.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(rt.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class St extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return lt}initializeFields(){var e=new B;return e.put(rt.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(rt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(rt.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsCtGpcSegment '"+e+"'")}}}class Et extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Et.ID}getName(){return Et.NAME}getVersion(){return Et.VERSION}initializeSegments(){var e=[];return e.push(new ut),e.push(new St),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(rt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(rt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(rt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Et.ID=12,Et.VERSION=1,Et.NAME="usct",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"}(dt||(dt={}));var ht,_t=[dt.VERSION,dt.PROCESSING_NOTICE,dt.SALE_OPT_OUT_NOTICE,dt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,dt.SALE_OPT_OUT,dt.TARGETED_ADVERTISING_OPT_OUT,dt.SENSITIVE_DATA_PROCESSING,dt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,dt.ADDITIONAL_DATA_PROCESSING_CONSENT,dt.MSPA_COVERED_TRANSACTION,dt.MSPA_OPT_OUT_OPTION_MODE,dt.MSPA_SERVICE_PROVIDER_MODE];class pt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return _t}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(dt.VERSION.toString(),new H(6,gt.VERSION)),i.put(dt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(dt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(dt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(dt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(dt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(dt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(dt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(dt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),i.put(dt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(dt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(dt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsFlCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(dt.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(dt.SALE_OPT_OUT).getValue(),n=this.fields.get(dt.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(dt.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(dt.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(dt.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usva sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usva sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usva sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usva targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usva targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usva targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usva mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usva mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usva mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usva mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class gt extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gt.ID}getName(){return gt.NAME}getVersion(){return gt.VERSION}initializeSegments(){var e=[];return e.push(new pt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i]);return t}encodeSection(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(i.encode())}return t.join(".")}}gt.ID=13,gt.VERSION=1,gt.NAME="usfl",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(ht||(ht={}));var Ot,Tt=[ht.VERSION,ht.SHARING_NOTICE,ht.SALE_OPT_OUT_NOTICE,ht.TARGETED_ADVERTISING_OPT_OUT_NOTICE,ht.SALE_OPT_OUT,ht.TARGETED_ADVERTISING_OPT_OUT,ht.SENSITIVE_DATA_PROCESSING,ht.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,ht.ADDITIONAL_DATA_PROCESSING_CONSENT,ht.MSPA_COVERED_TRANSACTION,ht.MSPA_OPT_OUT_OPTION_MODE,ht.MSPA_SERVICE_PROVIDER_MODE],It=[ht.GPC_SEGMENT_TYPE,ht.GPC];class Nt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Tt}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(ht.VERSION.toString(),new H(6,At.VERSION)),i.put(ht.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(ht.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(ht.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(ht.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(ht.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(ht.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(ht.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(ht.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),i.put(ht.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(ht.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(ht.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsMtCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(ht.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(ht.SALE_OPT_OUT).getValue(),n=this.fields.get(ht.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(ht.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(ht.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(ht.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class vt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return It}initializeFields(){var e=new B;return e.put(ht.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(ht.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(ht.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsMtGpcSegment '"+e+"'")}}}class At extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return At.ID}getName(){return At.NAME}getVersion(){return At.VERSION}initializeSegments(){var e=[];return e.push(new Nt),e.push(new vt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(ht.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(ht.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(ht.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}At.ID=14,At.VERSION=1,At.NAME="usmt",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Ot||(Ot={}));var wt,Pt=[Ot.VERSION,Ot.PROCESSING_NOTICE,Ot.SALE_OPT_OUT_NOTICE,Ot.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Ot.SALE_OPT_OUT,Ot.TARGETED_ADVERTISING_OPT_OUT,Ot.SENSITIVE_DATA_PROCESSING,Ot.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ot.ADDITIONAL_DATA_PROCESSING_CONSENT,Ot.MSPA_COVERED_TRANSACTION,Ot.MSPA_OPT_OUT_OPTION_MODE,Ot.MSPA_SERVICE_PROVIDER_MODE],ft=[Ot.GPC_SEGMENT_TYPE,Ot.GPC];class Ct extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Pt}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(Ot.VERSION.toString(),new H(6,Dt.VERSION)),i.put(Ot.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ot.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ot.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(Ot.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Ot.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(Ot.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Ot.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(Ot.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),i.put(Ot.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(Ot.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(Ot.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsOrCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(Ot.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(Ot.SALE_OPT_OUT).getValue(),n=this.fields.get(Ot.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(Ot.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(Ot.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(Ot.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class mt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return ft}initializeFields(){var e=new B;return e.put(Ot.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Ot.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Ot.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsOrGpcSegment '"+e+"'")}}}class Dt extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Dt.ID}getName(){return Dt.NAME}getVersion(){return Dt.VERSION}initializeSegments(){var e=[];return e.push(new Ct),e.push(new mt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Ot.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Ot.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Ot.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Dt.ID=15,Dt.VERSION=1,Dt.NAME="usor",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(wt||(wt={}));var Vt=[wt.VERSION,wt.PROCESSING_NOTICE,wt.SALE_OPT_OUT_NOTICE,wt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,wt.SALE_OPT_OUT,wt.TARGETED_ADVERTISING_OPT_OUT,wt.SENSITIVE_DATA_PROCESSING,wt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,wt.ADDITIONAL_DATA_PROCESSING_CONSENT,wt.MSPA_COVERED_TRANSACTION,wt.MSPA_OPT_OUT_OPTION_MODE,wt.MSPA_SERVICE_PROVIDER_MODE],Rt=[wt.GPC_SEGMENT_TYPE,wt.GPC];class Mt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Vt}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>2)return!1}return!0}},i=new B;return i.put(wt.VERSION.toString(),new H(6,Ut.VERSION)),i.put(wt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(wt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(wt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),i.put(wt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(wt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),i.put(wt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(wt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),i.put(wt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),i.put(wt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),i.put(wt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),i.put(wt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),i}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsTxCoreSegment '"+e+"'")}}validate(){var e=this.fields.get(wt.SALE_OPT_OUT_NOTICE).getValue(),t=this.fields.get(wt.SALE_OPT_OUT).getValue(),n=this.fields.get(wt.TARGETED_ADVERTISING_OPT_OUT_NOTICE).getValue(),i=this.fields.get(wt.TARGETED_ADVERTISING_OPT_OUT).getValue(),r=this.fields.get(wt.MSPA_SERVICE_PROVIDER_MODE).getValue(),s=this.fields.get(wt.MSPA_OPT_OUT_OPTION_MODE).getValue();if(0==e){if(0!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(1==e){if(1!=t&&2!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}")}else if(2==e&&1!=t)throw new y("Invalid usct sale notice / opt out combination: {"+e+" / "+t+"}");if(0==n){if(0!=i)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(1==n){if(1!=t&&2!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}")}else if(2==n&&1!=t)throw new y("Invalid usct targeted advertising notice / opt out combination: {"+n+" / "+i+"}");if(0==r){if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(1==r){if(2!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+r+"}");if(0!=e)throw new y("Invalid usct mspa service provider mode / sale opt out notice combination: {"+r+" / "+e+"}")}else if(2==r&&1!=s)throw new y("Invalid usct mspa service provider / opt out option modes combination: {"+r+" / "+s+"}")}}class bt extends z{constructor(e){super(),this.base64UrlEncoder=R.getInstance(),this.bitStringEncoder=M.getInstance(),e&&this.decode(e)}getFieldNames(){return Rt}initializeFields(){var e=new B;return e.put(wt.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(wt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(wt.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new C("Unable to decode UsTxGpcSegment '"+e+"'")}}}class Ut extends f{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ut.ID}getName(){return Ut.NAME}getVersion(){return Ut.VERSION}initializeSegments(){var e=[];return e.push(new Mt),e.push(new bt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(wt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(wt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(wt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Ut.ID=16,Ut.VERSION=1,Ut.NAME="ustx";class Gt{}Gt.SECTION_ID_NAME_MAP=new Map([[Oe.ID,Oe.NAME],[fe.ID,fe.NAME],[be.ID,be.NAME],[He.ID,He.NAME],[We.ID,We.NAME],[$e.ID,$e.NAME],[it.ID,it.NAME],[at.ID,at.NAME],[Et.ID,Et.NAME],[gt.ID,gt.NAME],[At.ID,At.NAME],[Dt.ID,Dt.NAME],[Ut.ID,Ut.NAME]]),Gt.SECTION_ORDER=[Oe.NAME,fe.NAME,be.NAME,He.NAME,We.NAME,$e.NAME,it.NAME,at.NAME,Et.NAME,gt.NAME,At.NAME,Dt.NAME,Ut.NAME];class yt{constructor(e){this.sections=new Map,this.encodedString=null,this.decoded=!0,this.dirty=!1,e&&this.decode(e)}setFieldValue(e,t,n){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);var i=null;if(this.sections.has(e)?i=this.sections.get(e):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===Oe.NAME?(i=new Oe,this.sections.set(Oe.NAME,i)):e===be.NAME?(i=new be,this.sections.set(be.NAME,i)):e===He.NAME?(i=new He,this.sections.set(He.NAME,i)):e===We.NAME?(i=new We,this.sections.set(We.NAME,i)):e===$e.NAME?(i=new $e,this.sections.set($e.NAME,i)):e===it.NAME?(i=new it,this.sections.set(it.NAME,i)):e===at.NAME?(i=new at,this.sections.set(at.NAME,i)):e===Et.NAME?(i=new Et,this.sections.set(Et.NAME,i)):e===gt.NAME?(i=new gt,this.sections.set(gt.NAME,i)):e===At.NAME?(i=new At,this.sections.set(At.NAME,i)):e===Dt.NAME?(i=new Dt,this.sections.set(Dt.NAME,i)):e===Ut.NAME&&(i=new Ut,this.sections.set(Ut.NAME,i)),!i)throw new P(e+"."+t+" not found");i.setFieldValue(t,n),this.dirty=!0}setFieldValueBySectionId(e,t,n){this.setFieldValue(Gt.SECTION_ID_NAME_MAP.get(e),t,n)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(Gt.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),!!this.sections.has(e)&&this.sections.get(e).hasField(t)}hasFieldBySectionId(e,t){return this.hasField(Gt.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(Gt.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&null!=this.encodedString&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(Gt.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);var e=new W;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);for(var e=[],t=0;t<Gt.SECTION_ORDER.length;t++){var n=Gt.SECTION_ORDER[t];if(this.sections.has(n)){var i=this.sections.get(n);e.push(i.getId())}}return e}encodeModel(e){for(var t=[],n=[],i=0;i<Gt.SECTION_ORDER.length;i++){var r=Gt.SECTION_ORDER[i];if(e.has(r)){var s=e.get(r);t.push(s.encode()),n.push(s.getId())}}var o=new W;return o.setFieldValue("SectionIds",n),t.unshift(o.encode()),t.join("~")}decodeModel(e){if(!e||0==e.length||e.startsWith("DB")){var t=e.split("~"),n=new Map;if(t[0].startsWith("D")){var i=new W(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new C("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(var r=0;r<i.length;r++){if(""===t[r+1].trim())throw new C("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===fe.ID){var s=new fe(t[r+1]);n.set(fe.NAME,s)}else if(i[r]===Oe.ID){var o=new Oe(t[r+1]);n.set(Oe.NAME,o)}else if(i[r]===be.ID){var a=new be(t[r+1]);n.set(be.NAME,a)}else if(i[r]===He.ID){var d=new He(t[r+1]);n.set(He.NAME,d)}else if(i[r]===We.ID){var c=new We(t[r+1]);n.set(We.NAME,c)}else if(i[r]===$e.ID){var l=new $e(t[r+1]);n.set($e.NAME,l)}else if(i[r]===it.ID){var u=new it(t[r+1]);n.set(it.NAME,u)}else if(i[r]===at.ID){var S=new at(t[r+1]);n.set(at.NAME,S)}else if(i[r]===Et.ID){var E=new Et(t[r+1]);n.set(Et.NAME,E)}else if(i[r]===gt.ID){var h=new gt(t[r+1]);n.set(gt.NAME,h)}else if(i[r]===At.ID){var _=new At(t[r+1]);n.set(At.NAME,_)}else if(i[r]===Dt.ID){var g=new Dt(t[r+1]);n.set(Dt.NAME,g)}else if(i[r]===Ut.ID){var O=new Ut(t[r+1]);n.set(Ut.NAME,O)}}}return n}if(e.startsWith("C")){var T=new Map,I=new Oe(e);return T.set(Oe.NAME,I),(new W).setFieldValue(p.SECTION_IDS,[2]),T.set(W.NAME,I),T}throw new C("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(Gt.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){var n=null;this.sections.has(e)?n=this.sections.get(e):e===fe.NAME?(n=new fe,this.sections.set(fe.NAME,n)):e===Oe.NAME?(n=new Oe,this.sections.set(Oe.NAME,n)):e===be.NAME?(n=new be,this.sections.set(be.NAME,n)):e===He.NAME?(n=new He,this.sections.set(He.NAME,n)):e===We.NAME?(n=new We,this.sections.set(We.NAME,n)):e===$e.NAME?(n=new $e,this.sections.set($e.NAME,n)):e===it.NAME?(n=new it,this.sections.set(it.NAME,n)):e===at.NAME?(n=new at,this.sections.set(at.NAME,n)):e===Et.NAME?(n=new Et,this.sections.set(Et.NAME,n)):e===gt.NAME?(n=new gt,this.sections.set(gt.NAME,n)):e===At.NAME?(n=new At,this.sections.set(At.NAME,n)):e===Dt.NAME?(n=new Dt,this.sections.set(Dt.NAME,n)):e===Ut.NAME&&(n=new Ut,this.sections.set(Ut.NAME,n)),n&&n.decode(t)}decodeSectionById(e,t){this.decodeSection(Gt.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);for(var e={},t=0;t<Gt.SECTION_ORDER.length;t++){var n=Gt.SECTION_ORDER[t];this.sections.has(n)&&(e[n]=this.sections.get(n).toObj())}return e}encode(){return(null==this.encodedString||0===this.encodedString.length||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Lt{constructor(){this.gppVersion="1.1",this.supportedAPIs=[],this.eventQueue=new w(this),this.cmpStatus=l.LOADING,this.cmpDisplayStatus=u.HIDDEN,this.signalStatus=E.NOT_READY,this.applicableSections=[],this.gppModel=new yt,this.cmpId=void 0,this.cmpVersion=void 0,this.eventStatus=void 0}reset(){this.eventQueue.clear(),this.cmpStatus=l.LOADING,this.cmpDisplayStatus=u.HIDDEN,this.signalStatus=E.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new yt,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Ft extends Error{constructor(e){super(e),this.name="GVLError"}}class xt{has(e){return xt.langSet.has(e)}forEach(e){xt.langSet.forEach(e)}get size(){return xt.langSet.size}}function jt(e,t,n,i,r,s,o){try{var a=e[s](o),d=a.value}catch(e){return void n(e)}a.done?t(d):Promise.resolve(d).then(i,r)}function Ht(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var s=e.apply(t,n);function o(e){jt(s,i,r,o,a,"next",e)}function a(e){jt(s,i,r,o,a,"throw",e)}o(void 0)}))}}xt.langSet=new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]);class Bt{static absCall(e,t,n,i){return new Promise(((r,s)=>{var o=new XMLHttpRequest;o.withCredentials=n,o.addEventListener("load",(()=>{if(o.readyState==XMLHttpRequest.DONE)if(o.status>=200&&o.status<300){var e=o.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}r(e)}else s(new Error("HTTP Status: "+o.status+" response type: "+o.responseType))})),o.addEventListener("error",(()=>{s(new Error("error"))})),o.addEventListener("abort",(()=>{s(new Error("aborted"))})),null===t?o.open("GET",e,!0):o.open("POST",e,!0),o.responseType="json",o.timeout=i,o.ontimeout=()=>{s(new Error("Timeout "+i+"ms "+e))},o.send(t)}))}static post(e,t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=0),this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=0),this.absCall(e,null,t,n)}}class kt{constructor(){this.vendors=void 0,this.consentLanguages=new xt,this.gvlSpecificationVersion=void 0,this.vendorListVersion=void 0,this.tcfPolicyVersion=void 0,this.lastUpdated=void 0,this.purposes=void 0,this.specialPurposes=void 0,this.features=void 0,this.specialFeatures=void 0,this.stacks=void 0,this.dataCategories=void 0,this.language=kt.DEFAULT_LANGUAGE,this.vendorIds=void 0,this.ready=!1,this.fullVendorList=void 0,this.byPurposeVendorMap=void 0,this.bySpecialPurposeVendorMap=void 0,this.byFeatureVendorMap=void 0,this.bySpecialFeatureVendorMap=void 0,this.baseUrl=void 0,this.languageFilename="purposes-[LANG].json"}static fromVendorList(e){var t=new kt;return t.populate(e),t}static fromUrl(e){return Ht((function*(){var t=e.baseUrl;if(!t||0===t.length)throw new Ft("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Ft("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&"/"!==t[t.length-1]&&(t+="/");var n=new kt;if(n.baseUrl=t,e.languageFilename?n.languageFilename=e.languageFilename:n.languageFilename="purposes-[LANG].json",e.version>0){var i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");var r=t+i.replace("[VERSION]",String(e.version));n.populate(yield Bt.fetch(r))}else{var s=e.latestFilename;s||(s="vendor-list.json");var o=t+s;n.populate(yield Bt.fetch(o))}return n}))()}changeLanguage(e){var t=this;return Ht((function*(){var n=e.toUpperCase();if(!t.consentLanguages.has(n))throw new Ft("unsupported language "+e);if(n!==t.language){t.language=n;var i=t.baseUrl+t.languageFilename.replace("[LANG]",e);try{t.populate(yield Bt.fetch(i))}catch(e){throw new Ft("unable to load language: "+e.message)}}}))()}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return void 0!==e&&void 0!==e.vendors}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((e=>{this.byPurposeVendorMap[e]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((e=>{this.bySpecialPurposeVendorMap[e]=new Set})),Object.keys(this.features).forEach((e=>{this.byFeatureVendorMap[e]=new Set})),Object.keys(this.specialFeatures).forEach((e=>{this.bySpecialFeatureVendorMap[e]=new Set})),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map((e=>+e))),this.vendorIds=new Set(e),this.vendors=e.reduce(((e,t)=>{var n=this.vendors[String(t)];return n&&void 0===n.deletedDate&&(n.purposes.forEach((e=>{this.byPurposeVendorMap[String(e)].consent.add(t)})),n.specialPurposes.forEach((e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)})),n.legIntPurposes&&n.legIntPurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)})),n.impConsPurposes&&n.impConsPurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].impCons.add(t)})),n.flexiblePurposes&&n.flexiblePurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)})),n.features.forEach((e=>{this.byFeatureVendorMap[String(e)].add(t)})),n.specialFeatures.forEach((e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)})),e[t]=n),e}),{})}getFilteredVendors(e,t,n,i){var r=e.charAt(0).toUpperCase()+e.slice(1),s={};return("purpose"===e&&n?this["by"+r+"VendorMap"][String(t)][n]:this["by"+(i?"Special":"")+r+"VendorMap"][String(t)]).forEach((e=>{s[String(e)]=this.vendors[String(e)]})),s}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}kt.DEFAULT_LANGUAGE="EN";class Kt{constructor(e,t,n){this.callResponder=void 0,this.cmpApiContext=void 0,this.cmpApiContext=new Lt,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new A(this.cmpApiContext,n)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(Gt.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Gt.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,n){this.cmpApiContext.gppModel.setFieldValue(e,t,n)}setFieldValueBySectionId(e,t,n){this.setFieldValue(Gt.SECTION_ID_NAME_MAP.get(e),t,n)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Gt.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Gt.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Gt.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Gt.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return kt.fromVendorList(e)}getGvlFromUrl(e){return Ht((function*(){return kt.fromUrl(e)}))()}}var zt,Yt,Wt,Qt=n(349),Xt="tcfcav1",qt="tcfeuv2",$t="usca",Jt="usco",Zt="usct",en="usnat",tn="usp",nn="usut",rn="usva",sn="usde",on="usia",an="usne",dn="usnh",cn="usnj",ln="ustn",un="usfl",Sn="usmt",En="usor",hn="ustx",_n={[qt]:2,[Xt]:5,[tn]:6,[en]:7,[$t]:8,[rn]:9,[Jt]:10,[nn]:11,[Zt]:12,[un]:13,[Sn]:14,[En]:15,[hn]:16,[sn]:17,[on]:18,[an]:19,[dn]:20,[cn]:21,[ln]:22},pn={[Xt]:["Version","Created","LastUpdated","CmpId","CmpVersion","ConsentScreen","ConsentLanguage","VendorListVersion","TcfPolicyVersion","UseNonStandardStacks","SpecialFeatureExpressConsent","PurposesExpressConsent","PurposesImpliedConsent","VendorExpressConsent","VendorImpliedConsent","SegmentType","PubPurposesExpressConsent","PubPurposesImpliedConsent","NumCustomPurposes","CustomPurposesExpressConsent","CustomPurposesImpliedConsent"],[qt]:["Version","Created","LastUpdated","CmpId","CmpVersion","ConsentScreen","ConsentLanguage","VendorListVersion","PolicyVersion","IsServiceSpecific","UseNonStandardStacks","SpecialFeatureOptins","PurposeConsents","PurposeLegitimateInterests","PurposeOneTreatment","PublisherCountryCode","VendorConsents","VendorLegitimateInterests","PublisherRestrictions","PublisherPurposesSegmentType","PublisherConsents","PublisherLegitimateInterests","NumCustomPurposes","PublisherCustomConsents","PublisherCustomLegitimateInterests","VendorsAllowedSegmentType","VendorsAllowed","VendorsDisclosedSegmentType","VendorsDisclosed"],[$t]:["Version","SaleOptOutNotice","SharingOptOutNotice","SensitiveDataLimitUseNotice","SaleOptOut","SharingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","PersonalDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Jt]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Zt]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","TargetedAdvertisingOptOut","SaleOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[en]:["Version","SharingNotice","SaleOptOutNotice","SharingOptOutNotice","TargetedAdvertisingOptOutNotice","SensitiveDataProcessingOptOutNotice","SensitiveDataLimitUseNotice","SaleOptOut","SharingOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","PersonalDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[tn]:["Version","Notice","OptOutSale","LspaCovered"],[nn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SensitiveDataProcessingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[rn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[un]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[Sn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[En]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[hn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"]},gn={gppDefaultStatus:e=>null==e?0:!0===e?1:2,gppReverseDefaultStatus:e=>null==e?0:!0===e?2:1},On=Object.keys(gn),Tn=null,In=!1,Nn=e=>Yt=e,vn=[],An=e=>{vn.forEach((t=>function(e,t){void 0===t&&(t=!1),t?setTimeout(e,0):e()}((()=>{t(e)}),In)))},wn=e=>{if("function"!=typeof e)return console.error("Didomi - Callback must be a function");var t;vn.push((t=e,function(){try{t(...arguments)}catch(e){console.error("Didomi - Error in callback after updating GPP string",e)}}))},Pn=()=>{Tn.getSignalStatus()!==E.READY&&Tn.setSignalStatus(E.READY)},fn=()=>{Tn.getCmpDisplayStatus()!==u.HIDDEN&&Tn.setCmpDisplayStatus(u.HIDDEN)},Cn=()=>{var e;try{e=Tn.getGppString()}catch(e){return Wt&&Wt(e),void console.error("Didomi - GPP library getGppString method failed with the error: "+e.message)}return e},mn=e=>{var t;if(!Boolean(Tn&&"object"==typeof Tn))throw new Error("Didomi - GPP API is not initialized");var n=[],{vendors:i,purposes:r,consent_string:s}=e,o={state:{userStatus:{vendors:i,purposes:r}},transformers:O({},gn,{default:gn.gppDefaultStatus})};null==(t=zt)||null==(t=t.sections)||t.forEach((e=>{if(e.name===qt)Tn.setSectionString(qt,null!=s?s:""),Tn.setFieldValue(qt,"CmpVersion",1),n.push(qt);else{var t=pn[e.name];if(t){var i,r=e.fields,a=(0,Qt.compute)(r,O({},o,{pick:t}));void 0!==a.Gpc&&(a.Gpc=!(0===a.Gpc||2===a.Gpc)),Tn.setSectionString(e.name,""),null==(i=Object.keys(a))||i.forEach((t=>{Tn.setFieldValue(e.name,t,a[t])})),n.push(e.name)}}})),fn();var a=Cn();a&&(((e,t,n)=>{n!==t&&(An(t),null==e||e.forEach((e=>Tn.fireSectionChange(e))),Nn(t))})(n,a,Yt),Pn())},Dn=()=>{Tn.getCmpDisplayStatus()!==u.VISIBLE&&Tn.setCmpDisplayStatus(u.VISIBLE),Tn.getSignalStatus()!==E.NOT_READY&&Tn.setSignalStatus(E.NOT_READY)},Vn=()=>{fn(),Pn()},Rn=()=>Yt,Mn=e=>{var t=(e=>{var t=new Set;for(var n of e.sections||[])if(n.fields){var i=Object.values(n.fields);null==i||i.forEach((e=>{var n=Array.isArray(e);if(n)for(var i of e)null!=i&&i.transformer&&!On.includes(i.transformer)&&t.add(i.transformer);n||null==e||!e.transformer||On.includes(e.transformer)||t.add(e.transformer)}))}return t.size>0&&Array.from(t)})(e);if(t.length){var n=t.length>1?"Didomi - Invalid transformers names:":"Didomi - Invalid transformer name:";console.error(n.concat(" ",t.join(", ")))}},bn=e=>{var{gppConfig:t,cmpID:n,cmpVersion:i,yieldToMain:r=!1,onError:s}=e;Tn=new Kt(n,i),In=r,zt=t,Tn.setCmpStatus(l.LOADED),Yt=Tn.getGppString(),Mn(t),"function"==typeof s&&(Wt=s)},Un=()=>{var e={};if(Tn){var t=Tn.cmpApiContext.gppVersion,n=Tn.getObject(),i=Object.keys(n).map((e=>_n[e])),r=i.map((e=>e.toString())).join("_"),s=Cn();if(!s)return;for(var o of(e.IABGPP_HDR_Version={type:"string",value:t},e.IABGPP_HDR_Sections={type:"string",value:r},e.IABGPP_HDR_GppString={type:"string",value:s},e.IABGPP_GppSID={type:"string",value:r},i))e["IABGPP_"+o+"_String"]={type:"string",value:Tn.getSectionStringById(o)}}return e};GppModule=g})();