{
  "version": 3,
  "sources": ["/cdn/shop/t/1064/assets/main-product.js?auto=format%2Ccompress"],
  "sourcesContent": ["function manageQuantities( type = '' ) {\n  try {\n    let qty         = $( `.customQtyFile__qty` ).val();\n    if ( typeof qty !== 'undefined' && qty ) {\n      qty = qty * 1;\n    } else {\n      const qty__ = $( `product-quantity .qty[name=\"quantity\"]` ).val();\n      if ( typeof qty__ !== 'undefined' && qty__ ) {\n        qty = qty__ * 1;\n      }\n    }\n    let selectedIndex = 0;\n    $( `.customTabelPlace .customTabelPlace__item` ).each(function() {\n      const min     = $( this ).attr( `min` ) * 1;\n      const max     = $( this ).attr( `max` ) * 1;\n      const indexNo = $( this ).attr( `index` ) * 1;\n      if ( qty >= min && qty <= max ) {\n        selectedIndex = indexNo;\n        const percentage  = $( this ).find( `.customTabelPlace__item_2` ).text().trim();\n        const unitPrice   = $( this ).find( `.customTabelPlace__item_3` ).text().trim();\n        $( `.customQtyFile__selectedData.percentage` ).html( `${ percentage !== '' ? percentage : `&nbsp;` }` );\n        $( `.customQtyFile__selectedData.unitPrice > span` ).html( `${ unitPrice !== '' ? unitPrice : `&nbsp;` }` );\n      }\n    })\n    if ( type != 'btnClicked' ) {\n      $( `.customTabelPlace .customTabelPlace__item` ).removeClass( `selected` );\n      $( `.customTabelPlace .customTabelPlace__item[index=\"${ selectedIndex }\"]` ).addClass( `selected` );\n    }\n    const isQtyEle = $( `.form__properties input[name=\"quantity\"]` ).length;\n    if ( isQtyEle > 0 ) {\n      $( `.form__properties input[name=\"quantity\"]` ).val( qty );\n    } else {\n      $( `.form__properties` ).append( `<input type=\"hidden\" name=\"quantity\" value=\"${ qty }\">` );\n    }\n\n    setSelectedRow( selectedIndex );\n    // console.log ( 'selectedIndex', selectedIndex );\n\n    if(typeof _qtyupdate != \"undefined\"){\n      _qtyupdate();\n    }\n\n  } catch ( err ) {\n    console.log( `ERROR manageQuantities`, err.message );\n  }\n}\n\n\nfunction setSelectedRow( selectedIndex ) {\n  try {\n    if($( `.customTabelPlace`) && $( `.customTabelPlace`).length > 0){\n    if ( selectedIndex == '') {\n      selectedIndex = $( `.customTabelPlaceWrap .customTabelPlace__item.selected` ).attr( `index` );\n    }\n      console.log(\"selectedIndex\",selectedIndex);\n      if(typeof selectedIndex != \"undefined\" ){\n    const getHeight = $( `.customTabelPlace .customTabelPlace__item[index=\"${ selectedIndex }\"]` ).outerHeight();\n    let getTopPosition = $( `.customTabelPlace .customTabelPlace__item[index=\"${ selectedIndex }\"]` ).position().top;\n\n    $( `.customTabelPlace__item__selectedBar` ).css({\n      \"top\": `${ getTopPosition }px`,\n      \"height\": `${ getHeight }px`\n    });\n      }\n    }\n  } catch ( err ) {\n    console.log( `ERROR setSelectedRow()`, err.message );\n  }\n}\n"],
  "mappings": "AAAA,SAAS,iBAAkB,KAAO,GAAK,CACrC,GAAI,CACF,IAAI,IAAc,EAAG,qBAAsB,EAAE,IAAI,EACjD,GAAK,OAAO,IAAQ,KAAe,IACjC,IAAM,IAAM,MACP,CACL,MAAM,MAAQ,EAAG,wCAAyC,EAAE,IAAI,EAC3D,OAAO,MAAU,KAAe,QACnC,IAAM,MAAQ,EAElB,CACA,IAAI,cAAgB,EACpB,EAAG,2CAA4C,EAAE,KAAK,UAAW,CAC/D,MAAM,IAAU,EAAG,IAAK,EAAE,KAAM,KAAM,EAAI,EACpC,IAAU,EAAG,IAAK,EAAE,KAAM,KAAM,EAAI,EACpC,QAAU,EAAG,IAAK,EAAE,KAAM,OAAQ,EAAI,EAC5C,GAAK,KAAO,KAAO,KAAO,IAAM,CAC9B,cAAgB,QAChB,MAAM,WAAc,EAAG,IAAK,EAAE,KAAM,2BAA4B,EAAE,KAAK,EAAE,KAAK,EACxE,UAAc,EAAG,IAAK,EAAE,KAAM,2BAA4B,EAAE,KAAK,EAAE,KAAK,EAC9E,EAAG,yCAA0C,EAAE,KAAM,GAAI,aAAe,GAAK,WAAa,QAAS,EAAG,EACtG,EAAG,+CAAgD,EAAE,KAAM,GAAI,YAAc,GAA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