PageSourceSearch

https://merchant.motorcar.ae/_next/static/chunks/22737-8387ec2a7435627d.js

js motorcar.ae collected 2026-10-02 00:43:48 UTC 8,903 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[22737],{22737:(e,t,r)=>{r.d(t,{B2:()=>h,Tt:()=>p,Tu:()=>g,gl:()=>f,hD:()=>a.hD,ig:()=>v,kT:()=>_,pb:()=>m,qW:()=>w,w_:()=>y});var a=r(49868),n=r(56542),o=r(70712);function i(){try{return window.localStorage.getItem(a.nE)}catch(e){return null}}function c(){try{let e=window.localStorage.getItem("garage_active_branch");if(!e||"all"===e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?String(t):null}catch(e){return null}}function s(e,t){let r=e.replace(/^\/+/,""),a="".concat("https://motorcar.ae/api".trim().replace(/\/+$/,""),"/").concat(r);if(!t)return a;let n=new URLSearchParams;Object.entries(t).forEach(e=>{let[t,r]=e;null!=r&&""!==r&&n.append(t,String(r))});let o=n.toString();return o?"".concat(a,"?").concat(o):a}async function l(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}async function u(e,t,r){var u;let d,p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},g={Accept:"application/json"};if(null===(u=p.auth)||void 0===u||u){let e=i();e&&(g.Authorization="Bearer ".concat(e))}let h=c();h&&(g["X-Garage-Branch"]=h),r instanceof FormData?d=r:null!=r&&(g["Content-Type"]="application/json",d=JSON.stringify(r));let f=await (0,a.Lp)(s(t,p.query),{method:e,headers:g,body:d,signal:p.signal,credentials:"omit"},e),_=await l(f);if(!f.ok){let r=(_&&"object"==typeof _&&"message"in _?String(_.message):"".concat(e," ").concat(t," failed"))+" (".concat(f.status,")");throw 401===f.status&&!1!==p.auth&&void 0!==g.Authorization&&((0,a.Hy)(),(0,n.$)()),new a.hD(r,f.status,_)}return(0,o.qp)(e,t,_),_}function d(e){return e&&"object"==typeof e&&"data"in e?e.data:e}async function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d(await u("GET",e,void 0,t))}async function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u("GET",e,void 0,t)}async function h(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return d(await u("POST",e,t,r))}async function f(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return d(await u("PUT",e,t,r))}async function _(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u("PUT",e,t,r)}async function m(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return d(await u("PATCH",e,t,r))}async function v(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return d(await u("DELETE",e,t,r))}async function y(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return d(await u("POST",e,t,r))}async function w(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};if(null===(t=r.auth)||void 0===t||t){let e=i();e&&(n.Authorization="Bearer ".concat(e))}let o=c();o&&(n["X-Garage-Branch"]=o);let u=await (0,a.Lp)(s(e,r.query),{method:"GET",headers:n,signal:r.signal,credentials:"omit"},"GET");if(!u.ok)throw new a.hD("GET ".concat(e," failed (").concat(u.status,")"),u.status,await l(u));return u.blob()}},70712:(e,t,r)=>{r.d(t,{Mt:()=>m,N7:()=>a,NV:()=>p,QJ:()=>s,_I:()=>o,_e:()=>h,hs:()=>b,qp:()=>O,u4:()=>u,wg:()=>y});let a="G-342DRVF1V3",n=()=>!0,o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return null==e?"":String(e).replace(/[^\s@]+@[^\s@]+\.[^\s@]+/g,"[email]").replace(/\+?\d[\d\s-]{6,}\d/g,"[number]").replace(/\s+/g," ").trim().slice(0,t)},i=[],c=null,s=()=>{try{if(!n()||"function"!=typeof window.gtag)return!1;for(;i.length;){let e=i.shift();window.gtag(...e)}return!0}catch(e){return!1}},l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];try{if(!n()||!a)return;if("function"==typeof window.gtag){window.gtag(...t);return}if(i.length<60&&i.push(t),!c){let e=0;c=setInterval(()=>{e+=1,(s()||e>40)&&(c&&clearInterval(c),c=null)},500)}}catch(e){}},u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l("event",e,t)},d=e=>{try{return window.localStorage.getItem(e)||""}catch(e){return""}},p=()=>{if(!n())return{business_type:"",account_kind:"",signed_in:"no"};let e=!!d("token"),t=d("business_type_slug")||d("dashboard_key"),r="owner";return"1"===d("is_supplier_user")||"true"===d("is_supplier_user")?r="supplier_user":("1"===d("is_staff")||"true"===d("is_staff"))&&(r="staff"),{business_type:e?o(t,30)||"unknown":"(signed out)",account_kind:e?r:"(signed out)",signed_in:e?"yes":"no"}},g="",h=()=>{try{if(!n()||!a)return;let e=p(),t=JSON.stringify(e);if(t===g)return;g=t,l("set","user_properties",e)}catch(e){}},f=new Set(["en","ar","fr"]),_=e=>/^\d+$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e)||e.length>=12&&/\d/.test(e)&&/^[A-Za-z0-9_=-]+$/.test(e)||/%/.test(e),m=e=>{let t=String(e||"").split("?")[0].split("#")[0].split("/").filter(
1Boolean);return t.length&&f.has(t[0])&&t.shift(),t.map(e=>_(e)?":id":e).join("/").slice(0,100)||"(root)"},v=new Set(["login","onboarding","register","under-review","forgot-password","partner","embed"]),y=e=>{let t=m(e),[r,a,n]=t.split("/"),o="other",i=r||"(root)";return v.has(r)?(o="public",i=r):"garage"===r?(o="garage",i=a||"dashboard"):"supplier"===r?(o="supplier",i=a||"dashboard"):"floor"===r?(o="floor",i=a||"jobs"):"merchant-portal"===r&&("detailing"===a?(o="detailing",i=n||"analytics"):"service-tickets"===a?(o="detailing",i=n&&":id"!==n?"service-tickets/".concat(n):"service-tickets"):(o="marketplace",i=a||"dashboard")),{portal_area:o,portal_module:i,page_template:t}},w=e=>{let t=null==e?void 0:e.status;return void 0===t||!0===t||"success"===t||1===t},S=()=>{try{return y(window.location.pathname)}catch(e){return{portal_area:"",portal_module:"",page_template:""}}},T={"/offers/create":"offer_created","/offers/update":"offer_updated","/offers/delete":"offer_deleted","/offers/toggle-status":"offer_status_toggled","/offers/voucher/redeem":"voucher_redeemed","/Merchant/addquotation":"quote_submitted","/Merchant/editquotation":"quote_edited","/Merchant/completed":"request_completed","/Merchant/buyPackage":"plan_checkout_started","/Merchant/add_expertise":"services_updated","/Merchant/deleteservice":"services_updated","/Merchant/autoquote/save":"autoquote_rule_saved","/Merchant/autoquote/toggle":"autoquote_rule_toggled","/Merchant/autoquote/delete":"autoquote_rule_deleted","/Merchant/update-order-status":"parts_order_status_updated","/Merchant/changepassword":"password_changed"},b=(e,t)=>{try{if(!n()||!a||!e||!w(t))return;let o=e.split("?")[0],i=S();if("/Merchant/signup"===o){u("sign_up",{account_type:"merchant",method:"phone_otp"});return}if("/Merchant/login"===o){u("login",{account_type:"merchant",method:"password"});return}if("/partner/leads"===o){var r;(null==t?void 0:null===(r=t.data)||void 0===r?void 0:r.duplicate)!==!0&&u("generate_lead",{lead_source:"partner_page"});return}if("/Merchant/updateprofile"===o){"onboarding"===i.portal_module?u("signup_profile_completed",{account_type:"merchant",...p()}):u("portal_action",{action:"POST",resource:"Merchant/updateprofile",...i});return}let c=T[o];c&&(u(c,{...i}),u("portal_action",{action:"POST",resource:o.replace(/^\//,""),...i}))}catch(e){}},k=/(^|\/)(notifications|read|read-all|unread-count|verify-pin|switch|login|logout|request-otp|verify-otp|availability|scan-lookup|check-sku|suggest-code|suggest-sku|preview|match-count|lookup|decode-vin)(\/|$)/,P=[{method:"POST",re:/^garage\/jobs$/,name:"job_card_created"},{method:"POST",re:/^garage\/appointments$/,name:"appointment_created"}
1,{method:"POST",re:/^garage\/customers$/,name:"customer_created"},{method:"POST",re:/^garage\/invoices(\/from-job\/:id)?$/,name:"invoice_created"},{method:"POST",re:/^garage\/invoices\/:id\/payments$/,name:"payment_recorded"},{method:"POST",re:/^garage\/rfqs$/,name:"rfq_created"},{method:"POST",re:/^garage\/inventory$/,name:"inventory_item_added"},{method:"POST",re:/^garage\/staff$/,name:"staff_added"},{method:"POST",re:/^garage\/branches$/,name:"branch_added"},{method:"POST",re:/^service-tickets$/,name:"service_ticket_created"},{method:"POST",re:/^service-tickets\/appointments$/,name:"appointment_created"},{method:"POST",re:/^service-tickets\/:id\/convert-to-invoice$/,name:"invoice_created"},{method:"POST",re:/^detailing\/invoices$/,name:"invoice_created"},{method:"POST",re:/^detailing\/expenses$/,name:"expense_recorded"},{method:"POST",re:/^supplier\/rfqs\/:id\/quote$/,name:"rfq_quote_submitted"},{method:"POST",re:/^supplier\/pos\/:id\/accept$/,name:"purchase_order_accepted"},{method:"POST",re:/^supplier\/price-list$/,name:"price_list_item_added"}],O=(e,t,r)=>{try{if(!n()||!a||!t)return;let o=String(e||"").toUpperCase();if("GET"===o||!w(r))return;let i=m(t);if(k.test(i)||/plan-contracts\/quote$/.test(i))return;let[c,s]=i.split("/"),l={action:o,resource:i,portal_area:c||"",portal_module:s&&":id"!==s?s:""};u("portal_action",l);let d=P.find(e=>e.method===o&&e.re.test(i));d&&u(d.name,l)}catch(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.