@plasmicpkgs/plasmic-sanity-io 1.0.138 → 1.0.139

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.
@@ -15,694 +15,337 @@ var get = _interopDefault(require('dlv'));
15
15
  var React = require('react');
16
16
  var React__default = _interopDefault(React);
17
17
 
18
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
18
+ function _regeneratorRuntime() {
19
+ _regeneratorRuntime = function () {
20
+ return e;
21
+ };
22
+ var t,
23
+ e = {},
24
+ r = Object.prototype,
25
+ n = r.hasOwnProperty,
26
+ o = Object.defineProperty || function (t, e, r) {
27
+ t[e] = r.value;
28
+ },
29
+ i = "function" == typeof Symbol ? Symbol : {},
30
+ a = i.iterator || "@@iterator",
31
+ c = i.asyncIterator || "@@asyncIterator",
32
+ u = i.toStringTag || "@@toStringTag";
33
+ function define(t, e, r) {
34
+ return Object.defineProperty(t, e, {
35
+ value: r,
36
+ enumerable: !0,
37
+ configurable: !0,
38
+ writable: !0
39
+ }), t[e];
40
+ }
19
41
  try {
20
- var info = gen[key](arg);
21
- var value = info.value;
22
- } catch (error) {
23
- reject(error);
24
- return;
42
+ define({}, "");
43
+ } catch (t) {
44
+ define = function (t, e, r) {
45
+ return t[e] = r;
46
+ };
25
47
  }
26
- if (info.done) {
27
- resolve(value);
28
- } else {
29
- Promise.resolve(value).then(_next, _throw);
48
+ function wrap(t, e, r, n) {
49
+ var i = e && e.prototype instanceof Generator ? e : Generator,
50
+ a = Object.create(i.prototype),
51
+ c = new Context(n || []);
52
+ return o(a, "_invoke", {
53
+ value: makeInvokeMethod(t, r, c)
54
+ }), a;
30
55
  }
31
- }
32
- function _asyncToGenerator(fn) {
33
- return function () {
34
- var self = this,
35
- args = arguments;
36
- return new Promise(function (resolve, reject) {
37
- var gen = fn.apply(self, args);
38
- function _next(value) {
39
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
40
- }
41
- function _throw(err) {
42
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
43
- }
44
- _next(undefined);
45
- });
46
- };
47
- }
48
-
49
- function createCommonjsModule(fn, module) {
50
- return module = { exports: {} }, fn(module, module.exports), module.exports;
51
- }
52
-
53
- var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
54
- /**
55
- * Copyright (c) 2014-present, Facebook, Inc.
56
- *
57
- * This source code is licensed under the MIT license found in the
58
- * LICENSE file in the root directory of this source tree.
59
- */
60
-
61
- var runtime = function (exports) {
62
-
63
- var Op = Object.prototype;
64
- var hasOwn = Op.hasOwnProperty;
65
- var undefined$1; // More compressible than void 0.
66
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
67
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
68
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
69
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
70
- function define(obj, key, value) {
71
- Object.defineProperty(obj, key, {
72
- value: value,
73
- enumerable: true,
74
- configurable: true,
75
- writable: true
76
- });
77
- return obj[key];
78
- }
56
+ function tryCatch(t, e, r) {
79
57
  try {
80
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
81
- define({}, "");
82
- } catch (err) {
83
- define = function define(obj, key, value) {
84
- return obj[key] = value;
58
+ return {
59
+ type: "normal",
60
+ arg: t.call(e, r)
61
+ };
62
+ } catch (t) {
63
+ return {
64
+ type: "throw",
65
+ arg: t
85
66
  };
86
67
  }
87
- function wrap(innerFn, outerFn, self, tryLocsList) {
88
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
89
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
90
- var generator = Object.create(protoGenerator.prototype);
91
- var context = new Context(tryLocsList || []);
92
-
93
- // The ._invoke method unifies the implementations of the .next,
94
- // .throw, and .return methods.
95
- generator._invoke = makeInvokeMethod(innerFn, self, context);
96
- return generator;
97
- }
98
- exports.wrap = wrap;
99
-
100
- // Try/catch helper to minimize deoptimizations. Returns a completion
101
- // record like context.tryEntries[i].completion. This interface could
102
- // have been (and was previously) designed to take a closure to be
103
- // invoked without arguments, but in all the cases we care about we
104
- // already have an existing method we want to call, so there's no need
105
- // to create a new function object. We can even get away with assuming
106
- // the method takes exactly one argument, since that happens to be true
107
- // in every case, so we don't have to touch the arguments object. The
108
- // only additional allocation required is the completion record, which
109
- // has a stable shape and so hopefully should be cheap to allocate.
110
- function tryCatch(fn, obj, arg) {
111
- try {
112
- return {
113
- type: "normal",
114
- arg: fn.call(obj, arg)
115
- };
116
- } catch (err) {
117
- return {
118
- type: "throw",
119
- arg: err
120
- };
121
- }
122
- }
123
- var GenStateSuspendedStart = "suspendedStart";
124
- var GenStateSuspendedYield = "suspendedYield";
125
- var GenStateExecuting = "executing";
126
- var GenStateCompleted = "completed";
127
-
128
- // Returning this object from the innerFn has the same effect as
129
- // breaking out of the dispatch switch statement.
130
- var ContinueSentinel = {};
131
-
132
- // Dummy constructor functions that we use as the .constructor and
133
- // .constructor.prototype properties for functions that return Generator
134
- // objects. For full spec compliance, you may wish to configure your
135
- // minifier not to mangle the names of these two functions.
136
- function Generator() {}
137
- function GeneratorFunction() {}
138
- function GeneratorFunctionPrototype() {}
139
-
140
- // This is a polyfill for %IteratorPrototype% for environments that
141
- // don't natively support it.
142
- var IteratorPrototype = {};
143
- define(IteratorPrototype, iteratorSymbol, function () {
144
- return this;
68
+ }
69
+ e.wrap = wrap;
70
+ var h = "suspendedStart",
71
+ l = "suspendedYield",
72
+ f = "executing",
73
+ s = "completed",
74
+ y = {};
75
+ function Generator() {}
76
+ function GeneratorFunction() {}
77
+ function GeneratorFunctionPrototype() {}
78
+ var p = {};
79
+ define(p, a, function () {
80
+ return this;
81
+ });
82
+ var d = Object.getPrototypeOf,
83
+ v = d && d(d(values([])));
84
+ v && v !== r && n.call(v, a) && (p = v);
85
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
86
+ function defineIteratorMethods(t) {
87
+ ["next", "throw", "return"].forEach(function (e) {
88
+ define(t, e, function (t) {
89
+ return this._invoke(e, t);
90
+ });
145
91
  });
146
- var getProto = Object.getPrototypeOf;
147
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
148
- if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
149
- // This environment has a native %IteratorPrototype%; use it instead
150
- // of the polyfill.
151
- IteratorPrototype = NativeIteratorPrototype;
152
- }
153
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
154
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
155
- define(Gp, "constructor", GeneratorFunctionPrototype);
156
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
157
- GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
158
-
159
- // Helper for defining the .next, .throw, and .return methods of the
160
- // Iterator interface in terms of a single ._invoke method.
161
- function defineIteratorMethods(prototype) {
162
- ["next", "throw", "return"].forEach(function (method) {
163
- define(prototype, method, function (arg) {
164
- return this._invoke(method, arg);
92
+ }
93
+ function AsyncIterator(t, e) {
94
+ function invoke(r, o, i, a) {
95
+ var c = tryCatch(t[r], t, o);
96
+ if ("throw" !== c.type) {
97
+ var u = c.arg,
98
+ h = u.value;
99
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
100
+ invoke("next", t, i, a);
101
+ }, function (t) {
102
+ invoke("throw", t, i, a);
103
+ }) : e.resolve(h).then(function (t) {
104
+ u.value = t, i(u);
105
+ }, function (t) {
106
+ return invoke("throw", t, i, a);
165
107
  });
166
- });
167
- }
168
- exports.isGeneratorFunction = function (genFun) {
169
- var ctor = typeof genFun === "function" && genFun.constructor;
170
- return ctor ? ctor === GeneratorFunction ||
171
- // For the native GeneratorFunction constructor, the best we can
172
- // do is to check its .name property.
173
- (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
174
- };
175
- exports.mark = function (genFun) {
176
- if (Object.setPrototypeOf) {
177
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
178
- } else {
179
- genFun.__proto__ = GeneratorFunctionPrototype;
180
- define(genFun, toStringTagSymbol, "GeneratorFunction");
181
- }
182
- genFun.prototype = Object.create(Gp);
183
- return genFun;
184
- };
185
-
186
- // Within the body of any async function, `await x` is transformed to
187
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
188
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
189
- // meant to be awaited.
190
- exports.awrap = function (arg) {
191
- return {
192
- __await: arg
193
- };
194
- };
195
- function AsyncIterator(generator, PromiseImpl) {
196
- function invoke(method, arg, resolve, reject) {
197
- var record = tryCatch(generator[method], generator, arg);
198
- if (record.type === "throw") {
199
- reject(record.arg);
200
- } else {
201
- var result = record.arg;
202
- var value = result.value;
203
- if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
204
- return PromiseImpl.resolve(value.__await).then(function (value) {
205
- invoke("next", value, resolve, reject);
206
- }, function (err) {
207
- invoke("throw", err, resolve, reject);
208
- });
209
- }
210
- return PromiseImpl.resolve(value).then(function (unwrapped) {
211
- // When a yielded Promise is resolved, its final value becomes
212
- // the .value of the Promise<{value,done}> result for the
213
- // current iteration.
214
- result.value = unwrapped;
215
- resolve(result);
216
- }, function (error) {
217
- // If a rejected Promise was yielded, throw the rejection back
218
- // into the async generator function so it can be handled there.
219
- return invoke("throw", error, resolve, reject);
220
- });
221
- }
222
108
  }
223
- var previousPromise;
224
- function enqueue(method, arg) {
109
+ a(c.arg);
110
+ }
111
+ var r;
112
+ o(this, "_invoke", {
113
+ value: function (t, n) {
225
114
  function callInvokeWithMethodAndArg() {
226
- return new PromiseImpl(function (resolve, reject) {
227
- invoke(method, arg, resolve, reject);
115
+ return new e(function (e, r) {
116
+ invoke(t, n, e, r);
228
117
  });
229
118
  }
230
- return previousPromise =
231
- // If enqueue has been called before, then we want to wait until
232
- // all previous Promises have been resolved before calling invoke,
233
- // so that results are always delivered in the correct order. If
234
- // enqueue has not been called before, then it is important to
235
- // call invoke immediately, without waiting on a callback to fire,
236
- // so that the async generator function has the opportunity to do
237
- // any necessary setup in a predictable way. This predictability
238
- // is why the Promise constructor synchronously invokes its
239
- // executor callback, and why async functions synchronously
240
- // execute code before the first await. Since we implement simple
241
- // async functions in terms of async generators, it is especially
242
- // important to get this right, even though it requires care.
243
- previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
244
- // Avoid propagating failures to Promises returned by later
245
- // invocations of the iterator.
246
- callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
119
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
247
120
  }
248
-
249
- // Define the unified helper method that is used to implement .next,
250
- // .throw, and .return (see defineIteratorMethods).
251
- this._invoke = enqueue;
252
- }
253
- defineIteratorMethods(AsyncIterator.prototype);
254
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
255
- return this;
256
121
  });
257
- exports.AsyncIterator = AsyncIterator;
258
-
259
- // Note that simple async functions are implemented on top of
260
- // AsyncIterator objects; they just return a Promise for the value of
261
- // the final result produced by the iterator.
262
- exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
263
- if (PromiseImpl === void 0) PromiseImpl = Promise;
264
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
265
- return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
266
- : iter.next().then(function (result) {
267
- return result.done ? result.value : iter.next();
268
- });
269
- };
270
- function makeInvokeMethod(innerFn, self, context) {
271
- var state = GenStateSuspendedStart;
272
- return function invoke(method, arg) {
273
- if (state === GenStateExecuting) {
274
- throw new Error("Generator is already running");
275
- }
276
- if (state === GenStateCompleted) {
277
- if (method === "throw") {
278
- throw arg;
279
- }
280
-
281
- // Be forgiving, per 25.3.3.3.3 of the spec:
282
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
283
- return doneResult();
284
- }
285
- context.method = method;
286
- context.arg = arg;
287
- while (true) {
288
- var delegate = context.delegate;
289
- if (delegate) {
290
- var delegateResult = maybeInvokeDelegate(delegate, context);
291
- if (delegateResult) {
292
- if (delegateResult === ContinueSentinel) continue;
293
- return delegateResult;
294
- }
295
- }
296
- if (context.method === "next") {
297
- // Setting context._sent for legacy support of Babel's
298
- // function.sent implementation.
299
- context.sent = context._sent = context.arg;
300
- } else if (context.method === "throw") {
301
- if (state === GenStateSuspendedStart) {
302
- state = GenStateCompleted;
303
- throw context.arg;
304
- }
305
- context.dispatchException(context.arg);
306
- } else if (context.method === "return") {
307
- context.abrupt("return", context.arg);
308
- }
309
- state = GenStateExecuting;
310
- var record = tryCatch(innerFn, self, context);
311
- if (record.type === "normal") {
312
- // If an exception is thrown from innerFn, we leave state ===
313
- // GenStateExecuting and loop back for another invocation.
314
- state = context.done ? GenStateCompleted : GenStateSuspendedYield;
315
- if (record.arg === ContinueSentinel) {
316
- continue;
317
- }
318
- return {
319
- value: record.arg,
320
- done: context.done
321
- };
322
- } else if (record.type === "throw") {
323
- state = GenStateCompleted;
324
- // Dispatch the exception by looping back around to the
325
- // context.dispatchException(context.arg) call above.
326
- context.method = "throw";
327
- context.arg = record.arg;
122
+ }
123
+ function makeInvokeMethod(e, r, n) {
124
+ var o = h;
125
+ return function (i, a) {
126
+ if (o === f) throw new Error("Generator is already running");
127
+ if (o === s) {
128
+ if ("throw" === i) throw a;
129
+ return {
130
+ value: t,
131
+ done: !0
132
+ };
133
+ }
134
+ for (n.method = i, n.arg = a;;) {
135
+ var c = n.delegate;
136
+ if (c) {
137
+ var u = maybeInvokeDelegate(c, n);
138
+ if (u) {
139
+ if (u === y) continue;
140
+ return u;
328
141
  }
329
142
  }
330
- };
331
- }
332
-
333
- // Call delegate.iterator[context.method](context.arg) and handle the
334
- // result, either by returning a { value, done } result from the
335
- // delegate iterator, or by modifying context.method and context.arg,
336
- // setting context.delegate to null, and returning the ContinueSentinel.
337
- function maybeInvokeDelegate(delegate, context) {
338
- var method = delegate.iterator[context.method];
339
- if (method === undefined$1) {
340
- // A .throw or .return when the delegate iterator has no .throw
341
- // method always terminates the yield* loop.
342
- context.delegate = null;
343
- if (context.method === "throw") {
344
- // Note: ["return"] must be used for ES3 parsing compatibility.
345
- if (delegate.iterator["return"]) {
346
- // If the delegate iterator has a return method, give it a
347
- // chance to clean up.
348
- context.method = "return";
349
- context.arg = undefined$1;
350
- maybeInvokeDelegate(delegate, context);
351
- if (context.method === "throw") {
352
- // If maybeInvokeDelegate(context) changed context.method from
353
- // "return" to "throw", let that override the TypeError below.
354
- return ContinueSentinel;
355
- }
356
- }
357
- context.method = "throw";
358
- context.arg = new TypeError("The iterator does not provide a 'throw' method");
143
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
144
+ if (o === h) throw o = s, n.arg;
145
+ n.dispatchException(n.arg);
146
+ } else "return" === n.method && n.abrupt("return", n.arg);
147
+ o = f;
148
+ var p = tryCatch(e, r, n);
149
+ if ("normal" === p.type) {
150
+ if (o = n.done ? s : l, p.arg === y) continue;
151
+ return {
152
+ value: p.arg,
153
+ done: n.done
154
+ };
359
155
  }
360
- return ContinueSentinel;
156
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
361
157
  }
362
- var record = tryCatch(method, delegate.iterator, context.arg);
363
- if (record.type === "throw") {
364
- context.method = "throw";
365
- context.arg = record.arg;
366
- context.delegate = null;
367
- return ContinueSentinel;
368
- }
369
- var info = record.arg;
370
- if (!info) {
371
- context.method = "throw";
372
- context.arg = new TypeError("iterator result is not an object");
373
- context.delegate = null;
374
- return ContinueSentinel;
375
- }
376
- if (info.done) {
377
- // Assign the result of the finished delegate to the temporary
378
- // variable specified by delegate.resultName (see delegateYield).
379
- context[delegate.resultName] = info.value;
380
-
381
- // Resume execution at the desired location (see delegateYield).
382
- context.next = delegate.nextLoc;
383
-
384
- // If context.method was "throw" but the delegate handled the
385
- // exception, let the outer generator proceed normally. If
386
- // context.method was "next", forget context.arg since it has been
387
- // "consumed" by the delegate iterator. If context.method was
388
- // "return", allow the original .return call to continue in the
389
- // outer generator.
390
- if (context.method !== "return") {
391
- context.method = "next";
392
- context.arg = undefined$1;
393
- }
394
- } else {
395
- // Re-yield the result returned by the delegate method.
396
- return info;
158
+ };
159
+ }
160
+ function maybeInvokeDelegate(e, r) {
161
+ var n = r.method,
162
+ o = e.iterator[n];
163
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
164
+ var i = tryCatch(o, e.iterator, r.arg);
165
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
166
+ var a = i.arg;
167
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
168
+ }
169
+ function pushTryEntry(t) {
170
+ var e = {
171
+ tryLoc: t[0]
172
+ };
173
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
174
+ }
175
+ function resetTryEntry(t) {
176
+ var e = t.completion || {};
177
+ e.type = "normal", delete e.arg, t.completion = e;
178
+ }
179
+ function Context(t) {
180
+ this.tryEntries = [{
181
+ tryLoc: "root"
182
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
183
+ }
184
+ function values(e) {
185
+ if (e || "" === e) {
186
+ var r = e[a];
187
+ if (r) return r.call(e);
188
+ if ("function" == typeof e.next) return e;
189
+ if (!isNaN(e.length)) {
190
+ var o = -1,
191
+ i = function next() {
192
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
193
+ return next.value = t, next.done = !0, next;
194
+ };
195
+ return i.next = i;
397
196
  }
398
-
399
- // The delegate iterator is finished, so forget it and continue with
400
- // the outer generator.
401
- context.delegate = null;
402
- return ContinueSentinel;
403
197
  }
404
-
405
- // Define Generator.prototype.{next,throw,return} in terms of the
406
- // unified ._invoke helper method.
407
- defineIteratorMethods(Gp);
408
- define(Gp, toStringTagSymbol, "Generator");
409
-
410
- // A Generator should always return itself as the iterator object when the
411
- // @@iterator function is called on it. Some browsers' implementations of the
412
- // iterator prototype chain incorrectly implement this, causing the Generator
413
- // object to not be returned from this call. This ensures that doesn't happen.
414
- // See https://github.com/facebook/regenerator/issues/274 for more details.
415
- define(Gp, iteratorSymbol, function () {
416
- return this;
417
- });
418
- define(Gp, "toString", function () {
419
- return "[object Generator]";
198
+ throw new TypeError(typeof e + " is not iterable");
199
+ }
200
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
201
+ value: GeneratorFunctionPrototype,
202
+ configurable: !0
203
+ }), o(GeneratorFunctionPrototype, "constructor", {
204
+ value: GeneratorFunction,
205
+ configurable: !0
206
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
207
+ var e = "function" == typeof t && t.constructor;
208
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
209
+ }, e.mark = function (t) {
210
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
211
+ }, e.awrap = function (t) {
212
+ return {
213
+ __await: t
214
+ };
215
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
216
+ return this;
217
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
218
+ void 0 === i && (i = Promise);
219
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
220
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
221
+ return t.done ? t.value : a.next();
420
222
  });
421
- function pushTryEntry(locs) {
422
- var entry = {
423
- tryLoc: locs[0]
424
- };
425
- if (1 in locs) {
426
- entry.catchLoc = locs[1];
427
- }
428
- if (2 in locs) {
429
- entry.finallyLoc = locs[2];
430
- entry.afterLoc = locs[3];
223
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
224
+ return this;
225
+ }), define(g, "toString", function () {
226
+ return "[object Generator]";
227
+ }), e.keys = function (t) {
228
+ var e = Object(t),
229
+ r = [];
230
+ for (var n in e) r.push(n);
231
+ return r.reverse(), function next() {
232
+ for (; r.length;) {
233
+ var t = r.pop();
234
+ if (t in e) return next.value = t, next.done = !1, next;
431
235
  }
432
- this.tryEntries.push(entry);
433
- }
434
- function resetTryEntry(entry) {
435
- var record = entry.completion || {};
436
- record.type = "normal";
437
- delete record.arg;
438
- entry.completion = record;
439
- }
440
- function Context(tryLocsList) {
441
- // The root entry object (effectively a try statement without a catch
442
- // or a finally block) gives us a place to store values thrown from
443
- // locations where there is no enclosing try statement.
444
- this.tryEntries = [{
445
- tryLoc: "root"
446
- }];
447
- tryLocsList.forEach(pushTryEntry, this);
448
- this.reset(true);
449
- }
450
- exports.keys = function (object) {
451
- var keys = [];
452
- for (var key in object) {
453
- keys.push(key);
454
- }
455
- keys.reverse();
456
-
457
- // Rather than returning an object with a next method, we keep
458
- // things simple and return the next function itself.
459
- return function next() {
460
- while (keys.length) {
461
- var key = keys.pop();
462
- if (key in object) {
463
- next.value = key;
464
- next.done = false;
465
- return next;
466
- }
467
- }
468
-
469
- // To avoid creating an additional object, we just hang the .value
470
- // and .done properties off the next function object itself. This
471
- // also ensures that the minifier will not anonymize the function.
472
- next.done = true;
473
- return next;
474
- };
236
+ return next.done = !0, next;
475
237
  };
476
- function values(iterable) {
477
- if (iterable) {
478
- var iteratorMethod = iterable[iteratorSymbol];
479
- if (iteratorMethod) {
480
- return iteratorMethod.call(iterable);
481
- }
482
- if (typeof iterable.next === "function") {
483
- return iterable;
484
- }
485
- if (!isNaN(iterable.length)) {
486
- var i = -1,
487
- next = function next() {
488
- while (++i < iterable.length) {
489
- if (hasOwn.call(iterable, i)) {
490
- next.value = iterable[i];
491
- next.done = false;
492
- return next;
493
- }
494
- }
495
- next.value = undefined$1;
496
- next.done = true;
497
- return next;
498
- };
499
- return next.next = next;
500
- }
238
+ }, e.values = values, Context.prototype = {
239
+ constructor: Context,
240
+ reset: function (e) {
241
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
242
+ },
243
+ stop: function () {
244
+ this.done = !0;
245
+ var t = this.tryEntries[0].completion;
246
+ if ("throw" === t.type) throw t.arg;
247
+ return this.rval;
248
+ },
249
+ dispatchException: function (e) {
250
+ if (this.done) throw e;
251
+ var r = this;
252
+ function handle(n, o) {
253
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
501
254
  }
502
-
503
- // Return an iterator with no values.
504
- return {
505
- next: doneResult
506
- };
507
- }
508
- exports.values = values;
509
- function doneResult() {
510
- return {
511
- value: undefined$1,
512
- done: true
513
- };
514
- }
515
- Context.prototype = {
516
- constructor: Context,
517
- reset: function reset(skipTempReset) {
518
- this.prev = 0;
519
- this.next = 0;
520
- // Resetting context._sent for legacy support of Babel's
521
- // function.sent implementation.
522
- this.sent = this._sent = undefined$1;
523
- this.done = false;
524
- this.delegate = null;
525
- this.method = "next";
526
- this.arg = undefined$1;
527
- this.tryEntries.forEach(resetTryEntry);
528
- if (!skipTempReset) {
529
- for (var name in this) {
530
- // Not sure about the optimal order of these conditions:
531
- if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
532
- this[name] = undefined$1;
533
- }
534
- }
535
- }
536
- },
537
- stop: function stop() {
538
- this.done = true;
539
- var rootEntry = this.tryEntries[0];
540
- var rootRecord = rootEntry.completion;
541
- if (rootRecord.type === "throw") {
542
- throw rootRecord.arg;
543
- }
544
- return this.rval;
545
- },
546
- dispatchException: function dispatchException(exception) {
547
- if (this.done) {
548
- throw exception;
549
- }
550
- var context = this;
551
- function handle(loc, caught) {
552
- record.type = "throw";
553
- record.arg = exception;
554
- context.next = loc;
555
- if (caught) {
556
- // If the dispatched exception was caught by a catch block,
557
- // then let that catch block handle the exception normally.
558
- context.method = "next";
559
- context.arg = undefined$1;
560
- }
561
- return !!caught;
562
- }
563
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
564
- var entry = this.tryEntries[i];
565
- var record = entry.completion;
566
- if (entry.tryLoc === "root") {
567
- // Exception thrown outside of any try block that could handle
568
- // it, so set the completion value of the entire function to
569
- // throw the exception.
570
- return handle("end");
571
- }
572
- if (entry.tryLoc <= this.prev) {
573
- var hasCatch = hasOwn.call(entry, "catchLoc");
574
- var hasFinally = hasOwn.call(entry, "finallyLoc");
575
- if (hasCatch && hasFinally) {
576
- if (this.prev < entry.catchLoc) {
577
- return handle(entry.catchLoc, true);
578
- } else if (this.prev < entry.finallyLoc) {
579
- return handle(entry.finallyLoc);
580
- }
581
- } else if (hasCatch) {
582
- if (this.prev < entry.catchLoc) {
583
- return handle(entry.catchLoc, true);
584
- }
585
- } else if (hasFinally) {
586
- if (this.prev < entry.finallyLoc) {
587
- return handle(entry.finallyLoc);
588
- }
589
- } else {
590
- throw new Error("try statement without catch or finally");
591
- }
592
- }
593
- }
594
- },
595
- abrupt: function abrupt(type, arg) {
596
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
597
- var entry = this.tryEntries[i];
598
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
599
- var finallyEntry = entry;
600
- break;
255
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
256
+ var i = this.tryEntries[o],
257
+ a = i.completion;
258
+ if ("root" === i.tryLoc) return handle("end");
259
+ if (i.tryLoc <= this.prev) {
260
+ var c = n.call(i, "catchLoc"),
261
+ u = n.call(i, "finallyLoc");
262
+ if (c && u) {
263
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
264
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
265
+ } else if (c) {
266
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
267
+ } else {
268
+ if (!u) throw new Error("try statement without catch or finally");
269
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
601
270
  }
602
271
  }
603
- if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
604
- // Ignore the finally entry if control is not jumping to a
605
- // location outside the try/catch block.
606
- finallyEntry = null;
607
- }
608
- var record = finallyEntry ? finallyEntry.completion : {};
609
- record.type = type;
610
- record.arg = arg;
611
- if (finallyEntry) {
612
- this.method = "next";
613
- this.next = finallyEntry.finallyLoc;
614
- return ContinueSentinel;
615
- }
616
- return this.complete(record);
617
- },
618
- complete: function complete(record, afterLoc) {
619
- if (record.type === "throw") {
620
- throw record.arg;
621
- }
622
- if (record.type === "break" || record.type === "continue") {
623
- this.next = record.arg;
624
- } else if (record.type === "return") {
625
- this.rval = this.arg = record.arg;
626
- this.method = "return";
627
- this.next = "end";
628
- } else if (record.type === "normal" && afterLoc) {
629
- this.next = afterLoc;
630
- }
631
- return ContinueSentinel;
632
- },
633
- finish: function finish(finallyLoc) {
634
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
635
- var entry = this.tryEntries[i];
636
- if (entry.finallyLoc === finallyLoc) {
637
- this.complete(entry.completion, entry.afterLoc);
638
- resetTryEntry(entry);
639
- return ContinueSentinel;
640
- }
272
+ }
273
+ },
274
+ abrupt: function (t, e) {
275
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
276
+ var o = this.tryEntries[r];
277
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
278
+ var i = o;
279
+ break;
641
280
  }
642
- },
643
- "catch": function _catch(tryLoc) {
644
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
645
- var entry = this.tryEntries[i];
646
- if (entry.tryLoc === tryLoc) {
647
- var record = entry.completion;
648
- if (record.type === "throw") {
649
- var thrown = record.arg;
650
- resetTryEntry(entry);
651
- }
652
- return thrown;
281
+ }
282
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
283
+ var a = i ? i.completion : {};
284
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
285
+ },
286
+ complete: function (t, e) {
287
+ if ("throw" === t.type) throw t.arg;
288
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
289
+ },
290
+ finish: function (t) {
291
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
292
+ var r = this.tryEntries[e];
293
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
294
+ }
295
+ },
296
+ catch: function (t) {
297
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
298
+ var r = this.tryEntries[e];
299
+ if (r.tryLoc === t) {
300
+ var n = r.completion;
301
+ if ("throw" === n.type) {
302
+ var o = n.arg;
303
+ resetTryEntry(r);
653
304
  }
305
+ return o;
654
306
  }
655
-
656
- // The context.catch method must only be called with a location
657
- // argument that corresponds to a known catch block.
658
- throw new Error("illegal catch attempt");
659
- },
660
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
661
- this.delegate = {
662
- iterator: values(iterable),
663
- resultName: resultName,
664
- nextLoc: nextLoc
665
- };
666
- if (this.method === "next") {
667
- // Deliberately forget the last sent value so that we don't
668
- // accidentally pass it on to the delegate.
669
- this.arg = undefined$1;
670
- }
671
- return ContinueSentinel;
672
307
  }
673
- };
674
-
675
- // Regardless of whether this script is executing as a CommonJS module
676
- // or not, return the runtime object so that we can declare the variable
677
- // regeneratorRuntime in the outer scope, which allows this module to be
678
- // injected easily by `bin/regenerator --include-runtime script.js`.
679
- return exports;
680
- }(
681
- // If this script is executing as a CommonJS module, use module.exports
682
- // as the regeneratorRuntime namespace. Otherwise create a new empty
683
- // object. Either way, the resulting object will be used to initialize
684
- // the regeneratorRuntime variable at the top of this file.
685
- module.exports );
686
- try {
687
- regeneratorRuntime = runtime;
688
- } catch (accidentalStrictMode) {
689
- // This module should not be running in strict mode, so the above
690
- // assignment should always work unless something is misconfigured. Just
691
- // in case runtime.js accidentally runs in strict mode, in modern engines
692
- // we can explicitly access globalThis. In older engines we can escape
693
- // strict mode using a global Function call. This could conceivably fail
694
- // if a Content Security Policy forbids using Function, but in that case
695
- // the proper solution is to fix the accidental strict mode problem. If
696
- // you've misconfigured your bundler to force strict mode and applied a
697
- // CSP to forbid Function, and you're not willing to fix either of those
698
- // problems, please detail your unique predicament in a GitHub issue.
699
- if (typeof globalThis === "object") {
700
- globalThis.regeneratorRuntime = runtime;
701
- } else {
702
- Function("r", "regeneratorRuntime = r")(runtime);
308
+ throw new Error("illegal catch attempt");
309
+ },
310
+ delegateYield: function (e, r, n) {
311
+ return this.delegate = {
312
+ iterator: values(e),
313
+ resultName: r,
314
+ nextLoc: n
315
+ }, "next" === this.method && (this.arg = t), y;
703
316
  }
317
+ }, e;
318
+ }
319
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
320
+ try {
321
+ var info = gen[key](arg);
322
+ var value = info.value;
323
+ } catch (error) {
324
+ reject(error);
325
+ return;
326
+ }
327
+ if (info.done) {
328
+ resolve(value);
329
+ } else {
330
+ Promise.resolve(value).then(_next, _throw);
704
331
  }
705
- });
332
+ }
333
+ function _asyncToGenerator(fn) {
334
+ return function () {
335
+ var self = this,
336
+ args = arguments;
337
+ return new Promise(function (resolve, reject) {
338
+ var gen = fn.apply(self, args);
339
+ function _next(value) {
340
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
341
+ }
342
+ function _throw(err) {
343
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
344
+ }
345
+ _next(undefined);
346
+ });
347
+ };
348
+ }
706
349
 
707
350
  var filterParameters = [{
708
351
  value: '==',
@@ -960,22 +603,20 @@ function SanityFetcher(_ref2) {
960
603
  return acc;
961
604
  }, []);
962
605
  };
963
- var allDataTypes = query.usePlasmicQueryData(JSON.stringify(creds) + "/SANITY_DOCTYPES", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
606
+ var allDataTypes = query.usePlasmicQueryData(JSON.stringify(creds) + "/SANITY_DOCTYPES", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
964
607
  var sanity, resp;
965
- return runtime_1.wrap(function _callee$(_context) {
966
- while (1) {
967
- switch (_context.prev = _context.next) {
968
- case 0:
969
- sanity = makeSanityClient(creds);
970
- _context.next = 3;
971
- return sanity.fetch("*{_type}").then(filterUniqueDocTypes);
972
- case 3:
973
- resp = _context.sent;
974
- return _context.abrupt("return", resp);
975
- case 5:
976
- case "end":
977
- return _context.stop();
978
- }
608
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
609
+ while (1) switch (_context.prev = _context.next) {
610
+ case 0:
611
+ sanity = makeSanityClient(creds);
612
+ _context.next = 3;
613
+ return sanity.fetch("*{_type}").then(filterUniqueDocTypes);
614
+ case 3:
615
+ resp = _context.sent;
616
+ return _context.abrupt("return", resp);
617
+ case 5:
618
+ case "end":
619
+ return _context.stop();
979
620
  }
980
621
  }, _callee);
981
622
  })));
@@ -1004,16 +645,14 @@ function SanityFetcher(_ref2) {
1004
645
  var _usePlasmicQueryData = query.usePlasmicQueryData(unfilteredQuery ? JSON.stringify({
1005
646
  fullQuery: unfilteredQuery,
1006
647
  creds: creds
1007
- }) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
1008
- return runtime_1.wrap(function _callee2$(_context2) {
1009
- while (1) {
1010
- switch (_context2.prev = _context2.next) {
1011
- case 0:
1012
- return _context2.abrupt("return", sanity.fetch(unfilteredQuery));
1013
- case 1:
1014
- case "end":
1015
- return _context2.stop();
1016
- }
648
+ }) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
649
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
650
+ while (1) switch (_context2.prev = _context2.next) {
651
+ case 0:
652
+ return _context2.abrupt("return", sanity.fetch(unfilteredQuery));
653
+ case 1:
654
+ case "end":
655
+ return _context2.stop();
1017
656
  }
1018
657
  }, _callee2);
1019
658
  }))),
@@ -1050,21 +689,19 @@ function SanityFetcher(_ref2) {
1050
689
  var _usePlasmicQueryData2 = query.usePlasmicQueryData(filteredQuery ? JSON.stringify({
1051
690
  filteredQuery: filteredQuery,
1052
691
  creds: creds
1053
- }) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3() {
692
+ }) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1054
693
  var resp;
1055
- return runtime_1.wrap(function _callee3$(_context3) {
1056
- while (1) {
1057
- switch (_context3.prev = _context3.next) {
1058
- case 0:
1059
- _context3.next = 2;
1060
- return sanity.fetch(filteredQuery);
1061
- case 2:
1062
- resp = _context3.sent;
1063
- return _context3.abrupt("return", resp);
1064
- case 4:
1065
- case "end":
1066
- return _context3.stop();
1067
- }
694
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
695
+ while (1) switch (_context3.prev = _context3.next) {
696
+ case 0:
697
+ _context3.next = 2;
698
+ return sanity.fetch(filteredQuery);
699
+ case 2:
700
+ resp = _context3.sent;
701
+ return _context3.abrupt("return", resp);
702
+ case 4:
703
+ case "end":
704
+ return _context3.stop();
1068
705
  }
1069
706
  }, _callee3);
1070
707
  }))),
@@ -1074,7 +711,7 @@ function SanityFetcher(_ref2) {
1074
711
  className: className
1075
712
  }, "Please configure the Sanity provider with a valid projectId, dataset, and token (if necessary). Don't forget to add 'https://host.plasmicdev.com' as an authorized host on the CORS origins section of your project.");
1076
713
  }
1077
- setControlContextData == null ? void 0 : setControlContextData({
714
+ setControlContextData == null || setControlContextData({
1078
715
  docTypes: docTypes
1079
716
  });
1080
717
  if (!groq && !docType) {
@@ -1118,7 +755,7 @@ function SanityFetcher(_ref2) {
1118
755
  }];
1119
756
  }
1120
757
  });
1121
- setControlContextData == null ? void 0 : setControlContextData({
758
+ setControlContextData == null || setControlContextData({
1122
759
  queryOptions: operators,
1123
760
  docTypes: docTypes,
1124
761
  sanityFields: sanityFields[0]
@@ -1206,7 +843,7 @@ function SanityField(_ref6) {
1206
843
  var value = get(item, field);
1207
844
  return typeof value !== "object" || value._type === "image";
1208
845
  });
1209
- setControlContextData == null ? void 0 : setControlContextData({
846
+ setControlContextData == null || setControlContextData({
1210
847
  fields: displayableFields,
1211
848
  isImage: false
1212
849
  });
@@ -1217,7 +854,7 @@ function SanityField(_ref6) {
1217
854
  path = field;
1218
855
  }
1219
856
  var data = get(item, path);
1220
- setControlContextData == null ? void 0 : setControlContextData({
857
+ setControlContextData == null || setControlContextData({
1221
858
  fields: displayableFields,
1222
859
  isImage: (data == null ? void 0 : data._type) == "image"
1223
860
  });