<script>
    var Pharaonic;void 0===Pharaonic&&(Pharaonic={});var PharaonicSelect2={Select2:{init:function(){$('[data-pharaonic="select2"]:not("[data-select2-id]")').each(function(){Pharaonic.Select2.load($(this),$(this).is("[data-component-id]")?$(this).data("component-id"):null)})},load:function(a,e){var t,i,n,l,d;e&&(t={multiple:$(a).is("[multiple]"),tags:$(a).is("[data-tags]"),placeholder:$(a).is("[data-placeholder]")?$(a).data("placeholder"):"Select an option",language:$(a).is("[data-language]")?$(a).data("language"):"en",dir:$(a).is("[data-dir]")?$(a).data("dir"):"ltr",dropdownParent:$(a).is("[data-parent]")?$($(a).data("parent")):null,minimumResultsForSearch:$(a).is("[data-search-off]")?-1:0,allowClear:$(a).is("[data-clear]")},n=(i=a[0].attributes).getNamedItem("wire:model")||i.getNamedItem("wire:model.defer")||null,i.getNamedItem("class")||$(a).attr("class","form-select"),delete i,(a=$(a).select2(t))&&(l=n.value,d=0<n.name.search("defer"),a.on("change",function(){Livewire.find(e).set(l,$(a).val(),d)})))}}};Object.assign(Pharaonic,PharaonicSelect2),$(document).ready(function(){Pharaonic.Select2.init()}),window.addEventListener("pharaonic.select2.init",()=>{Pharaonic.Select2.init()}),window.addEventListener("pharaonic.select2.load",a=>{Pharaonic.Select2.load($(a.detail.target),a.detail.component)});
</script>
