@bingads-webui-campaign/accounts-grid 0.0.1-security → 13.6.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @bingads-webui-campaign/accounts-grid might be problematic. Click here for more details.
- package/AUTHORS.txt +337 -0
- package/LICENSE.txt +20 -0
- package/README.md +58 -3
- package/bower.json +14 -0
- package/dist/jquery.js +10996 -0
- package/dist/jquery.min.js +2 -0
- package/dist/jquery.min.map +1 -0
- package/dist/jquery.slim.js +8894 -0
- package/dist/jquery.slim.min.js +2 -0
- package/dist/jquery.slim.min.map +1 -0
- package/external/sizzle/LICENSE.txt +36 -0
- package/external/sizzle/dist/sizzle.js +2542 -0
- package/external/sizzle/dist/sizzle.min.js +3 -0
- package/external/sizzle/dist/sizzle.min.map +1 -0
- package/package.json +139 -3
- package/src/ajax/jsonp.js +103 -0
- package/src/ajax/load.js +77 -0
- package/src/ajax/script.js +74 -0
- package/src/ajax/var/location.js +5 -0
- package/src/ajax/var/nonce.js +5 -0
- package/src/ajax/var/rquery.js +5 -0
- package/src/ajax/xhr.js +170 -0
- package/src/ajax.js +876 -0
- package/src/attributes/attr.js +141 -0
- package/src/attributes/classes.js +184 -0
- package/src/attributes/prop.js +142 -0
- package/src/attributes/support.js +33 -0
- package/src/attributes/val.js +191 -0
- package/src/attributes.js +13 -0
- package/src/callbacks.js +236 -0
- package/src/core/DOMEval.js +43 -0
- package/src/core/access.js +72 -0
- package/src/core/camelCase.js +23 -0
- package/src/core/init.js +129 -0
- package/src/core/isAttached.js +26 -0
- package/src/core/nodeName.js +13 -0
- package/src/core/parseHTML.js +65 -0
- package/src/core/parseXML.js +35 -0
- package/src/core/ready-no-deferred.js +97 -0
- package/src/core/ready.js +86 -0
- package/src/core/readyException.js +13 -0
- package/src/core/stripAndCollapse.js +14 -0
- package/src/core/support.js +20 -0
- package/src/core/toType.js +20 -0
- package/src/core/var/rsingleTag.js +7 -0
- package/src/core.js +400 -0
- package/src/css/addGetHookIf.js +26 -0
- package/src/css/adjustCSS.js +74 -0
- package/src/css/curCSS.js +100 -0
- package/src/css/finalPropName.js +42 -0
- package/src/css/hiddenVisibleSelectors.js +15 -0
- package/src/css/showHide.js +105 -0
- package/src/css/support.js +152 -0
- package/src/css/var/cssExpand.js +5 -0
- package/src/css/var/getStyles.js +17 -0
- package/src/css/var/isHiddenWithinTree.js +34 -0
- package/src/css/var/rboxStyle.js +7 -0
- package/src/css/var/rcustomProp.js +7 -0
- package/src/css/var/rnumnonpx.js +7 -0
- package/src/css/var/swap.js +26 -0
- package/src/css.js +495 -0
- package/src/data/Data.js +162 -0
- package/src/data/var/acceptData.js +19 -0
- package/src/data/var/dataPriv.js +7 -0
- package/src/data/var/dataUser.js +7 -0
- package/src/data.js +180 -0
- package/src/deferred/exceptionHook.js +21 -0
- package/src/deferred.js +399 -0
- package/src/deprecated/ajax-event-alias.js +22 -0
- package/src/deprecated/event.js +50 -0
- package/src/deprecated.js +89 -0
- package/src/dimensions.js +60 -0
- package/src/effects/Tween.js +125 -0
- package/src/effects/animatedSelector.js +15 -0
- package/src/effects.js +702 -0
- package/src/event/focusin.js +58 -0
- package/src/event/support.js +11 -0
- package/src/event/trigger.js +199 -0
- package/src/event.js +874 -0
- package/src/exports/amd.js +26 -0
- package/src/exports/global.js +34 -0
- package/src/jquery.js +41 -0
- package/src/manipulation/_evalUrl.js +32 -0
- package/src/manipulation/buildFragment.js +106 -0
- package/src/manipulation/getAll.js +32 -0
- package/src/manipulation/setGlobalEval.js +22 -0
- package/src/manipulation/support.js +41 -0
- package/src/manipulation/var/rscriptType.js +5 -0
- package/src/manipulation/var/rtagName.js +8 -0
- package/src/manipulation/wrapMap.js +30 -0
- package/src/manipulation.js +487 -0
- package/src/offset.js +232 -0
- package/src/queue/delay.js +23 -0
- package/src/queue.js +145 -0
- package/src/selector-native.js +240 -0
- package/src/selector-sizzle.js +19 -0
- package/src/selector.js +3 -0
- package/src/serialize.js +134 -0
- package/src/traversing/findFilter.js +97 -0
- package/src/traversing/var/dir.js +22 -0
- package/src/traversing/var/rneedsContext.js +8 -0
- package/src/traversing/var/siblings.js +17 -0
- package/src/traversing.js +198 -0
- package/src/var/ObjectFunctionString.js +7 -0
- package/src/var/arr.js +5 -0
- package/src/var/class2type.js +6 -0
- package/src/var/document.js +5 -0
- package/src/var/documentElement.js +7 -0
- package/src/var/flat.js +16 -0
- package/src/var/fnToString.js +7 -0
- package/src/var/getProto.js +5 -0
- package/src/var/hasOwn.js +7 -0
- package/src/var/indexOf.js +7 -0
- package/src/var/isFunction.js +17 -0
- package/src/var/isWindow.js +8 -0
- package/src/var/pnum.js +5 -0
- package/src/var/push.js +7 -0
- package/src/var/rcheckableType.js +5 -0
- package/src/var/rcssNum.js +9 -0
- package/src/var/rnothtmlwhite.js +8 -0
- package/src/var/rtrimCSS.js +12 -0
- package/src/var/slice.js +7 -0
- package/src/var/support.js +6 -0
- package/src/var/toString.js +7 -0
- package/src/var/whitespace.js +8 -0
- package/src/wrap.js +78 -0
package/src/callbacks.js
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
define( [
|
2
|
+
"./core",
|
3
|
+
"./core/toType",
|
4
|
+
"./var/isFunction",
|
5
|
+
"./var/rnothtmlwhite"
|
6
|
+
], function( jQuery, toType, isFunction, rnothtmlwhite ) {
|
7
|
+
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
// Convert String-formatted options into Object-formatted ones
|
11
|
+
function createOptions( options ) {
|
12
|
+
var object = {};
|
13
|
+
jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
|
14
|
+
object[ flag ] = true;
|
15
|
+
} );
|
16
|
+
return object;
|
17
|
+
}
|
18
|
+
|
19
|
+
/*
|
20
|
+
* Create a callback list using the following parameters:
|
21
|
+
*
|
22
|
+
* options: an optional list of space-separated options that will change how
|
23
|
+
* the callback list behaves or a more traditional option object
|
24
|
+
*
|
25
|
+
* By default a callback list will act like an event callback list and can be
|
26
|
+
* "fired" multiple times.
|
27
|
+
*
|
28
|
+
* Possible options:
|
29
|
+
*
|
30
|
+
* once: will ensure the callback list can only be fired once (like a Deferred)
|
31
|
+
*
|
32
|
+
* memory: will keep track of previous values and will call any callback added
|
33
|
+
* after the list has been fired right away with the latest "memorized"
|
34
|
+
* values (like a Deferred)
|
35
|
+
*
|
36
|
+
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
37
|
+
*
|
38
|
+
* stopOnFalse: interrupt callings when a callback returns false
|
39
|
+
*
|
40
|
+
*/
|
41
|
+
jQuery.Callbacks = function( options ) {
|
42
|
+
|
43
|
+
// Convert options from String-formatted to Object-formatted if needed
|
44
|
+
// (we check in cache first)
|
45
|
+
options = typeof options === "string" ?
|
46
|
+
createOptions( options ) :
|
47
|
+
jQuery.extend( {}, options );
|
48
|
+
|
49
|
+
var // Flag to know if list is currently firing
|
50
|
+
firing,
|
51
|
+
|
52
|
+
// Last fire value for non-forgettable lists
|
53
|
+
memory,
|
54
|
+
|
55
|
+
// Flag to know if list was already fired
|
56
|
+
fired,
|
57
|
+
|
58
|
+
// Flag to prevent firing
|
59
|
+
locked,
|
60
|
+
|
61
|
+
// Actual callback list
|
62
|
+
list = [],
|
63
|
+
|
64
|
+
// Queue of execution data for repeatable lists
|
65
|
+
queue = [],
|
66
|
+
|
67
|
+
// Index of currently firing callback (modified by add/remove as needed)
|
68
|
+
firingIndex = -1,
|
69
|
+
|
70
|
+
// Fire callbacks
|
71
|
+
fire = function() {
|
72
|
+
|
73
|
+
// Enforce single-firing
|
74
|
+
locked = locked || options.once;
|
75
|
+
|
76
|
+
// Execute callbacks for all pending executions,
|
77
|
+
// respecting firingIndex overrides and runtime changes
|
78
|
+
fired = firing = true;
|
79
|
+
for ( ; queue.length; firingIndex = -1 ) {
|
80
|
+
memory = queue.shift();
|
81
|
+
while ( ++firingIndex < list.length ) {
|
82
|
+
|
83
|
+
// Run callback and check for early termination
|
84
|
+
if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
|
85
|
+
options.stopOnFalse ) {
|
86
|
+
|
87
|
+
// Jump to end and forget the data so .add doesn't re-fire
|
88
|
+
firingIndex = list.length;
|
89
|
+
memory = false;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
// Forget the data if we're done with it
|
95
|
+
if ( !options.memory ) {
|
96
|
+
memory = false;
|
97
|
+
}
|
98
|
+
|
99
|
+
firing = false;
|
100
|
+
|
101
|
+
// Clean up if we're done firing for good
|
102
|
+
if ( locked ) {
|
103
|
+
|
104
|
+
// Keep an empty list if we have data for future add calls
|
105
|
+
if ( memory ) {
|
106
|
+
list = [];
|
107
|
+
|
108
|
+
// Otherwise, this object is spent
|
109
|
+
} else {
|
110
|
+
list = "";
|
111
|
+
}
|
112
|
+
}
|
113
|
+
},
|
114
|
+
|
115
|
+
// Actual Callbacks object
|
116
|
+
self = {
|
117
|
+
|
118
|
+
// Add a callback or a collection of callbacks to the list
|
119
|
+
add: function() {
|
120
|
+
if ( list ) {
|
121
|
+
|
122
|
+
// If we have memory from a past run, we should fire after adding
|
123
|
+
if ( memory && !firing ) {
|
124
|
+
firingIndex = list.length - 1;
|
125
|
+
queue.push( memory );
|
126
|
+
}
|
127
|
+
|
128
|
+
( function add( args ) {
|
129
|
+
jQuery.each( args, function( _, arg ) {
|
130
|
+
if ( isFunction( arg ) ) {
|
131
|
+
if ( !options.unique || !self.has( arg ) ) {
|
132
|
+
list.push( arg );
|
133
|
+
}
|
134
|
+
} else if ( arg && arg.length && toType( arg ) !== "string" ) {
|
135
|
+
|
136
|
+
// Inspect recursively
|
137
|
+
add( arg );
|
138
|
+
}
|
139
|
+
} );
|
140
|
+
} )( arguments );
|
141
|
+
|
142
|
+
if ( memory && !firing ) {
|
143
|
+
fire();
|
144
|
+
}
|
145
|
+
}
|
146
|
+
return this;
|
147
|
+
},
|
148
|
+
|
149
|
+
// Remove a callback from the list
|
150
|
+
remove: function() {
|
151
|
+
jQuery.each( arguments, function( _, arg ) {
|
152
|
+
var index;
|
153
|
+
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
154
|
+
list.splice( index, 1 );
|
155
|
+
|
156
|
+
// Handle firing indexes
|
157
|
+
if ( index <= firingIndex ) {
|
158
|
+
firingIndex--;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
} );
|
162
|
+
return this;
|
163
|
+
},
|
164
|
+
|
165
|
+
// Check if a given callback is in the list.
|
166
|
+
// If no argument is given, return whether or not list has callbacks attached.
|
167
|
+
has: function( fn ) {
|
168
|
+
return fn ?
|
169
|
+
jQuery.inArray( fn, list ) > -1 :
|
170
|
+
list.length > 0;
|
171
|
+
},
|
172
|
+
|
173
|
+
// Remove all callbacks from the list
|
174
|
+
empty: function() {
|
175
|
+
if ( list ) {
|
176
|
+
list = [];
|
177
|
+
}
|
178
|
+
return this;
|
179
|
+
},
|
180
|
+
|
181
|
+
// Disable .fire and .add
|
182
|
+
// Abort any current/pending executions
|
183
|
+
// Clear all callbacks and values
|
184
|
+
disable: function() {
|
185
|
+
locked = queue = [];
|
186
|
+
list = memory = "";
|
187
|
+
return this;
|
188
|
+
},
|
189
|
+
disabled: function() {
|
190
|
+
return !list;
|
191
|
+
},
|
192
|
+
|
193
|
+
// Disable .fire
|
194
|
+
// Also disable .add unless we have memory (since it would have no effect)
|
195
|
+
// Abort any pending executions
|
196
|
+
lock: function() {
|
197
|
+
locked = queue = [];
|
198
|
+
if ( !memory && !firing ) {
|
199
|
+
list = memory = "";
|
200
|
+
}
|
201
|
+
return this;
|
202
|
+
},
|
203
|
+
locked: function() {
|
204
|
+
return !!locked;
|
205
|
+
},
|
206
|
+
|
207
|
+
// Call all callbacks with the given context and arguments
|
208
|
+
fireWith: function( context, args ) {
|
209
|
+
if ( !locked ) {
|
210
|
+
args = args || [];
|
211
|
+
args = [ context, args.slice ? args.slice() : args ];
|
212
|
+
queue.push( args );
|
213
|
+
if ( !firing ) {
|
214
|
+
fire();
|
215
|
+
}
|
216
|
+
}
|
217
|
+
return this;
|
218
|
+
},
|
219
|
+
|
220
|
+
// Call all the callbacks with the given arguments
|
221
|
+
fire: function() {
|
222
|
+
self.fireWith( this, arguments );
|
223
|
+
return this;
|
224
|
+
},
|
225
|
+
|
226
|
+
// To know if the callbacks have already been called at least once
|
227
|
+
fired: function() {
|
228
|
+
return !!fired;
|
229
|
+
}
|
230
|
+
};
|
231
|
+
|
232
|
+
return self;
|
233
|
+
};
|
234
|
+
|
235
|
+
return jQuery;
|
236
|
+
} );
|
@@ -0,0 +1,43 @@
|
|
1
|
+
define( [
|
2
|
+
"../var/document"
|
3
|
+
], function( document ) {
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
var preservedScriptAttributes = {
|
7
|
+
type: true,
|
8
|
+
src: true,
|
9
|
+
nonce: true,
|
10
|
+
noModule: true
|
11
|
+
};
|
12
|
+
|
13
|
+
function DOMEval( code, node, doc ) {
|
14
|
+
doc = doc || document;
|
15
|
+
|
16
|
+
var i, val,
|
17
|
+
script = doc.createElement( "script" );
|
18
|
+
|
19
|
+
script.text = code;
|
20
|
+
if ( node ) {
|
21
|
+
for ( i in preservedScriptAttributes ) {
|
22
|
+
|
23
|
+
// Support: Firefox 64+, Edge 18+
|
24
|
+
// Some browsers don't support the "nonce" property on scripts.
|
25
|
+
// On the other hand, just using `getAttribute` is not enough as
|
26
|
+
// the `nonce` attribute is reset to an empty string whenever it
|
27
|
+
// becomes browsing-context connected.
|
28
|
+
// See https://github.com/whatwg/html/issues/2369
|
29
|
+
// See https://html.spec.whatwg.org/#nonce-attributes
|
30
|
+
// The `node.getAttribute` check was added for the sake of
|
31
|
+
// `jQuery.globalEval` so that it can fake a nonce-containing node
|
32
|
+
// via an object.
|
33
|
+
val = node[ i ] || node.getAttribute && node.getAttribute( i );
|
34
|
+
if ( val ) {
|
35
|
+
script.setAttribute( i, val );
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
doc.head.appendChild( script ).parentNode.removeChild( script );
|
40
|
+
}
|
41
|
+
|
42
|
+
return DOMEval;
|
43
|
+
} );
|
@@ -0,0 +1,72 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../core/toType",
|
4
|
+
"../var/isFunction"
|
5
|
+
], function( jQuery, toType, isFunction ) {
|
6
|
+
|
7
|
+
"use strict";
|
8
|
+
|
9
|
+
// Multifunctional method to get and set values of a collection
|
10
|
+
// The value/s can optionally be executed if it's a function
|
11
|
+
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
12
|
+
var i = 0,
|
13
|
+
len = elems.length,
|
14
|
+
bulk = key == null;
|
15
|
+
|
16
|
+
// Sets many values
|
17
|
+
if ( toType( key ) === "object" ) {
|
18
|
+
chainable = true;
|
19
|
+
for ( i in key ) {
|
20
|
+
access( elems, fn, i, key[ i ], true, emptyGet, raw );
|
21
|
+
}
|
22
|
+
|
23
|
+
// Sets one value
|
24
|
+
} else if ( value !== undefined ) {
|
25
|
+
chainable = true;
|
26
|
+
|
27
|
+
if ( !isFunction( value ) ) {
|
28
|
+
raw = true;
|
29
|
+
}
|
30
|
+
|
31
|
+
if ( bulk ) {
|
32
|
+
|
33
|
+
// Bulk operations run against the entire set
|
34
|
+
if ( raw ) {
|
35
|
+
fn.call( elems, value );
|
36
|
+
fn = null;
|
37
|
+
|
38
|
+
// ...except when executing function values
|
39
|
+
} else {
|
40
|
+
bulk = fn;
|
41
|
+
fn = function( elem, _key, value ) {
|
42
|
+
return bulk.call( jQuery( elem ), value );
|
43
|
+
};
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
if ( fn ) {
|
48
|
+
for ( ; i < len; i++ ) {
|
49
|
+
fn(
|
50
|
+
elems[ i ], key, raw ?
|
51
|
+
value :
|
52
|
+
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
53
|
+
);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
if ( chainable ) {
|
59
|
+
return elems;
|
60
|
+
}
|
61
|
+
|
62
|
+
// Gets
|
63
|
+
if ( bulk ) {
|
64
|
+
return fn.call( elems );
|
65
|
+
}
|
66
|
+
|
67
|
+
return len ? fn( elems[ 0 ], key ) : emptyGet;
|
68
|
+
};
|
69
|
+
|
70
|
+
return access;
|
71
|
+
|
72
|
+
} );
|
@@ -0,0 +1,23 @@
|
|
1
|
+
define( [], function() {
|
2
|
+
|
3
|
+
"use strict";
|
4
|
+
|
5
|
+
// Matches dashed string for camelizing
|
6
|
+
var rmsPrefix = /^-ms-/,
|
7
|
+
rdashAlpha = /-([a-z])/g;
|
8
|
+
|
9
|
+
// Used by camelCase as callback to replace()
|
10
|
+
function fcamelCase( _all, letter ) {
|
11
|
+
return letter.toUpperCase();
|
12
|
+
}
|
13
|
+
|
14
|
+
// Convert dashed to camelCase; used by the css and data modules
|
15
|
+
// Support: IE <=9 - 11, Edge 12 - 15
|
16
|
+
// Microsoft forgot to hump their vendor prefix (trac-9572)
|
17
|
+
function camelCase( string ) {
|
18
|
+
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
19
|
+
}
|
20
|
+
|
21
|
+
return camelCase;
|
22
|
+
|
23
|
+
} );
|
package/src/core/init.js
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
// Initialize a jQuery object
|
2
|
+
define( [
|
3
|
+
"../core",
|
4
|
+
"../var/document",
|
5
|
+
"../var/isFunction",
|
6
|
+
"./var/rsingleTag",
|
7
|
+
|
8
|
+
"../traversing/findFilter"
|
9
|
+
], function( jQuery, document, isFunction, rsingleTag ) {
|
10
|
+
|
11
|
+
"use strict";
|
12
|
+
|
13
|
+
// A central reference to the root jQuery(document)
|
14
|
+
var rootjQuery,
|
15
|
+
|
16
|
+
// A simple way to check for HTML strings
|
17
|
+
// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
|
18
|
+
// Strict HTML recognition (trac-11290: must start with <)
|
19
|
+
// Shortcut simple #id case for speed
|
20
|
+
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
21
|
+
|
22
|
+
init = jQuery.fn.init = function( selector, context, root ) {
|
23
|
+
var match, elem;
|
24
|
+
|
25
|
+
// HANDLE: $(""), $(null), $(undefined), $(false)
|
26
|
+
if ( !selector ) {
|
27
|
+
return this;
|
28
|
+
}
|
29
|
+
|
30
|
+
// Method init() accepts an alternate rootjQuery
|
31
|
+
// so migrate can support jQuery.sub (gh-2101)
|
32
|
+
root = root || rootjQuery;
|
33
|
+
|
34
|
+
// Handle HTML strings
|
35
|
+
if ( typeof selector === "string" ) {
|
36
|
+
if ( selector[ 0 ] === "<" &&
|
37
|
+
selector[ selector.length - 1 ] === ">" &&
|
38
|
+
selector.length >= 3 ) {
|
39
|
+
|
40
|
+
// Assume that strings that start and end with <> are HTML and skip the regex check
|
41
|
+
match = [ null, selector, null ];
|
42
|
+
|
43
|
+
} else {
|
44
|
+
match = rquickExpr.exec( selector );
|
45
|
+
}
|
46
|
+
|
47
|
+
// Match html or make sure no context is specified for #id
|
48
|
+
if ( match && ( match[ 1 ] || !context ) ) {
|
49
|
+
|
50
|
+
// HANDLE: $(html) -> $(array)
|
51
|
+
if ( match[ 1 ] ) {
|
52
|
+
context = context instanceof jQuery ? context[ 0 ] : context;
|
53
|
+
|
54
|
+
// Option to run scripts is true for back-compat
|
55
|
+
// Intentionally let the error be thrown if parseHTML is not present
|
56
|
+
jQuery.merge( this, jQuery.parseHTML(
|
57
|
+
match[ 1 ],
|
58
|
+
context && context.nodeType ? context.ownerDocument || context : document,
|
59
|
+
true
|
60
|
+
) );
|
61
|
+
|
62
|
+
// HANDLE: $(html, props)
|
63
|
+
if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
|
64
|
+
for ( match in context ) {
|
65
|
+
|
66
|
+
// Properties of context are called as methods if possible
|
67
|
+
if ( isFunction( this[ match ] ) ) {
|
68
|
+
this[ match ]( context[ match ] );
|
69
|
+
|
70
|
+
// ...and otherwise set as attributes
|
71
|
+
} else {
|
72
|
+
this.attr( match, context[ match ] );
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
return this;
|
78
|
+
|
79
|
+
// HANDLE: $(#id)
|
80
|
+
} else {
|
81
|
+
elem = document.getElementById( match[ 2 ] );
|
82
|
+
|
83
|
+
if ( elem ) {
|
84
|
+
|
85
|
+
// Inject the element directly into the jQuery object
|
86
|
+
this[ 0 ] = elem;
|
87
|
+
this.length = 1;
|
88
|
+
}
|
89
|
+
return this;
|
90
|
+
}
|
91
|
+
|
92
|
+
// HANDLE: $(expr, $(...))
|
93
|
+
} else if ( !context || context.jquery ) {
|
94
|
+
return ( context || root ).find( selector );
|
95
|
+
|
96
|
+
// HANDLE: $(expr, context)
|
97
|
+
// (which is just equivalent to: $(context).find(expr)
|
98
|
+
} else {
|
99
|
+
return this.constructor( context ).find( selector );
|
100
|
+
}
|
101
|
+
|
102
|
+
// HANDLE: $(DOMElement)
|
103
|
+
} else if ( selector.nodeType ) {
|
104
|
+
this[ 0 ] = selector;
|
105
|
+
this.length = 1;
|
106
|
+
return this;
|
107
|
+
|
108
|
+
// HANDLE: $(function)
|
109
|
+
// Shortcut for document ready
|
110
|
+
} else if ( isFunction( selector ) ) {
|
111
|
+
return root.ready !== undefined ?
|
112
|
+
root.ready( selector ) :
|
113
|
+
|
114
|
+
// Execute immediately if ready is not present
|
115
|
+
selector( jQuery );
|
116
|
+
}
|
117
|
+
|
118
|
+
return jQuery.makeArray( selector, this );
|
119
|
+
};
|
120
|
+
|
121
|
+
// Give the init function the jQuery prototype for later instantiation
|
122
|
+
init.prototype = jQuery.fn;
|
123
|
+
|
124
|
+
// Initialize central reference
|
125
|
+
rootjQuery = jQuery( document );
|
126
|
+
|
127
|
+
return init;
|
128
|
+
|
129
|
+
} );
|
@@ -0,0 +1,26 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../var/documentElement",
|
4
|
+
"../selector" // jQuery.contains
|
5
|
+
], function( jQuery, documentElement ) {
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
var isAttached = function( elem ) {
|
9
|
+
return jQuery.contains( elem.ownerDocument, elem );
|
10
|
+
},
|
11
|
+
composed = { composed: true };
|
12
|
+
|
13
|
+
// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
|
14
|
+
// Check attachment across shadow DOM boundaries when possible (gh-3504)
|
15
|
+
// Support: iOS 10.0-10.2 only
|
16
|
+
// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
|
17
|
+
// leading to errors. We need to check for `getRootNode`.
|
18
|
+
if ( documentElement.getRootNode ) {
|
19
|
+
isAttached = function( elem ) {
|
20
|
+
return jQuery.contains( elem.ownerDocument, elem ) ||
|
21
|
+
elem.getRootNode( composed ) === elem.ownerDocument;
|
22
|
+
};
|
23
|
+
}
|
24
|
+
|
25
|
+
return isAttached;
|
26
|
+
} );
|
@@ -0,0 +1,65 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../var/document",
|
4
|
+
"./var/rsingleTag",
|
5
|
+
"../manipulation/buildFragment",
|
6
|
+
|
7
|
+
// This is the only module that needs core/support
|
8
|
+
"./support"
|
9
|
+
], function( jQuery, document, rsingleTag, buildFragment, support ) {
|
10
|
+
|
11
|
+
"use strict";
|
12
|
+
|
13
|
+
// Argument "data" should be string of html
|
14
|
+
// context (optional): If specified, the fragment will be created in this context,
|
15
|
+
// defaults to document
|
16
|
+
// keepScripts (optional): If true, will include scripts passed in the html string
|
17
|
+
jQuery.parseHTML = function( data, context, keepScripts ) {
|
18
|
+
if ( typeof data !== "string" ) {
|
19
|
+
return [];
|
20
|
+
}
|
21
|
+
if ( typeof context === "boolean" ) {
|
22
|
+
keepScripts = context;
|
23
|
+
context = false;
|
24
|
+
}
|
25
|
+
|
26
|
+
var base, parsed, scripts;
|
27
|
+
|
28
|
+
if ( !context ) {
|
29
|
+
|
30
|
+
// Stop scripts or inline event handlers from being executed immediately
|
31
|
+
// by using document.implementation
|
32
|
+
if ( support.createHTMLDocument ) {
|
33
|
+
context = document.implementation.createHTMLDocument( "" );
|
34
|
+
|
35
|
+
// Set the base href for the created document
|
36
|
+
// so any parsed elements with URLs
|
37
|
+
// are based on the document's URL (gh-2965)
|
38
|
+
base = context.createElement( "base" );
|
39
|
+
base.href = document.location.href;
|
40
|
+
context.head.appendChild( base );
|
41
|
+
} else {
|
42
|
+
context = document;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
parsed = rsingleTag.exec( data );
|
47
|
+
scripts = !keepScripts && [];
|
48
|
+
|
49
|
+
// Single tag
|
50
|
+
if ( parsed ) {
|
51
|
+
return [ context.createElement( parsed[ 1 ] ) ];
|
52
|
+
}
|
53
|
+
|
54
|
+
parsed = buildFragment( [ data ], context, scripts );
|
55
|
+
|
56
|
+
if ( scripts && scripts.length ) {
|
57
|
+
jQuery( scripts ).remove();
|
58
|
+
}
|
59
|
+
|
60
|
+
return jQuery.merge( [], parsed.childNodes );
|
61
|
+
};
|
62
|
+
|
63
|
+
return jQuery.parseHTML;
|
64
|
+
|
65
|
+
} );
|
@@ -0,0 +1,35 @@
|
|
1
|
+
define( [
|
2
|
+
"../core"
|
3
|
+
], function( jQuery ) {
|
4
|
+
|
5
|
+
"use strict";
|
6
|
+
|
7
|
+
// Cross-browser xml parsing
|
8
|
+
jQuery.parseXML = function( data ) {
|
9
|
+
var xml, parserErrorElem;
|
10
|
+
if ( !data || typeof data !== "string" ) {
|
11
|
+
return null;
|
12
|
+
}
|
13
|
+
|
14
|
+
// Support: IE 9 - 11 only
|
15
|
+
// IE throws on parseFromString with invalid input.
|
16
|
+
try {
|
17
|
+
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
18
|
+
} catch ( e ) {}
|
19
|
+
|
20
|
+
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
21
|
+
if ( !xml || parserErrorElem ) {
|
22
|
+
jQuery.error( "Invalid XML: " + (
|
23
|
+
parserErrorElem ?
|
24
|
+
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
25
|
+
return el.textContent;
|
26
|
+
} ).join( "\n" ) :
|
27
|
+
data
|
28
|
+
) );
|
29
|
+
}
|
30
|
+
return xml;
|
31
|
+
};
|
32
|
+
|
33
|
+
return jQuery.parseXML;
|
34
|
+
|
35
|
+
} );
|