PageSourceSearch

https://www.nationalcar.com/etc/designs/nweb/assets/20260728055140/js/siteFlag.js

js nationalcar.com collected 2026-09-24 09:41:49 UTC 6,587 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknational_aem=self.webpackChunknational_aem||[]).push([[637],{61906:function(e,t,n){n.r(t),n.d(t,{default:function(){return m},doProfileWarningFlagChecks:function(){return P},possibleWarnings:function(){return A}});var a=n(4942),r=n(67294),i=n(20745),s=n(24011),o=n(94537),c=n(37723),l=n(12127),u=n(77206),f=function(e){var t=e.siteFlags,n=void 0===t?[]:t,a=e.hideFlag,i=(0,r.useRef)({}),s=(0,r.useCallback)(function(e,t){e&&(0,l.wy)({el:e,isOpen:t})},[]),f=n.map(function(e,t){var n=function(e,t){return Array.isArray(e.keys)&&e.keys.length?e.keys.join("|"):t}(e,t);return i.current[n]||(i.current[n]=r.createRef()),{flag:e,refKey:n,nodeRef:i.current[n]}});return Object.keys(i.current).forEach(function(e){f.some(function(t){return t.refKey===e})||delete i.current[e]}),r.createElement("div",{className:"site-flags__wrapper"},r.createElement(o.Z,{component:null},f.length>0&&f.map(function(e){var t=e.flag,n=e.refKey,i=e.nodeRef;return r.createElement(c.Z,{classNames:"site-flag",key:n,nodeRef:i,timeout:{enter:200,exit:200},onEntering:function(){return s(i.current,!0)},onExiting:function(){return s(i.current,!1)}},r.createElement(u.Z,{ref:i,siteFlagType:t.type,messages:t.messages,flagKeys:t.keys,hideFlag:a,closeAction:t.closeAction,timeout:t.timer,additionalClasses:t.additionalClasses,showFlagUnderHero:t.showFlagUnderHero}))})))};f.displayName="SiteFlagWrapper";var E=f,_=n(60831),g=n(56307),d=n(62797),O=n(55618),h=n(23558),R=n(27261),I=n(54059);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach(function(t){(0,a.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var F=O.ed.UI.SITE_FLAG;function N(e){var t=[O.at.SITE_FLAG_TYPE_WARNING_PROD,O.at.SITE_FLAG_TYPE_WARNING_HARD,O.at.SITE_FLAG_TYPE_WARNING_SOFT],n=[],a=(0,l.dX)(e.getIn(F.FLAGS));return t.forEach(function(e){a[e]&&(n.push(a[e]),delete a[e])}),Object.keys(a).forEach(function(e){return n.push(a[e])}),{siteFlags:n}}function y(e){return{hideFlag:function(t){t.length&&t[0]===O.ih.COMMUNICATION_PREFERENCE_SUCCESS&&(0,d.mr)({key:"email notifications save updates",event:I.fL.BANNER,type:I.mH.SUCCESS_BANNER,value:"close"}),e((0,g.OH)(t))}}}var A={credit_card_expired:function(){return(0,l.WF)(O.qT.PROFILE,{hash:"/"+O.ih.PROFILE_ROUTE_PAYMENT_OPTIONS})},credit_card_near_expiration:function(){return(0,l.WF)(O.qT.PROFILE,{hash:"/"+O.ih.PROFILE_ROUTE_PAYMENT_OPTIONS})},driver_license_expired:function(){return(0,l.WF)(O.qT.PROFILE,{hash:"/"+O.ih.PROFILE_ROUTE_PERSONAL_INFO})},driver_license_near_expiration:function(){return(0,l.WF)(O.qT.PROFILE,{hash:"/"+O.ih.PROFILE_ROUTE_PERSONAL_INFO})},unselected_coverages:function(){return(0,l.WF)(O.qT.PROFILE,{hash:"/"+O.ih.PROFILE_ROUTE_RENTAL_PREFERENCES})},no_payment_methods:function(){return(0,l.WF)(O.qT.PROFILE,{hash:"/"+O.ih.PROFILE_ROUTE_PAYMENT_OPTIONS})},email_change_required:function(){return(0,l.WF)(O.qT.PROFILE,{hash:"/"+O.ih.PROFILE_ROUTE_PERSONAL_INFO,qs:{update_email:"true"}})}};function P(e,t){if(h.w.gma.isAuthenticated(e)){var n=p(p({},(0,l.dX)(h.w.gbo.profile.getAdditionalData(e))),{},{unselected_coverages:h.w.gbo.profile.getUnselectedCoverages(e),no_payment_methods:!h.w.gbo.profile.getHasPaymentMethods(e),email_change_required:h.w.gbo.profile.getEmailUpdateRequired(e)}),a=(0,l.dX)(e.getIn(F.HASH));Object.keys(A).forEach(function(e){var r=void 0!==a[e];if(n[e]&&!r){var i="credit_card_near_expiration"===e||"driver_license_near_expiration"===e?O.at.SITE_FLAG_TYPE_WARNING_SOFT:O.at.SITE_FLAG_TYPE_WARNING_HARD,s="unselected_coverages"===e?n[e].join(", "):"";t((0,g.JN)({key:e,message:{title:(0,l.ag)(e+"_title"),subtitle:(0,l.ag)(e+"_subtitle",{0:s}),link:(0,l.ag)(e+"_link"),onClick:A[e]},siteFlagType:i}))}else!n[e]&&r&&t((0,g.hd)(e))})}}var m={init:function(e,t){var n=[O.a.HOME,O.a.ENROLLMENT,O.a.ENROLLMENT_ACTIVATE,O.a.HOME_AUTH,O.a.PROFILE,O.a.RESERVE,O.a.CONFIRMATION,O.a.CONFIRMATION_MODIFY,O.a.FIND_RESERVATION_DETAILS,O.a.UNSUBSCRIBE,O.a.UNAUTH_COMMUNICATION_PREFERENCES],a=e.getState().hasIn(["bookingWidget","partnerRewardProgram","code"]);((0,l.TN)(n)||a||(0,d.DP)())&&(l.Et.combineReducers(_.Z),(0,l.vQ)(e).then(function(t){if(h.w.gma.getProductionWarning(t)){var n="YOU ARE HITTING PRODUCTION GBO SERVICES!!!";e.dispatch((0,g.dN)({key:O.at.SITE_FLAG_TYPE_WARNING_PROD,message:{title:n,subtitle:"".concat(n," ").concat(n," ").concat(n," ").concat(n," ").concat(n)},siteFlagType:O.at.SITE_FLAG_TYPE_WARNING_PROD}))}e.dispatch((0,R._)()),(0,l.TN)([O.a.HOME_AUTH,O.a.PROFILE])&&h.w.gma.isAuthenticated(t)&&(P(e.getState(),e.dispatch),e.subscribe(function(){return P(e.getState(),e.dispatch)}))}));var o=(0,s.$j)(N,y)(E);(0,i.createRoot)(t).render(r.createElement(s.zt,{store:e},r.createElement(o,null)))}}},60831:function(e,t,n){n.d(t,{Z:function(){return u}});var a=n(71002),r=n(35369),i=n(55618),s=n(12127),o=n(23558),c=n(62797),l=n(54059);function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.D5)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=o.w.gma.getTimeOut(e),u=function(e,t){var n=i.sU[e.toUpperCase()];n&&(0,c.mr)({key:n,event:l.fL.BANNER,type:l.mH.BANNER,value:t})};switch(t.type){case i.at.SITE_FLAG_SHOW:var f=(0,s.dX)(e.getIn(i.ed.UI.SITE_FLAG_PATH)),E=t.flag.key,_=t.flag.closeAction,g=t.flag.siteFlagType,d=t.flag.additionalClasses,O=t.flag.showFlagUnderHero,h=n;return u(E,"open"),void 0===f.hash[E]?("object"!==(0,a.Z)(f.flags[g])&&(f.flags[g]={type:g,keys:[],messages:[],closeAction:_,timer:h,additionalClasses:d,showFlagUnderHero:O}),f.hash[E]=t.flag.siteFlagType,f.flags[g].keys.push(t.flag.key),f.flags[g].messages.push(t.flag.message),e.set("siteFlag",(0,r.d0)(f))):e;case i.at.SITE_FLAG_HIDE:var R=(0,s.dX)(e.getIn(i.ed.UI.SITE_FLAG_PATH));
1return("string"==typeof t.keys?[t.keys]:t.keys).forEach(function(e){var t,n=R.hash[e];R.flags[n]&&(R.flags[n].keys=R.flags[n].keys.filter(function(n,a){return n!==e||(t=a,!1)}),R.flags[n].messages.splice(t,1),0===R.flags[n].keys.length&&delete R.flags[n]),u(e,"close")}),R.hash={},Object.keys(R.flags).forEach(function(e){R.flags[e].keys.forEach(function(t){return R.hash[t]=e})}),e.set("siteFlag",(0,r.d0)(R));default:return 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.