PageSourceSearch

https://my.dnb.com/src_components_landing_Page_Page_tsx-src_helper…_useEntitlements_ts.ae438ce4b5199238e440.js

js dnb.com collected 2026-09-24 09:07:43 UTC 10,731 bytes, 2 lines download raw bytes

1/*! For license information please see src_components_landing_Page_Page_tsx-src_helpers_customHooks_useEntitlements_ts.ae438ce4b5199238e440.js.LICENSE.txt */
2"use strict";(self.webpackChunkmarketplace_portal_ui=self.webpackChunkmarketplace_portal_ui||[]).push([["src_components_landing_Page_Page_tsx-src_helpers_customHooks_useEntitlements_ts"],{13056(e,n,t){t.d(n,{A:()=>d});var r=t(58156),o=t.n(r),i=t(69594),a=t(40358),u=t(7822),l=t(47603),c=t(18573),s=t(96540);const d=function(){var e=(0,l.$g)(void 0,{refetchOnMountOrArgChange:30}),n=e.data,t=e.isLoading,r=e.isSuccess,d=e.isError,f=e.error,p=e.refetch,_=(0,u.jL)();return(0,s.useEffect)(function(){if((r||d)&&_((0,c.LC)()),r&&n){var e,t,u,l=o()(n,"applications",null),s={company_name:o()(n,"company_name",null),language_preference_code:o()(n,"language_preference_code",null),title_code:o()(n,"title_code",null),job_function_code:o()(n,"job_function_code",null),applications:l};window._datalayer_user=s;var f=o()(n,"country_code",null),p=o()(n,"email_address",null),v=o()(n,"language_preference_code",null),m=window.localStorage.getItem("bloomreachLoginFlow")||"";(0,i.Bk)(f,p,l,m,v);var b,y=n.street?n.street.split(", "):[""];b=null!=n&&n.language_preference_code?5===(null==n?void 0:n.language_preference_code.length)?null==n?void 0:n.language_preference_code:null!=n&&n.country_code?"".concat(null==n?void 0:n.language_preference_code,"-").concat(null==n?void 0:n.country_code):window.localStorage.getItem("language")||"en-us":(0,a.Ul)();var g={userName:n.user_name||"",email:n.email_address||"",firstName:n.first_name||"",lastName:n.last_name||"",phoneNumber:n.phone_number||"",countryCode:(0,a.E8)(n.country_code),accountSettingsSSOLink:o()(n,"account_settings_sso_link","")||"",hasSubscription:n.has_subscription||!1,hasDashboard:-1!==n.applications.findIndex(function(e){return"EB Dashboard"===e}),languagePreference:(0,a.ee)(null===(e=b)||void 0===e?void 0:e.toLowerCase())||"en-".concat((null===(t=(0,a.E8)(n.country_code))||void 0===t?void 0:t.toLowerCase())||"us"),product_subscriptions:n.product_subscriptions,street:n.street||"",city:n.city||"",state:n.state||"",postalCode:n.postal_code||"",address1:y[0]||"",address2:y.length>1?y[1]:"",company_name:n.company_name,title_code:n.title_code,idaasUUID:n.idaasUUID,isDnbUser:n.email_address.toLowerCase().indexOf("@dnb.com")>-1},h=n.product_subscriptions.map(function(e){return e.product_name});null!==(u=window)&&void 0!==u&&u.digitalData&&(window.digitalData.page.userInfo={first_name:n.first_name,last_name:n.last_name,email_address:n.email_address,products_list:h}),_((0,c.KF)(g)),_((0,c.gq)(g.countryCode)),_((0,c.aP)(null==g?void 0:g.idaasUUID)),_((0,c.t_)(-1!==n.applications.findIndex(function(e){return"EB Dashboard"===e})))}},[n,r,d,f,_]),(0,s.useEffect)(function(){_((0,c.F6)(t))},[t]),{triggerGetProfileInfo:p,response:n}}},43557(e,n,t){t.d(n,{A:()=>o});var r=t(74848);const o=function(e){var n=e.children;return(0,r.jsx)("div",{className:"marketplace-page relative grid grid-flow-row rounded-sm border-t-0 border-gray-border text-sm desktop:text-base",id:"marketPlaceView",children:n})}},76848(e,n,t){t.d(n,{o:()=>g});var r=t(18573),o=t(96540),i=t(16876),a=t(36091),u=t(7822),l=t(47603),c=t(13056),s=t(20008);function d(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(){var e,n,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return p(c,"_invoke",function(t,r,o){var i,u,l,c=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(n,t){return i=n,u=0,l=e,f.n=t,a}};function p(t,r){for(u=t,l=r,n=0;!d&&c&&!o&&n<s.length;n++){var o,i=s[n],p=f.p,_=i[2];t>3?(o=_===r)&&(l=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=t<2&&p<i[1])?(u=0,f.v=r,f.n=i[1]):p<_&&(o=t<3||i[0]>r||r>_)&&(i[4]=t,i[5]=r,f.n=_,u=0))}if(o||t>1)return a;throw d=!0,r}return function(o,s,_){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,_),u=s,l=_;(n=u<2?e:l)||!d;){i||(u?u<3?(u>1&&(f.n=-1),p(u,l)):f.n=l:f.v=l);try{if(c=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,l)))throw TypeError("iterator result is not an object");
2if(!n.done)return n;l=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((n=(d=f.n<0)?l:t.call(r,f))!==a)break}catch(n){i=e,u=1,l=n}finally{c=1}}return{value:n,done:d}}}(t,o,i),!0),c}var a={};function u(){}function l(){}function c(){}n=Object.getPrototypeOf;var s=[][r]?n(n([][r]())):(p(n={},r,function(){return this}),n),d=c.prototype=u.prototype=Object.create(s);function _(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,p(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,p(d,"constructor",c),p(c,"constructor",l),l.displayName="GeneratorFunction",p(c,o,"GeneratorFunction"),p(d),p(d,o,"Generator"),p(d,r,function(){return this}),p(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:i,m:_}})()}function p(e,n,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}p=function(e,n,t,r){function i(n,t){p(e,n,function(e){return this._invoke(n,t,e)})}n?o?o(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t:(i("next",0),i("throw",1),i("return",2))},p(e,n,t,r)}function _(e,n,t,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void t(e)}u.done?n(l):Promise.resolve(l).then(r,o)}function v(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){_(i,r,o,a,u,"next",e)}function u(e){_(i,r,o,a,u,"throw",e)}a(void 0)})}}function m(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,n)||b(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,n){if(e){if("string"==typeof e)return y(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(e,n):void 0}}function y(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,u.jL)(),t=m((0,o.useState)(!0),2),p=t[0],_=t[1],b=(0,u.GV)(function(e){return e.app.profileDetails}),y=(0,u.GV)(function(e){return e.app.alreadyLoaded}),g=e.ALL_API_ENHANCEMENT,w=m((0,l.vM)(),2),S=w[0],k=w[1].isLoading,E=m((0,l.AW)(),2),A=E[0],j=E[1].isLoading,D=m((0,l.sA)(),2),L=D[0],I=D[1].isLoading,O=(0,s.A)("flow").getSpecificValue,x=(0,s.A)("cid").getSpecificValue,T=m((0,l.Ve)(),1)[0],P=(0,c.A)().response;return(0,o.useEffect)(function(){var e=function(){var e=v(f().m(function e(){var t,o,u,l,c,s,p,m,w,k,E,j,D,I;return f().w(function(e){for(;;)switch(e.n){case 0:if(null==P||!P.email_address){e.n=6;break}if(y){e.n=5;break}if(n((0,r.eE)()),o=["216","231","253","294"],null==(u=null===(t=P.product_subscriptions)||void 0===t?void 0:t.filter(function(e){return e.subscriber_number&&o.includes(e.app_id)}))||!u.length){e.n=2;break}return e.n=1,Promise.all(u.map(function(){var e=v(f().m(function e(n){var t,r,i,a,u,l,c,s,d,p,_,v,m,b,y,g,w;return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,L(n).unwrap();case 1:if(a=e.v,u=null===(t=a[0])||void 0===t?void 0:t.products[0],l=null==a||null===(r=a.userDetails)||void 0===r||null===(r=r.filter(function(e){return n.app_id===e.app_id}))||void 0===r?void 0:r[0],!u){e.n=2;break}return s=u.expiration_date,d=u.service_type,p="Analytics STD Trial"===(null==u?void 0:u.name)||"Free Trial"===(null==u?void 0:u.service_type),_=o.includes(n.app_id)&&p?h(s):-1,v=n.subscriber_number,m=n.app_id,b=n.product_name,y=null==l||null===(c=l.products[0])||void 0===c?void 0:c.subscription_status,e.a(2,{subscriber_number:v,app_id:m,product_name:b,expiration_date:s,service_type:d,daysLeft:_,subscription_status:y});case 2:if(null!=a&&null!==(i=a.data)&&void 0!==i&&null!==(i=i[0])&&void 0!==i&&null!==(i=i.products)&&void 0!==i&&i.length){e.n=3;break}return e.a(2,{subscriber_number:null==l||null===(g=l.products)||void 0===g||null===(g=g[0])||void 0===g?void 0:g.subscriber_number,app_id:null==l?void 0:l.app_id,product_name:null==l?void 0:l.app_name,expiration_date:null,service_type:null,daysLeft:-1,subscription_status:null==l||null===(w=l.products)||void 0===w||null===(w=w[0])||void 0===w?void 0:w.subscription_status});case 3:return e.a(2,{subscriber_number:null,app_id:null,product_name:null,expiration_date:null,service_type:null,daysLeft:null,subscription_status:null})}},e)}));return function(n){return e.apply(this,arguments)}}()));case 1:l=e.v,n((0,r.WL)(d(l)));case 2:if("dfc"!==O||!x){e.n=3;break}return e.n=3,T({key:"".concat(P.email_address,"*")});case 3:return n((0,r.F6)(!0)),_(!0),e.n=4,g?A(b.idaasUUID?{idaas_uuid:b.idaasUUID}:{}).unwrap():S().unwrap();case 4:(c=e.v)&&(n((0,r.$2)(c)),w=null===(s=c.dfcEntitlements)||void 0===s?void 0:s.some(function(e){return e.showTile}),n((0,r.mu)(w)),k=(0,a.Hw)(b.countryCode),E=k&&c.credibilityEntitlements.some(function(e){return Object.values(i.$m).includes(e.title)}),j=(null===(p=c.vboEntitlements)||void 0===p?void 0:p.filter(function(e){return/D&B Rev\.Up.*/g.test(e.product_name)||i.$W.includes(e.product_name)||["329","330","331"].includes(e.application_id)}).length)>0,D=j||E,I=null===(m=c.vboEntitlements)||void 0===m?void 0:m.filter(function(e){return"Analytics STD Trial"===e.product_name}),D?n((0,r.I1)(D)):I.length>0&&n((0,r.x)(0!==I.length)),_(!1)),e.n=6;break;case 5:n((0,r.F6)(!1)),_(!1);case 6:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();e()},[P]),(0,o.useEffect)(function(){n((0,r.F6)(k||j||I))},[k,j,I]),[p]}function h(e){try{if(e){var n=new Date(e),t=new Date(Date.now());return Math.ceil((n-t)/864e5)}return-1}catch(e){return console.log("error in accessSubscription method",e.message),-1}}}}]);

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.