@nativescript/canvas-polyfill 2.0.0-alpha.9 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DOM/Document.d.ts +2 -1
- package/DOM/Element.js +3 -6
- package/DOM/Element.js.map +1 -1
- package/DOM/HTMLCanvasElement.d.ts +3 -0
- package/DOM/HTMLCanvasElement.js +5 -0
- package/DOM/HTMLCanvasElement.js.map +1 -1
- package/DOM/HTMLImageElement.js +9 -17
- package/DOM/HTMLImageElement.js.map +1 -1
- package/DOM/HTMLVideoElement.js +10 -20
- package/DOM/HTMLVideoElement.js.map +1 -1
- package/DOM/Node.js +3 -5
- package/DOM/Node.js.map +1 -1
- package/DOM/XMLDocument.js +2 -4
- package/DOM/XMLDocument.js.map +1 -1
- package/LICENSE +201 -0
- package/MutationObserver.d.ts +10 -0
- package/MutationObserver.js +22 -0
- package/MutationObserver.js.map +1 -0
- package/URL.android.d.ts +16 -14
- package/URL.android.js +293 -42
- package/URL.android.js.map +1 -1
- package/URL.ios.d.ts +19 -5
- package/URL.ios.js +536 -96
- package/URL.ios.js.map +1 -1
- package/async/file/file.android.js +2 -3
- package/async/file/file.android.js.map +1 -1
- package/async/file/file.ios.js +26 -39
- package/async/file/file.ios.js.map +1 -1
- package/async/http/http.android.js +6 -1
- package/async/http/http.android.js.map +1 -1
- package/async/http/http.ios.js +9 -4
- package/async/http/http.ios.js.map +1 -1
- package/async/xhr/TNSXMLHttpRequest.js +126 -10
- package/async/xhr/TNSXMLHttpRequest.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +8 -0
- package/index.js.map +1 -1
- package/localStorage.d.ts +2 -0
- package/localStorage.js +150 -0
- package/localStorage.js.map +1 -0
- package/package.json +6 -7
- package/platforms/android/async-release.aar +0 -0
- package/platforms/android/canvas_polyfill.aar +0 -0
- package/platforms/android/java/org/nativescript/canvas/polyfill/Utils.java +31 -9
- package/resize.js +15 -10
- package/resize.js.map +1 -1
- package/url-search.d.ts +0 -0
- package/url-search.js +343 -0
- package/url-search.js.map +1 -0
|
@@ -29,29 +29,38 @@ public class Utils {
|
|
|
29
29
|
buffer.position(position);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
33
32
|
public static String createObjectURL(Context context, ByteBuffer buffer, int position, String mime, String extension) throws IOException {
|
|
34
33
|
String id = UUID.randomUUID().toString();
|
|
34
|
+
createObjectURLWithURL(context, BLOB_PATH + id, buffer, position, mime, extension);
|
|
35
|
+
return BLOB_PATH + id;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public static void createObjectURLWithURL(Context context, String url, ByteBuffer buffer, int position, String mime, String extension) throws IOException {
|
|
39
|
+
String id = url.replace(BLOB_PATH, "");
|
|
35
40
|
File blob_root = new File(context.getFilesDir(), BLOB_DIR);
|
|
36
41
|
if (!blob_root.exists()) {
|
|
37
42
|
blob_root.mkdirs();
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
String fileName = id;
|
|
41
|
-
|
|
46
|
+
if (extension != null) {
|
|
42
47
|
fileName = id + "." + extension;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
} else {
|
|
49
|
+
// todo get type from magic bytes
|
|
50
|
+
String ext = MimeTypeMap.getSingleton().getExtensionFromMimeType(mime);
|
|
51
|
+
if (ext != null) {
|
|
52
|
+
fileName = id + "." + ext;
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
|
-
}
|
|
50
55
|
|
|
51
56
|
org.nativescript.canvas.polyfill.Utils.writeBytes(buffer, position, new File(blob_root, fileName).getAbsolutePath());
|
|
52
57
|
|
|
53
58
|
putItem(context, id, fileName);
|
|
54
|
-
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public static String getItemOrCreateAndReturn(Context context, String url, ByteBuffer buffer, int position, String mime, String extension) throws IOException {
|
|
62
|
+
createObjectURLWithURL(context, url, buffer, position, mime, extension);
|
|
63
|
+
return getPath(context, url);
|
|
55
64
|
}
|
|
56
65
|
|
|
57
66
|
public static void revokeObjectURL(Context context, String url) {
|
|
@@ -77,6 +86,7 @@ public class Utils {
|
|
|
77
86
|
return "";
|
|
78
87
|
}
|
|
79
88
|
|
|
89
|
+
|
|
80
90
|
public static void putItem(Context context, String key, String value) {
|
|
81
91
|
SharedPreferences sharedPreferences = context.getSharedPreferences(BLOB_KEYS, Context.MODE_PRIVATE);
|
|
82
92
|
sharedPreferences.edit().putString(key, value).commit();
|
|
@@ -96,6 +106,18 @@ public class Utils {
|
|
|
96
106
|
|
|
97
107
|
public static void deleteItem(Context context, String key) {
|
|
98
108
|
if (key != null) {
|
|
109
|
+
File blob_root = new File(context.getFilesDir(), BLOB_DIR);
|
|
110
|
+
SharedPreferences sharedPreferences = context.getSharedPreferences(BLOB_KEYS, Context.MODE_PRIVATE);
|
|
111
|
+
|
|
112
|
+
String fileName = sharedPreferences.getString(key, null);
|
|
113
|
+
|
|
114
|
+
if (fileName != null) {
|
|
115
|
+
File file = new File(blob_root, fileName);
|
|
116
|
+
try {
|
|
117
|
+
file.delete();
|
|
118
|
+
} catch (Exception ignored) {
|
|
119
|
+
}
|
|
120
|
+
}
|
|
99
121
|
putItem(context, key, null);
|
|
100
122
|
}
|
|
101
123
|
}
|
package/resize.js
CHANGED
|
@@ -4,21 +4,26 @@ import { Application } from '@nativescript/core';
|
|
|
4
4
|
Window Resize Stub
|
|
5
5
|
*/
|
|
6
6
|
const scale = Screen.mainScreen.scale;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
global.window.
|
|
12
|
-
global.window.
|
|
13
|
-
global.window.
|
|
7
|
+
// const screenWidth = Screen.mainScreen.widthPixels;
|
|
8
|
+
// const screenHeight = Screen.mainScreen.heightPixels;
|
|
9
|
+
const screenWidth = Screen.mainScreen.widthDIPs;
|
|
10
|
+
const screenHeight = Screen.mainScreen.heightDIPs;
|
|
11
|
+
global.window.devicePixelRatio = global.devicePixelRatio = scale; //1;
|
|
12
|
+
global.window.innerWidth = global.innerWidth = screenWidth;
|
|
13
|
+
global.window.clientWidth = global.clientWidth = screenWidth;
|
|
14
|
+
global.window.innerHeight = global.innerHeight = screenHeight;
|
|
15
|
+
global.window.clientHeight = global.clientHeight = screenHeight;
|
|
14
16
|
global.window.screen = global.screen = global.screen || {};
|
|
15
17
|
global.window.screen.orientation = global.screen.orientation = global.screen.orientation || global.clientWidth < global.clientHeight ? 0 : 90;
|
|
16
18
|
if (!global.__TNS_BROWSER_POLYFILL_RESIZE) {
|
|
17
19
|
global.__TNS_BROWSER_POLYFILL_RESIZE = true;
|
|
18
20
|
Application.on(Application.orientationChangedEvent, (args) => {
|
|
19
|
-
const width = Screen.mainScreen.widthPixels;
|
|
20
|
-
const height = Screen.mainScreen.
|
|
21
|
-
|
|
21
|
+
// const width = Screen.mainScreen.widthPixels;
|
|
22
|
+
// const height = Screen.mainScreen.heightPixels;
|
|
23
|
+
const portrait = args.newValue === 'portrait';
|
|
24
|
+
const width = portrait ? screenWidth : screenHeight;
|
|
25
|
+
const height = portrait ? screenHeight : screenWidth;
|
|
26
|
+
global.window.devicePixelRatio = global.devicePixelRatio = scale; //1;
|
|
22
27
|
global.window.innerWidth = global.innerWidth = width;
|
|
23
28
|
global.window.clientWidth = global.clientWidth = width;
|
|
24
29
|
global.window.innerHeight = global.innerHeight = height;
|
package/resize.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize.js","sourceRoot":"","sources":["../../../packages/canvas-polyfill/resize.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"resize.js","sourceRoot":"","sources":["../../../packages/canvas-polyfill/resize.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD;;EAEE;AAEF,MAAM,KAAK,GAAG,M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AAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC;QACpD,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;QAEpD,MAAc,CAAC,MAAM,CAAC,gBAAgB,GAAI,MAAc,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC,IAAI;QACvF,MAAc,CAAC,MAAM,CAAC,UAAU,GAAI,MAAc,CAAC,UAAU,GAAG,KAAK,CAAC;QACtE,MAAc,CAAC,MAAM,CAAC,WAAW,GAAI,MAAc,CAAC,WAAW,GAAG,KAAK,CAAC;QACxE,MAAc,CAAC,MAAM,CAAC,WAAW,GAAI,MAAc,CAAC,WAAW,GAAG,MAAM,CAAC;QACzE,MAAc,CAAC,MAAM,CAAC,YAAY,GAAI,MAAc,CAAC,YAAY,GAAG,MAAM,CAAC;QAC3E,MAAc,CAAC,MAAM,CAAC,WAAW,GAAI,MAAc,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACxG,MAAc,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,GAAI,MAAc,CAAC,MAAM,CAAC,WAAW,GAAI,MAAc,CAAC,WAAW,CAAC;QAC7G,IAAK,MAAc,CAAC,OAAO,IAAK,MAAc,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3D,MAAc,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACvC;IACF,CAAC,CAAC,CAAC;CACH"}
|
package/url-search.d.ts
ADDED
|
File without changes
|
package/url-search.js
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/**!
|
|
2
|
+
* url-search-params-polyfill
|
|
3
|
+
*
|
|
4
|
+
* @author Jerry Bendy (https://github.com/jerrybendy)
|
|
5
|
+
* @licence MIT
|
|
6
|
+
*/
|
|
7
|
+
//@ts-nocheck
|
|
8
|
+
(function (self) {
|
|
9
|
+
'use strict';
|
|
10
|
+
var nativeURLSearchParams = (function () {
|
|
11
|
+
// #41 Fix issue in RN
|
|
12
|
+
try {
|
|
13
|
+
if (self.URLSearchParams && (new self.URLSearchParams('foo=bar')).get('foo') === 'bar') {
|
|
14
|
+
return self.URLSearchParams;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
catch (e) { }
|
|
18
|
+
return null;
|
|
19
|
+
})(), isSupportObjectConstructor = nativeURLSearchParams && (new nativeURLSearchParams({ a: 1 })).toString() === 'a=1',
|
|
20
|
+
// There is a bug in safari 10.1 (and earlier) that incorrectly decodes `%2B` as an empty space and not a plus.
|
|
21
|
+
decodesPlusesCorrectly = nativeURLSearchParams && (new nativeURLSearchParams('s=%2B').get('s') === '+'), isSupportSize = nativeURLSearchParams && 'size' in nativeURLSearchParams.prototype, __URLSearchParams__ = "__URLSearchParams__",
|
|
22
|
+
// Fix bug in Edge which cannot encode ' &' correctly
|
|
23
|
+
encodesAmpersandsCorrectly = nativeURLSearchParams ? (function () {
|
|
24
|
+
var ampersandTest = new nativeURLSearchParams();
|
|
25
|
+
ampersandTest.append('s', ' &');
|
|
26
|
+
console.log('asdassasds');
|
|
27
|
+
return ampersandTest.toString() === 's=+%26';
|
|
28
|
+
})() : true, prototype = URLSearchParamsPolyfill.prototype, iterable = !!(self.Symbol && self.Symbol.iterator);
|
|
29
|
+
if (nativeURLSearchParams && isSupportObjectConstructor && decodesPlusesCorrectly && encodesAmpersandsCorrectly && isSupportSize) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Make a URLSearchParams instance
|
|
34
|
+
*
|
|
35
|
+
* @param {object|string|URLSearchParams} search
|
|
36
|
+
* @constructor
|
|
37
|
+
*/
|
|
38
|
+
function URLSearchParamsPolyfill(search) {
|
|
39
|
+
search = search || "";
|
|
40
|
+
// support construct object with another URLSearchParams instance
|
|
41
|
+
if (search instanceof URLSearchParams || search instanceof URLSearchParamsPolyfill) {
|
|
42
|
+
search = search.toString();
|
|
43
|
+
}
|
|
44
|
+
console.log(search, search.indexOf('%') > -1, decodeURIComponent(search));
|
|
45
|
+
if (search.indexOf('%') > -1 || search.indexOf("%20") > -1) {
|
|
46
|
+
search = decodeURIComponent(search);
|
|
47
|
+
}
|
|
48
|
+
this[__URLSearchParams__] = parseToDict(search);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} name
|
|
54
|
+
* @param {string} value
|
|
55
|
+
*/
|
|
56
|
+
prototype.append = function (name, value) {
|
|
57
|
+
appendTo(this[__URLSearchParams__], name, value);
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Deletes the given search parameter, and its associated value,
|
|
61
|
+
* from the list of all search parameters.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} name
|
|
64
|
+
*/
|
|
65
|
+
prototype['delete'] = function (name) {
|
|
66
|
+
delete this[__URLSearchParams__][name];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Returns the first value associated to the given search parameter.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} name
|
|
72
|
+
* @returns {string|null}
|
|
73
|
+
*/
|
|
74
|
+
prototype.get = function (name) {
|
|
75
|
+
var dict = this[__URLSearchParams__];
|
|
76
|
+
return this.has(name) ? dict[name][0] : null;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Returns all the values association with a given search parameter.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} name
|
|
82
|
+
* @returns {Array}
|
|
83
|
+
*/
|
|
84
|
+
prototype.getAll = function (name) {
|
|
85
|
+
var dict = this[__URLSearchParams__];
|
|
86
|
+
return this.has(name) ? dict[name].slice(0) : [];
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} name
|
|
92
|
+
* @returns {boolean}
|
|
93
|
+
*/
|
|
94
|
+
prototype.has = function (name) {
|
|
95
|
+
return hasOwnProperty(this[__URLSearchParams__], name);
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Sets the value associated to a given search parameter to
|
|
99
|
+
* the given value. If there were several values, delete the
|
|
100
|
+
* others.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} name
|
|
103
|
+
* @param {string} value
|
|
104
|
+
*/
|
|
105
|
+
prototype.set = function set(name, value) {
|
|
106
|
+
this[__URLSearchParams__][name] = ['' + value];
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Returns a string containg a query string suitable for use in a URL.
|
|
110
|
+
*
|
|
111
|
+
* @returns {string}
|
|
112
|
+
*/
|
|
113
|
+
prototype.toString = function () {
|
|
114
|
+
var dict = this[__URLSearchParams__], query = [], i, key, name, value;
|
|
115
|
+
for (key in dict) {
|
|
116
|
+
name = encode(key);
|
|
117
|
+
for (i = 0, value = dict[key]; i < value.length; i++) {
|
|
118
|
+
query.push(name + '=' + encode(value[i]));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return query.join('&');
|
|
122
|
+
};
|
|
123
|
+
// There is a bug in Safari 10.1 and `Proxy`ing it is not enough.
|
|
124
|
+
var useProxy = self.Proxy && nativeURLSearchParams && (!decodesPlusesCorrectly || !encodesAmpersandsCorrectly || !isSupportObjectConstructor || !isSupportSize);
|
|
125
|
+
var propValue;
|
|
126
|
+
if (useProxy) {
|
|
127
|
+
// Safari 10.0 doesn't support Proxy, so it won't extend URLSearchParams on safari 10.0
|
|
128
|
+
propValue = new Proxy(nativeURLSearchParams, {
|
|
129
|
+
construct: function (target, args) {
|
|
130
|
+
return new target((new URLSearchParamsPolyfill(args[0]).toString()));
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
// Chrome <=60 .toString() on a function proxy got error "Function.prototype.toString is not generic"
|
|
134
|
+
propValue.toString = Function.prototype.toString.bind(URLSearchParamsPolyfill);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
propValue = URLSearchParamsPolyfill;
|
|
138
|
+
}
|
|
139
|
+
/*
|
|
140
|
+
* Apply polyfill to global object and append other prototype into it
|
|
141
|
+
*/
|
|
142
|
+
Object.defineProperty(self, 'URLSearchParams', {
|
|
143
|
+
value: propValue
|
|
144
|
+
});
|
|
145
|
+
var USPProto = self.URLSearchParams.prototype;
|
|
146
|
+
USPProto.polyfill = true;
|
|
147
|
+
// Fix #54, `toString.call(new URLSearchParams)` will return correct value when Proxy not used
|
|
148
|
+
if (!useProxy && self.Symbol) {
|
|
149
|
+
USPProto[self.Symbol.toStringTag] = 'URLSearchParams';
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @param {function} callback
|
|
154
|
+
* @param {object} thisArg
|
|
155
|
+
*/
|
|
156
|
+
if (!('forEach' in USPProto)) {
|
|
157
|
+
USPProto.forEach = function (callback, thisArg) {
|
|
158
|
+
var dict = parseToDict(this.toString());
|
|
159
|
+
Object.getOwnPropertyNames(dict).forEach(function (name) {
|
|
160
|
+
dict[name].forEach(function (value) {
|
|
161
|
+
callback.call(thisArg, value, name, this);
|
|
162
|
+
}, this);
|
|
163
|
+
}, this);
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Sort all name-value pairs
|
|
168
|
+
*/
|
|
169
|
+
if (!('sort' in USPProto)) {
|
|
170
|
+
USPProto.sort = function () {
|
|
171
|
+
var dict = parseToDict(this.toString()), keys = [], k, i, j;
|
|
172
|
+
for (k in dict) {
|
|
173
|
+
keys.push(k);
|
|
174
|
+
}
|
|
175
|
+
keys.sort();
|
|
176
|
+
for (i = 0; i < keys.length; i++) {
|
|
177
|
+
this['delete'](keys[i]);
|
|
178
|
+
}
|
|
179
|
+
for (i = 0; i < keys.length; i++) {
|
|
180
|
+
var key = keys[i], values = dict[key];
|
|
181
|
+
for (j = 0; j < values.length; j++) {
|
|
182
|
+
this.append(key, values[j]);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Returns an iterator allowing to go through all keys of
|
|
189
|
+
* the key/value pairs contained in this object.
|
|
190
|
+
*
|
|
191
|
+
* @returns {function}
|
|
192
|
+
*/
|
|
193
|
+
if (!('keys' in USPProto)) {
|
|
194
|
+
USPProto.keys = function () {
|
|
195
|
+
var items = [];
|
|
196
|
+
this.forEach(function (item, name) {
|
|
197
|
+
items.push(name);
|
|
198
|
+
});
|
|
199
|
+
return makeIterator(items);
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Returns an iterator allowing to go through all values of
|
|
204
|
+
* the key/value pairs contained in this object.
|
|
205
|
+
*
|
|
206
|
+
* @returns {function}
|
|
207
|
+
*/
|
|
208
|
+
if (!('values' in USPProto)) {
|
|
209
|
+
USPProto.values = function () {
|
|
210
|
+
var items = [];
|
|
211
|
+
this.forEach(function (item) {
|
|
212
|
+
items.push(item);
|
|
213
|
+
});
|
|
214
|
+
return makeIterator(items);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Returns an iterator allowing to go through all key/value
|
|
219
|
+
* pairs contained in this object.
|
|
220
|
+
*
|
|
221
|
+
* @returns {function}
|
|
222
|
+
*/
|
|
223
|
+
if (!('entries' in USPProto)) {
|
|
224
|
+
USPProto.entries = function () {
|
|
225
|
+
var items = [];
|
|
226
|
+
this.forEach(function (item, name) {
|
|
227
|
+
items.push([name, item]);
|
|
228
|
+
});
|
|
229
|
+
return makeIterator(items);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
if (iterable) {
|
|
233
|
+
USPProto[self.Symbol.iterator] = USPProto[self.Symbol.iterator] || USPProto.entries;
|
|
234
|
+
}
|
|
235
|
+
if (!('size' in USPProto)) {
|
|
236
|
+
Object.defineProperty(USPProto, 'size', {
|
|
237
|
+
get: function () {
|
|
238
|
+
var dict = parseToDict(this.toString());
|
|
239
|
+
if (USPProto === this) {
|
|
240
|
+
throw new TypeError('Illegal invocation at URLSearchParams.invokeGetter');
|
|
241
|
+
}
|
|
242
|
+
return Object.keys(dict).reduce(function (prev, cur) {
|
|
243
|
+
return prev + dict[cur].length;
|
|
244
|
+
}, 0);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
function encode(str) {
|
|
249
|
+
var replace = {
|
|
250
|
+
'!': '%21',
|
|
251
|
+
"'": '%27',
|
|
252
|
+
'(': '%28',
|
|
253
|
+
')': '%29',
|
|
254
|
+
'~': '%7E',
|
|
255
|
+
'%20': '+',
|
|
256
|
+
'%00': '\x00'
|
|
257
|
+
};
|
|
258
|
+
return encodeURIComponent(str).replace(/[!'\(\)~]|%20|%00/g, function (match) {
|
|
259
|
+
return replace[match];
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
function decode(str) {
|
|
263
|
+
return str
|
|
264
|
+
.replace(/[ +]/g, '%20')
|
|
265
|
+
.replace(/(%[a-f0-9]{2})+/ig, function (match) {
|
|
266
|
+
return decodeURIComponent(match);
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
function makeIterator(arr) {
|
|
270
|
+
var iterator = {
|
|
271
|
+
next: function () {
|
|
272
|
+
var value = arr.shift();
|
|
273
|
+
return { done: value === undefined, value: value };
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
if (iterable) {
|
|
277
|
+
iterator[self.Symbol.iterator] = function () {
|
|
278
|
+
return iterator;
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
return iterator;
|
|
282
|
+
}
|
|
283
|
+
function parseToDict(search) {
|
|
284
|
+
var dict = {};
|
|
285
|
+
if (typeof search === "object") {
|
|
286
|
+
// if `search` is an array, treat it as a sequence
|
|
287
|
+
if (isArray(search)) {
|
|
288
|
+
for (var i = 0; i < search.length; i++) {
|
|
289
|
+
var item = search[i];
|
|
290
|
+
if (isArray(item) && item.length === 2) {
|
|
291
|
+
appendTo(dict, item[0], item[1]);
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
for (var key in search) {
|
|
300
|
+
if (search.hasOwnProperty(key)) {
|
|
301
|
+
appendTo(dict, key, search[key]);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
// remove first '?'
|
|
308
|
+
if (search.indexOf("?") === 0) {
|
|
309
|
+
search = search.slice(1);
|
|
310
|
+
}
|
|
311
|
+
var pairs = search.split("&");
|
|
312
|
+
for (var j = 0; j < pairs.length; j++) {
|
|
313
|
+
var value = pairs[j], index = value.indexOf('=');
|
|
314
|
+
if (-1 < index) {
|
|
315
|
+
appendTo(dict, decode(value.slice(0, index)), decode(value.slice(index + 1)));
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
if (value) {
|
|
319
|
+
appendTo(dict, decode(value), '');
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return dict;
|
|
325
|
+
}
|
|
326
|
+
function appendTo(dict, name, value) {
|
|
327
|
+
var val = typeof value === 'string' ? value : (value !== null && value !== undefined && typeof value.toString === 'function' ? value.toString() : JSON.stringify(value));
|
|
328
|
+
// #47 Prevent using `hasOwnProperty` as a property name
|
|
329
|
+
if (hasOwnProperty(dict, name)) {
|
|
330
|
+
dict[name].push(val);
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
dict[name] = [val];
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function isArray(val) {
|
|
337
|
+
return !!val && '[object Array]' === Object.prototype.toString.call(val);
|
|
338
|
+
}
|
|
339
|
+
function hasOwnProperty(obj, prop) {
|
|
340
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
341
|
+
}
|
|
342
|
+
})(typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : this));
|
|
343
|
+
//# sourceMappingURL=url-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-search.js","sourceRoot":"","sources":["../../../packages/canvas-polyfill/url-search.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,aAAa;AACb,CAAC,UAAS,IAAI;IACV,YAAY,CAAC;IAEb,IAAI,qBAAqB,GAAG,CAAC;QACrB,sBAAsB;QACtB,IAAI;YACA,IAAI,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;gBACpF,OAAO,IAAI,CAAC,eAAe,CAAC;aAC/B;SACJ;QAAC,OAAO,CAAC,EAAE,GAAE;QACd,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC,EAAE,EACJ,0BAA0B,GAAG,qBAAqB,IAAI,CAAC,IAAI,qBAAqB,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,KAAK;IAC9G,+GAA+G;IAC/G,sBAAsB,GAAG,qBAAqB,IAAI,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EACvG,aAAa,GAAG,qBAAqB,IAAI,MAAM,IAAI,qBAAqB,CAAC,SAAS,EAClF,mBAAmB,GAAG,qBAAqB;IAC3C,qDAAqD;IACrD,0BAA0B,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAClD,IAAI,aAAa,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAChD,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAEhC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAA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