Rami commited on
Commit
13ed2a1
1 Parent(s): fd76f3a

have zeno cache

Browse files
.dockerignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .git
.zeno_cache/OUTPUTtext-davinci-002.pickle ADDED
Binary file (9.15 kB). View file
 
.zeno_cache/folders.pickle ADDED
@@ -0,0 +1 @@
 
 
1
+ �]�.
.zeno_cache/reports.pickle ADDED
@@ -0,0 +1 @@
 
 
1
+ �]�.
.zeno_cache/view.mjs ADDED
@@ -0,0 +1,817 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function noop() { }
2
+ function run(fn) {
3
+ return fn();
4
+ }
5
+ function blank_object() {
6
+ return Object.create(null);
7
+ }
8
+ function run_all(fns) {
9
+ fns.forEach(run);
10
+ }
11
+ function is_function(thing) {
12
+ return typeof thing === 'function';
13
+ }
14
+ function safe_not_equal(a, b) {
15
+ return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
16
+ }
17
+ function is_empty(obj) {
18
+ return Object.keys(obj).length === 0;
19
+ }
20
+
21
+ // Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM
22
+ // at the end of hydration without touching the remaining nodes.
23
+ let is_hydrating = false;
24
+ function start_hydrating() {
25
+ is_hydrating = true;
26
+ }
27
+ function end_hydrating() {
28
+ is_hydrating = false;
29
+ }
30
+ function upper_bound(low, high, key, value) {
31
+ // Return first index of value larger than input value in the range [low, high)
32
+ while (low < high) {
33
+ const mid = low + ((high - low) >> 1);
34
+ if (key(mid) <= value) {
35
+ low = mid + 1;
36
+ }
37
+ else {
38
+ high = mid;
39
+ }
40
+ }
41
+ return low;
42
+ }
43
+ function init_hydrate(target) {
44
+ if (target.hydrate_init)
45
+ return;
46
+ target.hydrate_init = true;
47
+ // We know that all children have claim_order values since the unclaimed have been detached if target is not <head>
48
+ let children = target.childNodes;
49
+ // If target is <head>, there may be children without claim_order
50
+ if (target.nodeName === 'HEAD') {
51
+ const myChildren = [];
52
+ for (let i = 0; i < children.length; i++) {
53
+ const node = children[i];
54
+ if (node.claim_order !== undefined) {
55
+ myChildren.push(node);
56
+ }
57
+ }
58
+ children = myChildren;
59
+ }
60
+ /*
61
+ * Reorder claimed children optimally.
62
+ * We can reorder claimed children optimally by finding the longest subsequence of
63
+ * nodes that are already claimed in order and only moving the rest. The longest
64
+ * subsequence of nodes that are claimed in order can be found by
65
+ * computing the longest increasing subsequence of .claim_order values.
66
+ *
67
+ * This algorithm is optimal in generating the least amount of reorder operations
68
+ * possible.
69
+ *
70
+ * Proof:
71
+ * We know that, given a set of reordering operations, the nodes that do not move
72
+ * always form an increasing subsequence, since they do not move among each other
73
+ * meaning that they must be already ordered among each other. Thus, the maximal
74
+ * set of nodes that do not move form a longest increasing subsequence.
75
+ */
76
+ // Compute longest increasing subsequence
77
+ // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j
78
+ const m = new Int32Array(children.length + 1);
79
+ // Predecessor indices + 1
80
+ const p = new Int32Array(children.length);
81
+ m[0] = -1;
82
+ let longest = 0;
83
+ for (let i = 0; i < children.length; i++) {
84
+ const current = children[i].claim_order;
85
+ // Find the largest subsequence length such that it ends in a value less than our current value
86
+ // upper_bound returns first greater value, so we subtract one
87
+ // with fast path for when we are on the current longest subsequence
88
+ const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;
89
+ p[i] = m[seqLen] + 1;
90
+ const newLen = seqLen + 1;
91
+ // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.
92
+ m[newLen] = i;
93
+ longest = Math.max(newLen, longest);
94
+ }
95
+ // The longest increasing subsequence of nodes (initially reversed)
96
+ const lis = [];
97
+ // The rest of the nodes, nodes that will be moved
98
+ const toMove = [];
99
+ let last = children.length - 1;
100
+ for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {
101
+ lis.push(children[cur - 1]);
102
+ for (; last >= cur; last--) {
103
+ toMove.push(children[last]);
104
+ }
105
+ last--;
106
+ }
107
+ for (; last >= 0; last--) {
108
+ toMove.push(children[last]);
109
+ }
110
+ lis.reverse();
111
+ // We sort the nodes being moved to guarantee that their insertion order matches the claim order
112
+ toMove.sort((a, b) => a.claim_order - b.claim_order);
113
+ // Finally, we move the nodes
114
+ for (let i = 0, j = 0; i < toMove.length; i++) {
115
+ while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {
116
+ j++;
117
+ }
118
+ const anchor = j < lis.length ? lis[j] : null;
119
+ target.insertBefore(toMove[i], anchor);
120
+ }
121
+ }
122
+ function append(target, node) {
123
+ target.appendChild(node);
124
+ }
125
+ function append_styles(target, style_sheet_id, styles) {
126
+ const append_styles_to = get_root_for_style(target);
127
+ if (!append_styles_to.getElementById(style_sheet_id)) {
128
+ const style = element('style');
129
+ style.id = style_sheet_id;
130
+ style.textContent = styles;
131
+ append_stylesheet(append_styles_to, style);
132
+ }
133
+ }
134
+ function get_root_for_style(node) {
135
+ if (!node)
136
+ return document;
137
+ const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
138
+ if (root && root.host) {
139
+ return root;
140
+ }
141
+ return node.ownerDocument;
142
+ }
143
+ function append_stylesheet(node, style) {
144
+ append(node.head || node, style);
145
+ return style.sheet;
146
+ }
147
+ function append_hydration(target, node) {
148
+ if (is_hydrating) {
149
+ init_hydrate(target);
150
+ if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {
151
+ target.actual_end_child = target.firstChild;
152
+ }
153
+ // Skip nodes of undefined ordering
154
+ while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {
155
+ target.actual_end_child = target.actual_end_child.nextSibling;
156
+ }
157
+ if (node !== target.actual_end_child) {
158
+ // We only insert if the ordering of this node should be modified or the parent node is not target
159
+ if (node.claim_order !== undefined || node.parentNode !== target) {
160
+ target.insertBefore(node, target.actual_end_child);
161
+ }
162
+ }
163
+ else {
164
+ target.actual_end_child = node.nextSibling;
165
+ }
166
+ }
167
+ else if (node.parentNode !== target || node.nextSibling !== null) {
168
+ target.appendChild(node);
169
+ }
170
+ }
171
+ function insert_hydration(target, node, anchor) {
172
+ if (is_hydrating && !anchor) {
173
+ append_hydration(target, node);
174
+ }
175
+ else if (node.parentNode !== target || node.nextSibling != anchor) {
176
+ target.insertBefore(node, anchor || null);
177
+ }
178
+ }
179
+ function detach(node) {
180
+ if (node.parentNode) {
181
+ node.parentNode.removeChild(node);
182
+ }
183
+ }
184
+ function element(name) {
185
+ return document.createElement(name);
186
+ }
187
+ function svg_element(name) {
188
+ return document.createElementNS('http://www.w3.org/2000/svg', name);
189
+ }
190
+ function text(data) {
191
+ return document.createTextNode(data);
192
+ }
193
+ function space() {
194
+ return text(' ');
195
+ }
196
+ function attr(node, attribute, value) {
197
+ if (value == null)
198
+ node.removeAttribute(attribute);
199
+ else if (node.getAttribute(attribute) !== value)
200
+ node.setAttribute(attribute, value);
201
+ }
202
+ function children(element) {
203
+ return Array.from(element.childNodes);
204
+ }
205
+ function init_claim_info(nodes) {
206
+ if (nodes.claim_info === undefined) {
207
+ nodes.claim_info = { last_index: 0, total_claimed: 0 };
208
+ }
209
+ }
210
+ function claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {
211
+ // Try to find nodes in an order such that we lengthen the longest increasing subsequence
212
+ init_claim_info(nodes);
213
+ const resultNode = (() => {
214
+ // We first try to find an element after the previous one
215
+ for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {
216
+ const node = nodes[i];
217
+ if (predicate(node)) {
218
+ const replacement = processNode(node);
219
+ if (replacement === undefined) {
220
+ nodes.splice(i, 1);
221
+ }
222
+ else {
223
+ nodes[i] = replacement;
224
+ }
225
+ if (!dontUpdateLastIndex) {
226
+ nodes.claim_info.last_index = i;
227
+ }
228
+ return node;
229
+ }
230
+ }
231
+ // Otherwise, we try to find one before
232
+ // We iterate in reverse so that we don't go too far back
233
+ for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {
234
+ const node = nodes[i];
235
+ if (predicate(node)) {
236
+ const replacement = processNode(node);
237
+ if (replacement === undefined) {
238
+ nodes.splice(i, 1);
239
+ }
240
+ else {
241
+ nodes[i] = replacement;
242
+ }
243
+ if (!dontUpdateLastIndex) {
244
+ nodes.claim_info.last_index = i;
245
+ }
246
+ else if (replacement === undefined) {
247
+ // Since we spliced before the last_index, we decrease it
248
+ nodes.claim_info.last_index--;
249
+ }
250
+ return node;
251
+ }
252
+ }
253
+ // If we can't find any matching node, we create a new one
254
+ return createNode();
255
+ })();
256
+ resultNode.claim_order = nodes.claim_info.total_claimed;
257
+ nodes.claim_info.total_claimed += 1;
258
+ return resultNode;
259
+ }
260
+ function claim_element_base(nodes, name, attributes, create_element) {
261
+ return claim_node(nodes, (node) => node.nodeName === name, (node) => {
262
+ const remove = [];
263
+ for (let j = 0; j < node.attributes.length; j++) {
264
+ const attribute = node.attributes[j];
265
+ if (!attributes[attribute.name]) {
266
+ remove.push(attribute.name);
267
+ }
268
+ }
269
+ remove.forEach(v => node.removeAttribute(v));
270
+ return undefined;
271
+ }, () => create_element(name));
272
+ }
273
+ function claim_element(nodes, name, attributes) {
274
+ return claim_element_base(nodes, name, attributes, element);
275
+ }
276
+ function claim_svg_element(nodes, name, attributes) {
277
+ return claim_element_base(nodes, name, attributes, svg_element);
278
+ }
279
+ function claim_text(nodes, data) {
280
+ return claim_node(nodes, (node) => node.nodeType === 3, (node) => {
281
+ const dataStr = '' + data;
282
+ if (node.data.startsWith(dataStr)) {
283
+ if (node.data.length !== dataStr.length) {
284
+ return node.splitText(dataStr.length);
285
+ }
286
+ }
287
+ else {
288
+ node.data = dataStr;
289
+ }
290
+ }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements
291
+ );
292
+ }
293
+ function claim_space(nodes) {
294
+ return claim_text(nodes, ' ');
295
+ }
296
+ function set_data(text, data) {
297
+ data = '' + data;
298
+ if (text.wholeText !== data)
299
+ text.data = data;
300
+ }
301
+
302
+ let current_component;
303
+ function set_current_component(component) {
304
+ current_component = component;
305
+ }
306
+
307
+ const dirty_components = [];
308
+ const binding_callbacks = [];
309
+ const render_callbacks = [];
310
+ const flush_callbacks = [];
311
+ const resolved_promise = Promise.resolve();
312
+ let update_scheduled = false;
313
+ function schedule_update() {
314
+ if (!update_scheduled) {
315
+ update_scheduled = true;
316
+ resolved_promise.then(flush);
317
+ }
318
+ }
319
+ function add_render_callback(fn) {
320
+ render_callbacks.push(fn);
321
+ }
322
+ // flush() calls callbacks in this order:
323
+ // 1. All beforeUpdate callbacks, in order: parents before children
324
+ // 2. All bind:this callbacks, in reverse order: children before parents.
325
+ // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
326
+ // for afterUpdates called during the initial onMount, which are called in
327
+ // reverse order: children before parents.
328
+ // Since callbacks might update component values, which could trigger another
329
+ // call to flush(), the following steps guard against this:
330
+ // 1. During beforeUpdate, any updated components will be added to the
331
+ // dirty_components array and will cause a reentrant call to flush(). Because
332
+ // the flush index is kept outside the function, the reentrant call will pick
333
+ // up where the earlier call left off and go through all dirty components. The
334
+ // current_component value is saved and restored so that the reentrant call will
335
+ // not interfere with the "parent" flush() call.
336
+ // 2. bind:this callbacks cannot trigger new flush() calls.
337
+ // 3. During afterUpdate, any updated components will NOT have their afterUpdate
338
+ // callback called a second time; the seen_callbacks set, outside the flush()
339
+ // function, guarantees this behavior.
340
+ const seen_callbacks = new Set();
341
+ let flushidx = 0; // Do *not* move this inside the flush() function
342
+ function flush() {
343
+ // Do not reenter flush while dirty components are updated, as this can
344
+ // result in an infinite loop. Instead, let the inner flush handle it.
345
+ // Reentrancy is ok afterwards for bindings etc.
346
+ if (flushidx !== 0) {
347
+ return;
348
+ }
349
+ const saved_component = current_component;
350
+ do {
351
+ // first, call beforeUpdate functions
352
+ // and update components
353
+ try {
354
+ while (flushidx < dirty_components.length) {
355
+ const component = dirty_components[flushidx];
356
+ flushidx++;
357
+ set_current_component(component);
358
+ update(component.$$);
359
+ }
360
+ }
361
+ catch (e) {
362
+ // reset dirty state to not end up in a deadlocked state and then rethrow
363
+ dirty_components.length = 0;
364
+ flushidx = 0;
365
+ throw e;
366
+ }
367
+ set_current_component(null);
368
+ dirty_components.length = 0;
369
+ flushidx = 0;
370
+ while (binding_callbacks.length)
371
+ binding_callbacks.pop()();
372
+ // then, once components are updated, call
373
+ // afterUpdate functions. This may cause
374
+ // subsequent updates...
375
+ for (let i = 0; i < render_callbacks.length; i += 1) {
376
+ const callback = render_callbacks[i];
377
+ if (!seen_callbacks.has(callback)) {
378
+ // ...so guard against infinite loops
379
+ seen_callbacks.add(callback);
380
+ callback();
381
+ }
382
+ }
383
+ render_callbacks.length = 0;
384
+ } while (dirty_components.length);
385
+ while (flush_callbacks.length) {
386
+ flush_callbacks.pop()();
387
+ }
388
+ update_scheduled = false;
389
+ seen_callbacks.clear();
390
+ set_current_component(saved_component);
391
+ }
392
+ function update($$) {
393
+ if ($$.fragment !== null) {
394
+ $$.update();
395
+ run_all($$.before_update);
396
+ const dirty = $$.dirty;
397
+ $$.dirty = [-1];
398
+ $$.fragment && $$.fragment.p($$.ctx, dirty);
399
+ $$.after_update.forEach(add_render_callback);
400
+ }
401
+ }
402
+ const outroing = new Set();
403
+ function transition_in(block, local) {
404
+ if (block && block.i) {
405
+ outroing.delete(block);
406
+ block.i(local);
407
+ }
408
+ }
409
+ function mount_component(component, target, anchor, customElement) {
410
+ const { fragment, after_update } = component.$$;
411
+ fragment && fragment.m(target, anchor);
412
+ if (!customElement) {
413
+ // onMount happens before the initial afterUpdate
414
+ add_render_callback(() => {
415
+ const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
416
+ // if the component was destroyed immediately
417
+ // it will update the `$$.on_destroy` reference to `null`.
418
+ // the destructured on_destroy may still reference to the old array
419
+ if (component.$$.on_destroy) {
420
+ component.$$.on_destroy.push(...new_on_destroy);
421
+ }
422
+ else {
423
+ // Edge case - component was destroyed immediately,
424
+ // most likely as a result of a binding initialising
425
+ run_all(new_on_destroy);
426
+ }
427
+ component.$$.on_mount = [];
428
+ });
429
+ }
430
+ after_update.forEach(add_render_callback);
431
+ }
432
+ function destroy_component(component, detaching) {
433
+ const $$ = component.$$;
434
+ if ($$.fragment !== null) {
435
+ run_all($$.on_destroy);
436
+ $$.fragment && $$.fragment.d(detaching);
437
+ // TODO null out other refs, including component.$$ (but need to
438
+ // preserve final state?)
439
+ $$.on_destroy = $$.fragment = null;
440
+ $$.ctx = [];
441
+ }
442
+ }
443
+ function make_dirty(component, i) {
444
+ if (component.$$.dirty[0] === -1) {
445
+ dirty_components.push(component);
446
+ schedule_update();
447
+ component.$$.dirty.fill(0);
448
+ }
449
+ component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
450
+ }
451
+ function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
452
+ const parent_component = current_component;
453
+ set_current_component(component);
454
+ const $$ = component.$$ = {
455
+ fragment: null,
456
+ ctx: [],
457
+ // state
458
+ props,
459
+ update: noop,
460
+ not_equal,
461
+ bound: blank_object(),
462
+ // lifecycle
463
+ on_mount: [],
464
+ on_destroy: [],
465
+ on_disconnect: [],
466
+ before_update: [],
467
+ after_update: [],
468
+ context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
469
+ // everything else
470
+ callbacks: blank_object(),
471
+ dirty,
472
+ skip_bound: false,
473
+ root: options.target || parent_component.$$.root
474
+ };
475
+ append_styles && append_styles($$.root);
476
+ let ready = false;
477
+ $$.ctx = instance
478
+ ? instance(component, options.props || {}, (i, ret, ...rest) => {
479
+ const value = rest.length ? rest[0] : ret;
480
+ if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
481
+ if (!$$.skip_bound && $$.bound[i])
482
+ $$.bound[i](value);
483
+ if (ready)
484
+ make_dirty(component, i);
485
+ }
486
+ return ret;
487
+ })
488
+ : [];
489
+ $$.update();
490
+ ready = true;
491
+ run_all($$.before_update);
492
+ // `false` as a special case of no DOM component
493
+ $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
494
+ if (options.target) {
495
+ if (options.hydrate) {
496
+ start_hydrating();
497
+ const nodes = children(options.target);
498
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
499
+ $$.fragment && $$.fragment.l(nodes);
500
+ nodes.forEach(detach);
501
+ }
502
+ else {
503
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
504
+ $$.fragment && $$.fragment.c();
505
+ }
506
+ if (options.intro)
507
+ transition_in(component.$$.fragment);
508
+ mount_component(component, options.target, options.anchor, options.customElement);
509
+ end_hydrating();
510
+ flush();
511
+ }
512
+ set_current_component(parent_component);
513
+ }
514
+ /**
515
+ * Base class for Svelte components. Used when dev=false.
516
+ */
517
+ class SvelteComponent {
518
+ $destroy() {
519
+ destroy_component(this, 1);
520
+ this.$destroy = noop;
521
+ }
522
+ $on(type, callback) {
523
+ if (!is_function(callback)) {
524
+ return noop;
525
+ }
526
+ const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
527
+ callbacks.push(callback);
528
+ return () => {
529
+ const index = callbacks.indexOf(callback);
530
+ if (index !== -1)
531
+ callbacks.splice(index, 1);
532
+ };
533
+ }
534
+ $set($$props) {
535
+ if (this.$$set && !is_empty($$props)) {
536
+ this.$$.skip_bound = true;
537
+ this.$$set($$props);
538
+ this.$$.skip_bound = false;
539
+ }
540
+ }
541
+ }
542
+
543
+ /* src/InstanceView.svelte generated by Svelte v3.55.1 */
544
+
545
+ function add_css(target) {
546
+ append_styles(target, "svelte-1tmeyfg", "#container.svelte-1tmeyfg.svelte-1tmeyfg{border:0.5px solid rgb(224, 224, 224);border-radius:2px;max-width:350px;padding:10px}.box.svelte-1tmeyfg.svelte-1tmeyfg{display:flex;flex-direction:row;align-items:center}.box-reverse.svelte-1tmeyfg.svelte-1tmeyfg{display:flex;flex-direction:row-reverse}.chat.svelte-1tmeyfg.svelte-1tmeyfg{padding:10px;border:1px solid #6a1a9a;border-radius:5px}.label.svelte-1tmeyfg.svelte-1tmeyfg{margin-right:5px;font-size:10px;color:rgba(0, 0, 0, 0.5);font-variant:small-caps}p.svelte-1tmeyfg.svelte-1tmeyfg{margin:5px;overflow-wrap:anywhere}.box.svelte-1tmeyfg svg.svelte-1tmeyfg{min-width:24px;width:24px;margin-right:10px;fill:#6a1a9a}.box-reverse.svelte-1tmeyfg svg.svelte-1tmeyfg{min-width:30px;width:30px;margin-left:10px;fill:#6a1a9a}");
547
+ }
548
+
549
+ // (25:2) {#if entry[modelColumn]}
550
+ function create_if_block(ctx) {
551
+ let div;
552
+ let svg;
553
+ let path;
554
+ let t0;
555
+ let p;
556
+ let t1_value = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]] + "";
557
+ let t1;
558
+
559
+ return {
560
+ c() {
561
+ div = element("div");
562
+ svg = svg_element("svg");
563
+ path = svg_element("path");
564
+ t0 = space();
565
+ p = element("p");
566
+ t1 = text(t1_value);
567
+ this.h();
568
+ },
569
+ l(nodes) {
570
+ div = claim_element(nodes, "DIV", { class: true });
571
+ var div_nodes = children(div);
572
+ svg = claim_svg_element(div_nodes, "svg", { xmlns: true, viewBox: true, class: true });
573
+ var svg_nodes = children(svg);
574
+ path = claim_svg_element(svg_nodes, "path", { d: true });
575
+ children(path).forEach(detach);
576
+ svg_nodes.forEach(detach);
577
+ t0 = claim_space(div_nodes);
578
+ p = claim_element(div_nodes, "P", { class: true });
579
+ var p_nodes = children(p);
580
+ t1 = claim_text(p_nodes, t1_value);
581
+ p_nodes.forEach(detach);
582
+ div_nodes.forEach(detach);
583
+ this.h();
584
+ },
585
+ h() {
586
+ attr(path, "d", "M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z");
587
+ attr(svg, "xmlns", "http://www.w3.org/2000/svg");
588
+ attr(svg, "viewBox", "0 0 640 512");
589
+ attr(svg, "class", "svelte-1tmeyfg");
590
+ attr(p, "class", "chat svelte-1tmeyfg");
591
+ attr(div, "class", "box-reverse svelte-1tmeyfg");
592
+ },
593
+ m(target, anchor) {
594
+ insert_hydration(target, div, anchor);
595
+ append_hydration(div, svg);
596
+ append_hydration(svg, path);
597
+ append_hydration(div, t0);
598
+ append_hydration(div, p);
599
+ append_hydration(p, t1);
600
+ },
601
+ p(ctx, dirty) {
602
+ if (dirty & /*entry, modelColumn*/ 3 && t1_value !== (t1_value = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]] + "")) set_data(t1, t1_value);
603
+ },
604
+ d(detaching) {
605
+ if (detaching) detach(div);
606
+ }
607
+ };
608
+ }
609
+
610
+ function create_fragment(ctx) {
611
+ let div2;
612
+ let div0;
613
+ let svg;
614
+ let path;
615
+ let t0;
616
+ let p0;
617
+ let t1_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] + "";
618
+ let t1;
619
+ let t2;
620
+ let t3;
621
+ let div1;
622
+ let span;
623
+ let t4;
624
+ let t5;
625
+ let p1;
626
+ let t6_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "";
627
+ let t6;
628
+ let if_block = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]] && create_if_block(ctx);
629
+
630
+ return {
631
+ c() {
632
+ div2 = element("div");
633
+ div0 = element("div");
634
+ svg = svg_element("svg");
635
+ path = svg_element("path");
636
+ t0 = space();
637
+ p0 = element("p");
638
+ t1 = text(t1_value);
639
+ t2 = space();
640
+ if (if_block) if_block.c();
641
+ t3 = space();
642
+ div1 = element("div");
643
+ span = element("span");
644
+ t4 = text("label:");
645
+ t5 = space();
646
+ p1 = element("p");
647
+ t6 = text(t6_value);
648
+ this.h();
649
+ },
650
+ l(nodes) {
651
+ div2 = claim_element(nodes, "DIV", { id: true, class: true });
652
+ var div2_nodes = children(div2);
653
+ div0 = claim_element(div2_nodes, "DIV", { class: true });
654
+ var div0_nodes = children(div0);
655
+ svg = claim_svg_element(div0_nodes, "svg", { xmlns: true, viewBox: true, class: true });
656
+ var svg_nodes = children(svg);
657
+ path = claim_svg_element(svg_nodes, "path", { d: true });
658
+ children(path).forEach(detach);
659
+ svg_nodes.forEach(detach);
660
+ t0 = claim_space(div0_nodes);
661
+ p0 = claim_element(div0_nodes, "P", { class: true });
662
+ var p0_nodes = children(p0);
663
+ t1 = claim_text(p0_nodes, t1_value);
664
+ p0_nodes.forEach(detach);
665
+ div0_nodes.forEach(detach);
666
+ t2 = claim_space(div2_nodes);
667
+ if (if_block) if_block.l(div2_nodes);
668
+ t3 = claim_space(div2_nodes);
669
+ div1 = claim_element(div2_nodes, "DIV", { class: true });
670
+ var div1_nodes = children(div1);
671
+ span = claim_element(div1_nodes, "SPAN", { class: true });
672
+ var span_nodes = children(span);
673
+ t4 = claim_text(span_nodes, "label:");
674
+ span_nodes.forEach(detach);
675
+ t5 = claim_space(div1_nodes);
676
+ p1 = claim_element(div1_nodes, "P", { class: true });
677
+ var p1_nodes = children(p1);
678
+ t6 = claim_text(p1_nodes, t6_value);
679
+ p1_nodes.forEach(detach);
680
+ div1_nodes.forEach(detach);
681
+ div2_nodes.forEach(detach);
682
+ this.h();
683
+ },
684
+ h() {
685
+ attr(path, "d", "M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z");
686
+ attr(svg, "xmlns", "http://www.w3.org/2000/svg");
687
+ attr(svg, "viewBox", "0 0 448 512");
688
+ attr(svg, "class", "svelte-1tmeyfg");
689
+ attr(p0, "class", "chat svelte-1tmeyfg");
690
+ attr(div0, "class", "box svelte-1tmeyfg");
691
+ attr(span, "class", "label svelte-1tmeyfg");
692
+ attr(p1, "class", "svelte-1tmeyfg");
693
+ attr(div1, "class", "box svelte-1tmeyfg");
694
+ attr(div2, "id", "container");
695
+ attr(div2, "class", "svelte-1tmeyfg");
696
+ },
697
+ m(target, anchor) {
698
+ insert_hydration(target, div2, anchor);
699
+ append_hydration(div2, div0);
700
+ append_hydration(div0, svg);
701
+ append_hydration(svg, path);
702
+ append_hydration(div0, t0);
703
+ append_hydration(div0, p0);
704
+ append_hydration(p0, t1);
705
+ append_hydration(div2, t2);
706
+ if (if_block) if_block.m(div2, null);
707
+ append_hydration(div2, t3);
708
+ append_hydration(div2, div1);
709
+ append_hydration(div1, span);
710
+ append_hydration(span, t4);
711
+ append_hydration(div1, t5);
712
+ append_hydration(div1, p1);
713
+ append_hydration(p1, t6);
714
+ },
715
+ p(ctx, [dirty]) {
716
+ if (dirty & /*entry, dataColumn*/ 9 && t1_value !== (t1_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] + "")) set_data(t1, t1_value);
717
+
718
+ if (/*entry*/ ctx[0][/*modelColumn*/ ctx[1]]) {
719
+ if (if_block) {
720
+ if_block.p(ctx, dirty);
721
+ } else {
722
+ if_block = create_if_block(ctx);
723
+ if_block.c();
724
+ if_block.m(div2, t3);
725
+ }
726
+ } else if (if_block) {
727
+ if_block.d(1);
728
+ if_block = null;
729
+ }
730
+
731
+ if (dirty & /*entry, labelColumn*/ 5 && t6_value !== (t6_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "")) set_data(t6, t6_value);
732
+ },
733
+ i: noop,
734
+ o: noop,
735
+ d(detaching) {
736
+ if (detaching) detach(div2);
737
+ if (if_block) if_block.d();
738
+ }
739
+ };
740
+ }
741
+
742
+ function instance($$self, $$props, $$invalidate) {
743
+ let { options } = $$props;
744
+ let { entry } = $$props;
745
+ let { modelColumn } = $$props;
746
+ let { labelColumn } = $$props;
747
+ let { dataColumn } = $$props;
748
+ let { idColumn } = $$props;
749
+
750
+ $$self.$$set = $$props => {
751
+ if ('options' in $$props) $$invalidate(4, options = $$props.options);
752
+ if ('entry' in $$props) $$invalidate(0, entry = $$props.entry);
753
+ if ('modelColumn' in $$props) $$invalidate(1, modelColumn = $$props.modelColumn);
754
+ if ('labelColumn' in $$props) $$invalidate(2, labelColumn = $$props.labelColumn);
755
+ if ('dataColumn' in $$props) $$invalidate(3, dataColumn = $$props.dataColumn);
756
+ if ('idColumn' in $$props) $$invalidate(5, idColumn = $$props.idColumn);
757
+ };
758
+
759
+ return [entry, modelColumn, labelColumn, dataColumn, options, idColumn];
760
+ }
761
+
762
+ class InstanceView extends SvelteComponent {
763
+ constructor(options) {
764
+ super();
765
+
766
+ init(
767
+ this,
768
+ options,
769
+ instance,
770
+ create_fragment,
771
+ safe_not_equal,
772
+ {
773
+ options: 4,
774
+ entry: 0,
775
+ modelColumn: 1,
776
+ labelColumn: 2,
777
+ dataColumn: 3,
778
+ idColumn: 5
779
+ },
780
+ add_css
781
+ );
782
+ }
783
+ }
784
+
785
+ function getInstance(
786
+ div,
787
+ viewOptions,
788
+ entry,
789
+ modelColumn,
790
+ labelColumn,
791
+ dataColumn,
792
+ idColumn
793
+ ) {
794
+ new InstanceView({
795
+ target: div,
796
+ props: {
797
+ entry: entry,
798
+ viewOptions: viewOptions,
799
+ modelColumn: modelColumn,
800
+ labelColumn: labelColumn,
801
+ dataColumn: dataColumn,
802
+ idColumn: idColumn,
803
+ },
804
+ hydrate: true,
805
+ });
806
+ }
807
+
808
+ // export function getOptions(div, setOptions) {
809
+ // new OptionsView({
810
+ // target: div,
811
+ // props: {
812
+ // setOptions,
813
+ // },
814
+ // });
815
+ // }
816
+
817
+ export { getInstance };