/* Decoded by unphp.net */ "data_transfer::app.importers.products.validation.errors.invalid-type", self::J2A2A => "data_transfer::app.importers.products.validation.errors.sku-not-found", self::hVzsM => "data_transfer::app.importers.products.validation.errors.duplicate-url-key", self::y81Ei => "data_transfer::app.importers.products.validation.errors.invalid-attribute-family", self::tAGPZ => "data_transfer::app.importers.products.validation.errors.super-attribute-not-found"]; protected array $kqOya = ["sku"]; protected string $fyQ83 = "sku"; protected mixed $OGJtz = []; protected mixed $do7Y8 = []; protected array $uFMOA = []; protected array $kYhHs = []; protected array $S1HiZ = []; protected mixed $neNUT = []; protected array $reTCn = []; protected array $gRerH = []; protected bool $p2x0t = true; protected bool $e1v9X = true; protected array $hM5Kr = ["locale", "type", "attribute_family_code", "parent_sku", "categories", "images", "customer_group_prices", "tax_category_name", "inventories", "related_skus", "cross_sell_skus", "up_sell_skus", "configurable_variants", "bundle_options", "associated_skus"]; public function __construct(protected jveiu $JLzln, protected umwzH $Azbdl, protected cmGA2 $clwfM, protected bDxIv $LmxVa, protected nmGON $fViX7, protected QvIDv $tfGg4, protected NIU04 $aY7o2, protected oR1tw $bU1Jl, protected nYtBX $KM4uv, protected ah3gV $BOapB, protected THq7d $YYmO_, protected Ie0qJ $bHerZ, protected nL07i $scSRe, protected uxm27 $y3uLu, protected iDa_d $zruA5, protected hLcFI $tQ5_K, protected KJhhU $kSX4B) { parent::__construct($JLzln); $this->zIwXR(); } protected function zIWXR() : void { goto jwNQo; ydMpS: $this->do7Y8 = $this->sxNEh->tq2dl(); goto T6hQB; TqtLa: Sc7FN: goto wmxoV; jwNQo: $this->OGJtz = $this->A6LOP->tQ2dL(); goto ydMpS; T6hQB: foreach ($this->do7Y8 as $kciST => $KhePX) { $this->hM5Kr[] = $KhePX->code; rm5bz: } goto TqtLa; wmxoV: } protected function Dh3on() : void { goto wE8Mp; wE8Mp: foreach ($this->RwBMq as $nl0C7 => $bUYCp) { $this->frj8V->s52Jx($nl0C7, aRFMt($bUYCp)); xb08b: } goto UxZ12; UxZ12: Q8axy: goto f0lRr; f0lRr: parent::dH3oN(); goto jdlws; jdlws: } protected function gqumf() : self { goto HhkoQ; QCbdP: $this->Gzyj5(); goto nPznC; KOtPz: $this->A7MQq($OPL9M, $NUnLL->yqnBs()); goto JV7QK; zr9kO: try { $OPL9M = $NUnLL->current(); } catch (\InvalidArgumentException $Jty90) { $NUnLL->next(); goto Qf820; } goto KOtPz; JV7QK: $NUnLL->next(); goto w62sK; T8gJ0: $NUnLL->rewind(); goto P1QQE; p8ICT: return $this; goto qeXWM; FSCG6: Qf820: goto BYuCz; HhkoQ: $NUnLL = $this->YoYP4(); goto T8gJ0; nPznC: parent::gQumf(); goto p8ICT; w62sK: goto Qf820; goto XQRwC; BYuCz: if (!$NUnLL->valid()) { goto H2bkt; } goto zr9kO; XQRwC: H2bkt: goto QCbdP; P1QQE: $this->Y_MIf->aAp6D(); goto FSCG6; qeXWM: } public function A7Mqq(array $OPL9M, int $C7bFs) : bool { goto DaedL; rI1ys: return false; goto Ed00i; witYU: jl0ZY: goto QD2Oe; v86aV: $Oocpk = explode("|", $OPL9M["bundle_options"] ?? ''); goto sfJzD; pwGdH: foreach ($paFDc as $d_i17) { goto Nr1uw; Nr1uw: [$DAUfC, $gt9n9] = explode("=", $d_i17); goto e3BSH; T54e1: OWQvn: goto ftNP2; e3BSH: $u5Hg5["associated_skus"][] = ["sku" => $DAUfC ?? '', "qty" => $gt9n9 ?? null]; goto T54e1; ftNP2: } goto witYU; lo8E_: foreach ($kl7Ze->LHnip()->OXhSu() as $Yl7zp => $bUYCp) { goto e3Sn9; jARA2: tUkFx: goto ZmvVZ; e3Sn9: $w9svg = $kl7Ze->v88o1(); goto xAGuV; xAGuV: $nl0C7 = array_key_first($w9svg[$Yl7zp] ?? []); goto FqiH3; FqiH3: $this->Ift9a($C7bFs, $nl0C7, $Yl7zp, current($bUYCp)); goto jARA2; ZmvVZ: } goto GO0zL; l63Ag: $PZHio = explode("|", $OPL9M["configurable_variants"] ?? ''); goto ZFIDx; t477n: if (!$kl7Ze->Y_bWv()) { goto mzm1a; } goto lo8E_; zl4mi: l9aDY: goto pkfgH; xLudi: mzm1a: goto issQk; bXa2I: $SSdWo = ["bundle_options.*.name" => "sometimes|required", "bundle_options.*.type" => "sometimes|required|in:select,radio,checkbox,multiselect", "bundle_options.*.required" => "sometimes|required|boolean", "bundle_options.*.sku" => "sometimes|required", "bundle_options.*.price" => ["sometimes", "required", new mtNpj()], "bundle_options.*.qty" => "sometimes|required|integer", "bundle_options.*.default" => "sometimes|required|boolean"]; goto v86aV; a1VWO: $bUYCp = sprintf(ARfMt($this->RwBMq[self::hVzsM]), "url_key", $this->reTCn[$OPL9M["url_key"]]["sku"]); goto BXIg6; BXIg6: $this->IFt9a($C7bFs, self::hVzsM, "url_key", $bUYCp); goto bK9hU; DaedL: if (!isset($this->DoMR0[$C7bFs])) { goto CfKVr; } goto z1S6b; eEFw2: ZyORf: goto QpN55; hVBpu: nM_Q6: goto v8EJ_; SxAYF: if (!($this->vOM7k->U8EVw == OivY3::IRtGb)) { goto g9E26; } goto m5XW0; z1S6b: return !$this->frj8V->gnD_3($C7bFs); goto XWdzz; IiyJM: J1Chb: goto MShj0; XWdzz: CfKVr: goto nrSQ8; dg6Hs: $SSdWo = ["customer_group_prices.*.group" => "sometimes|required", "customer_group_prices.*.qty" => "sometimes|required|integer", "customer_group_prices.*.type" => "sometimes|required|in:fixed,discount", "customer_group_prices.*.price" => ["sometimes", "required", new mtnPJ()]]; goto WsbSn; jCj05: if (empty($this->reTCn[$OPL9M["url_key"]]) || $this->reTCn[$OPL9M["url_key"]]["sku"] == $OPL9M["sku"]) { goto nM_Q6; } goto a1VWO; QD2Oe: goto jTFQg; goto XFsY8; IXuUu: goto jTFQg; goto QkzyC; c2Kdh: WaKVK: goto i5aKA; Ig2Gg: foreach ($Bcdfk as $CINCz) { goto Ecbpb; GrBBE: $u5Hg5["customer_group_prices"][] = $JEpBn; goto a6i_l; Ecbpb: parse_str(str_replace(",", "&", $CINCz), $JEpBn); goto GrBBE; a6i_l: Rp_8b: goto rxpz0; rxpz0: } goto eznrr; rAaqE: if ($OPL9M["type"] == self::foqmJ) { goto lWEqc; } goto dg6Hs; TP8vT: UEDq2: goto vL5zX; cUgHt: return !$this->frj8V->gnd_3($C7bFs); goto hB7yS; tvUyy: $w9svg = $kl7Ze->v88o1(); goto zDyhJ; pQmGK: if (empty($u5Hg5)) { goto oGoX_; } goto wq63n; atn0D: B5a0M: goto pHWnQ; qjvYp: qHKPM: goto cUgHt; T15tN: g9E26: goto dCBjR; zDyhJ: foreach ($kl7Ze->lHNIP()->OxHsu() as $Yl7zp => $bUYCp) { goto SBTWi; dCpCc: b21tl: goto DEoJT; SBTWi: $nl0C7 = array_key_first($w9svg[$Yl7zp] ?? []); goto EkJK8; EkJK8: $this->IfT9a($C7bFs, $nl0C7, $Yl7zp, current($bUYCp)); goto dCpCc; DEoJT: } goto eEFw2; QY2xL: $paFDc = explode(",", $OPL9M["associated_skus"] ?? ''); goto pwGdH; iRE4l: if ($OPL9M["type"] == self::nV5N2) { goto l9aDY; } goto rAaqE; Qc4u0: foreach ($PZHio as $orbcc) { goto sdGVY; sdGVY: parse_str(str_replace(",", "&", $orbcc), $qwvGZ); goto CNwtF; IiCVc: B95iq: goto ouAMS; CNwtF: $HunyD = t9v9V::nEEZD($qwvGZ, "sku"); goto grTla; grTla: foreach ($HunyD as $hNyCF => $YK2ZY) { goto HcCZZ; FCtQ_: $this->IfT9A($C7bFs, self::tAGPZ, "configurable_variants", sprintf(arfmt($this->RwBMq[self::tAGPZ]), $hNyCF, $OPL9M["attribute_family_code"])); goto V3apR; V3apR: SD6ad: goto VLoik; HcCZZ: if ($nHcxU->iAsrB("code", $hNyCF)->CBaf1()) { goto SD6ad; } goto FCtQ_; VLoik: GzVQn: goto H_Fuz; H_Fuz: } goto IiCVc; ouAMS: gGTqV: goto SdtA7; SdtA7: } goto ZF_Z6; zDPny: $SSdWo = []; goto yfdo8; pHWnQ: $kl7Ze = V91o_::IPeoM($OPL9M, $this->kYhHs[$OPL9M["type"]][$OPL9M["attribute_family_code"]]); goto xYYQm; MH2tz: return true; goto T15tN; yj3Nn: if (!($OPL9M["type"] == self::foqmJ)) { goto qHKPM; } goto l63Ag; eznrr: oym_S: goto IXuUu; pkfgH: $SSdWo = ["associated_skus.*.sku" => "sometimes|required", "associated_skus.*.qty" => "sometimes|required|integer"]; goto QY2xL; ZFIDx: $nHcxU = $this->PSHz3($OPL9M["type"], $OPL9M["attribute_family_code"]); goto Qc4u0; a2rSn: $SSdWo = ["configurable_variants.*.sku" => "sometimes|required"]; goto YRD8q; sfJzD: foreach ($Oocpk as $Y8Z74) { goto hxOnv; uJO15: ZUcqp: goto TztEK; hxOnv: parse_str(str_replace(",", "&", $Y8Z74), $JEpBn); goto ke8hH; ke8hH: $u5Hg5["bundle_options"][] = $JEpBn; goto uJO15; TztEK: } goto IiyJM; l56Zx: SxuFK: goto MH2tz; SmJGp: frKzt: goto F0pFa; m5XW0: if ($this->WXazy($OPL9M["sku"])) { goto SxuFK; } goto u3B9V; TU0Vy: $this->kYhHs[$OPL9M["type"]][$OPL9M["attribute_family_code"]] = $this->GxoMB($OPL9M); goto atn0D; oRKs2: return false; goto l56Zx; ZF_Z6: lHwc9: goto qjvYp; Ed00i: TK4zh: goto oZsJv; bK9hU: goto WaKVK; goto hVBpu; wq63n: $kl7Ze = V91o_::IPEOM($u5Hg5, $SSdWo); goto t477n; WsbSn: $Bcdfk = explode("|", $OPL9M["customer_group_prices"] ?? ''); goto Ig2Gg; LC6nd: return false; goto SmJGp; issQk: oGoX_: goto yj3Nn; xYYQm: if (!$kl7Ze->y_bWV()) { goto d7t3X; } goto tvUyy; F0pFa: if ($this->OGJtz->IASrb("code", $OPL9M["attribute_family_code"])->cBAf1()) { goto TK4zh; } goto pAdQ_; QpN55: d7t3X: goto jCj05; u3B9V: $this->IFt9A($C7bFs, self::J2A2A); goto oRKs2; Odduq: foreach ($Oocpk as $Y8Z74) { goto G8Szg; W7hkI: $u5Hg5["configurable_variants"][] = $JEpBn; goto MnzSW; MnzSW: lJXJy: goto QH2eY; G8Szg: parse_str(str_replace(",", "&", $Y8Z74), $JEpBn); goto W7hkI; QH2eY: } goto TP8vT; i5aKA: $u5Hg5 = []; goto zDPny; oZsJv: if (isset($this->kYhHs[$OPL9M["type"]][$OPL9M["attribute_family_code"]])) { goto B5a0M; } goto TU0Vy; nrSQ8: $this->DoMR0[$C7bFs] = true; goto SxAYF; v8EJ_: $this->reTCn[$OPL9M["url_key"]] = ["sku" => $OPL9M["sku"], "row_number" => $C7bFs]; goto c2Kdh; vL5zX: jTFQg: goto pQmGK; XFsY8: lWEqc: goto a2rSn; pAdQ_: $this->IFT9A($C7bFs, self::y81Ei, "attribute_family_code"); goto rI1ys; dCBjR: if (!($OPL9M["type"] == self::jbdvK || !H8rcF("product_types." . $OPL9M["type"]))) { goto frKzt; } goto VLtDD; VLtDD: $this->IFT9A($C7bFs, self::SLP45, "type"); goto LC6nd; MShj0: goto jTFQg; goto zl4mi; QkzyC: YgkDO: goto bXa2I; yfdo8: if ($OPL9M["type"] == self::qS5yD) { goto YgkDO; } goto iRE4l; YRD8q: $Oocpk = explode("|", $OPL9M["configurable_variants"] ?? ''); goto Odduq; GO0zL: eMIj9: goto xLudi; hB7yS: } public function gxoMb(array $OPL9M) : array { goto tukfy; NlTwE: return $AhDFY; goto IVXi0; tukfy: $AhDFY = ["sku" => ["required", new kgfCD()], "url_key" => ["required"], "special_price_from" => ["nullable", "date"], "special_price_to" => ["nullable", "date", "after_or_equal:special_price_from"], "special_price" => ["nullable", new mTnpJ(), "lt:price"]]; goto ZC2ow; FDgnT: foreach ($JEpBn as $KhePX) { goto E6a63; nHffC: $SSI28[] = new MtNpj(); goto DSkdx; JySZM: if ($KhePX->RD28Z === "regex") { goto pmJBa; } goto lgiqH; obSBn: $AhDFY[$KhePX->code] = $SSI28; goto qKrHS; DSkdx: goto SxdKN; goto vTO_M; g1Z0N: if (!$KhePX->ST0ds) { goto B3k5d; } goto eKPUt; eKPUt: array_push($SSI28, function ($exW2F, $Z3GrM, $jB2dF) use($KhePX, $OPL9M) { goto DDzsk; DDzsk: $ymMcf = $this->Y_MIf->get($OPL9M["sku"]); goto jDv4x; jDv4x: $sZRHz = $this->PRFuA->iAsRb($KhePX->Wdqia, $OPL9M[$KhePX->code])->iAsRb("attribute_id", "=", $KhePX->id)->iAsRB("product_attribute_values.product_id", "!=", $ymMcf["id"])->count("product_attribute_values.id"); goto spWXv; wU2a9: $jB2dF(lPi2w("admin::app.catalog.products.index.already-taken", ["name" => ":attribute"])); goto BVIoL; spWXv: if (!$sZRHz) { goto KMqK6; } goto wU2a9; BVIoL: KMqK6: goto XGgf4; XGgf4: }); goto MOZKC; G6SbB: goto j6G51; goto NlA2E; HvpLb: SxdKN: goto Q1Tou; qKrHS: MR431: goto GH4kW; czzw1: if (!isset($AhDFY[$KhePX->code])) { goto fpU8P; } goto eDaNh; NlA2E: fpU8P: goto v9SPq; Q1Tou: hIYfL: goto Kktsz; eDaNh: $SSI28 = $AhDFY[$KhePX->code]; goto G6SbB; O3_FO: goto MR431; goto CKPcu; rHNBf: goto SxdKN; goto JWcaP; vTO_M: pmJBa: goto JpGEf; AD0zD: j6G51: goto S6YVN; MOZKC: B3k5d: goto obSBn; lgiqH: $SSI28[] = $KhePX->RD28Z; goto rHNBf; oAgtE: $SSI28[] = new mtnpJ(); goto I0a7N; v9SPq: $SSI28[] = $KhePX->HtkM8 ? "required" : "nullable"; goto AD0zD; Njxg6: $SSI28 = []; goto czzw1; CKPcu: P5dQc: goto Njxg6; JpGEf: $SSI28[] = "regex:" . $KhePX->C3ems; goto HvpLb; S6YVN: if (!($KhePX->AYUj2 == "text" && $KhePX->RD28Z)) { goto hIYfL; } goto urdM7; JWcaP: h7wYP: goto nHffC; Kktsz: if (!($KhePX->AYUj2 == "price")) { goto UCYy3; } goto oAgtE; urdM7: if ($KhePX->RD28Z === "decimal") { goto h7wYP; } goto JySZM; E6a63: if (!in_array($KhePX->code, ["sku", "url_key"])) { goto P5dQc; } goto O3_FO; I0a7N: UCYy3: goto g1Z0N; GH4kW: } goto lwKF0; lwKF0: ZJI7d: goto NlTwE; ZC2ow: $JEpBn = $this->PSHz3($OPL9M["type"], $OPL9M["attribute_family_code"]); goto FDgnT; IVXi0: } protected function GZyJ5() : void { goto qWqK2; VtT5f: ZhvJL: goto YSXGw; nGkhC: $hbGaA = $this->tBXZu->qk6Q4()->NJ2ex("products.id", "product_attribute_values.text_value as url_key", "products.sku")->eeu6Y("product_attribute_values", "products.id", "product_attribute_values.product_id")->EeU6y("attributes", "product_attribute_values.attribute_id", "attributes.id")->IasrB("attributes.code", "url_key")->iaSRB("product_attribute_values.text_value", array_keys($this->reTCn))->j8tnI("products.sku", t9V9v::B6jql($this->reTCn, "sku"))->get(); goto bzHTz; Ff5fX: y4K3l: goto nGkhC; qWqK2: if (!empty($this->reTCn)) { goto y4K3l; } goto Jk5Ho; bzHTz: foreach ($hbGaA as $ymMcf) { $this->IFT9A($this->reTCn[$ymMcf->Ws1TO]["row_number"], self::hVzsM, "url_key", sprintf(aRFMt($this->RwBMq[self::hVzsM]), $ymMcf->Ws1TO, $ymMcf->yZ23X)); EB8Jd: } goto VtT5f; Jk5Ho: return; goto Ff5fX; YSXGw: } public function pAAPR(OCTVm $nhzU4) : bool { goto IiEeG; lfPLA: Lryxv::led41("data_transfer.imports.batch.import.after", $nhzU4); goto kYkvW; IiEeG: LRYxv::Led41("data_transfer.imports.batch.import.before", $nhzU4); goto xf5f2; raGcm: goto m7KhK; goto zGjtd; NleHf: $this->qByj2($nhzU4); goto raGcm; Jao1u: $this->O6mzI($nhzU4); goto wK75s; wK75s: m7KhK: goto xiDz1; xf5f2: if ($nhzU4->vOM7k->U8EVw == OIVy3::IRtGb) { goto RodJb; } goto NleHf; kYkvW: return true; goto PcZ2w; xiDz1: $nhzU4 = $this->BWJk9->update(["state" => OIvY3::FTJxL, "summary" => ["created" => $this->UYPrU(), "updated" => $this->l3_OL(), "deleted" => $this->fCr30()]], $nhzU4->id); goto lfPLA; zGjtd: RodJb: goto Jao1u; PcZ2w: } public function U1h4x(oCtvM $nhzU4) : bool { goto UCKUv; JUr14: $this->sTEu6($a8RcP); goto JriE_; FjUSP: return true; goto xEB1E; iId5m: $bdE14 = []; goto SiQOo; BUu6h: $this->XMU0_($D3hFn); goto JUr14; a21jE: foreach ($nhzU4->V58vt as $OPL9M) { goto tPHr2; Es1kb: $this->uKzNs($OPL9M, $a8RcP); goto MhMIz; MhMIz: uTmMd: goto ZYmEl; R8FXz: $this->z7c0T($OPL9M, $D3hFn); goto Es1kb; OiC8E: $this->ndipG($OPL9M, $bdE14); goto R8FXz; tPHr2: $this->XNoym($OPL9M, $HunyD); goto OiC8E; ZYmEl: } goto a4ji7; Zr8Bm: $this->Y_MIf->load(T9V9V::B6Jql($nhzU4->V58vt, "sku")); goto ohS_v; Z4Uip: $this->Imfdd($bdE14); goto BUu6h; SiQOo: $D3hFn = []; goto mBAJD; mBAJD: $a8RcP = []; goto a21jE; a4ji7: l99vy: goto kjJV0; JriE_: $this->BWJk9->update(["state" => OIVY3::h15vv], $nhzU4->id); goto w9Gy1; ohS_v: $HunyD = []; goto iId5m; UCKUv: LRYXV::led41("data_transfer.imports.batch.linking.before", $nhzU4); goto Zr8Bm; w9Gy1: lRYXV::LED41("data_transfer.imports.batch.linking.after", $nhzU4); goto FjUSP; kjJV0: $this->siafg($HunyD); goto Z4Uip; xEB1E: } public function VVDCQ(OCtVm $nhzU4) : bool { goto hA3gG; XCDJq: xXmRh: goto WPi7q; N5Imy: eLomi: goto fvoU1; QAMhq: foreach ($H4gGt as $QJuWc => $Fpxz7) { goto IYp0R; IYp0R: switch ($QJuWc) { case self::gyjwu: case self::mkrDl: goto sjbuT; DJLWf: $IZWgT = $this->tBXZu->nj2Ex("parent_id")->zs7EZ("id", $Fpxz7)->kNi4k("parent_id")->B6JQL("parent_id")->toArray(); goto zYdRJ; aqH9R: $ehi1S = $this->fHgav->NJ2ex("product_id")->zs7ez("associated_product_id", $Fpxz7)->b6jQl("product_id")->toArray(); goto j3HvI; LDg7f: goto RXbLr; goto IMU6t; zHqu4: $XTiIE = $this->qF_x6->NJ2EX("product_bundle_options.product_id")->eEu6y("product_bundle_option_products", "product_bundle_options.id", "product_bundle_option_products.product_bundle_option_id")->zs7ez("product_bundle_option_products.product_id", $Fpxz7)->b6JQl("product_id")->toArray(); goto mznEl; zYdRJ: $qbdXO = [...$qbdXO, ...$IZWgT]; goto LDg7f; sjbuT: $qbdXO = [...$Fpxz7, ...$qbdXO]; goto zHqu4; j3HvI: $qbdXO = [...$qbdXO, ...$ehi1S]; goto DJLWf; mznEl: $qbdXO = [...$qbdXO, ...$XTiIE]; goto aqH9R; IMU6t: case self::foqmJ: goto FcQtf; nJHj3: $Yq5Uo = $this->tBXZu->nj2eX("id")->zS7Ez("parent_id", $Fpxz7)->b6Jql("id")->toArray(); goto r9TzZ; r9TzZ: $qbdXO = [...$Yq5Uo, ...$qbdXO]; goto IvayF; IvayF: goto RXbLr; goto QbNgk; FcQtf: $qbdXO = [...$qbdXO, ...$Fpxz7]; goto nJHj3; QbNgk: case self::qS5yD: goto Z5DlZ; C7JFl: $Yq5Uo = $this->fAzI0->Nj2ex("product_bundle_option_products.product_id")->eEU6Y("product_bundle_options", "product_bundle_option_products.product_bundle_option_id", "product_bundle_options.id")->ZS7eZ("product_bundle_options.product_id", $Fpxz7)->B6jQL("product_id")->toArray(); goto BmC0Y; Z5DlZ: $qbdXO = [...$qbdXO, ...$Fpxz7]; goto C7JFl; BmC0Y: $qbdXO = [...$Yq5Uo, ...$qbdXO]; goto ZIIpE; ZIIpE: goto RXbLr; goto h3XU0; h3XU0: case self::nV5N2: goto DoTn0; Vu7Xm: goto RXbLr; goto iRs5r; DoTn0: $qbdXO = [...$qbdXO, ...$Fpxz7]; goto Y3Yd5; Y3Yd5: $Yq5Uo = $this->fHgav->nj2eX("associated_product_id")->zs7EZ("product_id", $Fpxz7)->B6Jql("associated_product_id")->toArray(); goto N3StW; N3StW: $qbdXO = [...$Yq5Uo, ...$qbdXO]; goto Vu7Xm; iRs5r: } goto f85X6; f85X6: Rlttt: goto vwAN9; vwAN9: RXbLr: goto OnYwZ; OnYwZ: X9Lh_: goto vJ8hp; vJ8hp: } goto XCDJq; fvoU1: $qbdXO = []; goto QAMhq; EW2Yv: sje3T::JUTXs([new gDTuB($qbdXO), new u1UyC($qbdXO), new HUXmO($qbdXO)])->ud2mA("sync")->LeD41(); goto u1_vZ; hA3gG: Lryxv::LED41("data_transfer.imports.batch.indexing.before", $nhzU4); goto vfwCl; BUk7C: foreach ($nhzU4->V58vt as $OPL9M) { goto nwSff; E_04q: lcN9J: goto vi9C3; BJ151: $H4gGt[$ymMcf["type"]][] = (int) $ymMcf["id"]; goto E_04q; nwSff: $ymMcf = $this->Y_MIf->get($OPL9M["sku"]); goto BJ151; vi9C3: } goto N5Imy; vfwCl: $this->Y_MIf->load(t9v9V::b6Jql($nhzU4->V58vt, "sku")); goto a52p7; a52p7: $H4gGt = []; goto BUk7C; WPi7q: $qbdXO = array_unique($qbdXO); goto EW2Yv; qcHI5: lryXv::LeD41("data_transfer.imports.batch.indexing.after", $nhzU4); goto GYePK; u1_vZ: $this->BWJk9->update(["state" => OiVY3::xQBcs], $nhzU4->id); goto qcHI5; GYePK: return true; goto khKfB; khKfB: } protected function o6mzI(ocTvm $nhzU4) : bool { goto s4RLW; ba4BB: foreach ($nhzU4->V58vt as $OPL9M) { goto uGDnt; o2zfV: Lh5Dm: goto ssFLe; CkwVP: $Q5WW4[] = $ymMcf["id"]; goto quR3s; QNQNA: goto DD0hI; goto o2zfV; ssFLe: $ymMcf = $this->Y_MIf->get($OPL9M["sku"]); goto CkwVP; uGDnt: if ($this->WxazY($OPL9M["sku"])) { goto Lh5Dm; } goto QNQNA; quR3s: DD0hI: goto sG0HB; sG0HB: } goto xMCO8; cIg0k: Jp0Zm::Led41($Q5WW4)->uD2Ma("sync"); goto WB46l; mqi0J: $this->L5l23 = count($Q5WW4); goto mmots; PxzSM: $Q5WW4 = []; goto ba4BB; HV5PH: $Q5WW4 = array_unique($Q5WW4); goto mqi0J; mmots: $this->tBXZu->clRuz([["id", "IN", $Q5WW4]]); goto aR_UP; xMCO8: dwsoU: goto HV5PH; lhbdO: IEzND: goto cIg0k; WB46l: return true; goto c2wsK; s4RLW: $this->Y_MIf->load(t9v9V::b6JQL($nhzU4->V58vt, "sku")); goto PxzSM; aR_UP: foreach ($Q5WW4 as $CNEts) { goto JsPMC; LgTwQ: bRuGN::Dgym7($q3Tuu); goto VvReh; JsPMC: $q3Tuu = $this->P_Va7->VZj3o((object) ["id" => $CNEts]); goto OsMHY; MzYoT: goto uPzn3; goto Xkkgg; Xkkgg: T7JvN: goto LgTwQ; OsMHY: if (BruGn::Nzd8d($q3Tuu)) { goto T7JvN; } goto MzYoT; VvReh: uPzn3: goto BoUTE; BoUTE: } goto lhbdO; c2wsK: } protected function Qbyj2(oCTVm $nhzU4) : bool { goto Vk1uo; ak0qu: $this->XP1gp($p0D4h); goto yiNx9; wutX7: B6bfm: goto HLHMc; BHhXR: $this->omESu($xCfpi); goto ak0qu; itjog: $this->AVRcs($pfFXU); goto CEV18; f5v4s: $hbGaA = []; goto iCu0E; CEV18: return true; goto PYM8f; Vk1uo: $this->Y_MIf->load(t9V9v::B6Jql($nhzU4->V58vt, "sku")); goto f5v4s; X6GDs: $pfFXU = []; goto uJ7xy; HWgiF: $this->tpMjl($vUSKh); goto itjog; bWMoy: $tkj3g = []; goto dKQxk; JpXvR: $p0D4h = []; goto bWMoy; yiNx9: $this->HOE1Q($tkj3g); goto HWgiF; uJ7xy: foreach ($nhzU4->V58vt as $OPL9M) { goto k50DN; QWKAb: K2kAQ: goto pm6Pi; uEIy5: $this->nUoQI($OPL9M, $xCfpi); goto XcHLg; OchTv: $this->P1Cei($OPL9M, $tkj3g); goto dSId4; fU_3e: $this->fNmGY($OPL9M, $pfFXU); goto QWKAb; XcHLg: $this->kmP1C($OPL9M, $p0D4h); goto OchTv; dSId4: $this->tWfWY($OPL9M, $vUSKh); goto fU_3e; NgmmJ: $this->ir8d7($OPL9M, $Bcdfk); goto uEIy5; k50DN: $this->nefHW($OPL9M, $hbGaA); goto NgmmJ; pm6Pi: } goto wutX7; iCu0E: $Bcdfk = []; goto UHT6o; dKQxk: $vUSKh = []; goto X6GDs; HLHMc: $this->RglR_($hbGaA); goto JYS89; UHT6o: $xCfpi = []; goto JpXvR; JYS89: $this->fCN2C($Bcdfk); goto BHhXR; PYM8f: } public function NEfHW(array $OPL9M, array &$hbGaA) : void { goto zz5aP; HIunz: YDSn5: goto AQgGE; zz5aP: $F7F2h = $this->OGJtz->iaSRb("code", $OPL9M["attribute_family_code"])->CbAF1()->id; goto eT2Yl; CV7HB: $hbGaA["update"][$OPL9M["sku"]] = ["type" => $OPL9M["type"], "sku" => $OPL9M["sku"], "attribute_family_id" => $F7F2h]; goto HIunz; eT2Yl: if ($this->wxaZY($OPL9M["sku"])) { goto P13rV; } goto uxBo2; uxBo2: $hbGaA["insert"][$OPL9M["sku"]] = ["type" => $OPL9M["type"], "sku" => $OPL9M["sku"], "attribute_family_id" => $F7F2h, "created_at" => $OPL9M["created_at"] ?? j7tDw(), "updated_at" => $OPL9M["updated_at"] ?? j7tDw()]; goto FRkG9; uoCdC: P13rV: goto CV7HB; FRkG9: goto YDSn5; goto uoCdC; AQgGE: } public function rgLr_(array $hbGaA) : void { goto LDGXe; kbjlv: if (empty($hbGaA["insert"])) { goto Sxz0E; } goto wdEaF; Z36oi: $this->X8lcz += count($hbGaA["update"]); goto M2my0; CbI85: A2Qtm: goto EtjzV; EtjzV: Sxz0E: goto TGECx; qs4Tz: $this->tBXZu->insert($hbGaA["insert"]); goto YqUKH; xR46S: foreach ($DtLL2 as $ymMcf) { $this->Y_MIf->OJZxx($ymMcf->yZ23X, ["id" => $ymMcf->id, "type" => $ymMcf->AYUj2, "attribute_family_id" => $ymMcf->EUq1A]); jjCVZ: } goto CbI85; b7v0W: P7OJj: goto kbjlv; M2my0: $this->tBXZu->eA3Zt($hbGaA["update"], $this->fyQ83); goto b7v0W; LDGXe: if (empty($hbGaA["update"])) { goto P7OJj; } goto Z36oi; wdEaF: $this->ayshP += count($hbGaA["insert"]); goto qs4Tz; YqUKH: $DtLL2 = $this->tBXZu->Cv2h2("sku", array_keys($hbGaA["insert"]), ["id", "type", "sku", "attribute_family_id"]); goto xR46S; TGECx: } public function iR8D7(array $OPL9M, array &$Bcdfk) : void { goto hvSll; Y2bVV: $Qe1QH = $this->BS1C3(); goto kKyA5; wHdjE: $B26fJ = explode("|", $OPL9M["customer_group_prices"]); goto Y2bVV; NVf55: NF229: goto wHdjE; kKyA5: foreach ($B26fJ as $j9pxD) { goto UT6Mv; UT6Mv: parse_str(str_replace(",", "&", $j9pxD), $JEpBn); goto UI4Pj; UI4Pj: $Bcdfk[$OPL9M["sku"]][] = ["qty" => $JEpBn["qty"], "value_type" => $JEpBn["type"], "value" => $JEpBn["price"], "customer_group_id" => $Qe1QH->IasRb("code", $JEpBn["group"])->CBAF1()?->id]; goto deu2N; deu2N: xQ9Ei: goto AhJz1; AhJz1: } goto gRlux; cdY47: return; goto NVf55; gRlux: Fcx8J: goto aasAg; hvSll: if (!empty($OPL9M["customer_group_prices"])) { goto NF229; } goto cdY47; aasAg: } public function fcn2C(array $Bcdfk) : void { goto EqW23; siDKn: Caaz2: goto In2Lg; In2Lg: $this->ljHJk->Ea3Zt($uG6gO, "unique_id"); goto HoKQt; xi4cW: foreach ($Bcdfk as $DAUfC => $AgAv9) { goto x0UxI; nUfjz: R8_FK: goto p989e; oUvcw: vYw3J: goto nUfjz; x0UxI: foreach ($AgAv9 as $Bcdfk) { goto jC73v; jC73v: $ymMcf = $this->Y_MIf->get($DAUfC); goto pN4x4; LH2nl: QuynA: goto Q1KS_; pN4x4: $Bcdfk["product_id"] = (int) $ymMcf["id"]; goto OWtpL; TY97l: $uG6gO[$Bcdfk["unique_id"]] = $Bcdfk; goto LH2nl; OWtpL: $Bcdfk["unique_id"] = implode("|", array_filter([$Bcdfk["qty"], $Bcdfk["product_id"], $Bcdfk["customer_group_id"]])); goto TY97l; Q1KS_: } goto oUvcw; p989e: } goto siDKn; EqW23: $uG6gO = []; goto xi4cW; HoKQt: } public function nUoQi(array $OPL9M, array &$xCfpi) : void { goto dT8Ru; b4g5F: tAhtu: goto Csr_d; hd1CR: return; goto odYdP; LUuak: foreach ($n8nNM as $vHG1S) { goto NvskA; Qt0Rm: $this->S1HiZ[$vHG1S] = $this->EG0Jd->u5aCo("name", $vHG1S)->b6jql("id")->toArray(); goto uCSmH; E8Cmd: ifL9V: goto Qt0Rm; NvskA: if (!isset($this->S1HiZ[$vHG1S])) { goto ifL9V; } goto gWHHU; uCSmH: $bZ3w2 = array_merge($bZ3w2, $this->S1HiZ[$vHG1S]); goto o_3Lr; ywcje: goto jPyGZ; goto E8Cmd; o_3Lr: jPyGZ: goto JXPjN; gWHHU: $bZ3w2 = array_merge($bZ3w2, $this->S1HiZ[$vHG1S]); goto ywcje; JXPjN: } goto b4g5F; Csr_d: $xCfpi[$OPL9M["sku"]] = $bZ3w2; goto kBlWY; L4Zjs: $bZ3w2 = []; goto LUuak; odYdP: Gn4LF: goto JBHkF; Gr0b2: $n8nNM = explode("/", $OPL9M["categories"] ?? ''); goto L4Zjs; dT8Ru: if (!empty($OPL9M["categories"])) { goto Gn4LF; } goto hd1CR; JBHkF: $xCfpi[$OPL9M["sku"]] = []; goto Gr0b2; kBlWY: } public function OmesU(array $xCfpi) : void { goto K0EDL; M1Jta: pdLyW: goto Wt9k3; Boint: NwzC3::rEAkv("product_categories")->ea3ZT($HQ5oW, ["product_id", "category_id"]); goto UxUsT; K0EDL: if (!empty($xCfpi)) { goto pdLyW; } goto aDp8f; Wt9k3: $HQ5oW = []; goto NIHeP; I1aiw: oWaCe: goto Boint; aDp8f: return; goto M1Jta; NIHeP: foreach ($xCfpi as $DAUfC => $bZ3w2) { goto czLE8; MVqA2: Vep5i: goto zGCSZ; Z7zLm: foreach ($bZ3w2 as $Nfe7o) { $HQ5oW[] = ["product_id" => $ymMcf["id"], "category_id" => $Nfe7o]; E_6EH: } goto MVqA2; zGCSZ: VwWBU: goto cy43P; czLE8: $ymMcf = $this->Y_MIf->get($DAUfC); goto Z7zLm; cy43P: } goto I1aiw; UxUsT: } public function KmP1c(array $OPL9M, array &$p0D4h) : void { goto hG74c; ma2WU: TshBW: goto d3wDe; K9h4R: foreach ($OPL9M as $Yl7zp => $Z3GrM) { goto xqUxS; cpql6: $KhePX = $nHcxU->IASrb("code", $Yl7zp)->cbaF1(); goto f3l_L; sim2S: $p6eAh = array_fill_keys(array_values($KhePX->gViDz), null); goto rwWY1; n7jfN: goto lXiKh; goto pGPL2; rwWY1: $p0D4h[$OPL9M["sku"]][] = array_merge($p6eAh, ["attribute_id" => $KhePX->id, $KhePX->Wdqia => $Z3GrM, "channel" => $KhePX->AEtRC ? $OPL9M["channel"] : null, "locale" => $KhePX->WBjiM ? $OPL9M["locale"] : null]); goto d3GWd; ccEwT: goto lXiKh; goto ZigHw; xqUxS: if (!is_null($Z3GrM)) { goto u8xYK; } goto ccEwT; f3l_L: if ($KhePX) { goto Lr100; } goto n7jfN; pGPL2: Lr100: goto sim2S; ZigHw: u8xYK: goto cpql6; d3GWd: lXiKh: goto U4HAq; U4HAq: } goto ma2WU; ZbN33: $nHcxU = $this->psHz3($OPL9M["type"], $OPL9M["attribute_family_code"]); goto K9h4R; hG74c: $o0ANV = []; goto ZbN33; d3wDe: } public function xP1GP(array $p0D4h) : void { goto dEGqT; fAmQl: $this->PRFuA->Ea3zt($lBuDJ, "unique_id"); goto wbh6u; dEGqT: $lBuDJ = []; goto SYcdl; fuGk2: ybPsB: goto fAmQl; SYcdl: foreach ($p0D4h as $DAUfC => $sfqtC) { goto QRQvF; AQbG8: cmvam: goto GOW3F; QRQvF: foreach ($sfqtC as $KhePX) { goto bCVGH; Zijp_: $KhePX["product_id"] = (int) $ymMcf["id"]; goto Ndhum; Ndhum: $KhePX["unique_id"] = implode("|", array_filter([$KhePX["channel"], $KhePX["locale"], $KhePX["product_id"], $KhePX["attribute_id"]])); goto zFjn4; bCVGH: $ymMcf = $this->Y_MIf->get($DAUfC); goto Zijp_; zFjn4: $lBuDJ[$KhePX["unique_id"]] = $KhePX; goto ScdPm; ScdPm: ytoqg: goto kUMHI; kUMHI: } goto AQbG8; GOW3F: biBCd: goto Sf4lj; Sf4lj: } goto fuGk2; wbh6u: } public function P1cEi(array $OPL9M, array &$tkj3g) : void { goto pgFOd; LqGL1: cY2UH: goto WX6Bd; pgFOd: if (!empty($OPL9M["inventories"])) { goto H6NJy; } goto sKpxb; sKpxb: return; goto AOygY; kZtEd: $z_RN_ = explode(",", $OPL9M["inventories"] ?? ''); goto CuFUY; AOygY: H6NJy: goto URZct; URZct: $tkj3g[$OPL9M["sku"]] = []; goto kZtEd; CuFUY: foreach ($z_RN_ as $Bifni) { goto YX2Ft; vVqIu: $tkj3g[$OPL9M["sku"]][] = ["source" => $Bifni, "qty" => $gt9n9]; goto OobYe; OobYe: auF2D: goto zmmS1; YX2Ft: [$Bifni, $gt9n9] = explode("=", $Bifni ?? ''); goto vVqIu; zmmS1: } goto LqGL1; WX6Bd: } public function hOe1Q(array $tkj3g) : void { goto H5DSz; CdgrH: foreach ($tkj3g as $DAUfC => $JnVeN) { goto gMLBi; Hc0hD: byT3Z: goto u9_f5; u9_f5: rddJe: goto uRwZz; S3ZZM: foreach ($JnVeN as $JFdvk) { goto dmbjX; dmbjX: $Bifni = $z_RN_->iASrb("code", $JFdvk["source"])->cbaf1(); goto oL1aX; oL1aX: if ($Bifni) { goto LOXDc; } goto tHywf; tHywf: goto VqZsm; goto Aa_AI; AbIP0: VqZsm: goto ArQGI; Aa_AI: LOXDc: goto jHYIE; jHYIE: $hVVoa[] = ["inventory_source_id" => $Bifni->id, "product_id" => $ymMcf["id"], "qty" => $JFdvk["qty"], "vendor_id" => 0]; goto AbIP0; ArQGI: } goto Hc0hD; gMLBi: $ymMcf = $this->Y_MIf->get($DAUfC); goto S3ZZM; uRwZz: } goto KUDiH; GCqdz: LBK4d: goto RVZCE; l3rG7: $this->nDJnL->ea3zT($hVVoa, ["product_id", "inventory_source_id", "vendor_id"]); goto QgJZp; qqPHU: $hVVoa = []; goto CdgrH; RVZCE: $z_RN_ = $this->yTFwt->cv2h2("code", T9v9v::DC0J9(t9v9V::b6jqL($tkj3g, "*.source"))); goto qqPHU; H5DSz: if (!empty($tkj3g)) { goto LBK4d; } goto pZc6n; KUDiH: hQ7kX: goto l3rG7; pZc6n: return; goto GCqdz; QgJZp: } public function twfWY(array $OPL9M, array &$vUSKh) : void { goto KpHGL; dDU6a: foreach ($JNVzl as $kciST => $qjljb) { goto nAOvn; nAOvn: $JvZqI = "import/" . $this->vOM7k->s3vf3 . "/" . $qjljb; goto VdOCn; H18t1: goto W1GtE; goto Pmnjy; JFS01: W1GtE: goto BpWJQ; ZFCFR: $vUSKh[$OPL9M["sku"]][] = ["name" => $qjljb, "path" => brUGn::TWzff("local")->iGQrU($JvZqI)]; goto JFS01; VdOCn: if (bRugN::TWzff("local")->Ggl1c($JvZqI)) { goto FsxeI; } goto H18t1; Pmnjy: FsxeI: goto ZFCFR; BpWJQ: } goto BifP9; KpHGL: if (!empty($OPL9M["images"])) { goto GcwXU; } goto nn20c; ih7zD: $vUSKh[$OPL9M["sku"]] = []; goto HdTs3; WymHV: if (!$this->Y_MIf->ggl1C($OPL9M["sku"])) { goto T4OK7; } goto m25sX; jr08V: T4OK7: goto ih7zD; HdTs3: $JNVzl = array_map("trim", explode(",", $OPL9M["images"])); goto dDU6a; BifP9: g3Shi: goto WzyBv; m25sX: return; goto jr08V; nn20c: return; goto CyUnR; CyUnR: GcwXU: goto WymHV; WzyBv: } public function tpMJl(array $vUSKh) : void { goto N3XAG; eAQfl: foreach ($vUSKh as $DAUfC => $F7jXi) { goto iHS2q; iHS2q: $ymMcf = $this->Y_MIf->get($DAUfC); goto c_07c; bGMfm: sAKRR: goto M47WF; c_07c: foreach ($F7jXi as $kciST => $qjljb) { goto Z8sye; ZUqFh: $JvZqI = $q3Tuu . "/" . E66ER::R3PLX(40) . ".webp"; goto e42ea; mS4aw: $q3Tuu = $this->P_Va7->Vzj3o((object) $ymMcf); goto ZUqFh; QAwPo: II81i: goto eSxe9; gnY7M: $qjljb = (new lux1_())->IPeoM($sNMPJ)->EgIdm("webp"); goto mS4aw; e42ea: $V3BAl[] = ["type" => "images", "path" => $JvZqI, "product_id" => $ymMcf["id"], "position" => $kciST + 1]; goto pGQSZ; Z8sye: $sNMPJ = new U7D1a($qjljb["path"], $qjljb["name"]); goto gnY7M; pGQSZ: BrUgn::QZAit($JvZqI, $qjljb); goto QAwPo; eSxe9: } goto KNfw0; KNfw0: zNql0: goto bGMfm; M47WF: } goto Zb2Ff; N3XAG: if (!empty($vUSKh)) { goto ec4Bu; } goto aQwEW; LzA0g: $V3BAl = []; goto eAQfl; aQwEW: return; goto sySf2; Zb2Ff: Z9y8p: goto XODsO; XODsO: $this->P_Va7->insert($V3BAl); goto oEjWU; sySf2: ec4Bu: goto LzA0g; oEjWU: } public function FNMGy(array $OPL9M, array &$pfFXU) : void { goto rZOy2; S3hAh: $o0ANV = array_merge($o0ANV, ["locale" => $OPL9M["locale"], "channel" => $OPL9M["channel"]]); goto LyDA5; rZOy2: $ChFVt = $this->OGJtz->IasRB("code", $OPL9M["attribute_family_code"])->cBaf1(); goto olMfL; olMfL: $Ar9NR = $this->SsjNH(); goto J9qoh; hbZbT: foreach ($Ar9NR as $UCaoa) { goto hr_pZ; cP5eI: GXUPw: goto GUC_w; biv5n: $o0ANV[$UCaoa] = $OPL9M[$UCaoa] ?? null; goto cP5eI; LcRof: goto GXUPw; goto Tmv3m; hr_pZ: if (!in_array($UCaoa, ["id", "created_at", "updated_at"])) { goto oStiw; } goto LcRof; Tmv3m: oStiw: goto biv5n; GUC_w: } goto wetEQ; wetEQ: oeFIF: goto S3hAh; LyDA5: $pfFXU[] = $o0ANV; goto yaqOy; J9qoh: $o0ANV = []; goto hbZbT; yaqOy: } public function AVRCs(array &$pfFXU) : void { goto yI0BE; yI0BE: $hbGaA = []; goto sozmc; sozmc: foreach ($pfFXU as $JEpBn) { goto eAsED; Atz7M: $hbGaA[] = array_merge($JEpBn, ["product_id" => $ymMcf["id"], "attribute_family_id" => $ymMcf["attribute_family_id"]]); goto uNsH2; eAsED: $ymMcf = $this->Y_MIf->get($JEpBn["sku"]); goto Atz7M; uNsH2: mpdfN: goto RvaLY; RvaLY: } goto BFVD1; TlDvk: $this->TyRrs->ea3Zt($hbGaA, ["product_id", "channel", "locale"]); goto SLBvd; BFVD1: Um1iO: goto TlDvk; SLBvd: } public function xNoYm(array $OPL9M, array &$HunyD) : void { goto lc6PD; fO6ap: $PZHio = explode("|", $OPL9M["configurable_variants"]); goto xBWaW; v0MiU: g0Su3: goto di6VS; HiSNU: return; goto oAgQp; lc6PD: if (!($OPL9M["type"] != self::foqmJ && empty($OPL9M["configurable_variants"]))) { goto oJDMP; } goto HiSNU; oAgQp: oJDMP: goto fO6ap; xBWaW: foreach ($PZHio as $orbcc) { goto VHGTJ; SOTmT: $HunyD[$OPL9M["sku"]][$qwvGZ["sku"]] = T9v9V::neEzD($qwvGZ, "sku"); goto Sw7q0; VHGTJ: parse_str(str_replace(",", "&", $orbcc), $qwvGZ); goto SOTmT; Sw7q0: WxBuQ: goto mNDms; mNDms: } goto v0MiU; di6VS: } public function sIaFG(array $HunyD) : void { goto nY2EQ; N4HHG: $this->tBXZu->EA3zt($Nmy2H, "sku"); goto VvTnG; dKCd6: $DwX47 = []; goto zPOFq; jTfb0: return; goto vfpQr; O9qTn: $utFeF = $this->C2fjK($HunyD); goto Lam3x; K9N47: $this->p_aeK(array_unique(T9v9v::dc0J9($YEDhT))); goto O9qTn; zPOFq: foreach ($HunyD as $DAUfC => $PZHio) { goto yMibZ; DjM2W: foreach ($PZHio as $FUrSn => $pA8XI) { goto LmxgI; ToIS_: foreach ($pA8XI as $jKwHa => $YK2ZY) { goto tFuWf; kuXER: $N4XGC = $utFeF->IaSrb("attribute_id", $KhePX->id)->IaSrB("admin_name", $YK2ZY)->cbAf1(); goto gkMMo; NpKIr: $p6eAh["unique_id"] = implode("|", array_filter([$p6eAh["channel"], $p6eAh["locale"], $p6eAh["product_id"], $p6eAh["attribute_id"]])); goto zJrlb; fSJkq: UQeME: goto bwh2h; tFuWf: $KhePX = $this->do7Y8->iaSrb("code", $jKwHa)->cbAF1(); goto kuXER; E8iRs: $p6eAh = array_merge($p6eAh, ["product_id" => $orbcc["id"], "attribute_id" => $KhePX->id, $KhePX->Wdqia => $N4XGC->id, "channel" => null, "locale" => null]); goto NpKIr; gkMMo: $p6eAh = array_fill_keys(array_values($KhePX->gViDz), null); goto E8iRs; zJrlb: $DwX47[] = $p6eAh; goto fSJkq; bwh2h: } goto Tyy2T; ibVtq: OzKka: goto rEnwp; Tyy2T: nAWML: goto ibVtq; t2K42: $Nmy2H[] = ["sku" => $FUrSn, "parent_id" => $ymMcf["id"]]; goto ToIS_; LmxgI: $orbcc = $this->Y_MIf->get($FUrSn); goto t2K42; rEnwp: } goto b9RbO; ZK_Q3: foreach ($x901S as $Yl7zp) { goto DmRzU; RwZYc: $Vgilm[] = ["product_id" => $ymMcf["id"], "attribute_id" => $KhePX->id]; goto pHeYm; pHeYm: wZKCg: goto sAgXg; DmRzU: $KhePX = $this->do7Y8->iASrb("code", $Yl7zp)->CBAf1(); goto RwZYc; sAgXg: } goto g5JCV; IUbVM: $x901S = array_keys(current($PZHio)); goto ZK_Q3; Ab1rI: fYiEs: goto eYuT6; b9RbO: aUYAQ: goto IUbVM; g5JCV: w5oWf: goto Ab1rI; yMibZ: $ymMcf = $this->Y_MIf->get($DAUfC); goto DjM2W; eYuT6: } goto errie; vfpQr: hlwtR: goto o3RfP; meKas: $Vgilm = []; goto dKCd6; Lam3x: $Nmy2H = []; goto meKas; VvTnG: nwZc3::reakV("product_super_attributes")->EA3zT($Vgilm, ["product_id", "attribute_id"]); goto nOo4u; nOo4u: $this->PRFuA->eA3zT($DwX47, "unique_id"); goto qowbN; errie: EWY4a: goto N4HHG; o3RfP: $YEDhT = array_map("array_keys", $HunyD); goto K9N47; nY2EQ: if (!empty($HunyD)) { goto hlwtR; } goto jTfb0; qowbN: } public function NdIPG(array $OPL9M, array &$bdE14) : void { goto eFEZ0; FD4Jn: $paFDc = explode(",", $OPL9M["associated_skus"]); goto i5jcG; xnC8u: return; goto MPsFN; i5jcG: foreach ($paFDc as $d_i17) { goto NmY7R; kDU4L: $bdE14[$OPL9M["sku"]][$DAUfC] = $gt9n9; goto PUC6n; PUC6n: X5Ghx: goto D7HP9; NmY7R: [$DAUfC, $gt9n9] = explode("=", $d_i17); goto kDU4L; D7HP9: } goto yEA7Q; yEA7Q: JRn5q: goto W1VY6; eFEZ0: if (!($OPL9M["type"] != self::nV5N2 && empty($OPL9M["associated_skus"]))) { goto lV4Cv; } goto xnC8u; MPsFN: lV4Cv: goto FD4Jn; W1VY6: } public function ImFdd(array $bdE14) : void { goto PXiap; MFZB7: foreach ($bdE14 as $DAUfC => $paFDc) { goto GVe99; GVe99: $ymMcf = $this->Y_MIf->get($DAUfC); goto N9T4W; FqZ60: foreach ($paFDc as $hqL_A => $gt9n9) { goto WV7nB; YW22J: lKfwt: goto l6VmF; t_PzX: o1WaY: goto Yydwh; oeK5y: if ($GoojX) { goto o1WaY; } goto FmbaF; Yydwh: $AdXNv[] = ["qty" => $gt9n9, "sort_order" => $nvVTg++, "product_id" => $ymMcf["id"], "associated_product_id" => $GoojX["id"]]; goto YW22J; WV7nB: $GoojX = $this->Y_MIf->get($hqL_A); goto oeK5y; FmbaF: goto lKfwt; goto t_PzX; l6VmF: } goto WbRy3; nCRI3: gWLVG: goto alhph; N9T4W: $nvVTg = 0; goto FqZ60; WbRy3: cLZBq: goto nCRI3; alhph: } goto yeSn0; yeSn0: rSD95: goto B_rbo; B_rbo: $this->fHgav->EA3zT($AdXNv, ["product_id", "associated_product_id"]); goto jzzUO; PXiap: if (!empty($bdE14)) { goto GBfjj; } goto oCV2z; r4120: $paFDc = array_map("array_keys", $bdE14); goto h8Y7N; oCV2z: return; goto AlXgd; h8Y7N: $this->P_aek(array_unique(t9v9V::DC0J9($paFDc))); goto bSzMC; bSzMC: $AdXNv = []; goto MFZB7; AlXgd: GBfjj: goto r4120; jzzUO: } public function z7c0t(array $OPL9M, array &$D3hFn) : void { goto k8q09; qa3mx: return; goto LHUSk; WUz4d: B2VWd: goto qb8l6; k8q09: if (!($OPL9M["type"] != self::qS5yD && empty($OPL9M["bundle_options"]))) { goto JCJm0; } goto qa3mx; qNcUN: $Oocpk = explode("|", $OPL9M["bundle_options"]); goto ZmA0Z; ZmA0Z: $juWYt = 0; goto GAjMr; LHUSk: JCJm0: goto qNcUN; GAjMr: foreach ($Oocpk as $Y8Z74) { goto LSVGw; vFpKc: uYezO: goto EkjIr; t8HtC: if (isset($D3hFn[$OPL9M["sku"]][$OPL9M["locale"]][$JEpBn["name"]])) { goto uYezO; } goto Q4F7x; ogb_f: $D3hFn[$OPL9M["sku"]][$OPL9M["locale"]][$JEpBn["name"]]["attributes"] = ["type" => $JEpBn["type"], "is_required" => $JEpBn["required"], "sort_order" => $juWYt++]; goto vFpKc; EkjIr: $D3hFn[$OPL9M["sku"]][$OPL9M["locale"]][$JEpBn["name"]]["skus"][$JEpBn["sku"]] = ["qty" => $JEpBn["qty"], "is_default" => $JEpBn["default"], "sort_order" => $cZXnm++]; goto cIOVo; LSVGw: parse_str(str_replace(",", "&", $Y8Z74), $JEpBn); goto t8HtC; cIOVo: KBk3o: goto Cg2o0; Q4F7x: $cZXnm = 0; goto ogb_f; Cg2o0: } goto WUz4d; qb8l6: } public function xmu0_(array &$D3hFn) : void { goto BxCEx; xbEmT: J6Kpb: goto SvDJU; SvDJU: $paFDc = []; goto FDl2T; HtGfT: $this->fAzI0->eA3ZT($gTk8u["products"], ["product_id", "product_bundle_option_id"]); goto FcU5A; cPqzA: if (empty($gTk8u["products"])) { goto N2O6M; } goto HtGfT; zPaPE: if (empty($gTk8u["options"])) { goto Ut53I; } goto BU7S9; pbwn9: $gTk8u = []; goto TsV96; Zl9Sy: if (empty($gTk8u["products"])) { goto SS6wF; } goto mbYrq; vPJbO: foreach ($D3hFn as $DAUfC => $Gph75) { goto eTIzK; mVqFF: foreach ($Gph75 as $hrUmx => $Oocpk) { goto ibHLm; aSy4Q: foreach ($Oocpk as $MqygF => $Y8Z74) { goto G8XEu; Tuxwo: goto wJ9iW; goto y1DmX; wNdCB: wJ9iW: goto W_GDY; La6iM: $gTk8u["translations"][] = ["product_bundle_option_id" => $Efp7q, "label" => $MqygF, "locale" => $hrUmx]; goto wNdCB; mtAEa: if ($Efp7q) { goto rglhg; } goto Tuxwo; G8XEu: $Efp7q = $oP3SB[$kciST++] ?? null; goto mtAEa; y1DmX: rglhg: goto La6iM; W_GDY: } goto Xr6NA; ibHLm: $kciST = 0; goto aSy4Q; QAxWr: dSCZI: goto SAzaf; Xr6NA: pbU4i: goto QAxWr; SAzaf: } goto kSOrw; kSOrw: IvWQN: goto Q_q6a; Q_q6a: lqFUd: goto wLyDU; Q9QWW: nnTXQ: goto mVqFF; RrmUc: $oP3SB = []; goto p0nAJ; p0nAJ: foreach (current($Gph75) as $MqygF => $Y8Z74) { goto a6OhT; DAALI: goto ah31a; goto THMhU; MiUpf: if (!$YXWx1) { goto YLY7j; } goto WvfXM; Du5ZJ: ah31a: goto eOZbB; Gv8wJ: foreach ($Y8Z74["skus"] as $LRQ10 => $w7hHC) { goto xfoV3; xfoV3: $GoojX = $this->Y_MIf->get($LRQ10); goto bfKC_; ecK0G: hADv5: goto bCLHU; bfKC_: $gTk8u["products"][] = ["product_bundle_option_id" => $YXWx1->id, "product_id" => $GoojX["id"], "qty" => $w7hHC["qty"], "is_default" => $w7hHC["is_default"], "sort_order" => $w7hHC["sort_order"]]; goto ecK0G; bCLHU: } goto faSU5; ToxkN: $YXWx1 = $xF7Uu->Iasrb("product_id", $ymMcf["id"])->IasrB("label", $MqygF)->cbAF1(); goto MiUpf; a6OhT: $EsYaD = true; goto ToxkN; THMhU: YLY7j: goto tA9mg; GEx_Y: E0T77: goto X2LbV; tA9mg: $YXWx1 = $this->qF_x6->create(["product_id" => $ymMcf["id"], "type" => $Y8Z74["attributes"]["type"], "is_required" => $Y8Z74["attributes"]["is_required"], "sort_order" => $Y8Z74["attributes"]["sort_order"]]); goto Du5ZJ; faSU5: RkcbC: goto GEx_Y; eOZbB: $oP3SB[] = $YXWx1->id; goto Gv8wJ; WvfXM: $gTk8u["options"][] = ["id" => $YXWx1->id, "product_id" => $ymMcf["id"], "type" => $Y8Z74["attributes"]["type"], "is_required" => $Y8Z74["attributes"]["is_required"], "sort_order" => $Y8Z74["attributes"]["sort_order"]]; goto DAALI; X2LbV: } goto Q9QWW; eTIzK: $ymMcf = $this->Y_MIf->get($DAUfC); goto RrmUc; wLyDU: } goto dQOU2; FDl2T: foreach (yoWAh($D3hFn, "*.*.*.skus") as $Oocpk) { $paFDc = array_merge($paFDc, array_keys($Oocpk)); zh6I1: } goto U_rex; FcU5A: N2O6M: goto s3UH6; dQOU2: zVlJv: goto zPaPE; jtR6I: SS6wF: goto cPqzA; TsV96: $xF7Uu = $this->PEyvM($D3hFn); goto vPJbO; oz27P: $this->p_AeK(array_unique(t9V9V::Dc0j9($paFDc))); goto pbwn9; mbYrq: nWzc3::ReAkV("product_bundle_option_translations")->eA3Zt($gTk8u["translations"], ["product_bundle_option_id", "label", "locale"]); goto jtR6I; AFVvd: Ut53I: goto Zl9Sy; BxCEx: if (!empty($D3hFn)) { goto J6Kpb; } goto yHPfM; BU7S9: $this->qF_x6->ea3zt($gTk8u["options"], "id"); goto AFVvd; U_rex: ei5fA: goto oz27P; yHPfM: return; goto xbEmT; s3UH6: } public function uKZnS(array $OPL9M, array &$a8RcP) : void { goto U0nuc; g5LLq: BHBPJ: goto J6m2A; U0nuc: $g91iw = ["related" => "product_relations", "cross_sell" => "product_cross_sells", "up_sell" => "product_up_sells"]; goto K7xDu; K7xDu: foreach ($g91iw as $QJuWc => $T0PaB) { goto Me5Ov; ebU1z: pyHUc: goto OgrEz; X1Du3: oB4AK: goto yKGWe; Me5Ov: if (!empty($OPL9M[$QJuWc . "_skus"])) { goto oB4AK; } goto YmtcH; q3LXc: x0vkQ: goto ebU1z; YmtcH: goto pyHUc; goto X1Du3; wqg4S: foreach (explode(",", $OPL9M[$QJuWc . "_skus"] ?? '') as $DAUfC) { $a8RcP[$T0PaB][$OPL9M["sku"]][] = $DAUfC; USfOO: } goto q3LXc; yKGWe: $a8RcP[$T0PaB][$OPL9M["sku"]] = []; goto wqg4S; OgrEz: } goto g5LLq; J6m2A: } public function stEu6(array $a8RcP) : void { goto adAsD; adAsD: $this->p_AEK(array_unique(t9v9V::dc0J9($a8RcP))); goto x0IK0; Bvq1r: cDq6N: goto YqHKI; x0IK0: foreach ($a8RcP as $T0PaB => $qHIMB) { goto sp_9z; GIxGN: nwzC3::REAkv($T0PaB)->EA3Zt($DshPZ, ["parent_id", "child_id"]); goto oS9cA; oS9cA: OKOE7: goto dHf39; pnOgF: foreach ($qHIMB as $DAUfC => $Li61P) { goto Dtl4t; Dtl4t: $ymMcf = $this->Y_MIf->get($DAUfC); goto p9ywI; xBRrG: ho57j: goto UXEwS; p9ywI: foreach ($Li61P as $FMcie) { goto IG6DH; yHZxp: goto C8JEr; goto aHZwS; IG6DH: $f1VKe = $this->Y_MIf->get($FMcie); goto jOxBi; Yzqa1: C8JEr: goto dXYxL; aHZwS: lvrNO: goto NLwyH; jOxBi: if ($f1VKe) { goto lvrNO; } goto yHZxp; NLwyH: $DshPZ[] = ["parent_id" => $ymMcf["id"], "child_id" => $f1VKe["id"]]; goto Yzqa1; dXYxL: } goto xBRrG; UXEwS: IG4i3: goto ch8n6; ch8n6: } goto Duqxy; Duqxy: RRdL0: goto GIxGN; sp_9z: $DshPZ = []; goto pnOgF; dHf39: } goto Bvq1r; YqHKI: } public function peYvm(array $D3hFn) : mixed { goto XKsi7; k8spN: return $E3wEN->get(); goto zZU6i; M5Mlv: rMuqj: goto k8spN; XKsi7: $E3wEN = $this->qF_x6->Nj2ex("product_bundle_options.id", "label", "locale", "product_id", "type", "is_required", "sort_order")->EEu6Y("product_bundle_option_translations", "product_bundle_option_translations.product_bundle_option_id", "product_bundle_options.id"); goto Yb3CB; Yb3CB: foreach ($D3hFn as $DAUfC => $Gph75) { goto vdlXZ; UiuX8: Uzxr8: goto tl882; vdlXZ: $ymMcf = $this->Y_MIf->get($DAUfC); goto o3umZ; tl882: DkSZ5: goto PWKC9; o3umZ: foreach ($Gph75 as $hrUmx => $Oocpk) { goto Lmgj_; VZVkb: aZ8OZ: goto ng5Jj; cfnBc: SF1Fy: goto VZVkb; Lmgj_: foreach ($Oocpk as $MqygF => $Y8Z74) { $E3wEN->AsIGa(function ($cMVai) use($ymMcf, $MqygF, $hrUmx) { $cMVai->iasrB("product_bundle_options.product_id", $ymMcf["id"])->iaSRB("product_bundle_option_translations.label", $MqygF)->IasRb("product_bundle_option_translations.locale", $hrUmx); }); kc6E_: } goto cfnBc; ng5Jj: } goto UiuX8; PWKC9: } goto M5Mlv; zZU6i: } public function c2fjK(array $PZHio) : mixed { $rN2A9 = array_unique(t9v9V::dc0j9($PZHio)); return $this->luZdp->CV2h2("admin_name", $rN2A9); } public function P_aek(array $Wd7Mn) : void { goto UbkPI; fil7A: Di11i: goto W_9Eg; hzyyV: HG9xy: goto BFKJz; BFKJz: if (empty($tNVfL)) { goto Di11i; } goto aBdGz; UbkPI: $tNVfL = []; goto dEVaT; aBdGz: $this->Y_MIf->load($tNVfL); goto fil7A; dEVaT: foreach ($Wd7Mn as $DAUfC) { goto HGzke; HGzke: if (!$this->Y_MIf->gGL1C($DAUfC)) { goto QcptE; } goto J32rs; tyMsq: $tNVfL[] = $DAUfC; goto Pj9Fh; Pj9Fh: XVpQg: goto GpqYS; J32rs: goto XVpQg; goto Rck93; Rck93: QcptE: goto tyMsq; GpqYS: } goto hzyyV; W_9Eg: } public function Pshz3(string $QJuWc, string $m3KW6) : mixed { goto CfbpP; OUR4d: $ymMcf = iOmTc::ipEoM(["type" => $QJuWc, "attribute_family_id" => $ChFVt->id]); goto QkjZv; QkjZv: return $this->uFMOA[$QJuWc][$m3KW6] = $ymMcf->nkXQR(); goto QGCH6; lIQgd: return $this->uFMOA[$QJuWc][$m3KW6]; goto d4K87; CfbpP: if (!isset($this->uFMOA[$QJuWc][$m3KW6])) { goto fyuvc; } goto lIQgd; d4K87: fyuvc: goto D0Go_; D0Go_: $ChFVt = $this->OGJtz->IaSrB("code", $m3KW6)->cBaf1(); goto OUR4d; QGCH6: } public function bS1C3() : mixed { goto C8pak; CVIll: return $this->neNUT = $this->jYjtE->TQ2Dl(); goto wrrVY; QRTT6: return $this->neNUT; goto zp0Sv; C8pak: if (empty($this->neNUT)) { goto pswQh; } goto QRTT6; zp0Sv: pswQh: goto CVIll; wrrVY: } protected function SsjNH() : array { goto OLO99; qNSiY: return $this->gRerH = Maanh::xsfrK("product_flat"); goto UgL37; xPONZ: weaZm: goto qNSiY; ywo1g: return $this->gRerH; goto xPONZ; OLO99: if (empty($this->gRerH)) { goto weaZm; } goto ywo1g; UgL37: } public function WXaZY(string $DAUfC) : bool { return $this->Y_MIf->GGl1c($DAUfC); } protected function w4OJQ(array $OPL9M) : array { goto b5XaZ; jSmRe: return $OPL9M; goto VsMKw; QA4u9: $OPL9M["locale"] = $OPL9M["locale"] ?? AtBx3()->yCiT_(); goto lSLyp; b5XaZ: $OPL9M = parent::w4Ojq($OPL9M); goto QA4u9; lSLyp: $OPL9M["channel"] = $OPL9M["channel"] ?? ia2s0()->T5XLP(); goto jSmRe; VsMKw: } } ?>