PageSourceSearch

https://www.history.com/tve-weblanding/_next/static/chunks/tsub-middleware.50ae105b631c440f.js

js history.com collected 2026-09-24 08:33:02 UTC 6,885 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0dc2a433-7377-4199-8054-76f7a7942482",e._sentryDebugIdIdentifier="sentry-dbid-0dc2a433-7377-4199-8054-76f7a7942482")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9010],{88543:(e,r,t)=>{"use strict";t.r(r),t.d(r,{tsubMiddleware:()=>y});var n=function(){function e(e){this.rules=[],this.rules=e||[]}return e.prototype.getRulesByDestinationName=function(e){for(var r=[],t=0,n=this.rules;t<n.length;t++){var a=n[t];(a.destinationName===e||void 0===a.destinationName)&&r.push(a)}return r},e}(),a=t(93823),o=t.n(a);function i(e,r){return Array.isArray(e)?e:"object"==typeof e?e.value:o()(r,e)}function c(e){return!!Array.isArray(e)&&(("lowercase"===e[0]||"length"===e[0]||"typeof"===e[0])&&2===e.length||("contains"===e[0]||"match"===e[0])&&3===e.length)}function s(e,r){for(var t,n,a={t:"",ok:!1,err:!1};e.length>0;){if(0===r.length)return a;switch(e[0]){case"[":var o=r[0];r=r.slice(1);var i=!0;(e=e.slice(1)).length>0&&"^"===e[0]&&(i=!1,e=e.slice(1));for(var c=!1,s=0;;){if(e.length>0&&"]"===e[0]&&s>0){e=e.slice(1);break}var u="",l="";if(u=(t=f(e)).char,e=t.newChunk,t.err||(l=u,"-"===e[0]&&(l=(n=f(e.slice(1))).char,e=n.newChunk,n.err)))return a;u<=o&&o<=l&&(c=!0),s++}if(c!==i)return a;break;case"?":r=r.slice(1),e=e.slice(1);break;case"\\":if(0===(e=e.slice(1)).length)return a.err=!0,a;default:if(e[0]!==r[0])return a;r=r.slice(1),e=e.slice(1)}}return a.t=r,a.ok=!0,a.err=!1,a}function f(e){var r={char:"",newChunk:"",err:!1};return 0===e.length||"-"===e[0]||"]"===e[0]||"\\"===e[0]&&0===(e=e.slice(1)).length?(r.err=!0,r):(r.char=e[0],r.newChunk=e.slice(1),0===r.newChunk.length&&(r.err=!0),r)}var u=t(34012),l=t.n(u),p=t(94968);function h(e,r,t){Object.entries(r).forEach(function(r){var n=r[0],a=r[1],i=function(e){"object"==typeof e&&null!==e&&t(e,a)}
1,c=""===n?e:o()(e,n);Array.isArray(c)?c.forEach(i):i(c)})}function g(e,r){for(var t=0;t<8;t++)for(var n=e[t],a=128;a>=1;a/=2)n-a>=0?(n-=a,r.push(1)):r.push(0)}var y=function(e){return function(r){var t=r.payload,a=r.integration,f=r.next;new n(e).getRulesByDestinationName(a).forEach(function(e){for(var r=e.matchers,n=e.transformers,a=0;a<r.length;a++)if(function(e,r){if(!r)throw Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(e,r){if(!e)return!1;try{e=JSON.parse(e)}catch(r){throw Error('Failed to JSON.parse FQL intermediate representation "'.concat(e,'": ').concat(r))}var t=function e(r,t){if(!Array.isArray(r))return!0===i(r,t);var n,a,o,f,u,l,p,h,g=r[0];switch(g){case"!":return!e(r[1],t);case"or":for(var y=1;y<r.length;y++)if(e(r[y],t))return!0;return!1;case"and":for(var y=1;y<r.length;y++)if(!e(r[y],t))return!1;return!0;case"=":case"!=":var d=i(r[1],t),v=i(r[2],t),b=g,w=t;switch(c(d)&&(d=e(d,w)),c(v)&&(v=e(v,w)),"object"==typeof d&&"object"==typeof v&&(d=JSON.stringify(d),v=JSON.stringify(v)),b){case"=":return d===v;case"!=":return d!==v;default:throw Error("Invalid operator in compareItems: ".concat(b))}case"<=":case"<":case">":case">=":var m=i(r[1],t),k=i(r[2],t),N=g,j=t;if(c(m)&&(m=e(m,j)),c(k)&&(k=e(k,j)),"number"!=typeof m||"number"!=typeof k)return!1;switch(N){case"<=":return m<=k;case">=":return m>=k;case"<":return m<k;case">":return m>k;default:throw Error("Invalid operator in compareNumbers: ".concat(N))}case"in":return n=i(r[1],t),a=i(r[2],t),o=t,void 0!==a.find(function(e){return i(e,o)===n});case"contains":return f=i(r[1],t),u=i(r[2],t),"string"==typeof f&&"string"==typeof u&&-1!==f.indexOf(u);case"match":return l=i(r[1],t),p=i(r[2],t),"string"==typeof l&&"string"==typeof p&&function(e,r){var t,n;e:for(;e.length>0;){var a=void 0,o=void 0;if(a=(t=function(e){for(var r,t={star:!1,chunk:"",pattern:""};e.length>0&&"*"===e[0];)e=e.slice(1),t.star=!0;var n=!1;r:for(r=0;r<e.length;r++)switch(e[r]){case"\\":r+1<e.length&&r++;break;case"[":n=!0;break;case"]":n=!1;break;case"*":if(!n)break r}return t.chunk=e.slice(0,r),t.pattern=e.slice(r),t}(e)).star,o=t.chunk,e=t.pattern,a&&""===o)return!0;var i=s(o,r),c=i.t,f=i.ok,u=i.err;if(u)return!1;if(f&&(0===c.length||e.length>0)){r=c;continue}if(a)for(var l=0;l<r.length;l++){if(c=(n=s(o,r.slice(l+1))).t,f=n.ok,u=n.err,f){if(0===e.length&&c.length>0)continue;r=c;continue e}if(u)break}return!1}return 0===r.length}(p,l);case"lowercase":var E=i(r[1],t);if("string"!=typeof E)return null;return E.toLowerCase();case"typeof":return typeof i(r[1],t);case"length":return null===(h=i(r[1],t))?0:Array.isArray(h)||"string"==typeof h?h.length:NaN;default:throw Error("FQL IR could not evaluate for token: ".concat(g))}}(e,r);return"boolean"==typeof t&&t}(r.ir,e);default:throw Error("Matcher of type ".concat(r.type," unsupported."))}}(t.obj,r[a])&&(t.obj=function(e,r){for(var t=0;t<r.length;t++){var n=r[t];switch(n.type){case"drop":return null;case"drop_properties":h(e,n.config.drop,function(e,r){r.forEach(function(r){return delete e[r]})});break;case"allow_properties":h(e,n.config.allow,function(e,r){Object.keys(e).forEach(function(t){r.includes(t)||delete e[t]})});break;case"sample_event":if(function(e,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(e,r){var t,n=o()(e,r.sample.path),a=l().hash(JSON.stringify(n)).match(/.{2}/g).map(function(e){return parseInt(e,16)}),i=-64,c=[];g(a.slice(0,8),c);for(var s=0,f=0;f<64&&1!==c[f];f++)s++;if(0!==s){var u=[];g(a.slice(9,16),u),i-=s,c.splice(0,s),u.splice(64-s),c=c.concat(u)}return c[63]=+(0===c[63]),t=parseInt(c.join(""),2),t*Math.pow(2,i)<r.sample.percent}(e,r):Math.random()<=r.sample.percent))}(e,n.config))break;return null;case"map_properties":!function(e,r){var t=JSON.parse(JSON.stringify(e));for(var n in r.map)if(Object.prototype.hasOwnProperty.call(r.map,n)){var a=r.map[n],i=n.split("."),c=void 0;if(i.length>1?(i.pop(),c=o()(t,i.join("."))):c=e,"object"==typeof c){if(a.copy){var s=o()(t,a.copy);void 0!==s&&(0,p.J)(e,n,s)}else if(a.move){var f=o()(t,a.move);void 0!==f&&(0,p.J)(e,n,f),function(e,r){if(o()(e,r)){for(var t=r.split("."),n=t.pop();t.length&&"\\"===t[t.length-1].slice(-1);)n=t.pop().slice(0,-1)+"."+n;for(;t.length;)e=e[r=t.shift()];delete e[n]}}(e,a.move)}else Object.prototype.hasOwnProperty.call(a,"set")&&(0,p.J)(e,n,a.set);
1if(a.to_string){var u=o()(e,n);if("string"==typeof u||"object"==typeof u&&null!==u)continue;void 0!==u?(0,p.J)(e,n,JSON.stringify(u)):(0,p.J)(e,n,"undefined")}}}}(e,n.config);break;case"hash_properties":break;default:throw Error('Transformer of type "'.concat(n.type,'" is unsupported.'))}}return e}(t.obj,n[a]),null===t.obj))return f(null)}),f(t)}}},93823:function(e){e.exports=function(e,r,t,n,a){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)e=e?e[r[n]]:a;return e===a?t:e}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.