PageSourceSearch

https://www.washingtonoperatheatre.com/wp-content/plugins/bookingc…/assets/js/bos_main.js?ver=6.2.9

js washingtonoperatheatre.com collected 2026-10-08 13:55:51 UTC 5,864 bytes, 165 lines download raw bytes

1(function(c, a) {
2    var b = {};
3    b.name = "Strategic Partnerships namespace";
4    b.gElm = function(d) {
5        return (d) ? c.getElementById(d) : false;
6    };
7    b.gSelA = function(d) {
8        return (d) ? c.querySelectorAll(d) : false;
9    };
10    b.gSel = function(d) {
11        return (d) ? c.querySelector(d) : false;
12    };
13    b.example = {
14        calendarStyling: function() {
15            var f = b.gSel,
16                h = b.gSelA,
17                d = b.gElm,
18                calSelBg = f('.bos-calendar__date--b_calSelected'),
19                calSelTxt = f('.bos-calendar__date--b_calSelected a'),
20                calDayNms = h('.bos_calendar_day-name');
21
22                calDayNms.forEach(function(elm) {
23                    elm.style.color = d('calendar_daynames_color').value;
24                });
25                calSelBg.style.background = d('calendar_selected_bgcolor').value;
26                calSelTxt.style.color = d('calendar_selected_textcolor').value;
27        }
28    };
29
30    b.starting = {
31        defaultSettings: function() {
32            var d = b.gElm,
33                f = b.gSelA,
34                sb_width = d('flexi_searchbox'),
35                date_text = f('.bos-date-field__display'),
36                date_wrapper = f('.bos-dates__col');
37            if (sb_width && sb_width.offsetWidth < 280) {
38
39                date_text.forEach(function(elm) {
40                    elm.style.fontSize = '12px';
41                });
42            };
43            if (sb_width && sb_width.offsetWidth < 260) {
44                sb_width.classList.add('smaller');
45                date_wrapper.forEach((elm, index) => {
46                    elm.style.width = '100%';
47                    if (index == 0) {
48                        elm.style.marginBottom = '10px';
49                    }
50                });
51            }
52        }
53    };
54
55    b.validation = {
56        validSearch: function() {
57            var idf = jQuery('#b_idf:checked').val();
58            //alert(idf);
59            if (idf != 'on') { // check if idf checkbox is checked and exclude date validation
60                if (!this.checkDestination() || !this.checkDates()) {
61                    return false;
62                }
63            }
64        },
65        checkDestination: function() {
66            var d = b.gElm("b_destination").value || "";
67            if (d) {
68                return true;
69            }
70            this.showFormError(b.vars.errors.destinationErrorMsg,
71                "searchBox_error_msg");
72            return false;
73        },
74        checkDates: function() {
75            var j = b.gElm,
76                // k = parseInt(j("checkin").value),
77                f = j("checkin").value,
78                p = f.split(/-/),
79                g = new Date(p[0], p[1] - 1, p[2]),
80                // h = parseInt(j("b_checkout_day").value),
81                l = j("checkout").value,
82                i = l.split(/-/),
83                n = new Date(i[0], i[1] - 1, i[2]),
84                o = b.vars.gen.b_todays_date.split(/-/),
85                m = j("b_checkin_input") || false,
86                d = m && m.offsetWidth ? true : false;
87            textCheckOut = j("b_checkout_input") || false;
88            textCheckOutShown = m && m.offsetWidth ? true : false;
89            if (parseInt(i[1]) === parseInt(o[1]) && k < parseInt(o[2])) {
90                this.showFormError(b.vars.errors.dateInThePast,
91                    "searchBox_dates_error_msg");
92                return false;
93            }
94            if (n.getTime() <= g.getTime()) {
95                this.showFormError(b.vars.errors.cObeforeCI, "searchBox_dates_error_msg");
96                return false;
97            }
98            if ((n - g) / (1000 * 60 * 60 * 24) > 30) {
99                this.showFormError(b.vars.errors.tooManyDays,
100                    "searchBox_dates_error_msg");
101                return false;
102            }
103            return true;
104        },
105        showFormError: function(f, d) {
106            if (!f || !d) {
107                return false;
108            }
109            var e = c.getElementById(d),
110                g = function() {
111                    jQuery(e).fadeOut("default");
112                };
113            e.innerHTML = f;
114            e.style.cursor = "pointer";
115            jQuery(e).fadeIn("default", function() {
116                var h = this;
117                if (h.addEventListener) {
118                    h.addEventListener("click", g, false);
119                }
120                if (h.attachEvent) {
121                    h.attachEvent("onclick", g);
122                }
123                setTimeout(g, 5000);
124            });
125        }
126    };
127    a.sp = b;
128    a.e = b.gElm;
129})(document, window);
130
131(function($) {
132    $(function() {
133        sp.starting.defaultSettings();
134
135        $(document).on('click', '#b_searchCheckInDate, #b_searchCheckOutDate', function() {
136            var $datesVar = $(this).data('dates');
137            showCalendar('b_calendarPopup', $datesVar, 'b_frm');
138        });
139
140        $(document).on('click', '#b_dest_unlocker', function(event){       
141            event.preventDefault();
142            $("#b_dest_type, #b_dest_id, #b_open_search").remove(); 
143            $("#b_destination").removeAttr("readonly");
144            $("#b_destination").val('');
145            $("#b_destination").attr("placeholder", objectL10n.placeholder);
146            $("#b_dest_unlocker").remove();
147            // $("#b_destination").css({
148            //     "background": "#FFFFFF",
149            //     "color": "#003580"
150            // });
151            
152        });
153
154        $(document).on('hover', '#b_dest_unlocker', function(event){  
155        //$("#b_dest_unlocker").hover(function() {
156            $("#b_open_search").toggle();
157        });
158
159        $("#bos_info_displayer").click(function(event) {
160            event.preventDefault();
161            $("#bos_info_box").toggle();
162        });
163
164    });
165})(jQuery);

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.