{"product_id":"epi-clutch-kit-pol-we437697-we437697","title":"EPI Clutch Kit POL (WE437697)","description":"EPI CLUTCH KIT POL (WE437697)\n\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\njustify-content: center;\nalign-items: center;\nmax-width: 100%;\n\"\u003e\n\u003ch3\u003eFitment Lookup\u003c\/h3\u003e\n\u003cform id=\"FITMENT_FORM\" style=\"\ndisplay: flex;\nflex-wrap: wrap;\njustify-content: center;\nmax-width: 80%;\nwidth: 80%;\nmin-width: 8rem;\nmax-width: 24rem;\n\"\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\npadding: 1rem 0 1rem 0;\nmax-width: 100%;\nwidth: 100%;\n\"\u003e\n\u003clabel for=\"FITMENT_BRAND\" style=\"padding-bottom: 0.25rem\"\u003eBRAND\u003c\/label\u003e\n\u003cselect id=\"FITMENT_BRAND\" style=\"white-space: nowrap; text-overflow: ellipsis\"\u003e\n\u003coption value=\"default\" selected disabled hidden\u003e\nSELECT BRAND\n\u003c\/option\u003e\n\u003c\/select\u003e\n\u003c\/div\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\npadding: 1rem 0 1rem 0;\nmax-width: 100%;\nwidth: 100%;\n\"\u003e\n\u003clabel for=\"FITMENT_MODEL\" style=\"padding-bottom: 0.25rem\"\u003eMODEL\u003c\/label\u003e\n\u003cselect id=\"FITMENT_MODEL\" style=\"white-space: nowrap; text-overflow: ellipsis\" disabled\u003e\n\u003coption value=\"default\" selected disabled hidden\u003e\nSELECT MODEL\n\u003c\/option\u003e\n\u003c\/select\u003e\n\u003c\/div\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\npadding: 1rem 0 1rem 0;\nmax-width: 100%;\nwidth: 100%;\n\"\u003e\n\u003clabel for=\"FITMENT_YEAR\" style=\"padding-bottom: 0.25rem\"\u003eYEAR\u003c\/label\u003e\n\u003cselect id=\"FITMENT_YEAR\" style=\"white-space: nowrap; text-overflow: ellipsis\" disabled\u003e\n\u003coption value=\"default\" selected disabled hidden\u003e\nSELECT YEAR\n\u003c\/option\u003e\n\u003c\/select\u003e\n\u003c\/div\u003e\n\u003c\/form\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\nalign-items: center;\nmargin: 0.5rem;\n\"\u003e\n\u003ch4\u003eFitments:\u003c\/h4\u003e\n\u003ctable id=\"FITMENT_TABLE\"\u003e\u003c\/table\u003e\n\u003cdiv id=\"FITMENT_NOTES\" style=\"\ndisplay: flex;\nflex-direction: column;\nalign-items: center;\nmargin-top: 0.5rem;\n\"\u003e\n\u003cspan id=\"FITMENT_MESSAGE\" style=\"margin-top: 0.5rem; margin-bottom: 0.5rem\"\u003eSelect Brand, Model, and Year To Check Fitment For Current\nProduct\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003chr style=\"\nborder-top: 3px solid #ddd;\nwidth: 100%;\nmax-width: 32rem;\nmargin-top: 0.5rem;\nmargin-bottom: 0.5rem;\n\"\u003e\n\u003cspan style=\"\nmax-width: 32rem;\nfont-style: italic;\nfont-weight: 100;\npadding: 1rem;\n\"\u003e\u003cb\u003eDisclaimer:\u003c\/b\u003e Fitment information is based on third-party data and\nmay not be accurate. Other fitments may be available but are not shown\ndue to limited data. Verify with your vehicle's manufacturer or a\nprofessional before making any changes. We are not responsible for\nerrors or actions taken based on this information.\n\u003c\/span\u003e\n\u003c\/div\u003e\n\u003cscript\u003e\nconst fitments = [{\"m\":\"General 4 1000 XP Deluxe EPS\",\"b\":0,\"y\":{\"0\":{\"-1\":[\"WE437697|\"]},\"1\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General 4 1000 XP Factory Custom Edition EPS\",\"b\":0,\"y\":{\"1\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General 4 1000 XP Pursuit Edition EPS\",\"b\":0,\"y\":{\"1\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General 4 1000 XP Ride Command Edition\",\"b\":0,\"y\":{\"0\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 1000 Premium EPS\",\"b\":0,\"y\":{\"4\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 1000 Sport EPS\",\"b\":0,\"y\":{\"4\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 1000 Ultimate EPS\",\"b\":0,\"y\":{\"4\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 4 1000 Deluxe\",\"b\":0,\"y\":{\"2\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 4 1000 Deluxe Ride Command Edition\",\"b\":0,\"y\":{\"2\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 4 1000 Premium EPS\",\"b\":0,\"y\":{\"3\":{\"-1\":[\"WE437697|\"]},\"4\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 4 1000 Sport EPS\",\"b\":0,\"y\":{\"3\":{\"-1\":[\"WE437697|\"]},\"4\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 4 1000 Trailhead Edition\",\"b\":0,\"y\":{\"2\":{\"-1\":[\"WE437697|\"]}}},{\"m\":\"General XP 4 1000 Ultimate EPS\",\"b\":0,\"y\":{\"3\":{\"-1\":[\"WE437697|\"]},\"4\":{\"-1\":[\"WE437697|\"]}}}]\nconst brands = [\"POLARIS\"]\nconst notes = []\nconst years = [2020,2021,2022,2023,2024]\nconst options = []\nconst brandSelector = document.getElementById('FITMENT_BRAND')\nconst modelSelector = document.getElementById('FITMENT_MODEL')\nconst yearSelector = document.getElementById('FITMENT_YEAR')\nconst form = document.getElementById('FITMENT_FORM')\nconst table = document.getElementById('FITMENT_TABLE')\nconst notesDiv = document.getElementById('FITMENT_NOTES')\nconst _sBrands = [...brands].sort((a, b) =\u003e (a \u003e b ? 1 : a \u003c b ? -1 : 0))\nconst _sModels = []\nconst _sYears = [...years].sort()\nfitments.forEach((fitment, index) =\u003e {\nif (!_sModels.includes(fitment.m)) {\n_sModels.push(fitment.m)\nconst option = document.createElement('option')\noption.innerHTML = fitment.m\noption.value = fitment.m\noption.title = fitment.m\noption.hidden = true\nmodelSelector.appendChild(option)\n}\n})\n_sBrands.forEach((brand) =\u003e {\nconst option = document.createElement('option')\noption.innerHTML = brand\noption.value = brand\noption.title = brand\nconst foundIndex = brands.findIndex((_brand) =\u003e brand === _brand)\noption.dataset['index'] = foundIndex\nbrandSelector.appendChild(option)\n})\n_sYears.forEach((year) =\u003e {\nconst option = document.createElement('option')\noption.innerHTML = year\noption.value = year\noption.hidden = true\noption.title = year\nconst foundIndex = years.findIndex((_year) =\u003e year === _year)\noption.dataset['index'] = foundIndex\nyearSelector.appendChild(option)\n})\n_sBrands.splice(0, _sBrands.length)\n_sModels.splice(0, _sModels.length)\n_sYears.splice(0, _sYears.length)\n\nlet currentBrand\nlet currentModel\nlet currentYear\n\nconst resetState = (state) =\u003e {\nif (state === 'all') {\nmodelSelector.value = 'default'\nmodelSelector.disabled = false\ncurrentModel = undefined\n}\nyearSelector.value = 'default'\nyearSelector.disabled = true\ncurrentYear = undefined\ncleanMessages()\ncreateMessage('Select Brand, Model, and Year To Find Fitment For Product')\ncleanFitmentTable()\n}\n\nconst updateModels = () =\u003e {\nconst newFitmentLookup = fitments.filter((fitment) =\u003e {\nreturn fitment.b === currentBrand\n})\nmodelSelector.querySelectorAll('option')?.forEach((option, index) =\u003e {\nif (index === 0 || option.innerHTML.trim() === 'SELECT MODEL') return\noption.remove()\n})\nnewFitmentLookup.forEach((fitment) =\u003e {\nconst option = document.createElement('option')\noption.style.wordBreak = ''\noption.innerHTML = fitment.m\noption.value = fitment.m\noption.title = fitment.m\nmodelSelector.appendChild(option)\n})\nresetState('all')\n}\n\nconst updateYears = () =\u003e {\nconst newFitment = fitments.find((fitment) =\u003e {\nreturn fitment.b === currentBrand \u0026\u0026 fitment.m === currentModel\n})\n\nyearSelector.querySelectorAll('option')?.forEach((option) =\u003e {\nconst foundYear = newFitment.y[option.dataset['index']]\nif (foundYear) {\noption.hidden = false\n} else {\noption.hidden = true\n}\n})\nresetState()\nyearSelector.disabled = false\n}\n\nconst createMessage = (text, note) =\u003e {\nconst span = document.createElement('span')\nspan.innerHTML = text\nspan.style.marginTop = '0.5rem'\nspan.style.marginBottom = '0.5rem'\nif (note) {\nspan.style.fontWeight = 'bold'\nspan.style.fontStyle = 'italic'\n}\nnotesDiv.appendChild(span)\n}\n\nconst cleanMessages = () =\u003e {\nconst messages = notesDiv.querySelectorAll('span')\nmessages.forEach((message) =\u003e message.remove())\n}\n\nconst cleanFitmentTable = () =\u003e {\nconst rows = table.querySelectorAll('tr')\nrows.forEach((row) =\u003e row.remove())\n}\n\nconst createFitmentHeaders = () =\u003e {\nconst row = document.createElement('tr')\ntable.appendChild(row)\nconst tableHeader = document.createElement('th')\ntableHeader.innerHTML = 'SKU | OPTION(s)'\nrow.appendChild(tableHeader)\n}\n\nconst createFitmentRow = (text) =\u003e {\nconst row = document.createElement('tr')\ntable.appendChild(row)\nconst tableHeader = document.createElement('td')\ntableHeader.innerHTML = text\nrow.appendChild(tableHeader)\n}\n\nconst showFitments = () =\u003e {\nconst fitment = fitments.find((fitment) =\u003e fitment.b === currentBrand \u0026\u0026 fitment.m === currentModel)?.y?.[currentYear]\ncleanFitmentTable()\n\nif (!fitment) {\ncleanMessages()\ncreateMessage('No Fitments Found For This Current Product')\nreturn\n}\ncleanMessages()\ncreateFitmentHeaders()\nconst currentNotes = []\nconst currentFitments = []\nfor (noteKey in fitment) {\nconst note = notes[noteKey]\nlet notePosition\nif (note) notePosition = currentNotes.push(note)\n\nfitment[noteKey]\n.sort((a, b) =\u003e (a \u003e b ? 1 : a \u003c b ? -1 : 0))\n.forEach((sku) =\u003e {\nconst manufacturerSKU = sku.split('|')[0]\nconst optionString = options?.[sku.split('|')?.[1]]\nconst text = notePosition\n? `${manufacturerSKU}${'*'.repeat(notePosition)}${optionString ? ` | ${optionString}` : ''}`\n: `${manufacturerSKU}${optionString ? ` | ${optionString}` : ''}`\ncreateFitmentRow(text)\n})\n}\ncurrentNotes.forEach((note, index) =\u003e {\ncreateMessage(`${'*'.repeat(index + 1)} ${note}`, true)\n})\n}\n\nform.addEventListener('change', (event) =\u003e {\nswitch (event.target.id) {\ncase 'FITMENT_BRAND':\ncurrentBrand = Number(event.target.options[event.target.selectedIndex]?.dataset['index'])\nbrandSelector.title = brands[currentBrand]\nupdateModels()\nbreak\ncase 'FITMENT_MODEL':\ncurrentModel = event.target.value\nmodelSelector.title = event.target.value\nupdateYears()\nbreak\ncase 'FITMENT_YEAR':\ncurrentYear = Number(event.target.options[event.target.selectedIndex]?.dataset['index'])\nyearSelector.title = years[currentYear]\nshowFitments()\nbreak\ndefault:\nconsole.error('ERROR')\n}\n})\n\u003c\/script\u003e\n","brand":"EPI","offers":[{"title":"Default Title","offer_id":40647459930158,"sku":"WE437697","price":641.99,"currency_code":"CAD","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0251\/9659\/3198\/files\/epi-clutch-kit-pol-we437697driven-powersports-incwe437697we437697-950028.jpg?v=1722163015","url":"https:\/\/www.drivenpowersports.ca\/products\/epi-clutch-kit-pol-we437697-we437697","provider":"Driven Powersports Inc.","version":"1.0","type":"link"}