vendor: 5,148 bytes, lines 1-6
1/*! 2 * ClockPicker v1.0.0 (https://chriscurddesign.github.io/clockpicker/) 3 * Branch maintained by Ben Beckford 4 * Licensed under MIT (https://github.com/chriscurddesign/clockpicker/blob/gh-pages/LICENSE) 5 */ 6!function(){function t(t){return document.createElementNS(l,t)}function i(t){return(10>t?"0":"")+t}function e(t){var i=++v+"";return t?t+i:i}function s(s,a){function l(t,i){var e=u.offset(),s=/^touch/.test(t.type),o=e.left+g,c=e.top+g,l=(s?t.originalEvent.touches[0]:t).pageX-o,h=(s?t.originalEvent.touches[0]:t).pageY-c,k=Math.sqrt(l*l+h*h),m=!1;if(!i||!(b-y>k||k>b+y)){t.preventDefault();var v=setTimeout(function(){n.addClass("clockpicker-moving")},200);p&&u.append(x.canvas),x.setHand(l,h,!i,!0),r.off(d).on(d,function(t){t.preventDefault();var i=/^touch/.test(t.type),e=(i?t.originalEvent.touches[0]:t).pageX-o,s=(i?t.originalEvent.touches[0]:t).pageY-c;(m||e!==l||s!==h)&&(m=!0,x.setHand(e,s,!1,!0))}),r.off(f).on(f,function(t){r.off(f),t.preventDefault();var e=/^touch/.test(t.type),s=(e?t.originalEvent.changedTouches[0]:t).pageX-o,p=(e?t.originalEvent.changedTouches[0]:t).pageY-c;(i||m)&&s===l&&p===h&&x.setHand(s,p),"hours"===x.currentView&&a.allowMinutes?x.toggleView("minutes",A/2):a.autoclose&&(x.minutesView.addClass("clockpicker-dial-out"),setTimeout(function(){x.done()},A/2)),u.prepend(O),clearTimeout(v),n.removeClass("clockpicker-moving"),r.off(d)})}}var h=c(C),u=h.find(".clockpicker-plate"),m=h.find(".clockpicker-hours"),v=h.find(".clockpicker-minutes"),V=h.find(".clockpicker-am-pm-block"),T="INPUT"===s.prop("tagName"),H=T?s:s.find("input"),P=s.find(".input-group-addon"),x=this;if(this.id=e("cp"),this.element=s,this.options=a,this.isAppended=!1,this.isShown=!1,this.currentView="hours",this.isInput=T,this.input=H,this.addon=P,this.popover=h,this.plate=u,this.hoursView=m,this.minutesView=v,this.amPmBlock=V,this.spanHours=h.find(".clockpicker-span-hours"),this.spanMinutes=h.find(".clockpicker-span-minutes"),this.spanAmPm=h.find(".clockpicker-span-am-pm"),this.amOrPm="PM",a.twelvehour){{var S=['<div class="clockpicker-am-pm-block">','<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-am-button">',"AM</button>",'<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-pm-button">',"PM</button>","</div>"].join("");c(S)}c('<button type="button" class="btn btn-sm btn-default clockpicker-button am-button">AM</button>').on("click",function(){x.amOrPm="AM",c(".clockpicker-span-am-pm").empty().append("AM")}).appendTo(this.amPmBlock),c('<button type="button" class="btn btn-sm btn-default clockpicker-button pm-button">PM</button>').on("click",function(){x.amOrPm="PM",c(".clockpicker-span-am-pm").empty().append("PM")}).appendTo(this.amPmBlock)}a.autoclose||c('<button type="button" class="btn btn-sm btn-default btn-block clockpicker-button">'+a.donetext+"</button>").click(c.proxy(this.done,this)).appendTo(h),"top"!==a.placement&&"bottom"!==a.placement||"top"!==a.align&&"bottom"!==a.align||(a.align="left"),"left"!==a.placement&&"right"!==a.placement||"left"!==a.align&&"right"!==a.align||(a.align="top"),h.addClass(a.placement),h.addClass("clockpicker-align-"+a.align),this.spanHours.click(c.proxy(this.toggleView,this,"hours")),a.allowMinutes&&(h.addClass("allow-minutes"),this.spanMinutes.click(c.proxy(this.toggleView,this,"minutes"))),H.on("focus.clockpicker click.clockpicker",c.proxy(this.show,this)),P.on("click.clockpicker",c.proxy(this.toggle,this));var D,E,I,B,W=c('<div class="clockpicker-tick"></div>');if(a.twelvehour)for(D=1;13>D;D+=1)E=W.clone(),I=D/6*Math.PI,B=b,E.css("font-size","120%"),E.css({left:g+Math.sin(I)*B-y,top:g-Math.cos(I)*B-y}),E.html(0===D?"00":D),m.append(E),E.on(k,l);else for(D=0;24>D;D+=1){E=W.clone(),I=D/6*Math.PI;var z=D>0&&13>D;B=z?w:b,E.css({left:g+Math.sin(I)*B-y,top:g-Math.cos(I)*B-y}),z&&E.css("font-size","120%"),E.html(0===D?"00":D),m.append(E),E.on(k,l)}for(D=0;60>D;D+=5)E=W.clone(),I=D/30*Math.PI,E.css({left:g+Math.sin(I)*b-y,top:g-Math.cos(I)*b-y}),E.css("font-size","120%"),E.html(i(D)),v.append(E),E.on(k,l);if(u.on(k,function(t){0===c(t.target).closest(".clockpicker-tick").length&&l(t,!0)}),p){var O=h.find(".clockpicker-canvas"),j=t("svg");j.setAttribute("class","clockpicker-svg"),j.setAttribute("width",M),j.setAttribute("height",M);var L=t("g");L.setAttribute("transform","translate("+g+","+g+")");var U=t("circle");U.setAttribute("class","clockpicker-canvas-bearing"),U.setAttribute("cx",0),U.setAttribute("cy",0),U.setAttribute("r",2);var N=t("line");N.setAttribute("x1",0),N.setAttribute("y1",0);var X=t("circle");X.setAttribute("class","clockpicker-canvas-bg"),X.setAttribute("r",y);var Y=t("circle");Y.setAttribute("class","clockpicker-canvas-fg"),Y.setAttribute("r",3.5),L.appendChild(N),L.appendChild(X),L.appendChild(Y),L.appendChild(U),j.appendChild(L),O.append(j),this.hand=N,this.bg=X,this.fg=Y,this.bearing=U,this.g=L,this.canvas=O}o(this.options.init)}function o(t){t&&"function"==typeof t&&t()}var n,c=window.jQuery,a=c(window),r=c(document),l="http://www.w3.org/2000/svg",p="SVGAngle"in window&&function(){var t,i=document.createElement("div");return i.innerHTML="<svg/>
6",t=(i.firstChild&&i.firstChild.namespaceURI)==l,i.innerHTML="",t}(),h=function(){var t=document.createElement("div").style;return"transition"in t||"WebkitTransition"in t||"MozTransition"in t||"msTransition"in t||"OTransition"in t}(),u="ontouchstart"in window,k="mousedown"+(u?" touchstart":""),d="mousemove.clockpicker"+(u?" touchmove.clockpicker":""),f="mouseup.clockpicker"+(u?" touchend.clockpicker":""),m=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,v=0,g=100,b=80,w=54,y=13,M=2*g,A=h?350:1,C=['<div class="popover clockpicker-popover">','<div class="arrow"></div>','<div class="popover-title">','<span class="clockpicker-span-hours text-primary"></span>'," : ",'<span class="clockpicker-span-minutes"></span>','<span class="clockpicker-span-am-pm"></span>',"</div>",'<div class="popover-content">','<div class="clockpicker-plate">','<div class="clockpicker-canvas"></div>','<div class="clockpicker-dial clockpicker-hours"></div>','<div class="clockpicker-dial clockpicker-minutes clockpicker-dial-out"></div>',"</div>",'<span class="clockpicker-am-pm-block">',"</span>","</div>","</div>"].join("");s.DEFAULTS={"default":"",fromnow:0,placement:"bottom",align:"left",donetext:"Done",autoclose:!1,twelvehour:!1,vibrate:!0,allowMinutes:!0},s.prototype.toggle=function(){this[this.isShown?"hide":"show"]()},s.prototype.locate=function(){var t=this.element,i=this.popover,e=t.offset(),s=t.outerWidth(),o=t.outerHeight(),n=this.options.placement,a=this.options.align,r={},l=i.outerHeight()+50,p=i.outerWidth();if(c(window).outerHeight()<520||c(window).outerWidth()<326)return i.addClass("mobile-view"),i.show(),!1;switch(i.removeClass("mobile-view"),e.top+l>c(window).outerHeight()?(n=this.options.placement="top",i.removeClass("bottom").addClass("top")):(n=this.options.placement="bottom",i.removeClass("top").addClass("bottom")),e.left+p>c(window).outerWidth()?(a=this.options.align="right",i.removeClass("clockpicker-align-left").addClass("clockpicker-align-right")):(a=this.options.align="left",i.removeClass("clockpicker-align-right").addClass("clockpicker-align-left")),i.show(),n){case"bottom":r.top=e.top+o;break;case"right":r.left=e.left+s;break;case"top":r.top=e.top-i.outerHeight();break;case"left":r.left=e.left-i.outerWidth()}switch(a){case"left":r.left=e.left;break;case"right":r.left=e.left+s-i.outerWidth();break;case"top":r.top=e.top;break;case"bottom":r.top=e.top+o-i.outerHeight()}i.css(r)},s.prototype.show=function(){if(!this.isShown){o(this.options.beforeShow);var t=this;this.isAppended||(n=c(document.body).append(this.popover),a.on("resize.clockpicker"+this.id,function(){t.isShown&&t.locate()}),this.isAppended=!0);var e=((this.input.prop("value")||this.options["default"]||"")+"").split(":");if("now"===e[0]){var s=new Date(+new Date+this.options.fromnow);e=[s.getHours(),s.getMinutes()]}this.hours=+e[0]||0,this.minutes=+e[1]||0,this.spanHours.html(i(this.hours)),this.spanMinutes.html(i(this.minutes)),this.toggleView("hours"),this.locate(),this.isShown=!0,r.on("click.clockpicker."+this.id+" focusin.clockpicker."+this.id,function(i){var e=c(i.target);0===e.closest(t.popover).length&&0===e.closest(t.addon).length&&0===e.closest(t.input).length&&t.hide()}),r.on("keyup.clockpicker."+this.id,function(i){27===i.keyCode&&t.hide()}),o(this.options.afterShow)}},s.prototype.hide=function(){o(this.options.beforeHide),this.isShown=!1,r.off("click.clockpicker."+this.id+" focusin.clockpicker."+this.id),r.off("keyup.clockpicker."+this.id),this.popover.hide(),o(this.options.afterHide)},s.prototype.toggleView=function(t,i){var e=!1;"minutes"===t&&"visible"===c(this.hoursView).css("visibility")&&(o(this.options.beforeHourSelect),e=!0);var s="hours"===t,n=s?this.hoursView:this.minutesView,a=s?this.minutesView:this.hoursView;this.currentView=t,this.spanHours.toggleClass("text-primary",s),this.spanMinutes.toggleClass("text-primary",!s),a.addClass("clockpicker-dial-out"),n.css("visibility","visible").removeClass("clockpicker-dial-out"),this.resetClock(i),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){a.css("visibility","hidden")},A),e&&o(this.options.afterHourSelect)},s.prototype.resetClock=function(t){var i=this.currentView,e=this[i],s="hours"===i,o=Math.PI/(s?6:30),n=e*o,c=s&&e>0&&13>e?w:b,a=Math.sin(n)*c,r=-Math.cos(n)*c,l=this;p&&t?(l.canvas.addClass("clockpicker-canvas-out"),setTimeout(function(){l.canvas.removeClass("clockpicker-canvas-out"),l.setHand(a,r)},t)):this.setHand(a,r)},s.prototype.setHand=function(t,e,s,o){var n,a=Math.atan2(t,-e),r="hours"===this.currentView,l=Math.PI/(r||s?6:30),h=Math.sqrt(t*t+e*e),u=this.options,k=r&&(b+w)/2>h,d=k?w:b;if(u.twelvehour&&(d=b),0>a&&(a=2*Math.PI+a),n=Math.round(a/l),a=n*l,u.twelvehour?r?0===n&&(n=12):(s&&(n*=5),60===n&&(n=0)):r?(12===n&&(n=0),n=k?0===n?12:n:0===n?0:n+12):(s&&(n*=5),60===n&&(n=0)),this[this.currentView]!==n&&m&&this.options.vibrate&&(this.vibrateTimer||(navigator[m](10),this.vibrateTimer=setTimeout(c.proxy(function(){this.vibrateTimer=null},this),100))),this[this.currentView]=n,this[r?"spanHours":"spanMinutes"].html(i(n)),!p)return this[r?"hoursView":"minutesView"].find(".clockpicker-tick").each(function(){var t=c(this);t.toggleClass("active",n===+t.html())}),void 0;o||!r&&n%5?(this.g.insertBefore(this.hand,this.bearing),this.g.insertBefore(this.bg,this.fg),this.bg.setAttribute("class","clockpicker-canvas-bg clockpicker-canvas-bg-trans")):(this.g.insertBefore(this.hand,this.bg),this.g.insertBefore(this.fg,this.bg),this.bg.setAttribute("class","clockpicker-canvas-bg"));var f=Math.sin(a)*d,v=-Math.cos(a)*d;this.hand.setAttribute("x2",f),this.hand.setAttribute("y2",v),this.bg.setAttribute("cx",f),this.bg.setAttribute("cy",v),this.fg.setAttribute("cx",f),this.fg.setAttribute("cy",v)},s.prototype.done=function(){o(this.options.beforeDone),this.hide();var t=this.input.prop("value"),e=i(this.hours)+":"+i(this.minutes);this.options.twelvehour&&(e+=this.amOrPm),this.input.prop("value",e),e!==t&&(this.input.triggerHandler("change"),this.isInput||this.element.trigger("change")),this.options.autoclose&&this.input.trigger("blur"),o(this.options.afterDone)},s.prototype.remove=function(){this.element.removeData("clockpicker"),this.input.off("focus.clockpicker click.clockpicker"),this.addon.off("
6click.clockpicker"),this.isShown&&this.hide(),this.isAppended&&(a.off("resize.clockpicker"+this.id),this.popover.remove())},c.fn.clockpicker=function(t){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=c(this),o=e.data("clockpicker");if(o)"function"==typeof o[t]&&o[t].apply(o,i);else{var n=c.extend({},s.DEFAULTS,e.data(),"object"==typeof t&&t);e.data("clockpicker",new s(e,n))}})}}();
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.