PageSourceSearch

https://portal.amilfreight.com/Scripts/Plugins/Datepicker/datepicker_format.min.js?v=29343

js amilfreight.com collected 2026-09-24 11:05:00 UTC 30,134 bytes, 684 lines download raw bytes

1!function (e) {
2    var t = function (t, i) {
3        if (this.element = e(t),
4            this.format = a.parseFormat(i.format || this.element.data("date-format") || "mm/dd/yyyy"),
5            this.picker = e(a.template).appendTo("body").on({
6                click: e.proxy(this.click, this)
7            }),
8            this.isInput = this.element.is("input"),
9            this.component = !!this.element.is(".date") && this.element.find(".add-on"),
10            this.isInput ? this.element.on({
11                focus: e.proxy(this.show, this),
12                keyup: e.proxy(this.update, this)
13            }) : this.component ? this.component.on("click", e.proxy(this.show, this)) : this.element.on("click", e.proxy(this.show, this)),
14            this.minViewMode = i.minViewMode || this.element.data("date-minviewmode") || 0,
15            "string" == typeof this.minViewMode)
16            switch (this.minViewMode) {
17                case "months":
18                    this.minViewMode = 1;
19                    break;
20                case "years":
21                    this.minViewMode = 2;
22                    break;
23                default:
24                    this.minViewMode = 0
25            }
26        if (this.viewMode = i.viewMode || this.element.data("date-viewmode") || 0,
27            "string" == typeof this.viewMode)
28            switch (this.viewMode) {
29                case "months":
30                    this.viewMode = 1;
31                    break;
32                case "years":
33                    this.viewMode = 2;
34                    break;
35                default:
36                    this.viewMode = 0
37            }
38        ; this.startViewMode = this.viewMode,
39            this.weekStart = i.weekStart || this.element.data("date-weekstart") || 0,
40            this.weekEnd = 0 === this.weekStart ? 6 : this.weekStart - 1,
41            this.onRender = i.onRender,
42            this.fillDow(),
43            this.fillMonths(),
44            this.update(),
45            this.showMode()
46    };
47    t.prototype = {
48        constructor: t,
49        show: function (t) {
50            this.picker.show(),
51                this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(),
52                this.place(),
53                e(window).on("resize", e.proxy(this.place, this)),
54                t && (t.stopPropagation(),
55                    t.preventDefault()),
56                this.isInput;
57            var a = this;
58            e(document).on("mousedown", function (t) {
59                0 == e(t.target).closest(".datepicker").length && a.hide()
60            }),
61                this.element.trigger({
62                    type: "show",
63                    date: this.date
64                })
65        },
66        hide: function () {
67            this.picker.hide(),
68                e(window).off("resize", this.place),
69                this.viewMode = this.startViewMode,
70                this.showMode(),
71                this.isInput || e(document).off("mousedown", this.hide),
72                this.element.trigger({
73                    type: "hide",
74                    date: this.date
75                })
76        },
77        set: function () {
78            var e = a.formatDate(this.date, this.format);
79            this.isInput ? this.element.prop("value", e) : (this.component && this.element.find("input").prop("value", e),
80                this.element.data("date", e))
81        },
82        setValue: function (e) {
83            this.date = "string" == typeof e ? a.parseDate(e, this.format) : new Date(e),
84                this.set(),
85                this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0),
86                this.fill()
87        },
88        place: function () {
89            var e = this.component ? this.component.offset() : this.element.offset();
90            this.picker.css({
91                top: e.top + this.height,
92                left: e.left
93            })
94        },
95        update: function (e) {
96            this.date = a.parseDate("string" == typeof e ? e : this.isInput ? this.element.prop("value") : this.element.data("date"), this.format),
97                this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0),
98                this.fill()
99        },
100        fillDow: function () {
101            for (var e = this.weekStart, t = "<tr>"; e < this.weekStart + 7;)
102                t += '<th class="dow">' + a.dates.daysMin[e++ % 7] + "</th>";
103            t += "</tr>",
104                this.picker.find(".datepicker-days thead").append(t)
105        },
106        fillMonths: function () {
107            for (var e = "", t = 0; t < 12;)
108                e += '<span class="month">' + a.dates.monthsShort[t++] + "</span>";
109            this.picker.find(".datepicker-months td").append(e)
110        },
111        fill: function () {
112            var e = new Date(this.viewDate)
113                , t = e.getFullYear()
114                , i = e.getMonth()
115                , s = this.date.valueOf();
116            this.picker.find(".datepicker-days th:eq(1)").text(a.dates.months[i] + " " + t);
117            var n = new Date(t, i - 1, 28, 0, 0, 0, 0)
118                , r = a.getDaysInMonth(n.getFullYear(), n.getMonth());
119            n.setDate(r),
120                n.setDate(r - (n.getDay() - this.weekStart + 7) % 7);
121            var o = new Date(n);
122            o.setDate(o.getDate() + 42),
123                o = o.valueOf();
124            for (var d, h, l, m = []; n.valueOf() < o;)
125                n.getDay() === this.weekStart && m.push("<tr>"),
126                    d = this.onRender(n),
127                    h = n.getFullYear(),
128                    (l = n.getMonth()) < i && h === t || h < t ? d += " old" : (l > i && h === t || h > t) && (d += " new"),
129                    n.valueOf() === s && (d += " active"),
130                    m.push('<td class="day ' + d + '">' + n.getDate() + "</td>"),
131                    n.getDay() === this.weekEnd && m.push("</tr>"),
132                    n.setDate(n.getDate() + 1);
133            this.picker.find(".datepicker-days tbody").empty().append(m.join(""));
134            var u = this.date.getFullYear()
135                , c = this.picker.find(".datepicker-months").find("th:eq(1)").text(t).end().find("span").removeClass("active");
136            u === t && c.eq(this.date.getMonth()).addClass("active"),
137                m = "",
138                t = 10 * parseInt(t / 10, 10);
139            var f = this.picker.find(".datepicker-years").find("th:eq(1)").text(t + "-" + (t + 9)).end().find("td");
140            t -= 1;
141            for (var p = -1; p < 11; p++)
142                m += '<span class="year' + (-1 === p || 10 === p ? " old" : "") + (u === t ? " active" : "") + '">' + t + "</span>",
143                    t += 1;
144            f.html(m)
145        },
146        click: function (t) {
147            t.stopPropagation(),
148                t.preventDefault();
149            var i = e(t.target).closest("span, td, th");
150            if (1 === i.length)
151                switch (i[0].nodeName.toLowerCase()) {
152                    case "th":
153                        switch (i[0].className) {
154                            case "switch":
155                                this.showMode(1);
156                                break;
157                            case "prev":
158                            case "next":
159                                this.viewDate["set" + a.modes[this.viewMode].navFnc].call(this.viewDate, this.viewDate["get" + a.modes[this.viewMode].navFnc].call(this.viewDate) + a.modes[this.viewMode].navStep * ("prev" === i[0].className ? -1 : 1)),
160                                    this.fill(),
161                                    this.set()
162                        }
163                        break;
164                    case "span":
165                        if (i.is(".month")) {
166                            var s = i.parent().find("span").index(i);
167                            this.viewDate.setMonth(s)
168                        } else {
169                            var n = parseInt(i.text(), 10) || 0;
170                            this.viewDate.setFullYear(n)
171                        }
172                        0 !== this.viewMode && (this.date = new Date(this.viewDate),
173                            this.element.trigger({
174                                type: "changeDate",
175                                date: this.date,
176                                viewMode: a.modes[this.viewMode].clsName
177                            })),
178                            this.showMode(-1),
179                            this.fill(),
180                            this.set();
181                        break;
182                    case "td":
183                        if (i.is(".day") && !i.is(".disabled")) {
184                            var r = parseInt(i.text(), 10) || 1;
185                            s = this.viewDate.getMonth();
186                            i.is(".old") ? s -= 1 : i.is(".new") && (s += 1);
187                            n = this.viewDate.getFullYear();
188                            this.date = new Date(n, s, r, 0, 0, 0, 0),
189                                this.viewDate = new Date(n, s, Math.min(28, r), 0, 0, 0, 0),
190                                this.fill(),
191                                this.set(),
192                                this.element.trigger({
193                                    type: "changeDate",
194                                    date: this.date,
195                                    viewMode: a.modes[this.viewMode].clsName
196                                })
197                        }
198                }
199        },
200        mousedown: function (e) {
201            e.stopPropagation(),
202                e.preventDefault()
203        },
204        showMode: function (e) {
205            e && (this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + e))),
206                this.picker.find(">div").hide().filter(".datepicker-" + a.modes[this.viewMode].clsName).show()
207        }
208    },
209        e.fn.datepicker = function (a, i) {
210            return this.each(function () {
211                var s = e(this)
212                    , n = s.data("datepicker")
213                    , r = "object" == typeof a && a;
214                n || s.data("datepicker", n = new t(this, e.extend({}, e.fn.datepicker.defaults, r))),
215                    "string" == typeof a && n[a](i)
216            })
217        }
218        ,
219        e.fn.datepicker.defaults = {
220            onRender: function (e) {
221                return ""
222            }
223        },
224        e.fn.datepicker.Constructor = t;
225    var a = {
226        modes: [{
227            clsName: "days",
228            navFnc: "Month",
229            navStep: 1
230        }, {
231            clsName: "months",
232            navFnc: "FullYear",
233            navStep: 1
234        }, {
235            clsName: "years",
236            navFnc: "FullYear",
237            navStep: 10
238        }],
239        dates: {
240            days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
241            daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
242            daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
243            months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
243November", "December"],
244            monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
245        },
246        isLeapYear: function (e) {
247            return e % 4 == 0 && e % 100 != 0 || e % 400 == 0
248        },
249        getDaysInMonth: function (e, t) {
250            return [31, a.isLeapYear(e) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][t]
251        },
252        parseFormat: function (e) {
253            var t = e.match(/[.\/\-\s].*?/)
254                , a = e.split(/\W+/);
255            if (!t || !a || 0 === a.length)
256                throw new Error("Invalid date format.");
257            return {
258                separator: t,
259                parts: a
260            }
261        },
262        parseDate: function (e, t) {
263            var a, i = e.split(t.separator);
264            if ((e = new Date).setHours(0),
265                e.setMinutes(0),
266                e.setSeconds(0),
267                e.setMilliseconds(0),
268                i.length === t.parts.length) {
269                for (var s = e.getFullYear(), n = e.getDate(), r = e.getMonth(), o = 0, d = t.parts.length; o < d; o++)
270                    switch (a = parseInt(i[o], 10) || 1,
271                    t.parts[o]) {
272                        case "dd":
273                        case "d":
274                            n = a,
275                                e.setDate(a);
276                            break;
277                        case "mm":
278                        case "m":
279                            r = a - 1,
280                                e.setMonth(a - 1);
281                            break;
282                        case "yy":
283                            s = 2e3 + a,
284                                e.setFullYear(2e3 + a);
285                            break;
286                        case "yyyy":
287                            s = a,
288                                e.setFullYear(a)
289                    }
290                e = new Date(s, r, n, 0, 0, 0)
291            }
292            return e
293        },
294        formatDate: function (e, t) {
295            var a = {
296                d: e.getDate(),
297                m: e.getMonth() + 1,
298                yy: e.getFullYear().toString().substring(2),
299                yyyy: e.getFullYear()
300            };
301            a.dd = (a.d < 10 ? "0" : "") + a.d,
302                a.mm = (a.m < 10 ? "0" : "") + a.m;
303            e = [];
304            for (var i = 0, s = t.parts.length; i < s; i++)
305                e.push(a[t.parts[i]]);
306            return e.join(t.separator)
307        },
308        headTemplate: '<thead><tr><th class="prev">&lsaquo;</th><th colspan="5" class="switch"></th><th class="next">&rsaquo;</th></tr></thead>',
309        contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
310    };
311    a.template = '<div class="datepicker dropdown-menu"><div class="datepicker-days"><table class=" table-condensed">' + a.headTemplate + '<tbody></tbody></table></div><div class="datepicker-months"><table class="table-condensed">' + a.headTemplate + a.contTemplate + '</table></div><div class="datepicker-years"><table class="table-condensed">' + a.headTemplate + a.contTemplate + "</table></div></div>"
312}(window.jQuery);
313var dateFormat = function () {
314    var e = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g
315        , t = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g
316        , a = /[^-+\dA-Z]/g
317        , i = function (e, t) {
318            for (e = String(e),
319                t = t || 2; e.length < t;)
320                e = "0" + e;
321            return e
322        };
323    return function (s, n, r) {
324        var o = dateFormat;
325        if (1 != arguments.length || "[object String]" != Object.prototype.toString.call(s) || /\d/.test(s) || (n = s,
326            s = void 0),
327            s = s ? new Date(s) : new Date,
328            isNaN(s))
329            throw SyntaxError("invalid date");
330        "UTC:" == (n = String(o.masks[n] || n || o.masks.default)).slice(0, 4) && (n = n.slice(4),
331            r = !0);
332        var d = r ? "getUTC" : "get"
333            , h = s[d + "Date"]()
334            , l = s[d + "Day"]()
335            , m = s[d + "Month"]()
336            , u = s[d + "FullYear"]()
337            , c = s[d + "Hours"]()
338            , f = s[d + "Minutes"]()
339            , p = s[d + "Seconds"]()
340            , y = s[d + "Milliseconds"]()
341            , v = r ? 0 : s.getTimezoneOffset()
342            , g = {
343                d: h,
344                dd: i(h),
345                ddd: o.i18n.dayNames[l],
346                dddd: o.i18n.dayNames[l + 7],
347                m: m + 1,
348                mm: i(m + 1),
349                mmm: o.i18n.monthNames[m],
350                mmmm: o.i18n.monthNames[m + 12],
351                yy: String(u).slice(2),
352                yyyy: u,
353                h: c % 12 || 12,
354                hh: i(c % 12 || 12),
355                H: c,
356                HH: i(c),
357                M: f,
358                MM: i(f),
359                s: p,
360                ss: i(p),
361                l: i(y, 3),
362                L: i(y > 99 ? Math.round(y / 10) : y),
363                t: 12 > c ? "a" : "p",
364                tt: 12 > c ? "am" : "pm",
365                T: 12 > c ? "A" : "P",
366                TT: 12 > c ? "AM" : "PM",
367                Z: r ? "UTC" : (String(s).match(t) || [""]).pop().replace(a, ""),
368                o: (v > 0 ? "-" : "+") + i(100 * Math.floor(Math.abs(v) / 60) + Math.abs(v) % 60, 4),
369                S: ["th", "st", "nd", "rd"][h % 10 > 3 ? 0 : (h % 100 - h % 10 != 10) * h % 10]
370            };
371        return n.replace(e, function (e) {
372            return e in g ? g[e] : e.slice(1, e.length - 1)
373        })
374    }
375}();
376dateFormat.masks = {
377    default: "ddd mmm dd yyyy HH:MM:ss",
378    shortDate: "m/d/yy",
379    mediumDate: "mmm d, yyyy",
380    longDate: "mmmm d, yyyy",
381    fullDate: "dddd, mmmm d, yyyy",
382    shortTime: "h:MM TT",
383    mediumTime: "h:MM:ss TT",
384    longTime: "h:MM:ss TT Z",
385    isoDate: "yyyy-mm-dd",
386    isoTime: "HH:MM:ss",
387    isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
388    isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
389},
390    dateFormat.i18n = {
391        dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
392        monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
392November", "December"]
393    },
394    Date.prototype.format = function (e, t) {
395        return dateFormat(this, e, t)
396    }
397    ;
398var dtpicker = new function () {
399    var e = new Date;
400    this.StartDate = e.getFullYear() + "-" + (e.getMonth() + 1) + "-" + e.getDate() + " 00:00",
401        this.Add = function (e) {
402            $(e).each(function () {
403                var e = $(this)
404                    , t = e.attr("dt-nomindate")
405                    , a = {
406                        autoclose: !0
407                    };
408                "string" == typeof t && "" == t || (a.startDate = dtpicker.StartDate),
409                    e.filter("[ng-date]").length > 0 ? (a.startView = 2,
410                        a.minView = 2,
411                        a.format = "mm/dd/yyyy") : e.filter("[ng-time]").length > 0 ? (a.startView = 1,
412                            a.minView = 0,
413                            e.filter("[ng-mertimeformat]").length > 0 ? (a.format = "HH:ii P",
414                                a.showMeridian = !0) : a.format = "hh:ii") : e.filter("[ng-datetime]").length > 0 && (a.format = "mm/dd/yyyy hh:ii"),
415                    e.datetimepicker(a).on("show", function () {
416                        $(this).closest(".modal-body").css("overflow", "hidden")
417                    }).on("hide", function () {
418                        $(this).closest(".modal-body").css("overflow", "auto")
419                    })
420            })
421        }
422        ,
423        this.Init = function () {
424            this.Add("[ng-date],[ng-time],[ng-datetime]")
425        }
426        ,
427        this.datevalidate = function (e) {
428            if (e.split("/").length > 1)
429                var t = e.split("/");
430            var a = parseInt(t[0])
431                , i = parseInt(t[1])
432                , s = parseInt(t[2]);
433            if (2 == a) {
434                var n = !1;
435                if ((s % 4 || !(s % 100)) && s % 400 || (n = !0),
436                    0 == n && i >= 29)
437                    return -1;
438                if (1 == n && i > 29)
439                    return -1
440            } else if (i > [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][a - 1])
441                return -1;
442            return 1
443        }
444        ,
445        this.toTimezone = function (e, t) {
446            if (null != e && "" != e) {
447                if (null != t && "" != t) {
448                    var a = e
449                        , i = a.getTimezoneOffset()
450                        , s = 0
451                        , n = 0
452                        , r = 0;
453                    switch (t) {
454                        case "PST":
455                            s = ((r = moment.tz(e, "America/Los_Angeles").utcOffset()) + i) / 60,
456                                n = (r + i) % 60;
457                            break;
458                        case "MST":
459                            s = ((r = moment.tz(e, "America/Denver").utcOffset()) + i) / 60,
460                                n = (r + i) % 60;
461                            break;
462                        case "CST":
463                            s = ((r = moment.tz(e, "America/Chicago").utcOffset()) + i) / 60,
464                                n = (r + i) % 60;
465                            break;
466                        default:
467                            s = ((r = moment.tz(e, "America/New_York").utcOffset()) + i) / 60,
468                                n = (r + i) % 60
469                    }
470                    var o = a.getHours()
471                        , d = a.getMinutes()
472                        , h = (a.getDate(),
473                            o + parseInt(s))
474                        , l = d + n;
475                    return a.setHours(h),
476                        a.setMinutes(l),
477                        a
478                }
479                return e
480            }
481            return null
482        }
483        ,
484        this.JsonToDate = function (e, t) {
485            if (e && "string" == typeof e) {
486                e = (e = e.substr(e.indexOf("(") + 1)).substr(0, e.indexOf(")"));
487                var a = new Date(1 * e);
488                return null != t && "" != t ? dtpicker.toTimezone(a, t) : a
489            }
490            return null
491        }
492        ,
493        this.JsonToString = function (e, t, a, f) {
494            if (f) {
495                var d = new Date();
496                var currentyear = d.getFullYear();
497                if (m = (new Date(parseInt((e = e.substr(e.indexOf("(") + 1)).substr(0, e.indexOf(")"))))).getFullYear() == currentyear)
498                    t = "mmm dd"
499                else
500                    t = "mmm dd yyyy"
501            }
502
503            var d = e && "string" == typeof e ? (e = (e = e.substr(e.indexOf("(") + 1)).substr(0, e.indexOf(")")),
504                e = new Date(1 * e),
505                t ? null != a && "" != a ? dtpicker.toTimezone(e, a).format(t) : e.format(t) : null != a && "" != a ? this.toTimezone(e, a).format("mm/dd/yyyy") : e.format("mm/dd/yyyy")) : ""
506
507            return d
508        }
509        ,
510        this.JsonToStringNew = function (e, t) {
511            if (e && "string" == typeof e) {
512                var a = $("#TimeZone").val();
513                if (e = (e = e.substr(e.indexOf("(") + 1)).substr(0, e.indexOf(")")),
514                    e = new Date(1 * e),
515                    null == a)
516                    return e.format(null != t ? t : "mm/dd/yyyy");
517                if (1 == a) {
518                    var i = -240;
519                    return new Date(e.getTime() + 60 * i * 1e3).format(null != t ? t : "mm/dd/yyyy")
520                }
521                if (2 == a) {
522                    i = -300;
523                    return new Date(e.getTime() + 60 * i * 1e3).format(null != t ? t : "mm/dd/yyyy")
524                }
525            }
526            return ""
527        }
528        ,
529        this.JsonToUTCString = function (e, t) {
530            return e && "string" == typeof e ? (e = (e = e.substr(e.indexOf("(") + 1)).substr(0, e.indexOf(")")),
531                e = new Date(1 * e),
532                t ? e.format(t, !0) : e.format("mm/dd/yyyy", !0)) : ""
533        }
534        ,
535        this.ToDate = function (e, t) {
536            if ("" != e) {
537                var a = e.split("/");
538                if (3 == a.length && parseInt(a[0]) <= 12) {
539                    var i = parseInt(a[0]) - 1;
540                    return new Date(a[2], i, a[1])
541                }
542                return "Invalid Date Format. This should be 'mm/dd/yyyy'"
543            }
544            return ""
545        }
546        ,
547        this.ToDateNew = function (e) {
548            var t = e
549                , a = $("#TimeZone").val()
550                , i = new Date(e);
551            if (null != a ? i.setTime(i.getTime() + 60 * i.getTimezoneOffset() * 1e3) : i = i,
552                "" != (t = i.getMonth() + 1 + "/" + i.getDate() + "/" + i.getFullYear())) {
553                var s = t.split("/");
554                if (3 == s.length && parseInt(s[0]) <= 12) {
555                    var n = parseInt(s[0]) - 1;
556                    return new Date(s[2], n, s[1])
557                }
558                return "Invalid Date Format. This should be 'mm/dd/yyyy'"
559            }
560            return ""
561        }
562        ,
563        this.TimeZoneDateTime = function (e) {
564            if ("" != e) {
565                var t = e.split("/");
566                if (3 == t.length && parseInt(t[0]) <= 12) {
567                    var a = parseInt(t[0]) - 1;
568                    return new Date(t[2], a, t[1])
569                }
570                return "Invalid Date Format. This should be 'mm/dd/yyyy'"
571            }
572            return ""
573        }
574        ,
575        this.ToSystemDateTime = function (e) {
576            var t = this.ToDate(e)
577                , a = new Date;
578            a.getTimezoneOffset();
579            return t.setHours(a.getHours(), a.getMinutes(), a.getSeconds()),
580                t
581        }
582        ,
583        this.ToDateTime = function (e, t, a) {
584            var i = this.ToDate(e);
585            if ("object" == typeof i) {
586                var s = t.split(" ");
587                if (2 == s.length) {
588                    var n = s[0].split(":")
589                        , r = parseInt(n[0])
590                        , o = parseInt(n[1]);
591                    "PM" == s[1] && r < 12 ? r = 12 + r : "AM" == s[1] && 12 == r && (r = 0),
592                        i.setHours(r),
593                        i.setMinutes(o)
594                }
595                if (1 == s.length) {
596                    n = s[0].split(":"),
597                        r = parseInt(n[0]),
598                        o = parseInt(n[1]);
599                    i.setHours(r),
600                        i.setMinutes(o)
601                }
602            }
603            var d = i;
604            if (null != a && "" != a && null != a) {
605                var h = d.getTimezoneOffset()
606                    , l = 0
607                    , m = 0
608                    , u = 0;
609                switch (a) {
610                    case "PST":
611                        l = ((u = moment.tz(e, "America/Los_Angeles").utcOffset()) + h) / 60,
612                            m = (u + h) % 60;
613                        break;
614                    case "MST":
615                        l = ((u = moment.tz(e, "America/Denver").utcOffset()) + h) / 60,
616                            m = (u + h) % 60;
617                        break;
618                    case "CST":
619                        l = ((u = moment.tz(e, "America/Chicago").utcOffset()) + h) / 60,
620                            m = (u + h) % 60;
621                        break;
622                    default:
623                        l = ((u = moment.tz(e, "America/New_York").utcOffset()) + h) / 60,
624                            m = (u + h) % 60
625                }
626                var c = d.getHours()
627                    , f = d.getMinutes()
628                    , p = (d.getDate(),
629                        c - parseInt(l))
630                    , y = f - m;
631                d.setHours(p),
632                    d.setMinutes(y)
633            }
634            return d
635        }
636        ,
637        this.ToDateTimeNew = function (e, t) {
638            var a = $("#TimeZone").val()
639                , i = new Date(e + " " + t);
640            null != a ? i.setTime(i.getTime() + 60 * i.getTimezoneOffset() * 1e3) : i = i;
641            var s = this.TimeZoneDateTime(i.getMonth() + 1 + "/" + i.getDate() + "/" + i.getFullYear());
642            if ("object" == typeof s) {
643                var n = t.split(" ");
644                if (2 == n.length) {
645                    n[0].split(":");
646                    var r = parseInt(i.getHours())
647                        , o = parseInt(i.getMinutes());
648                    "PM" == n[1] && r < 12 ? r = 12 + r : "AM" == n[1] && 12 == r && (r = 0),
649                        s.setHours(r),
650                        s.setMinutes(o)
651                }
652                if (1 == n.length) {
653                    n[0].split(":"),
654                        r = parseInt(i.getHours()),
655                        o = parseInt(i.getMinutes());
656                    s.setHours(r),
657                        s.setMinutes(o)
658                }
659            }
660            return s
661        }
662        ,
663        this.Refresh = function (e) {
664            $(e).find("[ng-date]").each(function () {
665                if (this.dtpicker) {
666                    var e = this.value;
667                    if ("" != e) {
668                        var t = e.split("/");
669                        if (3 == t.length && parseInt(t[0]) <= 12) {
670                            var a = parseInt(t[0]) - 1;
671                            this.dtpicker.setDate(new Date(t[2], a, t[1]))
672                        } else
673                            this.value = "",
674                                this.dtpicker.setDate(new Date)
675                    } else
676                        this.dtpicker.setDate(new Date)
677                }
678            })
679        }
680}
681    ;
682$(document).ready(function () {
683    dtpicker.Init()
684});

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.