spm仓库支持,通用仓库
lpw
2026-02-03 b4e4ae3f9448a7232314eb83698e6897e6f34fc3
1
2
/*! Library version: 1.8.0. Commit hash: f5ada10 */
var GppModule;(()=>{"use strict";var e={968:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.compute=void 0;var i=n(651),r=n(227),s=n(124),o=n(923),a=n(588);function d(e,t){var n=t.state,d=t.transformers,S=void 0===d?{default:function(e){return e}}:d;if(e&&"object"==typeof e&&e.type){var E;switch(e.type){case i.PrivacySignalType.CONSTANT_VALUE:E=(0,s.compute)(e);break;case i.PrivacySignalType.VENDORS:E=(0,r.compute)(e,n);break;case i.PrivacySignalType.PURPOSES:E=(0,o.compute)(e,n);break;case i.PrivacySignalType.GPC:E=(0,a.compute)(n)}var c=S.default||function(e){return e};return e.transformer&&(c=S[e.transformer]||c),void 0!==e.default&&null==E?c(e.default):c(E)}}t.compute=function e(t,n){return Array.isArray(t)?t.map((function(e){return d(e,n)})):t&&"object"==typeof t&&t.type?d(t,n):t&&"object"==typeof t?Object.keys(t).reduce((function(i,r){return Array.isArray(n.pick)&&!n.pick.includes(r)||(i[r]=e(t[r],n)),i}),{}):void 0}},613:function(e,t,n){var i=this&&this.__assign||function(){return i=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},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.create=void 0;var r=n(651),s=n(124),o=n(923),a=n(227),d=n(588);t.create=function(e,t){switch(e){case r.PrivacySignalType.CONSTANT_VALUE:(0,s.validateParams)(t);break;case r.PrivacySignalType.VENDORS:(0,a.validateParams)(t);break;case r.PrivacySignalType.PURPOSES:(0,o.validateParams)(t);break;case r.PrivacySignalType.GPC:(0,d.validateParams)(t);break;default:throw new Error("Invalid privacy signal type: ".concat(e,". Valid types are: ").concat(Object.values(r.PrivacySignalType).join(", ")))}return i({type:e},t)}},349:function(e,t,n){var i=this&&this.__createBinding||(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]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(968),t),r(n(613),t),r(n(651),t),r(n(603),t)},506:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0;var i=n(128);t.compute=function(e){var t=e.value;return(0,i.validOrUndefined)(t)},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:function(e,t,n){var i=this&&this.__createBinding||(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]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(506),t),r(n(710),t)},596:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0,t.compute=function(e){var t;return null===(t=null==e?void 0:e.userStatus)||void 0===t?void 0:t.gpc},t.validateParams=function(e){if(void 0!==e.transformer&&"string"!=typeof e.transformer)throw new Error("Invalid parameter: transformer must be a string, or undefined")}},632:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},588:function(e,t,n){var i=this&&this.__createBinding||(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]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(596),t),r(n(632),t)},603:function(e,t,n){var i=this&&this.__createBinding||(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]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(710),t),r(n(880),t),r(n(784),t)},923:function(e,t,n){var i=this&&this.__createBinding||(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]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(220),t),r(n(880),t)},220:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0,t.compute=function(e,t){var n=e.ids;return Array.isArray(n)?0===n.length?null:n.every((function(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((function(e){return"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:function(e,t,n){var i=this&&this.__createBinding||(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]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(420),t),r(n(784),t)},420:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0,t.compute=function(e,t){var n=e.ids;return Array.isArray(n)?0===n.length?null:n.every((function(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((function(e){return"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:function(e,t,n){var i=this&&this.__createBinding||(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]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(552),t),r(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",e.GPC="gpc"}(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}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,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,S,E,c,l,u,_,O,h,T={};function N(){return N=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},N.apply(null,arguments)}n.r(T),n.d(T,{addGPPStringUpdateListener:()=>ai,cmpUIHiddenHandler:()=>ui,cmpUIShownHandler:()=>li,getGPPVariables:()=>Ti,getGppString:()=>_i,initGPPCmpApi:()=>hi,updateGPP:()=>ci});class g{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 p{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,S=i.REMOVE_EVENT_LISTENER;class A{}A[r]=class extends I{respond(){var e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new p("listenerRegistered",e,!0,new g(this.cmpApiContext));this.invokeCallback(t)}},A[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)}},A[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)}},A[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)}},A[d]=class extends I{respond(){var e=new g(this.cmpApiContext);this.invokeCallback(e)}},A[S]=class extends I{respond(){var e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new p("listenerRemoved",e,t,new g(this.cmpApiContext));this.invokeCallback(n)}},function(e){e.STUB="stub",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(E||(E={})),function(e){e.VISIBLE="visible",e.HIDDEN="hidden",e.DISABLED="disabled"}(c||(c={})),function(e){e.GPP_LOADED="gpploaded",e.CMP_UI_SHOWN="cmpuishown",e.USER_ACTION_COMPLETE="useractioncomplete"}(l||(l={})),function(e){e.NOT_READY="not ready",e.READY="ready"}(u||(u={}));class P{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 A[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!==A[e]}}class C{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 p(e,i,t,new g(this.cmpApiContext));n.callback(r,!0)}))}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class D extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class v{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 D("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 D("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.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}class w extends Error{constructor(e){super(e),this.name="DecodingError"}}class V extends Error{constructor(e){super(e),this.name="EncodingError"}}class R{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 V("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 w("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 M{encode(e){if(!/^[0-1]*$/.test(e))throw new V("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=R.decode(i);t+=M.DICT.charAt(r),n+=6}catch(t){throw new V("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new w("Undecodable Base64URL string '"+e+"'");for(var t="",n=0;n<e.length;n++){var i=e.charAt(n),r=M.REVERSE_DICT.get(i);t+=R.encode(r,6)}return t}}M.DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",M.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 m extends M{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}}_=m,m.instance=new _;class G{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 w("Unable to decode field '"+s+"'");return}}}}O=G,G.instance=new O;class U{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 w("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 f{static encode(e){if(!0===e)return"1";if(!1===e)return"0";throw new V("Unencodable Boolean '"+e+"'")}static decode(e){if("1"===e)return!0;if("0"===e)return!1;throw new w("Undecodable Boolean '"+e+"'")}}class b{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=R.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"+U.encode(a)}else{var d=t[o][0]-n;n=t[o][0];var S=t[o][t[o].length-1]-n;n=t[o][t[o].length-1],s+="1"+U.encode(d)+U.encode(S)}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new w("Undecodable FibonacciIntegerRange '"+e+"'");for(var t=[],n=R.decode(e.substring(0,12)),i=0,r=12,s=0;s<n;s++){var o=f.decode(e.substring(r,r+1));if(r++,!0===o){var a=e.indexOf("11",r),d=U.decode(e.substring(r,a+2))+i;i=d,r=a+2,a=e.indexOf("11",r);var S=U.decode(e.substring(r,a+2))+i;i=S,r=a+2;for(var E=d;E<=S;E++)t.push(E)}else{var c=e.indexOf("11",r),l=U.decode(e.substring(r,c+2))+i;i=l,t.push(l),r=c+2}}return t}}class L extends Error{constructor(e){super(e),this.name="ValidationError"}}class y{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 L("Invalid value '"+e+"'");this.value=e}getHardFailIfMissing(){return this.hardFailIfMissing}}class F extends w{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 H extends y{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return b.encode(this.value)}catch(e){throw new V(e)}}decode(e){try{this.value=b.decode(e)}catch(e){throw new w(e)}}substring(e,t){try{for(var n=R.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 j extends y{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.bitStringLength=void 0,this.bitStringLength=e,this.setValue(t)}encode(){try{return R.encode(this.value,this.bitStringLength)}catch(e){throw new V(e)}}decode(e){try{this.value=R.decode(e)}catch(e){throw new w(e)}}substring(e,t){try{return x.substring(e,t,t+this.bitStringLength)}catch(e){throw new F(e)}}}class K{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"}(h||(h={}));var B,z=[h.ID,h.VERSION,h.SECTION_IDS];class Y{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 D("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 D(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 k extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return z}initializeFields(){var e=new K;return e.put(h.ID.toString(),new j(6,W.ID)),e.put(h.VERSION.toString(),new j(6,W.VERSION)),e.put(h.SECTION_IDS.toString(),new H([])),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 w("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class W extends v{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 k),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"}(B||(B={}));var Q,X,q=[B.VERSION,B.CREATED,B.LAST_UPDATED,B.CMP_ID,B.CMP_VERSION,B.CONSENT_SCREEN,B.CONSENT_LANGUAGE,B.VENDOR_LIST_VERSION,B.POLICY_VERSION,B.IS_SERVICE_SPECIFIC,B.USE_NON_STANDARD_STACKS,B.SPECIAL_FEATURE_OPTINS,B.PURPOSE_CONSENTS,B.PURPOSE_LEGITIMATE_INTERESTS,B.PURPOSE_ONE_TREATMENT,B.PUBLISHER_COUNTRY_CODE,B.VENDOR_CONSENTS,B.VENDOR_LEGITIMATE_INTERESTS,B.PUBLISHER_RESTRICTIONS],J=[B.PUBLISHER_PURPOSES_SEGMENT_TYPE,B.PUBLISHER_CONSENTS,B.PUBLISHER_LEGITIMATE_INTERESTS,B.NUM_CUSTOM_PURPOSES,B.PUBLISHER_CUSTOM_CONSENTS,B.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],$=[B.VENDORS_ALLOWED_SEGMENT_TYPE,B.VENDORS_ALLOWED],Z=[B.VENDORS_DISCLOSED_SEGMENT_TYPE,B.VENDORS_DISCLOSED];class ee extends M{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=R.encode(t.length,12),s=0;s<t.length;s++)1===t[s].length?r+="0"+R.encode(t[s][0],16):r+="1"+R.encode(t[s][0],16)+R.encode(t[s][t[s].length-1],16);return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new w("Undecodable FixedIntegerRange '"+e+"'");for(var t=[],n=R.decode(e.substring(0,12)),i=12,r=0;r<n;r++){var s=f.decode(e.substring(i,i+1));if(i++,!0===s){var o=R.decode(e.substring(i,i+16));i+=16;var a=R.decode(e.substring(i,i+16));i+=16;for(var d=o;d<=a;d++)t.push(d)}else{var S=R.decode(e.substring(i,i+16));t.push(S),i+=16}}return t}}class ne extends y{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return te.encode(this.value)}catch(e){throw new V(e)}}decode(e){try{this.value=te.decode(e)}catch(e){throw new w(e)}}substring(e,t){try{for(var n=R.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 y{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+=R.encode(e.length,12);for(var n=0;n<e.length;n++){var i=e[n];t+=R.encode(i.getKey(),this.keyBitStringLength),t+=R.encode(i.getType(),this.typeBitStringLength),t+=te.encode(i.getIds())}return t}catch(e){throw new V(e)}}decode(e){try{for(var t=[],n=R.decode(x.substring(e,0,12)),i=12,r=0;r<n;r++){var s=R.decode(x.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;var o=R.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 w(e)}}substring(e,t){try{var n="";n+=x.substring(e,t,t+12);for(var i=R.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 y{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return f.encode(this.value)}catch(e){throw new V(e)}}decode(e){try{this.value=f.decode(e)}catch(e){throw new w(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?R.encode(Math.round(e.getTime()/100),36):R.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||36!==e.length)throw new w("Undecodable Datetime '"+e+"'");return new Date(100*R.decode(e))}}class ae extends y{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return oe.encode(this.value)}catch(e){throw new V(e)}}decode(e){try{this.value=oe.decode(e)}catch(e){throw new w(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 V("Too many values '"+e.length+"'");for(var n="",i=0;i<e.length;i++)n+=f.encode(e[i]);for(;n.length<t;)n+="0";return n}static decode(e){if(!/^[0-1]*$/.test(e))throw new w("Undecodable FixedBitfield '"+e+"'");for(var t=[],n=0;n<e.length;n++)t.push(f.decode(e.substring(n,n+1)));return t}}class Se extends y{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 V(e)}}decode(e){try{this.value=de.decode(e)}catch(e){throw new w(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 Ee{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+=R.encode(63,6);else{if(!(r>=65))throw new V("Unencodable FixedString '"+e+"'");n+=R.encode(e.charCodeAt(i)-65,6)}}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!=0)throw new w("Undecodable FixedString '"+e+"'");for(var t="",n=0;n<e.length;n+=6){var i=R.decode(e.substring(n,n+6));t+=63===i?" ":String.fromCharCode(i+65)}return t.trim()}}class ce extends y{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.stringLength=void 0,this.stringLength=e,this.setValue(t)}encode(){try{return Ee.encode(this.value,this.stringLength)}catch(e){throw new V(e)}}decode(e){try{this.value=Ee.decode(e)}catch(e){throw new w(e)}}substring(e,t){try{return x.substring(e,t,t+6*this.stringLength)}catch(e){throw new F(e)}}}class le extends y{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 R.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 R.encode(e,16)+"0"+de.encode(r,i)}catch(e){throw new V(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 w(e)}}substring(e,t){try{var n=R.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 ue extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return q}initializeFields(){var e=new Date,t=new K;return t.put(B.VERSION.toString(),new j(6,Ne.VERSION)),t.put(B.CREATED.toString(),new ae(e)),t.put(B.LAST_UPDATED.toString(),new ae(e)),t.put(B.CMP_ID.toString(),new j(12,0)),t.put(B.CMP_VERSION.toString(),new j(12,0)),t.put(B.CONSENT_SCREEN.toString(),new j(6,0)),t.put(B.CONSENT_LANGUAGE.toString(),new ce(2,"EN")),t.put(B.VENDOR_LIST_VERSION.toString(),new j(12,0)),t.put(B.POLICY_VERSION.toString(),new j(6,2)),t.put(B.IS_SERVICE_SPECIFIC.toString(),new se(!1)),t.put(B.USE_NON_STANDARD_STACKS.toString(),new se(!1)),t.put(B.SPECIAL_FEATURE_OPTINS.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(B.PURPOSE_CONSENTS.toString(),new Se([!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(B.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Se([!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(B.PURPOSE_ONE_TREATMENT.toString(),new se(!1)),t.put(B.PUBLISHER_COUNTRY_CODE.toString(),new ce(2,"AA")),t.put(B.VENDOR_CONSENTS.toString(),new le([])),t.put(B.VENDOR_LEGITIMATE_INTERESTS.toString(),new le([])),t.put(B.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 w("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class _e extends y{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 V(e)}}decode(e){try{this.value=de.decode(e)}catch(e){throw new w(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 Oe extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return J}initializeFields(){var e=new K;e.put(B.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new j(3,3)),e.put(B.PUBLISHER_CONSENTS.toString(),new Se([!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(B.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Se([!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 j(6,0);return e.put(B.NUM_CUSTOM_PURPOSES.toString(),t),e.put(B.PUBLISHER_CUSTOM_CONSENTS.toString(),new _e((()=>t.getValue()),[])),e.put(B.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new _e((()=>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 w("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class he extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return $}initializeFields(){var e=new K;return e.put(B.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new j(3,2)),e.put(B.VENDORS_ALLOWED.toString(),new le([])),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 w("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Te extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Z}initializeFields(){var e=new K;return e.put(B.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new j(3,1)),e.put(B.VENDORS_DISCLOSED.toString(),new le([])),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 w("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class Ne extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ne.ID}getName(){return Ne.NAME}getVersion(){return Ne.VERSION}initializeSegments(){var e=[];return e.push(new ue),e.push(new Oe),e.push(new he),e.push(new Te),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 w("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(B.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!==B.CREATED&&e!==B.LAST_UPDATED){var n=new Date;super.setFieldValue(B.CREATED,n),super.setFieldValue(B.LAST_UPDATED,n)}}}Ne.ID=2,Ne.VERSION=2,Ne.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 ge,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],pe=[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],Ae=[X.DISCLOSED_VENDORS_SEGMENT_TYPE,X.DISCLOSED_VENDORS];class Pe extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Ie}initializeFields(){var e=new Date,t=new K;return t.put(X.VERSION.toString(),new j(6,ve.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 j(12,0)),t.put(X.CMP_VERSION.toString(),new j(12,0)),t.put(X.CONSENT_SCREEN.toString(),new j(6,0)),t.put(X.CONSENT_LANGUAGE.toString(),new ce(2,"EN")),t.put(X.VENDOR_LIST_VERSION.toString(),new j(12,0)),t.put(X.TCF_POLICY_VERSION.toString(),new j(6,2)),t.put(X.USE_NON_STANDARD_STACKS.toString(),new se(!1)),t.put(X.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(X.PURPOSES_EXPRESS_CONSENT.toString(),new Se([!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 Se([!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 le([])),t.put(X.VENDOR_IMPLIED_CONSENT.toString(),new le([])),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 w("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Ce extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return pe}initializeFields(){var e=new K;e.put(X.PUB_PURPOSES_SEGMENT_TYPE.toString(),new j(3,3)),e.put(X.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Se([!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 Se([!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 j(6,0);return e.put(X.NUM_CUSTOM_PURPOSES.toString(),t),e.put(X.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new _e((()=>t.getValue()),[])),e.put(X.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new _e((()=>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 w("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class De extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Ae}initializeFields(){var e=new K;return e.put(X.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new j(3,1)),e.put(X.DISCLOSED_VENDORS.toString(),new le([])),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 w("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class ve extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ve.ID}getName(){return ve.NAME}getVersion(){return ve.VERSION}initializeSegments(){var e=[];return e.push(new Pe),e.push(new Ce),e.push(new De),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 w("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)}}}ve.ID=5,ve.VERSION=1,ve.NAME="tcfcav1";class we{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 Ve{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 Re{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"}(ge||(ge={}));var Me,me=[ge.VERSION,ge.NOTICE,ge.OPT_OUT_SALE,ge.LSPA_COVERED];class Ge extends Y{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return me}initializeFields(){var e=new class{test(e){return"-"===e||"Y"===e||"N"===e}},t=new Re;return t.put(ge.VERSION,new Ve(Ue.VERSION)),t.put(ge.NOTICE,new we("-",e)),t.put(ge.OPT_OUT_SALE,new we("-",e)),t.put(ge.LSPA_COVERED,new we("-",e)),t}encodeSegment(e){var t="";return t+=e.get(ge.VERSION).getValue(),t+=e.get(ge.NOTICE).getValue(),t+=e.get(ge.OPT_OUT_SALE).getValue(),t+=e.get(ge.LSPA_COVERED).getValue()}decodeSegment(e,t){if(null==e||4!=e.length)throw new w("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(ge.VERSION).setValue(parseInt(e.substring(0,1))),t.get(ge.NOTICE).setValue(e.charAt(1)),t.get(ge.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(ge.LSPA_COVERED).setValue(e.charAt(3))}catch(t){throw new w("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Ue extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ue.ID}getName(){return Ue.NAME}getVersion(){return Ue.VERSION}initializeSegments(){var e=[];return 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<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(".")}}Ue.ID=6,Ue.VERSION=1,Ue.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"}(Me||(Me={}));var fe,be=[Me.VERSION,Me.SHARING_NOTICE,Me.SALE_OPT_OUT_NOTICE,Me.SHARING_OPT_OUT_NOTICE,Me.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Me.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Me.SENSITIVE_DATA_LIMIT_USE_NOTICE,Me.SALE_OPT_OUT,Me.SHARING_OPT_OUT,Me.TARGETED_ADVERTISING_OPT_OUT,Me.SENSITIVE_DATA_PROCESSING,Me.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Me.PERSONAL_DATA_CONSENTS,Me.MSPA_COVERED_TRANSACTION,Me.MSPA_OPT_OUT_OPTION_MODE,Me.MSPA_SERVICE_PROVIDER_MODE],Le=[Me.GPC_SEGMENT_TYPE,Me.GPC];class ye{static encode(e,t,n){if(e.length>n)throw new V("Too many values '"+e.length+"'");for(var i="",r=0;r<e.length;r++)i+=R.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 w("Undecodable FixedInteger '"+e+"'");if(e.length>t*n)throw new w("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new w("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(R.decode(e.substring(r,r+t)));for(;i.length<n;)i.push(0);return i}}class Fe extends y{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 ye.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new V(e)}}decode(e){try{this.value=ye.decode(e,this.elementBitStringLength,this.numElements)}catch(e){throw new w(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 Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return be}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 K;return i.put(Me.VERSION.toString(),new j(6,je.VERSION)),i.put(Me.SHARING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Me.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Me.SHARING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Me.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Me.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Me.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Me.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Me.SHARING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Me.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Me.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Me.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(Me.PERSONAL_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put(Me.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Me.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Me.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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);66==n.length&&(n=n.substring(0,48)+"00000000"+n.substring(48,52)+"00"+n.substring(52,62)),this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new w("Unable to decode UsNatCoreSegment '"+e+"'")}}}class He extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Le}initializeFields(){var e=new K;return e.put(Me.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(Me.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Me.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 w("Unable to decode UsNatGpcSegment '"+e+"'")}}}class je extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return je.ID}getName(){return je.NAME}getVersion(){return je.VERSION}initializeSegments(){var e=[];return e.push(new xe),e.push(new He),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(Me.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Me.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(Me.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}je.ID=7,je.VERSION=1,je.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"}(fe||(fe={}));var Ke,Be=[fe.VERSION,fe.SALE_OPT_OUT_NOTICE,fe.SHARING_OPT_OUT_NOTICE,fe.SENSITIVE_DATA_LIMIT_USE_NOTICE,fe.SALE_OPT_OUT,fe.SHARING_OPT_OUT,fe.SENSITIVE_DATA_PROCESSING,fe.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,fe.PERSONAL_DATA_CONSENTS,fe.MSPA_COVERED_TRANSACTION,fe.MSPA_OPT_OUT_OPTION_MODE,fe.MSPA_SERVICE_PROVIDER_MODE],ze=[fe.GPC_SEGMENT_TYPE,fe.GPC];class Ye extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Be}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 K;return i.put(fe.VERSION.toString(),new j(6,We.VERSION)),i.put(fe.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(fe.SHARING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(fe.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(fe.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(fe.SHARING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(fe.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(fe.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0]).withValidator(n)),i.put(fe.PERSONAL_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put(fe.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(fe.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(fe.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsCaCoreSegment '"+e+"'")}}}class ke extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return ze}initializeFields(){var e=new K;return e.put(fe.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(fe.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(fe.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 w("Unable to decode UsCaGpcSegment '"+e+"'")}}}class We extends v{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 Ye),e.push(new ke),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(fe.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(fe.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(fe.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"}(Ke||(Ke={}));var Qe,Xe=[Ke.VERSION,Ke.SHARING_NOTICE,Ke.SALE_OPT_OUT_NOTICE,Ke.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Ke.SALE_OPT_OUT,Ke.TARGETED_ADVERTISING_OPT_OUT,Ke.SENSITIVE_DATA_PROCESSING,Ke.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ke.MSPA_COVERED_TRANSACTION,Ke.MSPA_OPT_OUT_OPTION_MODE,Ke.MSPA_SERVICE_PROVIDER_MODE];class qe extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.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 K;return i.put(Ke.VERSION.toString(),new j(6,Je.VERSION)),i.put(Ke.SHARING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Ke.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Ke.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Ke.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Ke.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Ke.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Ke.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put(Ke.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Ke.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Ke.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsVaCoreSegment '"+e+"'")}}}class Je extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Je.ID}getName(){return Je.NAME}getVersion(){return Je.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(".")}}Je.ID=9,Je.VERSION=1,Je.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 $e,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 Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.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 K;return i.put(Qe.VERSION.toString(),new j(6,it.VERSION)),i.put(Qe.SHARING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Qe.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Qe.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Qe.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Qe.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(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 j(2,0).withValidator(e)),i.put(Qe.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Qe.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Qe.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsCoCoreSegment '"+e+"'")}}}class nt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return et}initializeFields(){var e=new K;return e.put(Qe.GPC_SEGMENT_TYPE.toString(),new j(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 w("Unable to decode UsCoGpcSegment '"+e+"'")}}}class it extends v{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"}($e||($e={}));var rt,st=[$e.VERSION,$e.SHARING_NOTICE,$e.SALE_OPT_OUT_NOTICE,$e.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$e.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,$e.SALE_OPT_OUT,$e.TARGETED_ADVERTISING_OPT_OUT,$e.SENSITIVE_DATA_PROCESSING,$e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$e.MSPA_COVERED_TRANSACTION,$e.MSPA_OPT_OUT_OPTION_MODE,$e.MSPA_SERVICE_PROVIDER_MODE];class ot extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.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 K;return i.put($e.VERSION.toString(),new j(6,at.VERSION)),i.put($e.SHARING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put($e.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put($e.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put($e.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put($e.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put($e.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put($e.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put($e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put($e.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put($e.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put($e.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsUtCoreSegment '"+e+"'")}}}class at extends v{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,St=[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],Et=[rt.GPC_SEGMENT_TYPE,rt.GPC];class ct extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.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 K;return i.put(rt.VERSION.toString(),new j(6,ut.VERSION)),i.put(rt.SHARING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(rt.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(rt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(rt.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(rt.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(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 j(2,1).withValidator(t)),i.put(rt.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(rt.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsCtCoreSegment '"+e+"'")}}}class lt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Et}initializeFields(){var e=new K;return e.put(rt.GPC_SEGMENT_TYPE.toString(),new j(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 w("Unable to decode UsCtGpcSegment '"+e+"'")}}}class ut extends v{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 ct),e.push(new lt),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(".")}}ut.ID=12,ut.VERSION=1,ut.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 _t,Ot=[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 ht extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Ot}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 K;return i.put(dt.VERSION.toString(),new j(6,Tt.VERSION)),i.put(dt.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(dt.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(dt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(dt.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(dt.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(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 j(2,0).withValidator(e)),i.put(dt.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(dt.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(dt.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsFlCoreSegment '"+e+"'")}}}class Tt extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tt.ID}getName(){return Tt.NAME}getVersion(){return Tt.VERSION}initializeSegments(){var e=[];return e.push(new ht),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(".")}}Tt.ID=13,Tt.VERSION=1,Tt.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"}(_t||(_t={}));var Nt,gt=[_t.VERSION,_t.SHARING_NOTICE,_t.SALE_OPT_OUT_NOTICE,_t.TARGETED_ADVERTISING_OPT_OUT_NOTICE,_t.SALE_OPT_OUT,_t.TARGETED_ADVERTISING_OPT_OUT,_t.SENSITIVE_DATA_PROCESSING,_t.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,_t.ADDITIONAL_DATA_PROCESSING_CONSENT,_t.MSPA_COVERED_TRANSACTION,_t.MSPA_OPT_OUT_OPTION_MODE,_t.MSPA_SERVICE_PROVIDER_MODE],It=[_t.GPC_SEGMENT_TYPE,_t.GPC];class pt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return gt}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 K;return i.put(_t.VERSION.toString(),new j(6,Pt.VERSION)),i.put(_t.SHARING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(_t.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(_t.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(_t.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(_t.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(_t.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(_t.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(_t.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(_t.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(_t.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(_t.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsMtCoreSegment '"+e+"'")}}}class At extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return It}initializeFields(){var e=new K;return e.put(_t.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(_t.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(_t.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 w("Unable to decode UsMtGpcSegment '"+e+"'")}}}class Pt extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pt.ID}getName(){return Pt.NAME}getVersion(){return Pt.VERSION}initializeSegments(){var e=[];return e.push(new pt),e.push(new At),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(_t.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(_t.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(_t.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Pt.ID=14,Pt.VERSION=1,Pt.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"}(Nt||(Nt={}));var Ct,Dt=[Nt.VERSION,Nt.PROCESSING_NOTICE,Nt.SALE_OPT_OUT_NOTICE,Nt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Nt.SALE_OPT_OUT,Nt.TARGETED_ADVERTISING_OPT_OUT,Nt.SENSITIVE_DATA_PROCESSING,Nt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Nt.ADDITIONAL_DATA_PROCESSING_CONSENT,Nt.MSPA_COVERED_TRANSACTION,Nt.MSPA_OPT_OUT_OPTION_MODE,Nt.MSPA_SERVICE_PROVIDER_MODE],vt=[Nt.GPC_SEGMENT_TYPE,Nt.GPC];class wt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Dt}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 K;return i.put(Nt.VERSION.toString(),new j(6,Rt.VERSION)),i.put(Nt.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Nt.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Nt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Nt.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Nt.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Nt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Nt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(Nt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(Nt.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Nt.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Nt.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Vt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return vt}initializeFields(){var e=new K;return e.put(Nt.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(Nt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Nt.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 w("Unable to decode UsOrGpcSegment '"+e+"'")}}}class Rt extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Rt.ID}getName(){return Rt.NAME}getVersion(){return Rt.VERSION}initializeSegments(){var e=[];return e.push(new wt),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(Nt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Nt.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(Nt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Rt.ID=15,Rt.VERSION=1,Rt.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"}(Ct||(Ct={}));var Mt,mt=[Ct.VERSION,Ct.PROCESSING_NOTICE,Ct.SALE_OPT_OUT_NOTICE,Ct.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Ct.SALE_OPT_OUT,Ct.TARGETED_ADVERTISING_OPT_OUT,Ct.SENSITIVE_DATA_PROCESSING,Ct.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ct.ADDITIONAL_DATA_PROCESSING_CONSENT,Ct.MSPA_COVERED_TRANSACTION,Ct.MSPA_OPT_OUT_OPTION_MODE,Ct.MSPA_SERVICE_PROVIDER_MODE],Gt=[Ct.GPC_SEGMENT_TYPE,Ct.GPC];class Ut extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return mt}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 K;return i.put(Ct.VERSION.toString(),new j(6,bt.VERSION)),i.put(Ct.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Ct.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Ct.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Ct.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Ct.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Ct.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Ct.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put(Ct.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(Ct.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Ct.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Ct.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsTxCoreSegment '"+e+"'")}}}class ft extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Gt}initializeFields(){var e=new K;return e.put(Ct.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(Ct.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Ct.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 w("Unable to decode UsTxGpcSegment '"+e+"'")}}}class bt extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return bt.ID}getName(){return bt.NAME}getVersion(){return bt.VERSION}initializeSegments(){var e=[];return e.push(new Ut),e.push(new ft),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(Ct.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Ct.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(Ct.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}bt.ID=16,bt.VERSION=1,bt.NAME="ustx",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"}(Mt||(Mt={}));var Lt,yt=[Mt.VERSION,Mt.PROCESSING_NOTICE,Mt.SALE_OPT_OUT_NOTICE,Mt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Mt.SALE_OPT_OUT,Mt.TARGETED_ADVERTISING_OPT_OUT,Mt.SENSITIVE_DATA_PROCESSING,Mt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Mt.ADDITIONAL_DATA_PROCESSING_CONSENT,Mt.MSPA_COVERED_TRANSACTION,Mt.MSPA_OPT_OUT_OPTION_MODE,Mt.MSPA_SERVICE_PROVIDER_MODE],Ft=[Mt.GPC_SEGMENT_TYPE,Mt.GPC];class xt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return yt}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 K;return i.put(Mt.VERSION.toString(),new j(6,jt.VERSION)),i.put(Mt.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Mt.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Mt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Mt.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Mt.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Mt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Mt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0,0,0]).withValidator(n)),i.put(Mt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(Mt.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Mt.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Mt.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsDeCoreSegment '"+e+"'")}}}class Ht extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Ft}initializeFields(){var e=new K;return e.put(Mt.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(Mt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Mt.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 w("Unable to decode UsDeGpcSegment '"+e+"'")}}}class jt extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return jt.ID}getName(){return jt.NAME}getVersion(){return jt.VERSION}initializeSegments(){var e=[];return e.push(new xt),e.push(new Ht),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(Mt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Mt.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(Mt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}jt.ID=17,jt.VERSION=1,jt.NAME="usde",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",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"}(Lt||(Lt={}));var Kt,Bt=[Lt.VERSION,Lt.PROCESSING_NOTICE,Lt.SALE_OPT_OUT_NOTICE,Lt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Lt.SENSITIVE_DATA_OPT_OUT_NOTICE,Lt.SALE_OPT_OUT,Lt.TARGETED_ADVERTISING_OPT_OUT,Lt.SENSITIVE_DATA_PROCESSING,Lt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Lt.MSPA_COVERED_TRANSACTION,Lt.MSPA_OPT_OUT_OPTION_MODE,Lt.MSPA_SERVICE_PROVIDER_MODE],zt=[Lt.GPC_SEGMENT_TYPE,Lt.GPC];class Yt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Bt}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 K;return i.put(Lt.VERSION.toString(),new j(6,Wt.VERSION)),i.put(Lt.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Lt.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Lt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Lt.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Lt.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Lt.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Lt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Lt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put(Lt.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Lt.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Lt.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsIaCoreSegment '"+e+"'")}}}class kt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return zt}initializeFields(){var e=new K;return e.put(Lt.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(Lt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Lt.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 w("Unable to decode UsIaGpcSegment '"+e+"'")}}}class Wt extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Wt.ID}getName(){return Wt.NAME}getVersion(){return Wt.VERSION}initializeSegments(){var e=[];return e.push(new Yt),e.push(new kt),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(Lt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Lt.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(Lt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Wt.ID=18,Wt.VERSION=1,Wt.NAME="usia",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"}(Kt||(Kt={}));var Qt,Xt=[Kt.VERSION,Kt.PROCESSING_NOTICE,Kt.SALE_OPT_OUT_NOTICE,Kt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Kt.SALE_OPT_OUT,Kt.TARGETED_ADVERTISING_OPT_OUT,Kt.SENSITIVE_DATA_PROCESSING,Kt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Kt.ADDITIONAL_DATA_PROCESSING_CONSENT,Kt.MSPA_COVERED_TRANSACTION,Kt.MSPA_OPT_OUT_OPTION_MODE,Kt.MSPA_SERVICE_PROVIDER_MODE],qt=[Kt.GPC_SEGMENT_TYPE,Kt.GPC];class Jt extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Xt}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 K;return i.put(Kt.VERSION.toString(),new j(6,Zt.VERSION)),i.put(Kt.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Kt.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Kt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Kt.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Kt.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Kt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Kt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put(Kt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(Kt.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Kt.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Kt.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsNeCoreSegment '"+e+"'")}}}class $t extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return qt}initializeFields(){var e=new K;return e.put(Kt.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(Kt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Kt.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 w("Unable to decode UsNeGpcSegment '"+e+"'")}}}class Zt extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Zt.ID}getName(){return Zt.NAME}getVersion(){return Zt.VERSION}initializeSegments(){var e=[];return e.push(new Jt),e.push(new $t),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(Kt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Kt.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(Kt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Zt.ID=19,Zt.VERSION=1,Zt.NAME="usne",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"}(Qt||(Qt={}));var en,tn=[Qt.VERSION,Qt.PROCESSING_NOTICE,Qt.SALE_OPT_OUT_NOTICE,Qt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Qt.SALE_OPT_OUT,Qt.TARGETED_ADVERTISING_OPT_OUT,Qt.SENSITIVE_DATA_PROCESSING,Qt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Qt.ADDITIONAL_DATA_PROCESSING_CONSENT,Qt.MSPA_COVERED_TRANSACTION,Qt.MSPA_OPT_OUT_OPTION_MODE,Qt.MSPA_SERVICE_PROVIDER_MODE],nn=[Qt.GPC_SEGMENT_TYPE,Qt.GPC];class rn extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return tn}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 K;return i.put(Qt.VERSION.toString(),new j(6,on.VERSION)),i.put(Qt.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Qt.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Qt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(Qt.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Qt.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(Qt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Qt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),i.put(Qt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(Qt.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(Qt.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(Qt.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsNhCoreSegment '"+e+"'")}}}class sn extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return nn}initializeFields(){var e=new K;return e.put(Qt.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(Qt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Qt.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 w("Unable to decode UsNhGpcSegment '"+e+"'")}}}class on extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return on.ID}getName(){return on.NAME}getVersion(){return on.VERSION}initializeSegments(){var e=[];return e.push(new rn),e.push(new sn),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(Qt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Qt.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(Qt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}on.ID=20,on.VERSION=1,on.NAME="usnh",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"}(en||(en={}));var an,dn=[en.VERSION,en.PROCESSING_NOTICE,en.SALE_OPT_OUT_NOTICE,en.TARGETED_ADVERTISING_OPT_OUT_NOTICE,en.SALE_OPT_OUT,en.TARGETED_ADVERTISING_OPT_OUT,en.SENSITIVE_DATA_PROCESSING,en.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,en.ADDITIONAL_DATA_PROCESSING_CONSENT,en.MSPA_COVERED_TRANSACTION,en.MSPA_OPT_OUT_OPTION_MODE,en.MSPA_SERVICE_PROVIDER_MODE],Sn=[en.GPC_SEGMENT_TYPE,en.GPC];class En extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return dn}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 K;return i.put(en.VERSION.toString(),new j(6,ln.VERSION)),i.put(en.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(en.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(en.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(en.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(en.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(en.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(en.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0,0,0]).withValidator(n)),i.put(en.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(en.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(en.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(en.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsNjCoreSegment '"+e+"'")}}}class cn extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return Sn}initializeFields(){var e=new K;return e.put(en.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(en.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(en.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 w("Unable to decode UsNjGpcSegment '"+e+"'")}}}class ln extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){var e=[];return e.push(new En),e.push(new cn),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(en.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(en.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(en.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}ln.ID=21,ln.VERSION=1,ln.NAME="usnj",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"}(an||(an={}));var un=[an.VERSION,an.PROCESSING_NOTICE,an.SALE_OPT_OUT_NOTICE,an.TARGETED_ADVERTISING_OPT_OUT_NOTICE,an.SALE_OPT_OUT,an.TARGETED_ADVERTISING_OPT_OUT,an.SENSITIVE_DATA_PROCESSING,an.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,an.ADDITIONAL_DATA_PROCESSING_CONSENT,an.MSPA_COVERED_TRANSACTION,an.MSPA_OPT_OUT_OPTION_MODE,an.MSPA_SERVICE_PROVIDER_MODE],_n=[an.GPC_SEGMENT_TYPE,an.GPC];class On extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return un}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 K;return i.put(an.VERSION.toString(),new j(6,Tn.VERSION)),i.put(an.PROCESSING_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(an.SALE_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(an.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new j(2,0).withValidator(e)),i.put(an.SALE_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(an.TARGETED_ADVERTISING_OPT_OUT.toString(),new j(2,0).withValidator(e)),i.put(an.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(an.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new j(2,0).withValidator(e)),i.put(an.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new j(2,0).withValidator(e)),i.put(an.MSPA_COVERED_TRANSACTION.toString(),new j(2,1).withValidator(t)),i.put(an.MSPA_OPT_OUT_OPTION_MODE.toString(),new j(2,0).withValidator(e)),i.put(an.MSPA_SERVICE_PROVIDER_MODE.toString(),new j(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 w("Unable to decode UsTnCoreSegment '"+e+"'")}}}class hn extends Y{constructor(e){super(),this.base64UrlEncoder=m.getInstance(),this.bitStringEncoder=G.getInstance(),e&&this.decode(e)}getFieldNames(){return _n}initializeFields(){var e=new K;return e.put(an.GPC_SEGMENT_TYPE.toString(),new j(2,1)),e.put(an.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(an.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 w("Unable to decode UsTnGpcSegment '"+e+"'")}}}class Tn extends v{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){var e=[];return e.push(new On),e.push(new hn),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(an.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(an.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(an.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Tn.ID=22,Tn.VERSION=1,Tn.NAME="ustn";class Nn{}Nn.SECTION_ID_NAME_MAP=new Map([[Ne.ID,Ne.NAME],[ve.ID,ve.NAME],[Ue.ID,Ue.NAME],[je.ID,je.NAME],[We.ID,We.NAME],[Je.ID,Je.NAME],[it.ID,it.NAME],[at.ID,at.NAME],[ut.ID,ut.NAME],[Tt.ID,Tt.NAME],[Pt.ID,Pt.NAME],[Rt.ID,Rt.NAME],[bt.ID,bt.NAME],[jt.ID,jt.NAME],[Wt.ID,Wt.NAME],[Zt.ID,Zt.NAME],[on.ID,on.NAME],[ln.ID,ln.NAME],[Tn.ID,Tn.NAME]]),Nn.SECTION_ORDER=[Ne.NAME,ve.NAME,Ue.NAME,je.NAME,We.NAME,Je.NAME,it.NAME,at.NAME,ut.NAME,Tt.NAME,Pt.NAME,Rt.NAME,bt.NAME,jt.NAME,Wt.NAME,Zt.NAME,on.NAME,ln.NAME,Tn.NAME];class gn{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===ve.NAME?(i=new ve,this.sections.set(ve.NAME,i)):e===Ne.NAME?(i=new Ne,this.sections.set(Ne.NAME,i)):e===Ue.NAME?(i=new Ue,this.sections.set(Ue.NAME,i)):e===je.NAME?(i=new je,this.sections.set(je.NAME,i)):e===We.NAME?(i=new We,this.sections.set(We.NAME,i)):e===Je.NAME?(i=new Je,this.sections.set(Je.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===ut.NAME?(i=new ut,this.sections.set(ut.NAME,i)):e===Tt.NAME?(i=new Tt,this.sections.set(Tt.NAME,i)):e===Pt.NAME?(i=new Pt,this.sections.set(Pt.NAME,i)):e===Rt.NAME?(i=new Rt,this.sections.set(Rt.NAME,i)):e===bt.NAME?(i=new bt,this.sections.set(bt.NAME,i)):e===jt.NAME?(i=new jt,this.sections.set(jt.NAME,i)):e===Wt.NAME?(i=new Wt,this.sections.set(Wt.NAME,i)):e===Zt.NAME?(i=new Zt,this.sections.set(Zt.NAME,i)):e===on.NAME?(i=new on,this.sections.set(on.NAME,i)):e===ln.NAME?(i=new ln,this.sections.set(ln.NAME,i)):e===Tn.NAME&&(i=new Tn,this.sections.set(Tn.NAME,i)),!i)throw new D(e+"."+t+" not found");i.setFieldValue(t,n),this.dirty=!0,i.setIsDirty(!0)}setFieldValueBySectionId(e,t,n){this.setFieldValue(Nn.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(Nn.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(Nn.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(Nn.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(Nn.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<Nn.SECTION_ORDER.length;t++){var n=Nn.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<Nn.SECTION_ORDER.length;i++){var r=Nn.SECTION_ORDER[i];if(e.has(r)){var s=e.get(r);s.setIsDirty(!0),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 w("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 w("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===ve.ID){var s=new ve(t[r+1]);n.set(ve.NAME,s)}else if(i[r]===Ne.ID){var o=new Ne(t[r+1]);n.set(Ne.NAME,o)}else if(i[r]===Ue.ID){var a=new Ue(t[r+1]);n.set(Ue.NAME,a)}else if(i[r]===je.ID){var d=new je(t[r+1]);n.set(je.NAME,d)}else if(i[r]===We.ID){var S=new We(t[r+1]);n.set(We.NAME,S)}else if(i[r]===Je.ID){var E=new Je(t[r+1]);n.set(Je.NAME,E)}else if(i[r]===it.ID){var c=new it(t[r+1]);n.set(it.NAME,c)}else if(i[r]===at.ID){var l=new at(t[r+1]);n.set(at.NAME,l)}else if(i[r]===ut.ID){var u=new ut(t[r+1]);n.set(ut.NAME,u)}else if(i[r]===Tt.ID){var _=new Tt(t[r+1]);n.set(Tt.NAME,_)}else if(i[r]===Pt.ID){var O=new Pt(t[r+1]);n.set(Pt.NAME,O)}else if(i[r]===Rt.ID){var T=new Rt(t[r+1]);n.set(Rt.NAME,T)}else if(i[r]===bt.ID){var N=new bt(t[r+1]);n.set(bt.NAME,N)}else if(i[r]===jt.ID){var g=new jt(t[r+1]);n.set(jt.NAME,g)}else if(i[r]===Wt.ID){var I=new Wt(t[r+1]);n.set(Wt.NAME,I)}else if(i[r]===Zt.ID){var p=new Zt(t[r+1]);n.set(Zt.NAME,p)}else if(i[r]===on.ID){var A=new on(t[r+1]);n.set(on.NAME,A)}else if(i[r]===ln.ID){var P=new ln(t[r+1]);n.set(ln.NAME,P)}else if(i[r]===Tn.ID){var C=new Tn(t[r+1]);n.set(Tn.NAME,C)}}}return n}if(e.startsWith("C")){var D=new Map,v=new Ne(e);return D.set(Ne.NAME,v),(new W).setFieldValue(h.SECTION_IDS,[2]),D.set(W.NAME,v),D}throw new w("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(Nn.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);var n=null;this.sections.has(e)?n=this.sections.get(e):e===ve.NAME?(n=new ve,this.sections.set(ve.NAME,n)):e===Ne.NAME?(n=new Ne,this.sections.set(Ne.NAME,n)):e===Ue.NAME?(n=new Ue,this.sections.set(Ue.NAME,n)):e===je.NAME?(n=new je,this.sections.set(je.NAME,n)):e===We.NAME?(n=new We,this.sections.set(We.NAME,n)):e===Je.NAME?(n=new Je,this.sections.set(Je.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===ut.NAME?(n=new ut,this.sections.set(ut.NAME,n)):e===Tt.NAME?(n=new Tt,this.sections.set(Tt.NAME,n)):e===Pt.NAME?(n=new Pt,this.sections.set(Pt.NAME,n)):e===Rt.NAME?(n=new Rt,this.sections.set(Rt.NAME,n)):e===bt.NAME?(n=new bt,this.sections.set(bt.NAME,n)):e===jt.NAME?(n=new jt,this.sections.set(jt.NAME,n)):e===Wt.NAME?(n=new Wt,this.sections.set(Wt.NAME,n)):e===Zt.NAME?(n=new Zt,this.sections.set(Zt.NAME,n)):e===on.NAME?(n=new on,this.sections.set(on.NAME,n)):e===ln.NAME?(n=new ln,this.sections.set(ln.NAME,n)):e===Tn.NAME&&(n=new Tn,this.sections.set(Tn.NAME,n)),n&&(n.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(Nn.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<Nn.SECTION_ORDER.length;t++){var n=Nn.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 In{constructor(){this.gppVersion="1.1",this.supportedAPIs=[],this.eventQueue=new C(this),this.cmpStatus=E.LOADING,this.cmpDisplayStatus=c.HIDDEN,this.signalStatus=u.NOT_READY,this.applicableSections=[],this.gppModel=new gn,this.cmpId=void 0,this.cmpVersion=void 0,this.eventStatus=void 0}reset(){this.eventQueue.clear(),this.cmpStatus=E.LOADING,this.cmpDisplayStatus=c.HIDDEN,this.signalStatus=u.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new gn,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class pn extends Error{constructor(e){super(e),this.name="GVLError"}}class An{has(e){return An.langSet.has(e)}forEach(e){An.langSet.forEach(e)}get size(){return An.langSet.size}}function Pn(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 Cn(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var s=e.apply(t,n);function o(e){Pn(s,i,r,o,a,"next",e)}function a(e){Pn(s,i,r,o,a,"throw",e)}o(void 0)}))}}An.langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);class Dn{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 vn{constructor(){this.vendors=void 0,this.consentLanguages=new An,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=vn.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 vn;return t.populate(e),t}static fromUrl(e){return Cn((function*(){var t=e.baseUrl;if(!t||0===t.length)throw new pn("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new pn("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 vn;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 Dn.fetch(r))}else{var s=e.latestFilename;s||(s="vendor-list.json");var o=t+s;n.populate(yield Dn.fetch(o))}return n}))()}changeLanguage(e){var t=this;return Cn((function*(){var n=e.toUpperCase();if(!t.consentLanguages.has(n))throw new pn("unsupported language "+e);if(n!==t.language){t.language=n;var i=t.baseUrl+t.languageFilename.replace("[LANG]",e);try{t.populate(yield Dn.fetch(i))}catch(e){throw new pn("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}}vn.DEFAULT_LANGUAGE="EN";class wn{constructor(e,t,n){this.callResponder=void 0,this.cmpApiContext=void 0,this.cmpApiContext=new In,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new P(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(Nn.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Nn.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,n){this.cmpApiContext.gppModel.setFieldValue(e,t,n)}setFieldValueBySectionId(e,t,n){this.setFieldValue(Nn.SECTION_ID_NAME_MAP.get(e),t,n)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Nn.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Nn.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Nn.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Nn.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return vn.fromVendorList(e)}getGvlFromUrl(e){return Cn((function*(){return vn.fromUrl(e)}))()}}var Vn,Rn,Mn,mn=n(349),Gn="tcfcav1",Un="tcfeuv2",fn="usca",bn="usco",Ln="usct",yn="usnat",Fn="usp",xn="usut",Hn="usva",jn="usde",Kn="usia",Bn="usne",zn="usnh",Yn="usnj",kn="ustn",Wn="usfl",Qn="usmt",Xn="usor",qn="ustx",Jn={[Un]:2,[Gn]:5,[Fn]:6,[yn]:7,[fn]:8,[Hn]:9,[bn]:10,[xn]:11,[Ln]:12,[Wn]:13,[Qn]:14,[Xn]:15,[qn]:16,[jn]:17,[Kn]:18,[Bn]:19,[zn]:20,[Yn]:21,[kn]:22},$n={[Gn]:["Version","Created","LastUpdated","CmpId","CmpVersion","ConsentScreen","ConsentLanguage","VendorListVersion","TcfPolicyVersion","UseNonStandardStacks","SpecialFeatureExpressConsent","PurposesExpressConsent","PurposesImpliedConsent","VendorExpressConsent","VendorImpliedConsent","SegmentType","PubPurposesExpressConsent","PubPurposesImpliedConsent","NumCustomPurposes","CustomPurposesExpressConsent","CustomPurposesImpliedConsent"],[Un]:["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"],[fn]:["Version","SaleOptOutNotice","SharingOptOutNotice","SensitiveDataLimitUseNotice","SaleOptOut","SharingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","PersonalDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[bn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Ln]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","TargetedAdvertisingOptOut","SaleOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[yn]:["Version","SharingNotice","SaleOptOutNotice","SharingOptOutNotice","TargetedAdvertisingOptOutNotice","SensitiveDataProcessingOptOutNotice","SensitiveDataLimitUseNotice","SaleOptOut","SharingOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","PersonalDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Fn]:["Version","Notice","OptOutSale","LspaCovered"],[xn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SensitiveDataProcessingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[Hn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[Wn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[Qn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Xn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[qn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[jn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Kn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Bn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[zn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Yn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[kn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"]},Zn={gppDefaultStatus:e=>null==e?0:!0===e?1:2,gppReverseDefaultStatus:e=>null==e?0:!0===e?2:1},ei=Object.keys(Zn),ti=e=>t=>{var n;if(t instanceof Error?n=t:("string"!=typeof t&&(t=JSON.stringify(t)),n=new Error(t)),!e)throw n;if("function"==typeof e)return e(n);throw n},ni=null,ii=!1,ri=e=>Rn=e,si=[],oi=e=>{si.forEach((t=>function(e,t){void 0===t&&(t=!1),t?setTimeout(e,0):e()}((()=>{t(e)}),ii)))},ai=e=>{if("function"!=typeof e)return Mn("Didomi - Error in addGPPStringUpdateListener: listener must be a function");var t;si.push((t=e,function(){try{t(...arguments)}catch(e){Mn("Didomi - Error in addGPPStringUpdateListener: "+e.message)}}))},di=()=>{ni.getSignalStatus()!==u.READY&&ni.setSignalStatus(u.READY)},Si=()=>{ni.getCmpDisplayStatus()!==c.HIDDEN&&ni.setCmpDisplayStatus(c.HIDDEN)},Ei=()=>{var e;try{e=ni.getGppString()}catch(e){Mn("Didomi - GPP library getGppString method failed with the error: "+e.message)}return e},ci=e=>{var t;if(!Boolean(ni&&"object"==typeof ni))throw new Error("Didomi - GPP API is not initialized");if((e=>"none"===(null==e?void 0:e.regulation))(e))return ni.setGppString("DBAA"),ni.setCmpStatus(E.LOADED),di(),ni.setSupportedAPIs([]),void ni.setApplicableSections([-1]);var n=[],{vendors:i,purposes:r,consent_string:s}=e,o={state:{userStatus:{vendors:i,purposes:r}},transformers:N({},Zn,{default:Zn.gppDefaultStatus})};null==(t=Vn)||null==(t=t.sections)||t.forEach((e=>{if(e.name===Un)ni.setSectionString(Un,null!=s?s:""),n.push(Un);else{var t=$n[e.name];if(t){var i,r=e.fields,a=(0,mn.compute)(r,N({},o,{pick:t}));void 0!==a.Gpc&&(a.Gpc=!(0===a.Gpc||2===a.Gpc)),ni.setSectionString(e.name,""),null==(i=Object.keys(a))||i.forEach((t=>{ni.setFieldValue(e.name,t,a[t])})),n.push(e.name)}}})),Si();var a=Ei();a&&(((e,t,n)=>{n!==t&&(oi(t),null==e||e.forEach((e=>ni.fireSectionChange(e))),ri(t))})(n,a,Rn),di())},li=()=>{ni.getCmpDisplayStatus()!==c.VISIBLE&&ni.setCmpDisplayStatus(c.VISIBLE),ni.getSignalStatus()!==u.NOT_READY&&ni.setSignalStatus(u.NOT_READY)},ui=()=>{Si(),di()},_i=()=>Rn,Oi=e=>{var t=(e=>{var t=new Set,n=(null==e?void 0:e.sections)||[];for(var i of n)if(i.fields){var r=Object.values(i.fields);null==r||r.forEach((e=>{Array.isArray(e)?e.forEach((e=>{null!=e&&e.transformer&&!ei.includes(null==e?void 0:e.transformer)&&t.add(e.transformer)})):Object.prototype.hasOwnProperty.call(e,"transformer")&&!ei.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:",i=(e=>e.map((e=>"object"==typeof e?JSON.stringify(e):String(e))))(t);Mn(n.concat(" ",i.join(", ")))}},hi=e=>{var{gppConfig:t,cmpID:n,cmpVersion:i,yieldToMain:r=!1,onError:s}=e;if(ni=new wn(n,i),ii=r,Vn=t,ni.setCmpStatus(E.LOADED),Rn=ni.getGppString(),"function"==typeof s)Mn=ti(s);else{if(s)throw new Error("Didomi - onError must be a function");Mn=ti()}Oi(t)},Ti=()=>{var e={};if(ni){var t=ni.cmpApiContext.gppVersion,n=ni.getObject(),i=Object.keys(n).map((e=>Jn[e])),r=i.map((e=>e.toString())).join("_"),s=Ei();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:ni.getSectionStringById(o)}}return e};GppModule=T})();