PageSourceSearch

https://mohajerdanesh.com/wp-content/plugins/bookly-responsive-app…/frontend/resources/js/picker.js

js mohajerdanesh.com collected 2026-10-03 00:57:49 UTC 8,507 bytes, 1 lines download raw bytes

1(function(e){"function"==typeof define&&define.amd?define("picker",["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):"object"==typeof window?window.Picker=e(jQuery):this.Picker=e(jQuery)})(function(e){function t(a,d,c,l){function p(){return t._.node("div",t._.node("div",t._.node("div",t._.node("div",S.component.nodes(w.open),x.box),x.wrap),x.frame),x.holder,'tabindex="-1"')}function h(){C.data(d,S).addClass(x.input).val(C.data("value")?S.get("select",k.format):a.value).on("focus."+w.id+" click."+w.id,function(e){e.preventDefault(),S.open()}).on("mousedown",function(){w.handlingOpen=!0;var t=function(){setTimeout(function(){e(document).off("mouseup",t),w.handlingOpen=!1},0)};e(document).on("mouseup",t)}),k.editable||C.on("keydown."+w.id,$),i(a,{haspopup:!0,expanded:!1,readonly:!1,owns:a.id+"_root"})}function m(){i(S.$root[0],"hidden",!0)}function g(){S.$holder.on({keydown:$,"focus.toOpen":_,blur:function(){C.removeClass(x.target)},focusin:function(e){S.$root.removeClass(x.focused),e.stopPropagation()},"mousedown click":function(t){var n=r(t,a);n!=S.$holder[0]&&(t.stopPropagation(),"mousedown"!=t.type||e(n).is("input, select, textarea, button, option")||(t.preventDefault(),S.$holder.eq(0).focus()))}}).on("click","[data-pick], [data-nav], [data-clear], [data-close]",function(){var t=e(this),n=t.data(),o=t.hasClass(x.navDisabled)||t.hasClass(x.disabled),r=u();r=r&&(r.type||r.href?r:null),(o||r&&!e.contains(S.$root[0],r))&&S.$holder.eq(0).focus(),!o&&n.nav?S.set("highlight",S.component.item.highlight,{nav:n.nav}):!o&&"pick"in n?(S.set("select",n.pick),k.closeOnSelect&&S.close(!0)):n.clear?(S.clear(),k.closeOnClear&&S.close(!0)):n.close&&S.close(!0)})}function v(){var t;!0===k.hiddenName?(t=a.name,a.name=""):(t=["string"==typeof k.hiddenPrefix?k.hiddenPrefix:"","string"==typeof k.hiddenSuffix?k.hiddenSuffix:"_submit"],t=t[0]+a.name+t[1]),S._hidden=e('<input type=hidden name="'+t+'"'+(C.data("value")||a.value?' value="'+S.get("select",k.formatSubmit)+'"':"")+">")[0],C.on("change."+w.id,function(){S._hidden.value=a.value?S.get("select",k.formatSubmit):""})}function y(){b&&f?S.$holder.find("."+x.frame).one("transitionend",function(){S.$holder.eq(0).focus()}):setTimeout(function(){S.$holder.eq(0).focus()},0)}function _(e){e.stopPropagation(),C.addClass(x.target),S.$root.addClass(x.focused),S.open()}function $(e){var t=e.keyCode,n=/^(8|46)$/.test(t);if(27==t)return S.close(!0),!1;(32==t||n||!w.open&&S.component.key[t])&&(e.preventDefault(),e.stopPropagation(),n?S.clear().close():S.open())}if(!a)return t;var b=!1,w={id:a.id||"P"+Math.abs(~~(Math.random()*new Date)),handlingOpen:!1},k=c?e.extend(!0,{},c.defaults,l):l||{},x=e.extend({},t.klasses(),k.klass),C=e(a),O=function(){return this.start()},S=O.prototype={constructor:O,$node:C,start:function(){return w&&w.start?S:(w.methods={},w.start=!0,w.open=!1,w.type=a.type,a.autofocus=a==u(),a.readOnly=!k.editable,a.id=a.id||w.id,"text"!=a.type&&(a.type="text"),S.component=new c(S,k),S.$root=e('<div class="'+x.picker+'" id="'+a.id+'_root" />'),m(),S.$holder=e(p()).appendTo(S.$root),g(),k.formatSubmit&&v(),h(),k.containerHidden?e(k.containerHidden).append(S._hidden):C.after(S._hidden),k.container?e(k.container).append(S.$root):C.after(S.$root),S.on({start:S.component.onStart,render:S.component.onRender,stop:S.component.onStop,open:S.component.onOpen,close:S.component.onClose,set:S.component.onSet}).on({start:k.onStart,render:k.onRender,stop:k.onStop,open:k.onOpen,close:k.onClose,set:k.onSet}),b=n(S.$holder[0]),a.autofocus&&S.open(),S.trigger("start").trigger("render"))},render:function(t){return t?(S.$holder=e(p()),g(),S.$root.html(S.$holder)):S.$root.find("."+x.box).html(S.component.nodes(w.open)),S.trigger("render")},stop:function(){return w.start?(S.close(),S._hidden&&S._hidden.parentNode.removeChild(S._hidden),S.$root.remove(),C.removeClass(x.input).removeData(d),setTimeout(function(){C.off("."+w.id)},0),a.type=w.type,a.readOnly=!1,S.trigger("stop"),w.methods={},w.start=!1,S):S},open:function(n){return w.open?S:(C.addClass(x.active),i(a,"expanded",!0),setTimeout(function(){S.$root.addClass(x.opened),i(S.$root[0],"hidden",!1)},0),!1!==n&&(w.open=!0,b&&e("body").css("overflow","hidden").css("padding-right","+="+o()),y(),s.on("click."+w.id+" focusin."+w.id,function(e){if(!w.handlingOpen){var t=r(e,a);e.isSimulated||t==a||t==document||3==e.which||S.close(t===S.$holder[0])}}).on("keydown."+w.id,function(n){var o=n.keyCode,i=S.component.key[o],d=r(n,a);27==o?S.close(!0):d!=S.$holder[0]||!i&&13!=o?e.contains(S.$root[0],d)&&13==o&&(n.preventDefault(),d.click()):(n.preventDefault(),i?t._.trigger(S.component.key.go,S,[t._.trigger(i)]):S.$root.find("."+x.highlighted).hasClass(x.disabled)||(S.set("select",S.component.item.highlight),k.closeOnSelect&&S.close(!0)))})),S.trigger("open"))},close:function(t){return t&&(k.editable?a.focus():(S.$holder.off("focus.toOpen").focus(),setTimeout(function(){S.$holder.on("focus.toOpen",_)}
1,0))),C.removeClass(x.active),i(a,"expanded",!1),setTimeout(function(){S.$root.removeClass(x.opened+" "+x.focused),i(S.$root[0],"hidden",!0)},0),w.open?(w.open=!1,b&&e("body").css("overflow","").css("padding-right","-="+o()),s.off("."+w.id),S.trigger("close")):S},clear:function(e){return S.set("clear",null,e)},set:function(t,n,o){var r,i,a=e.isPlainObject(t),d=a?t:{};if(o=a&&e.isPlainObject(n)?n:o||{},t){for(r in a||(d[t]=n),d)i=d[r],r in S.component.item&&(void 0===i&&(i=null),S.component.set(r,i,o)),"select"!=r&&"clear"!=r||C.val("clear"==r?"":S.get(r,k.format)).trigger("change");S.render()}return o.muted?S:S.trigger("set",d)},get:function(e,n){if(e=e||"value",null!=w[e])return w[e];if("valueSubmit"==e){if(S._hidden)return S._hidden.value;e="value"}if("value"==e)return a.value;if(e in S.component.item){if("string"==typeof n){var o=S.component.get(e);return o?t._.trigger(S.component.formats.toString,S.component,[n,o]):""}return S.component.get(e)}},on:function(t,n,o){var r,i,a=e.isPlainObject(t),d=a?t:{};if(t)for(r in a||(d[t]=n),d)i=d[r],o&&(r="_"+r),w.methods[r]=w.methods[r]||[],w.methods[r].push(i);return S},off:function(){var e,t,n=arguments;for(e=0,namesCount=n.length;e<namesCount;e+=1)t=n[e],t in w.methods&&delete w.methods[t];return S},trigger:function(e,n){var o=function(e){var o=w.methods[e];o&&o.map(function(e){t._.trigger(e,S,[n])})};return o("_"+e),o(e),S}};return new O}function n(e){var t,n="position";return e.currentStyle?t=e.currentStyle[n]:window.getComputedStyle&&(t=getComputedStyle(e)[n]),"fixed"==t}function o(){if(l.height()<=c.height())return 0;var t=e('<div style="visibility:hidden;width:100px" />').appendTo("body"),n=t[0].offsetWidth;t.css("overflow","scroll");var o=e('<div style="width:100%" />').appendTo(t),r=o[0].offsetWidth;return t.remove(),n-r}function r(e,t){var n=[];return e.path&&(n=e.path),e.originalEvent&&e.originalEvent.path&&(n=e.originalEvent.path),n&&n.length>0?t&&n.indexOf(t)>=0?t:n[0]:e.target}function i(t,n,o){if(e.isPlainObject(n))for(var r in n)a(t,r,n[r]);else a(t,n,o)}function a(e,t,n){e.setAttribute(("role"==t?"":"aria-")+t,n)}function d(t,n){for(var o in e.isPlainObject(t)||(t={attribute:n}),n="",t){var r=("role"==o?"":"aria-")+o,i=t[o];n+=null==i?"":r+'="'+t[o]+'"'}return n}function u(){try{return document.activeElement}catch(e){}}var c=e(window),s=e(document),l=e(document.documentElement),f=null!=document.documentElement.style.transition;return t.klasses=function(e){return e=e||"picker",{picker:e,opened:e+"--opened",focused:e+"--focused",input:e+"__input",active:e+"__input--active",target:e+"__input--target",holder:e+"__holder",frame:e+"__frame",wrap:e+"__wrap",box:e+"__box"}},t._={group:function(e){for(var n,o="",r=t._.trigger(e.min,e);r<=t._.trigger(e.max,e,[r]);r+=e.i)n=t._.trigger(e.item,e,[r]),o+=t._.node(e.node,n[0],n[1],n[2]);return o},node:function(t,n,o,r){return n?(n=e.isArray(n)?n.join(""):n,o=o?' class="'+o+'"':"",r=r?" "+r:"","<"+t+o+r+">"+n+"</"+t+">"):""},lead:function(e){return(e<10?"0":"")+e},trigger:function(e,t,n){return"function"==typeof e?e.apply(t,n||[]):e},digits:function(e){return/\d/.test(e[1])?2:1},isDate:function(e){return{}.toString.call(e).indexOf("Date")>-1&&this.isInteger(e.getDate())},isInteger:function(e){return{}.toString.call(e).indexOf("Number")>-1&&e%1==0},ariaAttr:d},t.extend=function(n,o){e.fn[n]=function(r,i){var a=this.data(n);return"picker"==r?a:a&&"string"==typeof r?t._.trigger(a[r],a,[i]):this.each(function(){var i=e(this);i.data(n)||new t(this,n,o,r)})},e.fn[n].defaults=o.defaults},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.