import{vt as n}from"./vendor-all-1-BfXMvJfI.js";import{t}from"./cc188f2db-BCJ6pC5C.js";function e(e,r){function i(i){var o=e,a=i.event.event;if(o&&a){var s=o[a];if(!t(o,s))return i.updateEvent("integrations",n(n({},i.event.integrations),{All:!1,"Segment.io":!0})),i;var u=function(n,t){var e,r;if(!n||!Object.keys(n))return{};var i=n.integrations?Object.keys(n.integrations).filter(function(t){return!1===n.integrations[t]}):[],o=[];return(null!==(e=t.remotePlugins)&&void 0!==e?e:[]).forEach(function(n){i.forEach(function(t){n.creationName==t&&o.push(n.name)})}),(null!==(r=t.remotePlugins)&&void 0!==r?r:[]).reduce(function(n,t){return t.settings.subscriptions&&o.includes(t.name)&&t.settings.subscriptions.forEach(function(e){return n["".concat(t.name," ").concat(e.partnerAction)]=!1}),n},{})}(s,r);i.updateEvent("integrations",n(n(n({},i.event.integrations),null==s?void 0:s.integrations),u))}return i}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:i,alias:i,track:i,identify:i,group:i}}export{e as schemaFilter};