PageSourceSearch

https://gcfct.org/public/js/sub.js

js gcfct.org collected 2026-10-07 16:19:37 UTC 29,999 bytes, 868 lines download raw bytes

1// // 디바운스 함수 정의
2// function debounce(func, delay) {
3//   let timer;
4
5//   return function () {
6//     const context = this;
7//     const args = arguments;
8
9//     clearTimeout(timer);
10//     timer = setTimeout(() => {
11//       func.apply(context, args);
12//     }, delay);
13//   };
14// }
15
16const lnb = () => {
17    const menu = $(".contents-navigation-menu-title");
18
19    menu.on("click", function (e) {
20        const $this = $(this);
21
22        if ($this.next().length) {
23            e.preventDefault();
24
25            $this
26                .toggleClass("active")
27                .next()
28                .slideToggle()
29                .parent()
30                .siblings()
31                .find(".contents-navigation-menu-title")
32                .removeClass("active")
33                .next()
34                .hide();
35        }
36    });
37    menu.each(function () {
38        if ($(this).hasClass("on")) {
39            $(this).trigger("click");
40        }
41    });
42
43    // gsap.registerPlugin(ScrollTrigger);
44    // const reservationArea = document.querySelector('.contents');
45    // const formArea = document.querySelector('.contents-information');
46    // const reportArea = document.querySelector('.contents-navigation');
47
48    // const headerHeight = document.querySelector('.header').offsetHeight;
49    // const headerElementSpacing = headerHeight + parseInt(getComputedStyle(reservationArea).paddingTop.replace('px', ''));
50
51    // ScrollTrigger.matchMedia({
52    // 	"(min-width: 1024px)": function() {
53    // 		ScrollTrigger.create({
54    // 			trigger : reportArea,
55    // 			endTrigger : formArea,
56    // 			start : `top-=${headerElementSpacing} `,
57    // 			end : `bottom-=${reportArea.offsetHeight} top+=${headerElementSpacing}`,
58    // 			pin : true,
59    // 			pinSpacing : false,
60    // 			markers : false,
61    // 			onEnter : () => {
62    // 				ScrollTrigger.refresh();
63    // 			},
64    // 			onEnterBack : () => {
65    // 				ScrollTrigger.refresh();
66    // 			}
67    // 		})
68
69    // 		$('.contents-navigation-menu-title').on('click', function(){
70    // 			setTimeout(()=> {ScrollTrigger.refresh();},100)
71    // 		})
72    // 	},
73    // })
74};
75
76const tab = () => {
77    const tabContainer = $(".mxds-tab");
78
79    if (tabContainer.length) {
80        tabContainer.each(function () {
81            const $this = $(this);
82            const listContainer = $this.find("ul");
83            const responsiveType = $this.filter("[data-mxds-type]");
84            const responsiveWidth = $(this).data("mxds-responsive");
85            const responsiveActiveMenu = listContainer.find(".on");
86            const scrWIdth = listContainer[0].scrollWidth;
87
88            listContainer.scrollLeft(
89                responsiveActiveMenu.parent().position().left
90            );
91
92            const responsiveTab = () => {
93                if (
94                    scrWIdth - 1 > $this.width() &&
95                    responsiveActiveMenu.length > 0
96                ) {
97                    // $this.addClass("mxds-tab-responsive-scroll");
98                } else {
99                    // $this.removeClass("mxds-tab-responsive-scroll");
100                    listContainer.scrollLeft(0);
101                }
102
103                if (responsiveType.length) {
104                    if ($(window).width() < responsiveWidth) {
105                        const appendToggleButton = responsiveActiveMenu.clone();
106                        const appendToggleButtonElement = $this.find("> a");
107                        const button = $(".mxds-tab > ul > li > a");
108
109                        // $this.removeClass("mxds-tab-responsive-scroll");
110                        $this.addClass("mxds-tab-responsive-default");
111
112                        if (appendToggleButtonElement.length == 0) {
113                            $this.prepend(appendToggleButton);
114
115                            $this.find("> a").on("click", function (e) {
116                                e.preventDefault();
117
118                                $this.toggleClass("active");
119                            });
120
121                            button.on("click", function (e) {
122                                e.preventDefault();
123
124                                const txt = $(this).html();
125                                $this.find("> a").html(txt);
126                            });
127
128                            $this
129                                .find("ul > li > a")
130                                .off("click")
131                                .on("click", function (e) {
132                                    const href = $(this).attr("href");
133
134                                    if (href && href.startsWith("#")) {
135                                        // 내부 탭 전환 로직
136                                        e.preventDefault();
137                                    } else {
138                                        // 링크는 정상 이동
139                                        $this.removeClass("active");
140                                    }
141                                });
142                        }
143
144                        $(document).on("click", function (event) {
145                            if (!$(event.target).closest(".mxds-tab").length) {
146                                $(".mxds-tab").removeClass("active");
147                            }
148                        });
149                    } else {
150                        $this.removeClass("mxds-tab-responsive-default");
151                        $this.find("> a").remove();
152                    }
153                }
154            };
155
156            responsiveTab();
157
158            $(window).resize(function () {
159                responsiveTab();
160            });
161        });
162    }
163
164    const innerTab = () => {
165        const $tab = $(".mxds-tab a");
166        const $item = $(".contents-box");
167
168        // $item.children().eq(0).show();
169
170        $tab.on("click", function (e) {
171            // e.preventDefault();
172
173            const $this = $(this);
174            const target = $this.attr("href");
175
176            // $this
177            //     .addClass("on")
178            //     .parent()
179            //     .siblings()
180            //     .children()
181            //     .removeClass("on");
182            // $(${target}).show().siblings().hide();
183
184            if (target.startsWith("#")) {
185                e.preventDefault();
186
187                $this
188                    .addClass("on")
189                    .parent()
190                    .siblings()
191                    .children()
192                    .removeClass("on");
193                $(`${target}`).show().siblings().hide();
194            }
195        });
196    };
197
198    innerTab();
199
200    $(window).on("resize", function () {
201        innerTab();
202    });
203};
204
205const copyURL = () => {
206    $(".contents-util-btn-share").on("click", function (e) {
207        e.preventDefault();
208
209        $(this).find("i").toggleClass("ri-close-fill");
210
211        $(this).next().toggle();
212    });
213
214    $("a[data-toggle='sns_share']").on("click", function (e) {
215        e.preventDefault();
216
217        const $this = $(this),
218            sns_type = $this.attr("data-service"),
219            current_url = window.location.href,
220            href = current_url,
221            title = $this.attr("data-title"),
222            loc = "",
223            img = $("meta[name='og:image']").attr("content");
224
225        if (!sns_type || !href || !title) return;
226
227        if (sns_type == "facebook") {
228            loc =
229                "//www.facebook.com/sharer/sharer.php?u=" +
230                href +
231                "&t=" +
232                title;
233        } else if (sns_type == "twitter") {
234            loc =
235                "//twitter.com/home?status=" +
236                encodeURIComponent(title) +
237                " " +
238                href;
239        } else if (sns_type == "google") {
240            loc = "//plus.google.com/share?url=" + href;
241        } else if (sns_type == "pinterest") {
242            loc =
243                "//www.pinterest.com/pin/create/button/?url=" +
244                href +
245                "&media=" +
246                img +
247                "&description=" +
248                encodeURIComponent(title);
249        } else if (sns_type == "kakaostory") {
250            loc =
251                "https://story.kakao.com/share?url=" + encodeURIComponent(href);
252        } else if (sns_type == "band") {
253            loc =
254                "http://www.band.us/plugin/share?body=" +
255                encodeURIComponent(title) +
256                "%0A" +
257                encodeURIComponent(href);
258        } else if (sns_type == "naver") {
259            loc =
260                "http://share.naver.com/web/shareView.nhn?url=" +
261                encodeURIComponent(href) +
262                "&title=" +
263                encodeURIComponent(title);
264        } else {
265            return false;
266        }
267
268        window.open(loc, "pop", "width=600, height=600,scrollbars=yes");
269
270        return false;
271    });
272
273    function clip() {
274        let url = "";
275        let textarea = document.createElement("textarea");
276
277        document.body.appendChild(textarea);
278        url = window.document.location.href;
279        textarea.value = url;
280        textarea.select();
281        document.execCommand("copy");
282        document.body.removeChild(textarea);
283        alert("주소가 복사되었습니다.");
284    }
285
286    $(".copy").on("click", function (e) {
287        e.preventDefault();
288
289        clip();
290    });
291};
292
293// 3depth snb
294const snb = () => {
295    const snbWrap = $("#snb");
296    const snbList = snbWrap.find(".snb-navi");
297    const snbMobile = snbWrap.find(".snb-navi-mobile");
298
299    snbList.each(function () {
300        const snbItem = $(this).find(">.depth03");
301        const snbActive = $(this).find(".active").text();
302        const snbItemLength = snbItem.length;
303
304        if (snbItemLength < 10) {
305            $(this).addClass("snb-navi-length-0" + snbItemLength);
306        } else {
307            $(this).addClass("snb-navi-length-" + snbItemLength);
308        }
309        if (snbItemLength === 0) {
310            snbWrap.remove();
311        }
312
313        snbMobile.find(".snb-navi-mobile-active").text(snbActive);
314    });
315
316    snbMobile.click(function () {
317        if (!snbMobile.hasClass("active")) {
318            snbMobile
319                .addClass("active")
320                .find("i")
321                .removeClass()
322                .addClass("ri-arrow-up-s-line");
323            snbList.slideDown();
324        } else {
325            snbMobile
326                .removeClass("active")
327                .find("i")
328                .removeClass()
329                .addClass("ri-arrow-down-s-line");
330            snbList.slideUp();
331        }
332
333        return false;
334    });
335};
336
337// 계룡시문화관광재단 > 조직도
338const organization = () => {
339    const $btn = $(".organization-item a, .organization-caption a");
340    $(".staff").children().eq(0).show(); // 첫 번째 항목을 보여주기
341
342    $btn.on("click", function (event) {
343        event.preventDefault(); // 기본 이벤트 방지
344        const $this = $(this);
345        const $target = $($this.attr("href"));
346
347        $("html, body").stop(true); // 이전 스크롤 애니메이션 중지
348
349        // 헤더 높이를 동적으로 계산
350        const headerHeight = $("header").outerHeight() + 30;
351
352        // 대상 요소를 보여주고 형제 요소들은 숨김
353        $target.show().siblings().hide();
354
355        // 스크롤 애니메이션 적용
356        $("html, body")
357            .stop()
358            .animate(
359                {
360                    scrollTop: $target.offset().top - headerHeight,
361                },
362                500
363            );
364    });
365};
366
367// 계룡시문화관광재단 > 상징물
368const symbol = () => {
369    const symbolSlider = new Swiper(".symbol .symbol-slider-swiper", {
370        slidesPerView: 1,
371        spaceBetween: 30,
372        loop: true,
373        navigation: {
374            nextEl: ".symbol-slider-controller-next",
375            prevEl: ".symbol-slider-controller-prev",
376        },
377        breakpoints: {
378            1279: {
379                slidesPerView: 3,
380                spaceBetween: 30,
381            },
382            640: {
383                slidesPerView: 2,
384                spaceBetween: 30,
385            },
386            460: {
387                slidesPerView: 1,
388                spaceBetween: 30,
389            },
390        },
391    });
392};
393
394// 계룡시문화관광재단 > 밀리터리 아카데미 > 프로그램 소개
395const militarySlider = () => {
396    const ms = new Swiper(".military .military-slider-swiper", {
397        slidesPerView: 1,
398        spaceBetween: 32,
399        loop: true,
400        navigation: {
401            nextEl: ".military-slider-controller-next",
402            prevEl: ".military-slider-controller-prev",
403        },
404        breakpoints: {
405            1279: {
406                slidesPerView: 3,
407                spaceBetween: 32,
408            },
409            640: {
410                slidesPerView: 2,
411                spaceBetween: 32,
412            },
413            460: {
414                slidesPerView: 1,
415                spaceBetween: 32,
416            },
417        },
418    });
419};
420
421// 계룡군축제 > 행사 일정표
422const timetable = () => {
423    var $titleElement = $(".event-timetable-table .timetable__title");
424
425    // 텍스트의 줄 수 계산
426    var lineHeight = parseFloat($titleElement.css("line-height"));
427    var lines = $titleElement.innerHeight() / lineHeight;
428
429    // 한 줄인 경우에만 line-height를 적용
430    if (lines <= 1) {
431        $titleElement.css("line-height", $titleElement.css("height"));
432    }
433};
434
435// 계룡군축제 > 행사 내용
436const initializeEventSliders = () => {
437    const listItemElements = document.querySelectorAll(
438        ".event-content-list > li"
439    );
440
441    listItemElements.forEach((listItem, index) => {
442        listItem.classList.add(`item-${index}`);
443
444        new Swiper(
445            `.event-content .item-${index}
445 .event-content-slider-swiper`,
446            {
447                spaceBetween: 10,
448                slidesPerView: 1,
449                navigation: {
450                    nextEl: `.event-content .item-${index} .event-content-slider-next`,
451                    prevEl: `.event-content .item-${index} .event-content-slider-prev`,
452                },
453                pagination: {
454                    el: `.event-content .item-${index} .event-content-slider-pagination`,
455                    type: "custom",
456                    renderCustom: (swiper, current, total) =>
457                        `<strong>${current}</strong><span>/&nbsp;${total}</span>`,
458                    clickable: true,
459                },
460            }
461        );
462    });
463};
464
465// 신청 내역 확인 아코디언
466const programAccordion = () => {
467    const title = $(".program-check-list-title");
468
469    title.on("click", function (e) {
470        const $this = $(this);
471
472        if ($this.next().length) {
473            e.preventDefault();
474
475            $this.toggleClass("active").next().slideToggle(500);
476        }
477    });
478};
479
480// 우리가족 軍문화 캠프 > 캠프 신청
481const settingProgram = () => {
482    const peopleBox = $(".people-add .border-container");
483    const $btn = $(".people-add-button");
484    const $delete = $(".board-write-delete .btn-delete");
485    let maxItems = 4;
486
487    $btn.on("click", function () {
488        const itemCount = $(".people-add-item").length;
489
490        if (itemCount < maxItems) {
491            const newItem = $(".people-add-item").first().clone();
492
493            newItem.find(".index").text(itemCount + 1);
494            let new_checkbox = newItem.find('input[type="checkbox"]');
495            let new_label = newItem.find(
496                'label[for="' + new_checkbox.attr("id") + '"]'
497            );
498
499            new_checkbox.attr("id", new_checkbox.attr("id") + (itemCount + 1));
500            new_label.attr("for", new_checkbox.attr("id"));
501            new_checkbox.prop("checked", false);
502
503            newItem.find("input").val("");
504
505            peopleBox.append(newItem);
506        } else {
507            const toast = new Toast();
508
509            toast._toast({
510                type: "error",
511                title: "더 이상 추가할 수 없습니다.",
512                position: "center center",
513            });
514        }
515    });
516
517    const updateIndexes = () => {
518        $(".people-add-item").each(function (index) {
519            const newIndex = index + 1;
520
521            $(this).find(".index").text(newIndex);
522            $(this)
523                .removeClass()
524                .addClass("people-add-item item" + newIndex);
525        });
526    };
527
528    // document 수준에서 이벤트 핸들러를 설정하는 이유
529    // 동적으로 생성되는 요소에 대한 이벤트 처리: document 수준에서 이벤트를 처리하면 해당 이벤트 핸들러는 문서 내에 동적으로 생성된 요소에 대해서도 동작함.
530    //  반면에 일반적인 방식으로 요소에 직접 이벤트 핸들러를 할당하면 동적으로 생성된 요소에는 동작하지 않을 수 있음
531    // 이벤트 위임(Event delegation): document 수준에서 이벤트를 처리하면 이벤트 위임을 통해 처리되므로,
532    // 요소마다 이벤트 핸들러를 별도로 설정할 필요가 없습니다. 이는 코드의 유지보수성을 향상시키고 메모리 사용을 줄일 수 있음
533    $(document).on("click", ".board-write-delete .btn-delete", function () {
534        const item = $(this).closest(".people-add-item");
535        const itemCount = $(".people-add-item").length;
536
537        if (itemCount > 1) {
538            item.remove();
539            updateIndexes();
540        } else {
541            const toast = new Toast();
542
543            toast._toast({
544                type: "error",
545                title: "한 명 이상의 추가인원이 필요합니다.",
546                position: "center center",
547            });
548        }
549    });
550};
551
552const privacy = () => {
553    const $privacyLink = $("a[href*='#privacy__item']");
554    $privacyLink.on("click", function () {
555        const $privacyHref = $(this).attr("href"),
556            $privacyTarget = $(".privacy__item").filter($privacyHref);
557        let $pageTopPosition = $("header").height() + 30;
558        let $pageTopMove = $privacyTarget.offset().top - $pageTopPosition;
559        $("html, body").animate(
560            {
561                scrollTop: $pageTopMove,
562            },
563            750
564        );
565        $(window).trigger("scroll");
566        return false;
567    });
568};
569
570$(function () {
571    // play
572    // subVisualNavigation();
573    // kakao_maps('#btn1');
574    lnb();
575    tab();
576    copyURL();
577    organization();
578    symbol();
579    militarySlider();
580    // destination();
581    initializeEventSliders();
582    programAccordion();
583    settingProgram();
584    timetable();
585    privacy();
586
587    // 카카오맵
588    // $('.destination .contents-tab .mxds-tab ul li a').on('click', function (obj) {
589    //   kakao_maps($(this).attr('href'));
590    // });
591});
592
593document.addEventListener("DOMContentLoaded", function () {
594    initMaps("#btn1"); // 초기 지도 로드
595    initDestination(); // 초기 슬라이더 설정
596    setupTabSwitching(); // 탭 전환 설정
597});
598
599function initDestination() {
600    // 슬라이더 초기화
601    initSliders();
602}
603
604function initSliders() {
605    document
606        .querySelectorAll(".destination .contents-item")
607        .forEach(function (item, index) {
608            const sliders = item.querySelectorAll(
609                ".destination-slider-container"
610            );
611
612            // 썸네일과 메인 슬라이더 초기화
613            sliders.forEach(function (slider, index) {
614                const thumbSlider = new Swiper(
615                    slider.querySelector(".destination-slider-swiper2"),
616                    {
617                        spaceBetween: 8,
618                        slidesPerView: 2,
619                        freeMode: true,
620                        watchSlidesProgress: true,
621                        preloadImages: true,
622                        updateOnImagesReady: true,
623                        resizeObserver: true,
624                        breakpoints: {
625                            379: {
626                                slidesPerView: 2,
627                                spaceBetween: 8,
628                            },
629                            459: {
630                                slidesPerView: 4,
631                                spaceBetween: 8,
632                            },
633                            767: {
634                                slidesPerView: 6,
635                                spaceBetween: 8,
636                            },
637                            1279: {
638                                slidesPerView: 8,
639                                spaceBetween: 8,
640                            },
641                        },
642                    }
643                );
644
645                const mainSlider = new Swiper(
646                    slider.querySelector(".destination-slider-swiper"),
647                    {
648                        slidesPerView: 1,
649                        spaceBetween: 10,
650                        pagination: {
651                            el: slider.querySelector(
652                                ".destination-slider-pagination-box"
653                            ),
654                            type: "custom",
655                            renderCustom: function (swiper, current, total) {
656                                return (
657                                    `<span>${current}&nbsp;</span>` +
658                                    `<span>/&nbsp;${total}</span>`
659                                );
660                            },
661
662                            clickable: true,
663                        },
664                        navigation: {
665                            nextEl: slider.querySelector(
666                                ".destination-slider-thumbs-next"
667                            ),
668                            prevEl: slider.querySelector(
669                                ".destination-slider-thumbs-prev"
670                            ),
671                        },
672                        thumbs: {
673                            swiper: thumbSlider,
674                        },
675                    }
676                );
677
678                if (index === 0) {
679                    slider.classList.add("active");
680                } else {
681                    slider.classList.remove("active");
682                }
683            });
684
685            // 제목 슬라이더 초기화
686            let titleSlider = new Swiper(
687                item.querySelector(".destination-slider-title-swiper"),
688                {
689                    slidesPerView: 1,
690                    centeredSlides: true,
691                    observer: true,
692                    observeParents: true,
693                    navigation: {
694                        nextEl: item.querySelector(
695                            ".destination-slider-title-next"
696                        ),
697                        prevEl: item.querySelector(
698                            ".destination-slider-title-prev"
699                        ),
700                    },
701                    on: {
702                        init: function () {
703                            const activeSlide = item.querySelector(
704                                ".swiper-slide-active"
705                            );
706                            if (activeSlide) {
707                                const tabId =
708                                    activeSlide.getAttribute("data-tab");
709                                initMaps(tabId);
710                            }
711                        },
712                        slideChange: function () {
713                            const currentIndex = this.realIndex;
714                            item.querySelectorAll(
715                                ".destination-slider-container"
716                            ).forEach(function (container, idx) {
717                                container.classList.toggle(
718                                    "active",
719                                    idx === currentIndex
720                                );
721                            });
722                            const activeSlide = item.querySelector(
723                                ".swiper-slide-active"
724                            );
725                            const tabId = activeSlide.getAttribute("data-tab");
726                            initMaps(tabId);
727                        },
728                    },
729                }
730            );
731
732            item.querySelectorAll(
733                ".destination-slider-title-swiper .swiper-slide"
734            ).forEach(function (slide) {
735                slide.addEventListener("click", function (event) {
736                    event.preventDefault();
737                    item.querySelectorAll(".swiper-slide").forEach((s) =>
738                        s.classList.remove("swiper-slide-active")
739                    );
740                    slide.classList.add("swiper-slide-active");
741                    titleSlider.slideTo(
742                        Array.from(slide.parentNode.children).indexOf(slide),
743                        300
744                    );
745                });
746            });
747        });
748}
749
750function setupTabSwitching() {
751    // 탭 전환 처리
752    document
753        .querySelectorAll(".destination .contents-tab .mxds-tab ul li a")
754        .forEach((tab) => {
755            tab.addEventListener("click", function (event) {
756                event.preventDefault();
757                const targetId = this.getAttribute("href");
758                activateTab(targetId);
759                initMaps(targetId);
760            });
761        });
762}
763
764function activateTab(targetId) {
765    // 탭 활성화
766    const tabs = document.querySelectorAll(".destination .contents-item");
767    tabs.forEach((tab) => tab.classList.remove("active"));
768    document.querySelector(targetId).classList.add("active");
769    initSliders(); // 활성화될 때마다 슬라이더를 재초기화
770}
771
772function initMaps(selector) {
773    const tabInfo = {
774        "#btn1": {
775            tab1: {
776                timestamp: "1711593044263",
777                key: "2ippe",
778                containerId: "daumRoughmapContainer1711593044263",
779            },
780            tab2: {
781                timestamp: "1711593089308",
782                key: "2ippf",
783                containerId: "daumRoughmapContainer1711593089308",
784            },
785            tab3: {
786                timestamp: "1711593129788",
787                key: "2ipph",
788                containerId: "daumRoughmapContainer1711593129788",
789            },
790            tab4: {
791                timestamp: "1711593164655",
792                key: "2ippi",
793                containerId: "daumRoughmapContainer1711593164655",
794            },
795        },
796        "#btn2": {
797            tab5: {
798                timestamp: "1711593210362",
799                key: "2ippj",
800                containerId: "daumRoughmapContainer1711593210362",
801            },
802            tab6: {
803                timestamp: "1711593244770",
804                key: "2ippk",
805                containerId: "daumRoughmapContainer1711593244770",
806            },
807            tab7: {
808                timestamp: "1711593273562",
809                key: "2ippm",
810                containerId: "daumRoughmapContainer1711593273562",
811            },
812        },
813    };
814
815    if (selector.startsWith("#")) {
816        // Initialize all maps within a selected tab
817        const tabMaps = tabInfo[selector];
818        for (const key in tabMaps) {
819            const map = tabMaps[key];
820            const container = document.getElementById(map.containerId);
821            if (container && !container.classList.contains("map-initialized")) {
822                initializeKakaoMap(container, map.timestamp, map.key);
823                container.classList.add("map-initialized");
824            }
825        }
826    } else {
827        // Initialize a single map if a specific map ID is passed
828        const mapEntry = Object.values(tabInfo)
829            .flatMap((obj) => Object.values(obj))
830            .find((map) => map.containerId === selector);
831        if (mapEntry) {
832            const container = document.getElementById(mapEntry.containerId);
833            if (container && !container.classList.contains("map-initialized")) {
834                initializeKakaoMap(container, mapEntry.timestamp, mapEntry.key);
835                container.classList.add("map-initialized");
836            }
837        }
838    }
839}
840
841function initializeKakaoMap(container, timestamp, key) {
842    // 카카오맵 초기화
843    if (window.daum && window.daum.roughmap) {
844        new daum.roughmap.Lander({
845            timestamp: timestamp,
846            key: key,
847            mapWidth: "100%",
848            mapHeight: "100%", // 화면 크기에 맞게 조정
849        }).render();
850
851        $(window).on("load resize", function () {
852            // 리사이즈가 끝난 시점 이벤트 발생
853            clearTimeout(window.resizeTimeout);
854            window.resizeTimeout = setTimeout(function () {
855                $(".btn_zoom_reset").trigger("click");
856            }, 50);
857        });
858    } else {
859        console.error("Kakao Map script not loaded");
860    }
861}
862
863function loadScript(src, callback) {
864    let script = document.createElement("script");
865    script.onload = callback;
866    script.src = src;
867    document.head.appendChild(script);
868}

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.