1import { G as renderList, Ht as normalizeClass, Kt as toDisplayString, M as init_runtime_core_esm_bundler, O as defineComponent, S as createElementBlock, T as createTextVNode, U as openBlock, Xt as __exportAll, b as createBlock, d as vModelText, dt as reactive, h as Fragment, kt as init_shared_esm_bundler, nt as withDirectives, o as init_runtime_dom_esm_bundler, ot as init_reactivity_esm_bundler, pt as ref, tt as withCtx, v as computed, x as createCommentVNode, xt as unref, y as createBaseVNode } from "./vue.runtime.esm-bundler-Dh_z576G.js"; 2import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js"; 3import { t as useComponentId } from "./component-id-CBcjVwy6.js"; 4import { t as LinkOrRoute_default } from "./LinkOrRoute-BJoLl9oQ.js"; 5//#region resources/js/Pages/Consumer/components/cms/blocks/LinksColumnBlock.vue?vue&type=script&setup=true&lang.ts 6init_runtime_core_esm_bundler(); 7init_reactivity_esm_bundler(), init_shared_esm_bundler(), init_runtime_dom_esm_bundler(); 8var _hoisted_1 = ["id"]; 9var _hoisted_2 = { class: "container" }; 10var _hoisted_3 = { class: "columns" }; 11var _hoisted_4 = ["onClick"]; 12var _hoisted_5 = { 13 key: 0, 14 class: "column column-newsletter" 15}; 16var _hoisted_6 = ["action", "method"]; 17var _hoisted_7 = { 18 key: 0, 19 class: "lead" 20}; 21var _hoisted_8 = ["onUpdate:modelValue", "name"]; 22var _hoisted_9 = ["name", "placeholder"]; 23var _hoisted_10 = { 24 class: "button outline-primary", 25 type: "submit" 26}; 27var LinksColumnBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({ 28 inheritAttrs: false, 29 __name: "LinksColumnBlock", 30 props: { 31 elementId: { default: "" }, 32 data: {}, 33 inEditMode: { 34 type: Boolean, 35 default: false 36 }, 37 isActive: { 38 type: Boolean, 39 default: false 40 } 41 }, 42 setup(__props) { 43 const props = __props; 44 const { getElementId } = useComponentId(); 45 const blockId = getElementId(props.elementId); 46 const activeIndex = ref(-1); 47 const toggle = (index) => { 48 activeIndex.value = activeIndex.value === index ? -1 : index; 49 }; 50 const formMethod = computed(() => { 51 if (["get", "ajax-get"].indexOf(props.data.newsletter_form_type) >= 0) return "get"; 52 return "post"; 53 }); 54 const isAjax = computed(() => { 55 return props.data.newsletter_form_type.startsWith("ajax"); 56 }); 57 function onSubmitForm(ev) { 58 if (!isAjax.value) return; 59 const endpoint = props.data.newsletter_endpoint; 60 const param = props.data.newsletter_email_parameter; 61 ev.preventDefault(); 62 news.is_sending = true; 63 const method = formMethod.value.toUpperCase(); 64 const ajax = new XMLHttpRequest(); 65 ajax.onreadystatechange = function() { 66 if (this.readyState == 4 && this.status == 200) { 67 news.is_sending = false; 68 news.success = true; 69 news.email = ""; 70 } 71 }; 72 const data = new FormData(); 73 data.append(param, news.email); 74 for (const field of hiddenFields.value) data.append(field.name, field.value); 75 ajax.open(method, endpoint, true); 76 ajax.send(data); 77 } 78 const news = reactive({ 79 email: "", 80 is_sending: false, 81 success: false 82 }); 83 const hiddenFields = computed(() => { 84 if (props.data.newsletter_hidden_fields == void 0) return []; 85 const result = []; 86 const lines = props.data.newsletter_hidden_fields.split("\n"); 87 for (const line of lines) { 88 const parts = line.split(":"); 89 if (parts.length === 2) result.push({ 90 name: parts[0], 91 value: parts[1] 92 }); 93 } 94 return result; 95 }); 96 return (_ctx, _cache) => { 97 return openBlock(), createElementBlock("div", { 98 id: unref(blockId), 99 class: "links-column" 100 }, [createBaseVNode("div", _hoisted_2, [createBaseVNode("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.data.links, (col, i) => { 101 return openBlock(), createElementBlock("div", { 102 key: i, 103 class: "column" 104 }, [createBaseVNode("h3", { 105 class: normalizeClass([{ active: activeIndex.value === i }, "title"]), 106 onClick: ($event) => toggle(i) 107 }, [createBaseVNode("span", null, toDisplayString(col.title), 1), _cache[2] || (_cache[2] = createBaseVNode("i", { class: "mobile toggle-icon fa fa-chevron-down" }, null, -1))], 10, _hoisted_4), createBaseVNode("nav", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(col.links, (link, j) => { 108 return openBlock(), createBlock(LinkOrRoute_default, { 109 key: `${i}-${j}`, 110 url: link.url 111 }, {
112 default: withCtx(() => [createTextVNode(toDisplayString(link.label), 1)]), 113 _: 2 114 }, 1032, ["url"]); 115 }), 128))])]); 116 }), 128)), __props.data.newsletter_enabled ? (openBlock(), createElementBlock("div", _hoisted_5, [__props.data.newsletter_title ? (openBlock(), createElementBlock("h3", { 117 key: 0, 118 class: normalizeClass([{ active: activeIndex.value === 100 }, "title"]), 119 onClick: _cache[0] || (_cache[0] = ($event) => toggle(100)) 120 }, [createBaseVNode("span", null, toDisplayString(__props.data.newsletter_title), 1), _cache[3] || (_cache[3] = createBaseVNode("i", { class: "mobile toggle-icon fa fa-chevron-down" }, null, -1))], 2)) : createCommentVNode("", true), createBaseVNode("form", { 121 action: __props.data.newsletter_endpoint, 122 method: formMethod.value, 123 "accept-charset": "UTF-8", 124 onSubmit: onSubmitForm 125 }, [ 126 __props.data.newsletter_lead ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(__props.data.newsletter_lead), 1)) : createCommentVNode("", true), 127 (openBlock(true), createElementBlock(Fragment, null, renderList(hiddenFields.value, (field, index) => { 128 return withDirectives((openBlock(), createElementBlock("input", { 129 key: index, 130 "onUpdate:modelValue": ($event) => field.value = $event, 131 name: field.name, 132 type: "hidden" 133 }, null, 8, _hoisted_8)), [[vModelText, field.value]]); 134 }), 128)), 135 withDirectives(createBaseVNode("input", { 136 id: "newsletter-email", 137 "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => news.email = $event), 138 name: __props.data.newsletter_email_parameter, 139 placeholder: _ctx.$t("general.email"), 140 autocomplete: "off", 141 class: "form-control", 142 required: "", 143 type: "email" 144 }, null, 8, _hoisted_9), [[vModelText, news.email]]), 145 createBaseVNode("button", _hoisted_10, [createBaseVNode("span", null, toDisplayString(_ctx.$t("cms.newsletter_subscribe")), 1)]) 146 ], 40, _hoisted_6)])) : createCommentVNode("", true)])])], 8, _hoisted_1); 147 }; 148 } 149}); 150//#endregion 151//#region resources/js/Pages/Consumer/components/cms/blocks/LinksColumnBlock.vue 152var LinksColumnBlock_exports = /* @__PURE__ */ __exportAll({ default: () => LinksColumnBlock_default }); 153var LinksColumnBlock_default = /*#__PURE__*/ _plugin_vue_export_helper_default(LinksColumnBlock_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-12b8a487"]]); 154//#endregion 155export { LinksColumnBlock_exports as n, LinksColumnBlock_default as t };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.