1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["src_main_webpack_components_immersivehero_immersiveheroUtils_js"],{15085:function(t,e,n){n.r(e),n.d(e,{REMOVED_BUILDS_STORAGE_KEY:function(){return p},buildDetailsString:function(){return y},buildReminderRemovalButton:function(){return E},extractExteriorDetails:function(){return m},extractInteriorDetails:function(){return h},extractOptions:function(){return _},extractPackCode:function(){return S},extractPrice:function(){return O},extractPricingDetails:function(){return g},extractProductDetails:function(){return b},extractSavedBuild:function(){return T},getLatestModelYear:function(){return k},getLocalStorageMatches:function(){return w},getRemovedBuilds:function(){return P},isBuildRemoved:function(){return j},modelYearValue:function(){return A},removeBuildReminder:function(){return D},saveRemovedBuilds:function(){return R}});var r=n(40443),o=n(11968);function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function l(n,r,o,i){var l=r&&r.prototype instanceof c?r:c,f=Object.create(l.prototype);return u(f,"_invoke",function(n,r,o){var i,u,l,c=0,f=o||[],v=!1,d={p:0,n:0,v:t,a:s,f:s.bind(t,4),d:function(e,n){return i=e,u=0,l=t,d.n=n,a}};function s(n,r){for(u=n,l=r,e=0;!v&&c&&!o&&e<f.length;e++){var o,i=f[e],s=d.p,p=i[2];n>3?(o=p===r)&&(l=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=s&&((o=n<2&&s<i[1])?(u=0,d.v=r,d.n=i[1]):s<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,u=0))}if(o||n>1)return a;throw v=!0,r}return function(o,f,p){if(c>1)throw TypeError("Generator is already running");for(v&&1===f&&s(f,p),u=f,l=p;(e=u<2?t:l)||!v;){i||(u?u<3?(u>1&&(d.n=-1),s(u,l)):d.n=l:d.v=l);try{if(c=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(v=d.n<0)?l:n.call(r,d))!==a)break}catch(e){i=t,u=1,l=e}finally{c=1}}return{value:e,done:v}}}(n,o,i),!0),f}var a={};function c(){}function f(){}function v(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),s=v.prototype=c.prototype=Object.create(d);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,o,"GeneratorFunction")),t.prototype=Object.create(s),t}return f.prototype=v,u(s,"constructor",v),u(v,"constructor",f),f.displayName="GeneratorFunction",u(v,o,"GeneratorFunction"),u(s),u(s,o,"Generator"),u(s,r,function(){return this}),u(s,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function u(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}u=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){u(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},u(t,e,n,r)}function l(t,e,n,r,o,i,u){try{var l=t[i](u),a=l.value}catch(t){return void n(t)}l.done?e(a):Promise.resolve(a).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function u(t){l(i,r,o,u,a,"next",t)}function a(t){l(i,r,o,u,a,"throw",t)}u(void 0)})}}function c(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||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(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,u,l=[],a=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(t){c=!0,o=t}
1finally{try{if(!a&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return l}}(t,e)||d(t,e)||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 d(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var p="RemovedSavedBuilds";function y(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return null!=e&&e.length?e.filter(Boolean).join("|"):""}function m(t){var e,n,o,i=v(r.A.getFeature("PAINT_COLOUR",t),1)[0];return i?y(null==i?void 0:i.id,r.A.getDescription(null==i?void 0:i.description),g(null!==(e=null===(n=i.price)||void 0===n?void 0:n.GROSS)&&void 0!==e?e:null===(o=i.price)||void 0===o?void 0:o.NET)):""}function h(t){var e,n,o,i,u=v(null!==(e=r.A.getFeature("TRIM",null==t?void 0:t.vehicle))&&void 0!==e?e:[],1)[0];return u?y(u.id,r.A.getDescription(null==u?void 0:u.description),g(null!==(n=null===(o=u.price)||void 0===o?void 0:o.GROSS)&&void 0!==n?n:null===(i=u.price)||void 0===i?void 0:i.NET)):""}function b(t,e){var n,o,i,u=v(r.A.getFeature(e,null==t?void 0:t.vehicle),1)[0];return u?y(null==u?void 0:u.id,r.A.getDescription(null==u?void 0:u.description),g(null!==(n=null===(o=u.price)||void 0===o?void 0:o.GROSS)&&void 0!==n?n:null===(i=u.price)||void 0===i?void 0:i.NET)):""}function S(t){var e=v(r.A.getFeature("PRODUCT",null==t?void 0:t.vehicle),1)[0];return e?r.A.getProductProperty(e,"DerivativePackCode"):""}function g(t){var e;return"object"!==f(t)||null===t?"N/A":"".concat(null===(e=t.currency)||void 0===e||null===(e=e.split("-"))||void 0===e?void 0:e[0]," ").concat(null==t?void 0:t.value)}function O(t){var e,n,o,i,u,l=v(r.A.getFeature("PRODUCT",null==t?void 0:t.vehicle),1)[0],a=null===(e=r.A.getVehicleDetails(null==t?void 0:t.vehicle))||void 0===e?void 0:e.price;return null!==(n=null!==(o=null!==(i=null==l||null===(u=l.price)||void 0===u?void 0:u.GROSS)&&void 0!==i?i:null==a?void 0:a.MIN_GROSS)&&void 0!==o?o:null==a?void 0:a.GROSS)&&void 0!==n?n:a}function _(t){var e,n=r.A.getFeature("OPTIONS",t);if(!n)return[];var o=null===(e=n.find(function(t){return"OPTIONS_CONFIGURATION"===t.name}))||void 0===e?void 0:e["feature-list"];return o?o.reduce(function(t,e){var n,r,o,i=(null!==(n=null!==(r=e.feature)&&void 0!==r?r:null===(o=e["feature-list"])||void 0===o?void 0:o.flatMap(function(t){var e;return null!==(e=t.feature)&&void 0!==e?e:[]}))&&void 0!==n?n:[]).filter(function(t){return"standard"!==t.availability&&"y"===t.preferred});return[].concat(c(t),c(i))},[]):[]}function A(t){var e=t.split("_").at(-1).replace(/^k/i,"");return 3===e.length&&e.endsWith("5")?Number(e.slice(0,-1))+.5:Number(e)}function k(t){return t.sort(function(t,e){return A(e.key)-A(t.key)})}function w(t,e,n){return I.apply(this,arguments)}function I(){return I=a(i().m(function t(e,n,r){var o,u,l,c,f,v,d,s,p;return i().w(function(t){for(;;)switch(t.n){case 0:for(o=[],u=new Set(e.map(function(t){return t.nameplateId})),l=0;l<localStorage.length;l+=1)c=localStorage.key(l),f=c.split("_"),v=f.at(-2),f.at(-1),c.startsWith("SavedBuild_".concat(n))&&u.has(v)&&o.push({key:c,value:localStorage.getItem(c)});if(d=o.filter(function(t){return!j(t.key,t.value)}),null!=r&&r.bodystyle){t.n=1;break}return t.a(2,k(d));case 1:return t.n=2,Promise.all(d.map(function(){var t=a(i().m(function t(e){var n,o,u,l,a,c,f,v,d;return i().w(function(t){for(;;)switch(t.n){case 0:if(n=e.key,o=e.value,t.p=1,(l=JSON.parse(o)).url){t.n=2;break}return t.a(2,null);case 2:return t.n=3,r.rcAPI.loadJsonp(l.url);case 3:return a=t.v,c=null===(u=a["feature-dictionary"])||void 0===u||null===(u=u["feature-list"])||void 0===u||null===(u=u.find(function(t){return"BODYSTYLE"===t.name}))||void 0===u||null===(u=u.feature)||void 0===u||null===(u=u.find(function(t){return"selected"===t.availability}))||void 0===u||null===(u=u.id)||void 0===u?void 0:u.toUpperCase(),f=r.bodystyle.toUpperCase(),v="A-HT"===f?null==c?void 0:c.startsWith("A-HT"):c===f,t.a(2,v?{key:n,value:o}:null);case 4:return t.p=4,d=t.v,console.error("Failed bodystyle lookup: ",d),t.a(2,null)}},t,null,[[1,4]])}));return function(e){return t.apply(this,arguments)}}()));
1case 2:return s=t.v,p=s.filter(Boolean),t.a(2,k(p))}},t)})),I.apply(this,arguments)}function T(t,e){return N.apply(this,arguments)}function N(){return N=a(i().m(function t(e,n){var r,o,u,l,a=arguments;return i().w(function(t){for(;;)switch(t.n){case 0:if(r=a.length>2&&void 0!==a[2]?a[2]:{},n){t.n=1;break}return t.a(2,!1);case 1:if(e&&"[]"!==e){t.n=3;break}if(o=Object.keys(localStorage).find(function(t){return!!t.startsWith("SavedBuild_".concat(n))&&!j(t,localStorage.getItem(t))})){t.n=2;break}return t.a(2,!1);case 2:return t.a(2,{key:o,value:localStorage.getItem(o)});case 3:return u=JSON.parse(e),t.n=4,w(u,n,r);case 4:return l=t.v,t.a(2,l[0]||!1)}},t)})),N.apply(this,arguments)}function P(){try{var t=localStorage.getItem(p);return t?JSON.parse(t):{}}catch(t){return console.error("Failed to parse removed builds object: ",t),{}}}function R(t){localStorage.setItem(p,JSON.stringify(t))}function j(t,e){var n,r,o=P()[t];return!!o&&(o.url===(null===(n=JSON.parse(e))||void 0===n?void 0:n.url)&&o.onSummary===(null===(r=JSON.parse(e))||void 0===r?void 0:r.onSummary))}function D(t,e){var n=P(),r=JSON.parse(e);n[t]={url:r.url,onSummary:Boolean(r.onSummary)},R(n),window.location.reload()}function E(t,e,n){var r=(0,o.Kp)("button",["ImmersiveHero__config-prompt-remove","icon-close"]),i=(0,o.Kp)("span",["ImmersiveHero__config-prompt-remove-inner"]);return i.textContent=t,r.appendChild(i),r.addEventListener("click",function(){return D(e,n)}),r}}}]);
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.