{"version":3,"file":"tom_select-Gxhuky8q.js","sources":["../../../app/frontend/entrypoints/tom_select.js"],"sourcesContent":["import 'tom-select';\nimport TomSelect from 'tom-select';\n\ndocument.addEventListener('turbo:load', function () {\n console.log('Tom Select JS is connected PROPER.');\n\n const selectDancestyle = document.getElementById('select-dancestyle');\n if (selectDancestyle) {\n new TomSelect(selectDancestyle, {\n maxOptions: 100000,\n plugins: {\n remove_button: {\n title: 'Remove this dance style.',\n },\n },\n onItemAdd: function () {\n this.setTextboxValue('');\n this.refreshOptions();\n },\n });\n }\n\n const selectPostTypes = document.getElementById('select-post-types');\n if (selectPostTypes) {\n new TomSelect(selectPostTypes, {\n maxOptions: 100000,\n plugins: {\n remove_button: {\n title: 'Remove this dance style.',\n },\n },\n onItemAdd: function () {\n this.setTextboxValue('');\n this.refreshOptions();\n },\n });\n }\n\n const selectArtist = document.getElementById('select-artist');\n if (selectArtist) {\n new TomSelect(selectArtist, {\n maxOptions: null,\n plugins: {\n remove_button: { title: 'Remove this artist' },\n },\n onItemAdd: function () {\n this.setTextboxValue('');\n this.refreshOptions();\n },\n });\n }\n\n const selectMonth = document.getElementById('select-month');\n if (selectMonth) {\n new TomSelect(selectMonth, {\n plugins: {\n remove_button: { title: 'Remove month.' },\n },\n onItemAdd: function () {\n this.setTextboxValue('');\n this.refreshOptions();\n },\n });\n }\n\n const selectYear = document.getElementById('select-year');\n if (selectYear) {\n new TomSelect(selectYear, {\n plugins: {\n remove_button: { title: 'Remove year.' },\n },\n onItemAdd: function () {\n this.setTextboxValue('');\n this.refreshOptions();\n },\n });\n }\n\n const selectUser = document.getElementById('select-user');\n if (selectUser) {\n new TomSelect(selectUser, {\n maxOptions: 100000,\n plugins: {\n remove_button: { title: 'Remove month.' },\n },\n onItemAdd: function () {\n this.setTextboxValue('');\n this.refreshOptions();\n },\n });\n }\n\n const selectOrganizer = document.getElementById('select-organizer');\n if (selectOrganizer) {\n new TomSelect(selectOrganizer, {\n maxOptions: 100000,\n plugins: {\n remove_button: { title: 'Remove month.' },\n },\n onItemAdd: function () {\n this.setTextboxValue('');\n this.refreshOptions();\n },\n });\n }\n});\n"],"names":["selectDancestyle","TomSelect","selectPostTypes","selectArtist","selectMonth","selectYear","selectUser","selectOrganizer"],"mappings":"sDAGA,SAAS,iBAAiB,aAAc,UAAY,CAClD,QAAQ,IAAI,oCAAoC,EAEhD,MAAMA,EAAmB,SAAS,eAAe,mBAAmB,EAChEA,GACF,IAAIC,EAAUD,EAAkB,CAC9B,WAAY,IACZ,QAAS,CACP,cAAe,CACb,MAAO,0BACR,CACF,EACD,UAAW,UAAY,CACrB,KAAK,gBAAgB,EAAE,EACvB,KAAK,eAAgB,CACtB,CACP,CAAK,EAGH,MAAME,EAAkB,SAAS,eAAe,mBAAmB,EAC/DA,GACF,IAAID,EAAUC,EAAiB,CAC7B,WAAY,IACZ,QAAS,CACP,cAAe,CACb,MAAO,0BACR,CACF,EACD,UAAW,UAAY,CACrB,KAAK,gBAAgB,EAAE,EACvB,KAAK,eAAgB,CACtB,CACP,CAAK,EAGH,MAAMC,EAAe,SAAS,eAAe,eAAe,EACxDA,GACF,IAAIF,EAAUE,EAAc,CAC1B,WAAY,KACZ,QAAS,CACP,cAAe,CAAE,MAAO,oBAAsB,CAC/C,EACD,UAAW,UAAY,CACrB,KAAK,gBAAgB,EAAE,EACvB,KAAK,eAAgB,CACtB,CACP,CAAK,EAGH,MAAMC,EAAc,SAAS,eAAe,cAAc,EACtDA,GACF,IAAIH,EAAUG,EAAa,CACzB,QAAS,CACP,cAAe,CAAE,MAAO,eAAiB,CAC1C,EACD,UAAW,UAAY,CACrB,KAAK,gBAAgB,EAAE,EACvB,KAAK,eAAgB,CACtB,CACP,CAAK,EAGH,MAAMC,EAAa,SAAS,eAAe,aAAa,EACpDA,GACF,IAAIJ,EAAUI,EAAY,CACxB,QAAS,CACP,cAAe,CAAE,MAAO,cAAgB,CACzC,EACD,UAAW,UAAY,CACrB,KAAK,gBAAgB,EAAE,EACvB,KAAK,e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