@plaidev/karte-action-sdk 1.1.108 → 1.1.109-27920272.d0a496d3
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/dist/hydrate/index.es.d.ts +74 -14
- package/dist/hydrate/index.es.js +1206 -482
- package/dist/index.es.d.ts +74 -14
- package/dist/index.es.js +1135 -480
- package/dist/templates.js +3 -1
- package/package.json +4 -5
package/dist/hydrate/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { writable, get } from 'svelte/store';
|
|
2
2
|
import 'svelte/easing';
|
|
3
|
-
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, claim_component, claim_space, mount_component, insert_hydration, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, element, claim_element, children, attr, noop, listen, is_function, append_hydration, add_render_callback, create_in_transition, svg_element, claim_svg_element, binding_callbacks, destroy_each, text, claim_text, set_data, null_to_empty, src_url_equal, set_style } from 'svelte/internal';
|
|
4
|
-
import { createEventDispatcher, onMount, onDestroy as onDestroy$1
|
|
3
|
+
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, claim_component, claim_space, mount_component, insert_hydration, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, element, claim_element, children, attr, noop, listen, is_function, append_hydration, add_render_callback, create_in_transition, svg_element, claim_svg_element, binding_callbacks, destroy_each, text, claim_text, set_data, null_to_empty, src_url_equal, set_style, run_all } from 'svelte/internal';
|
|
4
|
+
import { setContext, getContext, createEventDispatcher, onMount, onDestroy as onDestroy$1 } from 'svelte';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* 内部的に使われている、UIから選択できない関数
|
|
@@ -461,6 +461,10 @@ function updateCustomVariables(variables) {
|
|
|
461
461
|
});
|
|
462
462
|
return getCustomVariables();
|
|
463
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* Store for form data
|
|
466
|
+
*/
|
|
467
|
+
const formData = writable({});
|
|
464
468
|
|
|
465
469
|
const ALL_ACTION_ID = 'KARTE_ALL_ACTION_ID';
|
|
466
470
|
const ALL_ACTION_SHORTEN_ID = 'KARTE_ALL_ACTION_SHORTEN_ID';
|
|
@@ -639,6 +643,7 @@ const PropTypes = [
|
|
|
639
643
|
'Color',
|
|
640
644
|
'Alignment',
|
|
641
645
|
'State',
|
|
646
|
+
'TransitState',
|
|
642
647
|
'Style',
|
|
643
648
|
'ModalPlacement',
|
|
644
649
|
'OnClick',
|
|
@@ -710,7 +715,7 @@ const OnClickOperationOptions = [
|
|
|
710
715
|
operation: 'moveTo',
|
|
711
716
|
args: [
|
|
712
717
|
{
|
|
713
|
-
type: '
|
|
718
|
+
type: 'TransitState',
|
|
714
719
|
default: '/',
|
|
715
720
|
},
|
|
716
721
|
],
|
|
@@ -738,11 +743,13 @@ const LengthUnits = ['px', 'em', 'rem', 'vw', 'fr', '%'];
|
|
|
738
743
|
const Justifies = ['flex-start', 'center', 'flex-end'];
|
|
739
744
|
const Alignments = ['flex-start', 'center', 'flex-end'];
|
|
740
745
|
const ObjectFits = ['fill', 'contain', 'cover'];
|
|
746
|
+
const ClipPaths = ['none', 'circle(closest-side)'];
|
|
741
747
|
const Repeats = ['repeat', 'space', 'round', 'no-repeat'];
|
|
742
748
|
const BackgroundSizes = ['cover', 'contain', 'auto'];
|
|
743
749
|
const Cursors = ['default', 'pointer'];
|
|
744
750
|
const Overflows = ['visible', 'auto', 'hidden'];
|
|
745
751
|
const WritingModes = ['horizontal-tb', 'vertical-lr'];
|
|
752
|
+
const ListSeparatorTypes = ['none', 'border', 'gap'];
|
|
746
753
|
const DefaultListSeparatorNone = {
|
|
747
754
|
type: 'none',
|
|
748
755
|
};
|
|
@@ -757,6 +764,7 @@ const DefaultListSeparatorGap = {
|
|
|
757
764
|
gap: '8px',
|
|
758
765
|
};
|
|
759
766
|
const DefaultListSeparator = DefaultListSeparatorBorder;
|
|
767
|
+
const ListBackgroundTypes = ['none', 'stripe'];
|
|
760
768
|
const DefaultListBackgroundNone = {
|
|
761
769
|
type: 'none',
|
|
762
770
|
};
|
|
@@ -766,6 +774,7 @@ const DefaultListBackgroundStripe = {
|
|
|
766
774
|
background2: '#fff',
|
|
767
775
|
};
|
|
768
776
|
const DefaultListBackground = DefaultListBackgroundNone;
|
|
777
|
+
const ListDirections = ['vertical', 'horizontal'];
|
|
769
778
|
|
|
770
779
|
function doPresent({ direction, deltaRate }, downFn, upFn, condition = false) {
|
|
771
780
|
if (direction === 'down' && deltaRate > 0) {
|
|
@@ -1608,20 +1617,20 @@ var widget = /*#__PURE__*/Object.freeze({
|
|
|
1608
1617
|
|
|
1609
1618
|
/* src/components/Normalize.svelte generated by Svelte v3.53.1 */
|
|
1610
1619
|
|
|
1611
|
-
function add_css$
|
|
1612
|
-
append_styles(target, "svelte-
|
|
1620
|
+
function add_css$m(target) {
|
|
1621
|
+
append_styles(target, "svelte-tr4qnr", "@import 'https://esm.sh/normalize.css';");
|
|
1613
1622
|
}
|
|
1614
1623
|
|
|
1615
1624
|
class Normalize extends SvelteComponent {
|
|
1616
1625
|
constructor(options) {
|
|
1617
1626
|
super();
|
|
1618
|
-
init(this, options, null, null, safe_not_equal, {}, add_css$
|
|
1627
|
+
init(this, options, null, null, safe_not_equal, {}, add_css$m);
|
|
1619
1628
|
}
|
|
1620
1629
|
}
|
|
1621
1630
|
|
|
1622
1631
|
/* src/components/State.svelte generated by Svelte v3.53.1 */
|
|
1623
1632
|
|
|
1624
|
-
function create_fragment$
|
|
1633
|
+
function create_fragment$q(ctx) {
|
|
1625
1634
|
let normalize;
|
|
1626
1635
|
let t;
|
|
1627
1636
|
let current;
|
|
@@ -1685,7 +1694,7 @@ function create_fragment$o(ctx) {
|
|
|
1685
1694
|
};
|
|
1686
1695
|
}
|
|
1687
1696
|
|
|
1688
|
-
function instance$
|
|
1697
|
+
function instance$q($$self, $$props, $$invalidate) {
|
|
1689
1698
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
1690
1699
|
|
|
1691
1700
|
$$self.$$set = $$props => {
|
|
@@ -1698,18 +1707,18 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
1698
1707
|
class State extends SvelteComponent {
|
|
1699
1708
|
constructor(options) {
|
|
1700
1709
|
super();
|
|
1701
|
-
init(this, options, instance$
|
|
1710
|
+
init(this, options, instance$q, create_fragment$q, safe_not_equal, {});
|
|
1702
1711
|
}
|
|
1703
1712
|
}
|
|
1704
1713
|
|
|
1705
1714
|
/* src/components/StateItem.svelte generated by Svelte v3.53.1 */
|
|
1706
1715
|
|
|
1707
|
-
function add_css$
|
|
1708
|
-
append_styles(target, "svelte-
|
|
1716
|
+
function add_css$l(target) {
|
|
1717
|
+
append_styles(target, "svelte-2qb6dm", ".state-item.svelte-2qb6dm{position:absolute;display:none}");
|
|
1709
1718
|
}
|
|
1710
1719
|
|
|
1711
|
-
// (
|
|
1712
|
-
function create_if_block$
|
|
1720
|
+
// (23:0) {#if $state === path}
|
|
1721
|
+
function create_if_block$4(ctx) {
|
|
1713
1722
|
let div;
|
|
1714
1723
|
let t;
|
|
1715
1724
|
let current;
|
|
@@ -1732,7 +1741,7 @@ function create_if_block$3(ctx) {
|
|
|
1732
1741
|
},
|
|
1733
1742
|
h() {
|
|
1734
1743
|
attr(div, "data-state-path", /*path*/ ctx[0]);
|
|
1735
|
-
attr(div, "class", "state-item svelte-
|
|
1744
|
+
attr(div, "class", "state-item svelte-2qb6dm");
|
|
1736
1745
|
},
|
|
1737
1746
|
m(target, anchor) {
|
|
1738
1747
|
insert_hydration(target, div, anchor);
|
|
@@ -1781,10 +1790,10 @@ function create_if_block$3(ctx) {
|
|
|
1781
1790
|
};
|
|
1782
1791
|
}
|
|
1783
1792
|
|
|
1784
|
-
function create_fragment$
|
|
1793
|
+
function create_fragment$p(ctx) {
|
|
1785
1794
|
let if_block_anchor;
|
|
1786
1795
|
let current;
|
|
1787
|
-
let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$
|
|
1796
|
+
let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$4(ctx);
|
|
1788
1797
|
|
|
1789
1798
|
return {
|
|
1790
1799
|
c() {
|
|
@@ -1809,7 +1818,7 @@ function create_fragment$n(ctx) {
|
|
|
1809
1818
|
transition_in(if_block, 1);
|
|
1810
1819
|
}
|
|
1811
1820
|
} else {
|
|
1812
|
-
if_block = create_if_block$
|
|
1821
|
+
if_block = create_if_block$4(ctx);
|
|
1813
1822
|
if_block.c();
|
|
1814
1823
|
transition_in(if_block, 1);
|
|
1815
1824
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -1840,11 +1849,18 @@ function create_fragment$n(ctx) {
|
|
|
1840
1849
|
};
|
|
1841
1850
|
}
|
|
1842
1851
|
|
|
1843
|
-
|
|
1852
|
+
const STATE_ITEM_CONTEXT_KEY = Symbol();
|
|
1853
|
+
|
|
1854
|
+
function getStateItemContext() {
|
|
1855
|
+
return getContext(STATE_ITEM_CONTEXT_KEY);
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
function instance$p($$self, $$props, $$invalidate) {
|
|
1844
1859
|
let $state;
|
|
1845
1860
|
component_subscribe($$self, state, $$value => $$invalidate(1, $state = $$value));
|
|
1846
1861
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
1847
1862
|
let { path } = $$props;
|
|
1863
|
+
setContext(STATE_ITEM_CONTEXT_KEY, { path });
|
|
1848
1864
|
|
|
1849
1865
|
$$self.$$set = $$props => {
|
|
1850
1866
|
if ('path' in $$props) $$invalidate(0, path = $$props.path);
|
|
@@ -1865,18 +1881,18 @@ function instance$n($$self, $$props, $$invalidate) {
|
|
|
1865
1881
|
class StateItem extends SvelteComponent {
|
|
1866
1882
|
constructor(options) {
|
|
1867
1883
|
super();
|
|
1868
|
-
init(this, options, instance$
|
|
1884
|
+
init(this, options, instance$p, create_fragment$p, safe_not_equal, { path: 0 }, add_css$l);
|
|
1869
1885
|
}
|
|
1870
1886
|
}
|
|
1871
1887
|
|
|
1872
1888
|
/* src/components/BackgroundOverray.svelte generated by Svelte v3.53.1 */
|
|
1873
1889
|
|
|
1874
|
-
function add_css$
|
|
1875
|
-
append_styles(target, "svelte-
|
|
1890
|
+
function add_css$k(target) {
|
|
1891
|
+
append_styles(target, "svelte-1d4fta", ".background.svelte-1d4fta{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.3);z-index:2147483646}");
|
|
1876
1892
|
}
|
|
1877
1893
|
|
|
1878
1894
|
// (9:0) {#if backgroundOverray}
|
|
1879
|
-
function create_if_block$
|
|
1895
|
+
function create_if_block$3(ctx) {
|
|
1880
1896
|
let div;
|
|
1881
1897
|
let mounted;
|
|
1882
1898
|
let dispose;
|
|
@@ -1892,7 +1908,7 @@ function create_if_block$2(ctx) {
|
|
|
1892
1908
|
this.h();
|
|
1893
1909
|
},
|
|
1894
1910
|
h() {
|
|
1895
|
-
attr(div, "class", "background svelte-
|
|
1911
|
+
attr(div, "class", "background svelte-1d4fta");
|
|
1896
1912
|
},
|
|
1897
1913
|
m(target, anchor) {
|
|
1898
1914
|
insert_hydration(target, div, anchor);
|
|
@@ -1911,9 +1927,9 @@ function create_if_block$2(ctx) {
|
|
|
1911
1927
|
};
|
|
1912
1928
|
}
|
|
1913
1929
|
|
|
1914
|
-
function create_fragment$
|
|
1930
|
+
function create_fragment$o(ctx) {
|
|
1915
1931
|
let if_block_anchor;
|
|
1916
|
-
let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$
|
|
1932
|
+
let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$3(ctx);
|
|
1917
1933
|
|
|
1918
1934
|
return {
|
|
1919
1935
|
c() {
|
|
@@ -1933,7 +1949,7 @@ function create_fragment$m(ctx) {
|
|
|
1933
1949
|
if (if_block) {
|
|
1934
1950
|
if_block.p(ctx, dirty);
|
|
1935
1951
|
} else {
|
|
1936
|
-
if_block = create_if_block$
|
|
1952
|
+
if_block = create_if_block$3(ctx);
|
|
1937
1953
|
if_block.c();
|
|
1938
1954
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
1939
1955
|
}
|
|
@@ -1951,7 +1967,7 @@ function create_fragment$m(ctx) {
|
|
|
1951
1967
|
};
|
|
1952
1968
|
}
|
|
1953
1969
|
|
|
1954
|
-
function instance$
|
|
1970
|
+
function instance$o($$self, $$props, $$invalidate) {
|
|
1955
1971
|
let { backgroundOverray = false } = $$props;
|
|
1956
1972
|
const dispatch = createEventDispatcher();
|
|
1957
1973
|
const click_handler = () => dispatch('click');
|
|
@@ -1966,18 +1982,18 @@ function instance$m($$self, $$props, $$invalidate) {
|
|
|
1966
1982
|
class BackgroundOverray extends SvelteComponent {
|
|
1967
1983
|
constructor(options) {
|
|
1968
1984
|
super();
|
|
1969
|
-
init(this, options, instance$
|
|
1985
|
+
init(this, options, instance$o, create_fragment$o, safe_not_equal, { backgroundOverray: 0 }, add_css$k);
|
|
1970
1986
|
}
|
|
1971
1987
|
}
|
|
1972
1988
|
|
|
1973
1989
|
/* src/components/Modal.svelte generated by Svelte v3.53.1 */
|
|
1974
1990
|
|
|
1975
|
-
function add_css$
|
|
1976
|
-
append_styles(target, "svelte-
|
|
1991
|
+
function add_css$j(target) {
|
|
1992
|
+
append_styles(target, "svelte-12dkw0q", ".modal.svelte-12dkw0q{position:fixed;box-sizing:border-box;z-index:2147483647}.close.svelte-12dkw0q{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-12dkw0q:hover{transform:rotate(90deg)}.modal-content.svelte-12dkw0q{display:flex;justify-content:center;align-items:center}");
|
|
1977
1993
|
}
|
|
1978
1994
|
|
|
1979
1995
|
// (142:0) {#if visible}
|
|
1980
|
-
function create_if_block$
|
|
1996
|
+
function create_if_block$2(ctx) {
|
|
1981
1997
|
let div1;
|
|
1982
1998
|
let t;
|
|
1983
1999
|
let div0;
|
|
@@ -2018,9 +2034,9 @@ function create_if_block$1(ctx) {
|
|
|
2018
2034
|
this.h();
|
|
2019
2035
|
},
|
|
2020
2036
|
h() {
|
|
2021
|
-
attr(div0, "class", "modal-content svelte-
|
|
2037
|
+
attr(div0, "class", "modal-content svelte-12dkw0q");
|
|
2022
2038
|
attr(div0, "style", /*_style*/ ctx[1]);
|
|
2023
|
-
attr(div1, "class", "modal svelte-
|
|
2039
|
+
attr(div1, "class", "modal svelte-12dkw0q");
|
|
2024
2040
|
attr(div1, "role", "dialog");
|
|
2025
2041
|
attr(div1, "aria-modal", "true");
|
|
2026
2042
|
attr(div1, "style", div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + " " + ElasticityStyle[/*overwriteElasticity*/ ctx[11]] + "");
|
|
@@ -2167,7 +2183,7 @@ function create_if_block_1(ctx) {
|
|
|
2167
2183
|
attr(svg, "viewBox", "0 0 9 10");
|
|
2168
2184
|
attr(svg, "fill", "none");
|
|
2169
2185
|
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
2170
|
-
attr(button, "class", "close svelte-
|
|
2186
|
+
attr(button, "class", "close svelte-12dkw0q");
|
|
2171
2187
|
attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[16] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
|
|
2172
2188
|
},
|
|
2173
2189
|
m(target, anchor) {
|
|
@@ -2202,7 +2218,7 @@ function create_if_block_1(ctx) {
|
|
|
2202
2218
|
};
|
|
2203
2219
|
}
|
|
2204
2220
|
|
|
2205
|
-
function create_fragment$
|
|
2221
|
+
function create_fragment$n(ctx) {
|
|
2206
2222
|
let backgroundoverray;
|
|
2207
2223
|
let t;
|
|
2208
2224
|
let if_block_anchor;
|
|
@@ -2220,7 +2236,7 @@ function create_fragment$l(ctx) {
|
|
|
2220
2236
|
if (is_function(/*backgroundClick*/ ctx[12])) /*backgroundClick*/ ctx[12].apply(this, arguments);
|
|
2221
2237
|
});
|
|
2222
2238
|
|
|
2223
|
-
let if_block = /*visible*/ ctx[6] && create_if_block$
|
|
2239
|
+
let if_block = /*visible*/ ctx[6] && create_if_block$2(ctx);
|
|
2224
2240
|
|
|
2225
2241
|
return {
|
|
2226
2242
|
c() {
|
|
@@ -2264,7 +2280,7 @@ function create_fragment$l(ctx) {
|
|
|
2264
2280
|
transition_in(if_block, 1);
|
|
2265
2281
|
}
|
|
2266
2282
|
} else {
|
|
2267
|
-
if_block = create_if_block$
|
|
2283
|
+
if_block = create_if_block$2(ctx);
|
|
2268
2284
|
if_block.c();
|
|
2269
2285
|
transition_in(if_block, 1);
|
|
2270
2286
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -2301,7 +2317,7 @@ function create_fragment$l(ctx) {
|
|
|
2301
2317
|
};
|
|
2302
2318
|
}
|
|
2303
2319
|
|
|
2304
|
-
function instance$
|
|
2320
|
+
function instance$n($$self, $$props, $$invalidate) {
|
|
2305
2321
|
let click;
|
|
2306
2322
|
let close;
|
|
2307
2323
|
let closable;
|
|
@@ -2492,8 +2508,8 @@ class Modal extends SvelteComponent {
|
|
|
2492
2508
|
init(
|
|
2493
2509
|
this,
|
|
2494
2510
|
options,
|
|
2495
|
-
instance$
|
|
2496
|
-
create_fragment$
|
|
2511
|
+
instance$n,
|
|
2512
|
+
create_fragment$n,
|
|
2497
2513
|
safe_not_equal,
|
|
2498
2514
|
{
|
|
2499
2515
|
onClick: 17,
|
|
@@ -2509,14 +2525,14 @@ class Modal extends SvelteComponent {
|
|
|
2509
2525
|
closeButtonColor: 2,
|
|
2510
2526
|
_closeStyle: 3
|
|
2511
2527
|
},
|
|
2512
|
-
add_css$
|
|
2528
|
+
add_css$j
|
|
2513
2529
|
);
|
|
2514
2530
|
}
|
|
2515
2531
|
}
|
|
2516
2532
|
|
|
2517
2533
|
/* src/components/Grid.svelte generated by Svelte v3.53.1 */
|
|
2518
2534
|
|
|
2519
|
-
function create_fragment$
|
|
2535
|
+
function create_fragment$m(ctx) {
|
|
2520
2536
|
let div;
|
|
2521
2537
|
let current;
|
|
2522
2538
|
const default_slot_template = /*#slots*/ ctx[8].default;
|
|
@@ -2584,7 +2600,7 @@ function create_fragment$k(ctx) {
|
|
|
2584
2600
|
};
|
|
2585
2601
|
}
|
|
2586
2602
|
|
|
2587
|
-
function instance$
|
|
2603
|
+
function instance$m($$self, $$props, $$invalidate) {
|
|
2588
2604
|
let _style;
|
|
2589
2605
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
2590
2606
|
let { width = '512px' } = $$props;
|
|
@@ -2629,7 +2645,7 @@ class Grid extends SvelteComponent {
|
|
|
2629
2645
|
constructor(options) {
|
|
2630
2646
|
super();
|
|
2631
2647
|
|
|
2632
|
-
init(this, options, instance$
|
|
2648
|
+
init(this, options, instance$m, create_fragment$m, safe_not_equal, {
|
|
2633
2649
|
width: 1,
|
|
2634
2650
|
height: 2,
|
|
2635
2651
|
rows: 3,
|
|
@@ -2820,7 +2836,7 @@ function create_default_slot(ctx) {
|
|
|
2820
2836
|
};
|
|
2821
2837
|
}
|
|
2822
2838
|
|
|
2823
|
-
function create_fragment$
|
|
2839
|
+
function create_fragment$l(ctx) {
|
|
2824
2840
|
let stateitem;
|
|
2825
2841
|
let current;
|
|
2826
2842
|
|
|
@@ -2868,7 +2884,7 @@ function create_fragment$j(ctx) {
|
|
|
2868
2884
|
};
|
|
2869
2885
|
}
|
|
2870
2886
|
|
|
2871
|
-
function instance$
|
|
2887
|
+
function instance$l($$self, $$props, $$invalidate) {
|
|
2872
2888
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
2873
2889
|
let { path } = $$props;
|
|
2874
2890
|
let { onClick = { operation: 'none', args: [] } } = $$props;
|
|
@@ -2939,7 +2955,7 @@ class GridModalState extends SvelteComponent {
|
|
|
2939
2955
|
constructor(options) {
|
|
2940
2956
|
super();
|
|
2941
2957
|
|
|
2942
|
-
init(this, options, instance$
|
|
2958
|
+
init(this, options, instance$l, create_fragment$l, safe_not_equal, {
|
|
2943
2959
|
path: 0,
|
|
2944
2960
|
onClick: 1,
|
|
2945
2961
|
clickEventName: 2,
|
|
@@ -2964,11 +2980,11 @@ class GridModalState extends SvelteComponent {
|
|
|
2964
2980
|
|
|
2965
2981
|
/* src/components/GridItem.svelte generated by Svelte v3.53.1 */
|
|
2966
2982
|
|
|
2967
|
-
function add_css$
|
|
2968
|
-
append_styles(target, "svelte-
|
|
2983
|
+
function add_css$i(target) {
|
|
2984
|
+
append_styles(target, "svelte-n7kdl3", ".grid-item.svelte-n7kdl3{word-break:break-all;position:relative}.grid-item-inner.svelte-n7kdl3{position:absolute;inset:0}");
|
|
2969
2985
|
}
|
|
2970
2986
|
|
|
2971
|
-
function create_fragment$
|
|
2987
|
+
function create_fragment$k(ctx) {
|
|
2972
2988
|
let div1;
|
|
2973
2989
|
let div0;
|
|
2974
2990
|
let current;
|
|
@@ -2998,8 +3014,8 @@ function create_fragment$i(ctx) {
|
|
|
2998
3014
|
this.h();
|
|
2999
3015
|
},
|
|
3000
3016
|
h() {
|
|
3001
|
-
attr(div0, "class", "grid-item-inner svelte-
|
|
3002
|
-
attr(div1, "class", "grid-item svelte-
|
|
3017
|
+
attr(div0, "class", "grid-item-inner svelte-n7kdl3");
|
|
3018
|
+
attr(div1, "class", "grid-item svelte-n7kdl3");
|
|
3003
3019
|
attr(div1, "data-grid-item-id", /*gridItemId*/ ctx[1]);
|
|
3004
3020
|
attr(div1, "style", /*_style*/ ctx[0]);
|
|
3005
3021
|
},
|
|
@@ -3049,7 +3065,7 @@ function create_fragment$i(ctx) {
|
|
|
3049
3065
|
};
|
|
3050
3066
|
}
|
|
3051
3067
|
|
|
3052
|
-
function instance$
|
|
3068
|
+
function instance$k($$self, $$props, $$invalidate) {
|
|
3053
3069
|
let _style;
|
|
3054
3070
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
3055
3071
|
let { x1 } = $$props;
|
|
@@ -3102,8 +3118,8 @@ class GridItem extends SvelteComponent {
|
|
|
3102
3118
|
init(
|
|
3103
3119
|
this,
|
|
3104
3120
|
options,
|
|
3105
|
-
instance$
|
|
3106
|
-
create_fragment$
|
|
3121
|
+
instance$k,
|
|
3122
|
+
create_fragment$k,
|
|
3107
3123
|
safe_not_equal,
|
|
3108
3124
|
{
|
|
3109
3125
|
x1: 2,
|
|
@@ -3113,18 +3129,18 @@ class GridItem extends SvelteComponent {
|
|
|
3113
3129
|
z: 6,
|
|
3114
3130
|
background: 7
|
|
3115
3131
|
},
|
|
3116
|
-
add_css$
|
|
3132
|
+
add_css$i
|
|
3117
3133
|
);
|
|
3118
3134
|
}
|
|
3119
3135
|
}
|
|
3120
3136
|
|
|
3121
3137
|
/* src/components/Flex.svelte generated by Svelte v3.53.1 */
|
|
3122
3138
|
|
|
3123
|
-
function add_css$
|
|
3124
|
-
append_styles(target, "svelte-
|
|
3139
|
+
function add_css$h(target) {
|
|
3140
|
+
append_styles(target, "svelte-1e71ejc", ".flex.svelte-1e71ejc{display:flex}");
|
|
3125
3141
|
}
|
|
3126
3142
|
|
|
3127
|
-
function create_fragment$
|
|
3143
|
+
function create_fragment$j(ctx) {
|
|
3128
3144
|
let div;
|
|
3129
3145
|
let div_style_value;
|
|
3130
3146
|
let current;
|
|
@@ -3145,7 +3161,7 @@ function create_fragment$h(ctx) {
|
|
|
3145
3161
|
this.h();
|
|
3146
3162
|
},
|
|
3147
3163
|
h() {
|
|
3148
|
-
attr(div, "class", "flex svelte-
|
|
3164
|
+
attr(div, "class", "flex svelte-1e71ejc");
|
|
3149
3165
|
attr(div, "style", div_style_value = "width:" + /*width*/ ctx[1] + "; height:" + /*height*/ ctx[2] + "; flex-direction:" + /*direction*/ ctx[0] + "; " + /*_style*/ ctx[3]);
|
|
3150
3166
|
},
|
|
3151
3167
|
m(target, anchor) {
|
|
@@ -3199,7 +3215,7 @@ function getFlexContext() {
|
|
|
3199
3215
|
return getContext(FlexContextKey);
|
|
3200
3216
|
}
|
|
3201
3217
|
|
|
3202
|
-
function instance$
|
|
3218
|
+
function instance$j($$self, $$props, $$invalidate) {
|
|
3203
3219
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
3204
3220
|
let { direction = 'row' } = $$props;
|
|
3205
3221
|
let { width = '100%' } = $$props;
|
|
@@ -3225,8 +3241,8 @@ class Flex extends SvelteComponent {
|
|
|
3225
3241
|
init(
|
|
3226
3242
|
this,
|
|
3227
3243
|
options,
|
|
3228
|
-
instance$
|
|
3229
|
-
create_fragment$
|
|
3244
|
+
instance$j,
|
|
3245
|
+
create_fragment$j,
|
|
3230
3246
|
safe_not_equal,
|
|
3231
3247
|
{
|
|
3232
3248
|
direction: 0,
|
|
@@ -3234,18 +3250,18 @@ class Flex extends SvelteComponent {
|
|
|
3234
3250
|
height: 2,
|
|
3235
3251
|
_style: 3
|
|
3236
3252
|
},
|
|
3237
|
-
add_css$
|
|
3253
|
+
add_css$h
|
|
3238
3254
|
);
|
|
3239
3255
|
}
|
|
3240
3256
|
}
|
|
3241
3257
|
|
|
3242
3258
|
/* src/components/FlexItem.svelte generated by Svelte v3.53.1 */
|
|
3243
3259
|
|
|
3244
|
-
function add_css$
|
|
3245
|
-
append_styles(target, "svelte-
|
|
3260
|
+
function add_css$g(target) {
|
|
3261
|
+
append_styles(target, "svelte-1p0bk1x", ".flex-item.svelte-1p0bk1x{max-width:100%;max-height:100%;position:relative;isolation:isolate}");
|
|
3246
3262
|
}
|
|
3247
3263
|
|
|
3248
|
-
function create_fragment$
|
|
3264
|
+
function create_fragment$i(ctx) {
|
|
3249
3265
|
let div;
|
|
3250
3266
|
let current;
|
|
3251
3267
|
const default_slot_template = /*#slots*/ ctx[4].default;
|
|
@@ -3265,7 +3281,7 @@ function create_fragment$g(ctx) {
|
|
|
3265
3281
|
this.h();
|
|
3266
3282
|
},
|
|
3267
3283
|
h() {
|
|
3268
|
-
attr(div, "class", "flex-item svelte-
|
|
3284
|
+
attr(div, "class", "flex-item svelte-1p0bk1x");
|
|
3269
3285
|
attr(div, "style", /*style*/ ctx[0]);
|
|
3270
3286
|
},
|
|
3271
3287
|
m(target, anchor) {
|
|
@@ -3313,7 +3329,7 @@ function create_fragment$g(ctx) {
|
|
|
3313
3329
|
};
|
|
3314
3330
|
}
|
|
3315
3331
|
|
|
3316
|
-
function instance$
|
|
3332
|
+
function instance$i($$self, $$props, $$invalidate) {
|
|
3317
3333
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
3318
3334
|
let { length } = $$props;
|
|
3319
3335
|
let { _style = '' } = $$props;
|
|
@@ -3356,20 +3372,20 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
3356
3372
|
class FlexItem extends SvelteComponent {
|
|
3357
3373
|
constructor(options) {
|
|
3358
3374
|
super();
|
|
3359
|
-
init(this, options, instance$
|
|
3375
|
+
init(this, options, instance$i, create_fragment$i, safe_not_equal, { length: 1, _style: 2 }, add_css$g);
|
|
3360
3376
|
}
|
|
3361
3377
|
}
|
|
3362
3378
|
|
|
3363
3379
|
/* src/components/RenderText.svelte generated by Svelte v3.53.1 */
|
|
3364
3380
|
|
|
3365
|
-
function get_each_context$
|
|
3381
|
+
function get_each_context$2(ctx, list, i) {
|
|
3366
3382
|
const child_ctx = ctx.slice();
|
|
3367
3383
|
child_ctx[2] = list[i];
|
|
3368
3384
|
return child_ctx;
|
|
3369
3385
|
}
|
|
3370
3386
|
|
|
3371
3387
|
// (12:2) {:else}
|
|
3372
|
-
function create_else_block(ctx) {
|
|
3388
|
+
function create_else_block$1(ctx) {
|
|
3373
3389
|
let t_value = /*item*/ ctx[2] + "";
|
|
3374
3390
|
let t;
|
|
3375
3391
|
|
|
@@ -3393,7 +3409,7 @@ function create_else_block(ctx) {
|
|
|
3393
3409
|
}
|
|
3394
3410
|
|
|
3395
3411
|
// (10:2) {#if item.match(regexp)}
|
|
3396
|
-
function create_if_block(ctx) {
|
|
3412
|
+
function create_if_block$1(ctx) {
|
|
3397
3413
|
let br;
|
|
3398
3414
|
|
|
3399
3415
|
return {
|
|
@@ -3414,15 +3430,15 @@ function create_if_block(ctx) {
|
|
|
3414
3430
|
}
|
|
3415
3431
|
|
|
3416
3432
|
// (9:0) {#each items as item}
|
|
3417
|
-
function create_each_block$
|
|
3433
|
+
function create_each_block$2(ctx) {
|
|
3418
3434
|
let show_if;
|
|
3419
3435
|
let if_block_anchor;
|
|
3420
3436
|
|
|
3421
3437
|
function select_block_type(ctx, dirty) {
|
|
3422
3438
|
if (dirty & /*items*/ 1) show_if = null;
|
|
3423
3439
|
if (show_if == null) show_if = !!/*item*/ ctx[2].match(regexp);
|
|
3424
|
-
if (show_if) return create_if_block;
|
|
3425
|
-
return create_else_block;
|
|
3440
|
+
if (show_if) return create_if_block$1;
|
|
3441
|
+
return create_else_block$1;
|
|
3426
3442
|
}
|
|
3427
3443
|
|
|
3428
3444
|
let current_block_type = select_block_type(ctx, -1);
|
|
@@ -3461,13 +3477,13 @@ function create_each_block$1(ctx) {
|
|
|
3461
3477
|
};
|
|
3462
3478
|
}
|
|
3463
3479
|
|
|
3464
|
-
function create_fragment$
|
|
3480
|
+
function create_fragment$h(ctx) {
|
|
3465
3481
|
let each_1_anchor;
|
|
3466
3482
|
let each_value = /*items*/ ctx[0];
|
|
3467
3483
|
let each_blocks = [];
|
|
3468
3484
|
|
|
3469
3485
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
3470
|
-
each_blocks[i] = create_each_block$
|
|
3486
|
+
each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
|
|
3471
3487
|
}
|
|
3472
3488
|
|
|
3473
3489
|
return {
|
|
@@ -3498,12 +3514,12 @@ function create_fragment$f(ctx) {
|
|
|
3498
3514
|
let i;
|
|
3499
3515
|
|
|
3500
3516
|
for (i = 0; i < each_value.length; i += 1) {
|
|
3501
|
-
const child_ctx = get_each_context$
|
|
3517
|
+
const child_ctx = get_each_context$2(ctx, each_value, i);
|
|
3502
3518
|
|
|
3503
3519
|
if (each_blocks[i]) {
|
|
3504
3520
|
each_blocks[i].p(child_ctx, dirty);
|
|
3505
3521
|
} else {
|
|
3506
|
-
each_blocks[i] = create_each_block$
|
|
3522
|
+
each_blocks[i] = create_each_block$2(child_ctx);
|
|
3507
3523
|
each_blocks[i].c();
|
|
3508
3524
|
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
|
3509
3525
|
}
|
|
@@ -3527,7 +3543,7 @@ function create_fragment$f(ctx) {
|
|
|
3527
3543
|
|
|
3528
3544
|
const regexp = /(\r?\n)/;
|
|
3529
3545
|
|
|
3530
|
-
function instance$
|
|
3546
|
+
function instance$h($$self, $$props, $$invalidate) {
|
|
3531
3547
|
let items;
|
|
3532
3548
|
let { text = 'サンプルSample' } = $$props;
|
|
3533
3549
|
|
|
@@ -3547,17 +3563,17 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
|
3547
3563
|
class RenderText extends SvelteComponent {
|
|
3548
3564
|
constructor(options) {
|
|
3549
3565
|
super();
|
|
3550
|
-
init(this, options, instance$
|
|
3566
|
+
init(this, options, instance$h, create_fragment$h, safe_not_equal, { text: 1 });
|
|
3551
3567
|
}
|
|
3552
3568
|
}
|
|
3553
3569
|
|
|
3554
3570
|
/* src/components/TextElement.svelte generated by Svelte v3.53.1 */
|
|
3555
3571
|
|
|
3556
|
-
function add_css$
|
|
3557
|
-
append_styles(target, "svelte-
|
|
3572
|
+
function add_css$f(target) {
|
|
3573
|
+
append_styles(target, "svelte-9en2jg", ".text-element.svelte-9en2jg.svelte-9en2jg{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-element-inner.svelte-9en2jg.svelte-9en2jg{width:100%;height:auto}.text-direction-vertical.svelte-9en2jg.svelte-9en2jg{writing-mode:vertical-rl}.text-direction-vertical.svelte-9en2jg .text-element-inner.svelte-9en2jg{width:auto;height:100%}");
|
|
3558
3574
|
}
|
|
3559
3575
|
|
|
3560
|
-
function create_fragment$
|
|
3576
|
+
function create_fragment$g(ctx) {
|
|
3561
3577
|
let div1;
|
|
3562
3578
|
let div0;
|
|
3563
3579
|
let rendertext;
|
|
@@ -3583,8 +3599,8 @@ function create_fragment$e(ctx) {
|
|
|
3583
3599
|
this.h();
|
|
3584
3600
|
},
|
|
3585
3601
|
h() {
|
|
3586
|
-
attr(div0, "class", "text-element-inner svelte-
|
|
3587
|
-
attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-
|
|
3602
|
+
attr(div0, "class", "text-element-inner svelte-9en2jg");
|
|
3603
|
+
attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-9en2jg"));
|
|
3588
3604
|
attr(div1, "style", /*style*/ ctx[2]);
|
|
3589
3605
|
},
|
|
3590
3606
|
m(target, anchor) {
|
|
@@ -3598,7 +3614,7 @@ function create_fragment$e(ctx) {
|
|
|
3598
3614
|
if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
|
|
3599
3615
|
rendertext.$set(rendertext_changes);
|
|
3600
3616
|
|
|
3601
|
-
if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-
|
|
3617
|
+
if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-9en2jg"))) {
|
|
3602
3618
|
attr(div1, "class", div1_class_value);
|
|
3603
3619
|
}
|
|
3604
3620
|
|
|
@@ -3622,7 +3638,7 @@ function create_fragment$e(ctx) {
|
|
|
3622
3638
|
};
|
|
3623
3639
|
}
|
|
3624
3640
|
|
|
3625
|
-
function instance$
|
|
3641
|
+
function instance$g($$self, $$props, $$invalidate) {
|
|
3626
3642
|
let style;
|
|
3627
3643
|
let { text = 'サンプルSample' } = $$props;
|
|
3628
3644
|
let { _textStyle = 'font-size:12px;' } = $$props;
|
|
@@ -3652,8 +3668,8 @@ class TextElement extends SvelteComponent {
|
|
|
3652
3668
|
init(
|
|
3653
3669
|
this,
|
|
3654
3670
|
options,
|
|
3655
|
-
instance$
|
|
3656
|
-
create_fragment$
|
|
3671
|
+
instance$g,
|
|
3672
|
+
create_fragment$g,
|
|
3657
3673
|
safe_not_equal,
|
|
3658
3674
|
{
|
|
3659
3675
|
text: 0,
|
|
@@ -3661,18 +3677,18 @@ class TextElement extends SvelteComponent {
|
|
|
3661
3677
|
textDirection: 1,
|
|
3662
3678
|
_style: 4
|
|
3663
3679
|
},
|
|
3664
|
-
add_css$
|
|
3680
|
+
add_css$f
|
|
3665
3681
|
);
|
|
3666
3682
|
}
|
|
3667
3683
|
}
|
|
3668
3684
|
|
|
3669
3685
|
/* src/components/TextButtonElement.svelte generated by Svelte v3.53.1 */
|
|
3670
3686
|
|
|
3671
|
-
function add_css$
|
|
3672
|
-
append_styles(target, "svelte-
|
|
3687
|
+
function add_css$e(target) {
|
|
3688
|
+
append_styles(target, "svelte-tx5xf5", ".text-button-element.svelte-tx5xf5{width:100%;height:100%}.text-button.svelte-tx5xf5{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:transparent;border:none;box-shadow:transparent;box-sizing:border-box;cursor:pointer;transition:box-shadow 0.2s;white-space:pre-wrap;overflow:hidden}.text-button.svelte-tx5xf5:active{box-shadow:inset 0 0 100px 100px rgba(0, 0, 0, 0.3)}.text-button.svelte-tx5xf5:hover{box-shadow:inset 0 0 100px 100px rgba(255, 255, 255, 0.3)}");
|
|
3673
3689
|
}
|
|
3674
3690
|
|
|
3675
|
-
function create_fragment$
|
|
3691
|
+
function create_fragment$f(ctx) {
|
|
3676
3692
|
let div;
|
|
3677
3693
|
let button;
|
|
3678
3694
|
let rendertext;
|
|
@@ -3699,9 +3715,9 @@ function create_fragment$d(ctx) {
|
|
|
3699
3715
|
this.h();
|
|
3700
3716
|
},
|
|
3701
3717
|
h() {
|
|
3702
|
-
attr(button, "class", "text-button svelte-
|
|
3718
|
+
attr(button, "class", "text-button svelte-tx5xf5");
|
|
3703
3719
|
attr(button, "style", /*_buttonStyle*/ ctx[1]);
|
|
3704
|
-
attr(div, "class", "text-button-element svelte-
|
|
3720
|
+
attr(div, "class", "text-button-element svelte-tx5xf5");
|
|
3705
3721
|
attr(div, "style", /*_style*/ ctx[2]);
|
|
3706
3722
|
},
|
|
3707
3723
|
m(target, anchor) {
|
|
@@ -3746,7 +3762,7 @@ function create_fragment$d(ctx) {
|
|
|
3746
3762
|
};
|
|
3747
3763
|
}
|
|
3748
3764
|
|
|
3749
|
-
function instance$
|
|
3765
|
+
function instance$f($$self, $$props, $$invalidate) {
|
|
3750
3766
|
let { text = 'ボタンラベル' } = $$props;
|
|
3751
3767
|
let { onClick = { operation: 'none', args: [] } } = $$props;
|
|
3752
3768
|
|
|
@@ -3780,8 +3796,8 @@ class TextButtonElement extends SvelteComponent {
|
|
|
3780
3796
|
init(
|
|
3781
3797
|
this,
|
|
3782
3798
|
options,
|
|
3783
|
-
instance$
|
|
3784
|
-
create_fragment$
|
|
3799
|
+
instance$f,
|
|
3800
|
+
create_fragment$f,
|
|
3785
3801
|
safe_not_equal,
|
|
3786
3802
|
{
|
|
3787
3803
|
text: 0,
|
|
@@ -3790,18 +3806,18 @@ class TextButtonElement extends SvelteComponent {
|
|
|
3790
3806
|
_buttonStyle: 1,
|
|
3791
3807
|
_style: 2
|
|
3792
3808
|
},
|
|
3793
|
-
add_css$
|
|
3809
|
+
add_css$e
|
|
3794
3810
|
);
|
|
3795
3811
|
}
|
|
3796
3812
|
}
|
|
3797
3813
|
|
|
3798
3814
|
/* src/components/ImageElement.svelte generated by Svelte v3.53.1 */
|
|
3799
3815
|
|
|
3800
|
-
function add_css$
|
|
3801
|
-
append_styles(target, "svelte-
|
|
3816
|
+
function add_css$d(target) {
|
|
3817
|
+
append_styles(target, "svelte-t8kpqw", ".image-element.svelte-t8kpqw{display:flex;position:relative;width:100%;height:100%;max-width:100%;max-height:100%;justify-content:center;align-items:center;white-space:nowrap;box-sizing:border-box;overflow:hidden}.image.svelte-t8kpqw{width:100%;height:100%}.transport.svelte-t8kpqw:hover,.transport.svelte-t8kpqw:focus{opacity:0.75;box-shadow:0 5px 16px rgba(0, 0, 0, 0.1), 0 8px 28px rgba(0, 0, 0, 0.16)}");
|
|
3802
3818
|
}
|
|
3803
3819
|
|
|
3804
|
-
function create_fragment$
|
|
3820
|
+
function create_fragment$e(ctx) {
|
|
3805
3821
|
let div;
|
|
3806
3822
|
let img;
|
|
3807
3823
|
let img_src_value;
|
|
@@ -3833,14 +3849,14 @@ function create_fragment$c(ctx) {
|
|
|
3833
3849
|
this.h();
|
|
3834
3850
|
},
|
|
3835
3851
|
h() {
|
|
3836
|
-
attr(img, "class", "image svelte-
|
|
3852
|
+
attr(img, "class", "image svelte-t8kpqw");
|
|
3837
3853
|
attr(img, "loading", "lazy");
|
|
3838
3854
|
attr(img, "width", "auto");
|
|
3839
3855
|
attr(img, "height", "auto");
|
|
3840
3856
|
attr(img, "style", /*_imageStyle*/ ctx[3]);
|
|
3841
3857
|
if (!src_url_equal(img.src, img_src_value = /*src*/ ctx[0])) attr(img, "src", img_src_value);
|
|
3842
3858
|
attr(img, "alt", /*alt*/ ctx[1]);
|
|
3843
|
-
attr(div, "class", div_class_value = "" + (null_to_empty('image-element' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-
|
|
3859
|
+
attr(div, "class", div_class_value = "" + (null_to_empty('image-element' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-t8kpqw"));
|
|
3844
3860
|
attr(div, "style", /*_style*/ ctx[4]);
|
|
3845
3861
|
},
|
|
3846
3862
|
m(target, anchor) {
|
|
@@ -3865,7 +3881,7 @@ function create_fragment$c(ctx) {
|
|
|
3865
3881
|
attr(img, "alt", /*alt*/ ctx[1]);
|
|
3866
3882
|
}
|
|
3867
3883
|
|
|
3868
|
-
if (dirty & /*transport*/ 4 && div_class_value !== (div_class_value = "" + (null_to_empty('image-element' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-
|
|
3884
|
+
if (dirty & /*transport*/ 4 && div_class_value !== (div_class_value = "" + (null_to_empty('image-element' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-t8kpqw"))) {
|
|
3869
3885
|
attr(div, "class", div_class_value);
|
|
3870
3886
|
}
|
|
3871
3887
|
|
|
@@ -3883,7 +3899,7 @@ function create_fragment$c(ctx) {
|
|
|
3883
3899
|
};
|
|
3884
3900
|
}
|
|
3885
3901
|
|
|
3886
|
-
function instance$
|
|
3902
|
+
function instance$e($$self, $$props, $$invalidate) {
|
|
3887
3903
|
let { src = 'https://admin.karte.io/action-editor2/public/images/no_image_en.svg' } = $$props;
|
|
3888
3904
|
let { alt = 'No Image' } = $$props;
|
|
3889
3905
|
let { transport = false } = $$props;
|
|
@@ -3921,8 +3937,8 @@ class ImageElement extends SvelteComponent {
|
|
|
3921
3937
|
init(
|
|
3922
3938
|
this,
|
|
3923
3939
|
options,
|
|
3924
|
-
instance$
|
|
3925
|
-
create_fragment$
|
|
3940
|
+
instance$e,
|
|
3941
|
+
create_fragment$e,
|
|
3926
3942
|
safe_not_equal,
|
|
3927
3943
|
{
|
|
3928
3944
|
src: 0,
|
|
@@ -3933,18 +3949,18 @@ class ImageElement extends SvelteComponent {
|
|
|
3933
3949
|
_imageStyle: 3,
|
|
3934
3950
|
_style: 4
|
|
3935
3951
|
},
|
|
3936
|
-
add_css$
|
|
3952
|
+
add_css$d
|
|
3937
3953
|
);
|
|
3938
3954
|
}
|
|
3939
3955
|
}
|
|
3940
3956
|
|
|
3941
3957
|
/* src/components/List.svelte generated by Svelte v3.53.1 */
|
|
3942
3958
|
|
|
3943
|
-
function add_css$
|
|
3944
|
-
append_styles(target, "svelte-
|
|
3959
|
+
function add_css$c(target) {
|
|
3960
|
+
append_styles(target, "svelte-dfqtyx", ".list.svelte-dfqtyx{display:flex;width:100%;height:100%;overflow:hidden}");
|
|
3945
3961
|
}
|
|
3946
3962
|
|
|
3947
|
-
function create_fragment$
|
|
3963
|
+
function create_fragment$d(ctx) {
|
|
3948
3964
|
let div;
|
|
3949
3965
|
let current;
|
|
3950
3966
|
const default_slot_template = /*#slots*/ ctx[6].default;
|
|
@@ -3964,7 +3980,7 @@ function create_fragment$b(ctx) {
|
|
|
3964
3980
|
this.h();
|
|
3965
3981
|
},
|
|
3966
3982
|
h() {
|
|
3967
|
-
attr(div, "class", "list svelte-
|
|
3983
|
+
attr(div, "class", "list svelte-dfqtyx");
|
|
3968
3984
|
attr(div, "style", /*style*/ ctx[0]);
|
|
3969
3985
|
},
|
|
3970
3986
|
m(target, anchor) {
|
|
@@ -4014,7 +4030,7 @@ function create_fragment$b(ctx) {
|
|
|
4014
4030
|
|
|
4015
4031
|
const LIST_CONTEXT_KEY = Symbol();
|
|
4016
4032
|
|
|
4017
|
-
function instance$
|
|
4033
|
+
function instance$d($$self, $$props, $$invalidate) {
|
|
4018
4034
|
let style;
|
|
4019
4035
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
4020
4036
|
let { direction = 'vertical' } = $$props;
|
|
@@ -4081,8 +4097,8 @@ class List extends SvelteComponent {
|
|
|
4081
4097
|
init(
|
|
4082
4098
|
this,
|
|
4083
4099
|
options,
|
|
4084
|
-
instance$
|
|
4085
|
-
create_fragment$
|
|
4100
|
+
instance$d,
|
|
4101
|
+
create_fragment$d,
|
|
4086
4102
|
safe_not_equal,
|
|
4087
4103
|
{
|
|
4088
4104
|
direction: 1,
|
|
@@ -4090,18 +4106,18 @@ class List extends SvelteComponent {
|
|
|
4090
4106
|
background: 3,
|
|
4091
4107
|
_style: 4
|
|
4092
4108
|
},
|
|
4093
|
-
add_css$
|
|
4109
|
+
add_css$c
|
|
4094
4110
|
);
|
|
4095
4111
|
}
|
|
4096
4112
|
}
|
|
4097
4113
|
|
|
4098
4114
|
/* src/components/ListItem.svelte generated by Svelte v3.53.1 */
|
|
4099
4115
|
|
|
4100
|
-
function add_css$
|
|
4101
|
-
append_styles(target, "svelte-
|
|
4116
|
+
function add_css$b(target) {
|
|
4117
|
+
append_styles(target, "svelte-h5j4xe", ".list-item.svelte-h5j4xe{flex:auto;box-sizing:border-box;min-width:0;min-height:0;position:relative}.list-item-inner.svelte-h5j4xe{position:absolute;inset:0}");
|
|
4102
4118
|
}
|
|
4103
4119
|
|
|
4104
|
-
function create_fragment$
|
|
4120
|
+
function create_fragment$c(ctx) {
|
|
4105
4121
|
let div1;
|
|
4106
4122
|
let div0;
|
|
4107
4123
|
let current;
|
|
@@ -4128,9 +4144,9 @@ function create_fragment$a(ctx) {
|
|
|
4128
4144
|
this.h();
|
|
4129
4145
|
},
|
|
4130
4146
|
h() {
|
|
4131
|
-
attr(div0, "class", "list-item-inner svelte-
|
|
4147
|
+
attr(div0, "class", "list-item-inner svelte-h5j4xe");
|
|
4132
4148
|
attr(div0, "style", /*_style*/ ctx[0]);
|
|
4133
|
-
attr(div1, "class", "list-item svelte-
|
|
4149
|
+
attr(div1, "class", "list-item svelte-h5j4xe");
|
|
4134
4150
|
attr(div1, "style", /*listItemStyle*/ ctx[1]);
|
|
4135
4151
|
},
|
|
4136
4152
|
m(target, anchor) {
|
|
@@ -4195,7 +4211,7 @@ function create_fragment$a(ctx) {
|
|
|
4195
4211
|
};
|
|
4196
4212
|
}
|
|
4197
4213
|
|
|
4198
|
-
function instance$
|
|
4214
|
+
function instance$c($$self, $$props, $$invalidate) {
|
|
4199
4215
|
let click;
|
|
4200
4216
|
let listItemStyle;
|
|
4201
4217
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
@@ -4285,17 +4301,17 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
4285
4301
|
class ListItem extends SvelteComponent {
|
|
4286
4302
|
constructor(options) {
|
|
4287
4303
|
super();
|
|
4288
|
-
init(this, options, instance$
|
|
4304
|
+
init(this, options, instance$c, create_fragment$c, safe_not_equal, { onClick: 3, clickEventName: 4, _style: 0 }, add_css$b);
|
|
4289
4305
|
}
|
|
4290
4306
|
}
|
|
4291
4307
|
|
|
4292
4308
|
/* src/components/EmbedElement.svelte generated by Svelte v3.53.1 */
|
|
4293
4309
|
|
|
4294
|
-
function add_css$
|
|
4295
|
-
append_styles(target, "svelte-
|
|
4310
|
+
function add_css$a(target) {
|
|
4311
|
+
append_styles(target, "svelte-k86zna", ".embed.svelte-k86zna{position:relative;box-shadow:0 1px rgba(0, 0, 0, 0.06);padding-top:56.25%;overflow:hidden}.embed.svelte-k86zna iframe{position:absolute;top:0;left:0;width:100%;height:100%}");
|
|
4296
4312
|
}
|
|
4297
4313
|
|
|
4298
|
-
function create_fragment$
|
|
4314
|
+
function create_fragment$b(ctx) {
|
|
4299
4315
|
let div;
|
|
4300
4316
|
|
|
4301
4317
|
return {
|
|
@@ -4310,7 +4326,7 @@ function create_fragment$9(ctx) {
|
|
|
4310
4326
|
this.h();
|
|
4311
4327
|
},
|
|
4312
4328
|
h() {
|
|
4313
|
-
attr(div, "class", "embed svelte-
|
|
4329
|
+
attr(div, "class", "embed svelte-k86zna");
|
|
4314
4330
|
attr(div, "style", /*_style*/ ctx[1]);
|
|
4315
4331
|
},
|
|
4316
4332
|
m(target, anchor) {
|
|
@@ -4331,7 +4347,7 @@ function create_fragment$9(ctx) {
|
|
|
4331
4347
|
};
|
|
4332
4348
|
}
|
|
4333
4349
|
|
|
4334
|
-
function instance$
|
|
4350
|
+
function instance$b($$self, $$props, $$invalidate) {
|
|
4335
4351
|
let { code } = $$props;
|
|
4336
4352
|
let { _style = '' } = $$props;
|
|
4337
4353
|
|
|
@@ -4346,17 +4362,17 @@ function instance$9($$self, $$props, $$invalidate) {
|
|
|
4346
4362
|
class EmbedElement extends SvelteComponent {
|
|
4347
4363
|
constructor(options) {
|
|
4348
4364
|
super();
|
|
4349
|
-
init(this, options, instance$
|
|
4365
|
+
init(this, options, instance$b, create_fragment$b, safe_not_equal, { code: 0, _style: 1 }, add_css$a);
|
|
4350
4366
|
}
|
|
4351
4367
|
}
|
|
4352
4368
|
|
|
4353
4369
|
/* src/components/MovieYouTubeElement.svelte generated by Svelte v3.53.1 */
|
|
4354
4370
|
|
|
4355
|
-
function add_css$
|
|
4356
|
-
append_styles(target, "svelte-
|
|
4371
|
+
function add_css$9(target) {
|
|
4372
|
+
append_styles(target, "svelte-k86zna", ".embed.svelte-k86zna{position:relative;box-shadow:0 1px rgba(0, 0, 0, 0.06);padding-top:56.25%;overflow:hidden}.embed.svelte-k86zna iframe{position:absolute;top:0;left:0;width:100%;height:100%}");
|
|
4357
4373
|
}
|
|
4358
4374
|
|
|
4359
|
-
function create_fragment$
|
|
4375
|
+
function create_fragment$a(ctx) {
|
|
4360
4376
|
let div1;
|
|
4361
4377
|
let div0;
|
|
4362
4378
|
|
|
@@ -4376,7 +4392,7 @@ function create_fragment$8(ctx) {
|
|
|
4376
4392
|
},
|
|
4377
4393
|
h() {
|
|
4378
4394
|
attr(div0, "class", "karte-player");
|
|
4379
|
-
attr(div1, "class", "embed svelte-
|
|
4395
|
+
attr(div1, "class", "embed svelte-k86zna");
|
|
4380
4396
|
attr(div1, "style", /*_style*/ ctx[0]);
|
|
4381
4397
|
},
|
|
4382
4398
|
m(target, anchor) {
|
|
@@ -4398,7 +4414,7 @@ function create_fragment$8(ctx) {
|
|
|
4398
4414
|
};
|
|
4399
4415
|
}
|
|
4400
4416
|
|
|
4401
|
-
function instance$
|
|
4417
|
+
function instance$a($$self, $$props, $$invalidate) {
|
|
4402
4418
|
let $system;
|
|
4403
4419
|
component_subscribe($$self, system, $$value => $$invalidate(12, $system = $$value));
|
|
4404
4420
|
let { videoId } = $$props;
|
|
@@ -4411,7 +4427,7 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
4411
4427
|
// @ts-ignore
|
|
4412
4428
|
if (!window.YT) {
|
|
4413
4429
|
const tag = document.createElement("script");
|
|
4414
|
-
tag.src = "
|
|
4430
|
+
tag.src = "https://www.youtube.com/iframe_api";
|
|
4415
4431
|
const firstScriptTag = document.getElementsByTagName("script")[0];
|
|
4416
4432
|
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
|
4417
4433
|
}
|
|
@@ -4523,14 +4539,6 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
4523
4539
|
});
|
|
4524
4540
|
}
|
|
4525
4541
|
|
|
4526
|
-
onDestroy$1(() => {
|
|
4527
|
-
if (player) {
|
|
4528
|
-
player.stopVideo();
|
|
4529
|
-
}
|
|
4530
|
-
|
|
4531
|
-
player.destroy();
|
|
4532
|
-
});
|
|
4533
|
-
|
|
4534
4542
|
onMount(() => {
|
|
4535
4543
|
setTimeout(
|
|
4536
4544
|
() => {
|
|
@@ -4543,6 +4551,13 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
4543
4551
|
);
|
|
4544
4552
|
});
|
|
4545
4553
|
|
|
4554
|
+
onDestroy$1(() => {
|
|
4555
|
+
if (player) {
|
|
4556
|
+
player.stopVideo();
|
|
4557
|
+
player.destroy();
|
|
4558
|
+
}
|
|
4559
|
+
});
|
|
4560
|
+
|
|
4546
4561
|
// @ts-ignore
|
|
4547
4562
|
window.onYouTubeIframeAPIReady = () => {
|
|
4548
4563
|
createPlayer();
|
|
@@ -4578,8 +4593,8 @@ class MovieYouTubeElement extends SvelteComponent {
|
|
|
4578
4593
|
init(
|
|
4579
4594
|
this,
|
|
4580
4595
|
options,
|
|
4581
|
-
instance$
|
|
4582
|
-
create_fragment$
|
|
4596
|
+
instance$a,
|
|
4597
|
+
create_fragment$a,
|
|
4583
4598
|
safe_not_equal,
|
|
4584
4599
|
{
|
|
4585
4600
|
videoId: 2,
|
|
@@ -4589,18 +4604,18 @@ class MovieYouTubeElement extends SvelteComponent {
|
|
|
4589
4604
|
mute: 6,
|
|
4590
4605
|
_style: 0
|
|
4591
4606
|
},
|
|
4592
|
-
add_css$
|
|
4607
|
+
add_css$9
|
|
4593
4608
|
);
|
|
4594
4609
|
}
|
|
4595
4610
|
}
|
|
4596
4611
|
|
|
4597
4612
|
/* src/components/MovieVimeoElement.svelte generated by Svelte v3.53.1 */
|
|
4598
4613
|
|
|
4599
|
-
function add_css$
|
|
4600
|
-
append_styles(target, "svelte-
|
|
4614
|
+
function add_css$8(target) {
|
|
4615
|
+
append_styles(target, "svelte-5l33p2", ".embed.svelte-5l33p2{position:relative;box-shadow:0 1px rgba(0, 0, 0, 0.06);padding-top:56.25%;overflow:hidden}.embed.svelte-5l33p2 iframe{position:absolute;top:0;left:0;width:100%;height:100%}");
|
|
4601
4616
|
}
|
|
4602
4617
|
|
|
4603
|
-
function create_fragment$
|
|
4618
|
+
function create_fragment$9(ctx) {
|
|
4604
4619
|
let div1;
|
|
4605
4620
|
let div0;
|
|
4606
4621
|
|
|
@@ -4620,7 +4635,7 @@ function create_fragment$7(ctx) {
|
|
|
4620
4635
|
},
|
|
4621
4636
|
h() {
|
|
4622
4637
|
attr(div0, "class", "karte-player");
|
|
4623
|
-
attr(div1, "class", "embed svelte-
|
|
4638
|
+
attr(div1, "class", "embed svelte-5l33p2");
|
|
4624
4639
|
attr(div1, "style", /*_style*/ ctx[0]);
|
|
4625
4640
|
},
|
|
4626
4641
|
m(target, anchor) {
|
|
@@ -4642,7 +4657,7 @@ function create_fragment$7(ctx) {
|
|
|
4642
4657
|
};
|
|
4643
4658
|
}
|
|
4644
4659
|
|
|
4645
|
-
function instance$
|
|
4660
|
+
function instance$9($$self, $$props, $$invalidate) {
|
|
4646
4661
|
let $system;
|
|
4647
4662
|
component_subscribe($$self, system, $$value => $$invalidate(12, $system = $$value));
|
|
4648
4663
|
let { videoId } = $$props;
|
|
@@ -4650,13 +4665,13 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
4650
4665
|
let { autoplay = false } = $$props;
|
|
4651
4666
|
let { loop = false } = $$props;
|
|
4652
4667
|
let { mute = false } = $$props;
|
|
4653
|
-
let { _style =
|
|
4668
|
+
let { _style = '' } = $$props;
|
|
4654
4669
|
|
|
4655
4670
|
// @ts-ignore
|
|
4656
4671
|
if (!window.Vimeo) {
|
|
4657
|
-
const tag = document.createElement(
|
|
4658
|
-
tag.src =
|
|
4659
|
-
const firstScriptTag = document.getElementsByTagName(
|
|
4672
|
+
const tag = document.createElement('script');
|
|
4673
|
+
tag.src = 'https://player.vimeo.com/api/player.js';
|
|
4674
|
+
const firstScriptTag = document.getElementsByTagName('script')[0];
|
|
4660
4675
|
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
|
4661
4676
|
}
|
|
4662
4677
|
|
|
@@ -4689,7 +4704,7 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
4689
4704
|
const playSeconds = Math.round((currentDate - startDate) / 1000);
|
|
4690
4705
|
totalPlaySeconds += playSeconds;
|
|
4691
4706
|
|
|
4692
|
-
sendMovieEvent(
|
|
4707
|
+
sendMovieEvent('_movie_playtime', {
|
|
4693
4708
|
seconds: playSeconds,
|
|
4694
4709
|
total_seconds: totalPlaySeconds
|
|
4695
4710
|
});
|
|
@@ -4706,7 +4721,7 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
4706
4721
|
|
|
4707
4722
|
if (!alreadyPlay) {
|
|
4708
4723
|
alreadyPlay = true;
|
|
4709
|
-
sendMovieEvent(
|
|
4724
|
+
sendMovieEvent('_movie_play');
|
|
4710
4725
|
}
|
|
4711
4726
|
}
|
|
4712
4727
|
|
|
@@ -4716,7 +4731,7 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
4716
4731
|
}
|
|
4717
4732
|
|
|
4718
4733
|
function onFinish() {
|
|
4719
|
-
sendMovieEvent(
|
|
4734
|
+
sendMovieEvent('_movie_finish');
|
|
4720
4735
|
sendPlaytime();
|
|
4721
4736
|
startDate = null;
|
|
4722
4737
|
}
|
|
@@ -4727,30 +4742,21 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
4727
4742
|
}
|
|
4728
4743
|
|
|
4729
4744
|
const playerOptions = { id: videoId, autoplay, loop };
|
|
4730
|
-
console.log("createPlayer1");
|
|
4731
4745
|
|
|
4732
4746
|
// @ts-ignore
|
|
4733
4747
|
player = new window.Vimeo.Player(domRef, playerOptions);
|
|
4734
4748
|
|
|
4735
|
-
|
|
4736
|
-
player.on(
|
|
4737
|
-
player.on(
|
|
4738
|
-
player.on("ended", onFinish);
|
|
4749
|
+
player.on('play', onStart);
|
|
4750
|
+
player.on('pause', onPause);
|
|
4751
|
+
player.on('ended', onFinish);
|
|
4739
4752
|
onPlayerReady();
|
|
4740
4753
|
}
|
|
4741
4754
|
|
|
4742
|
-
onDestroy$1(() => {
|
|
4743
|
-
player.destroy();
|
|
4744
|
-
});
|
|
4745
|
-
|
|
4746
4755
|
onMount(() => {
|
|
4747
|
-
console.log("onMount1");
|
|
4748
|
-
|
|
4749
4756
|
setTimeout(
|
|
4750
4757
|
() => {
|
|
4751
4758
|
// @ts-ignore
|
|
4752
4759
|
if (window.Vimeo) {
|
|
4753
|
-
console.log("onMount2");
|
|
4754
4760
|
createPlayer();
|
|
4755
4761
|
}
|
|
4756
4762
|
},
|
|
@@ -4758,7 +4764,13 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
4758
4764
|
);
|
|
4759
4765
|
});
|
|
4760
4766
|
|
|
4761
|
-
|
|
4767
|
+
onDestroy$1(() => {
|
|
4768
|
+
if (player) {
|
|
4769
|
+
player.destroy();
|
|
4770
|
+
}
|
|
4771
|
+
});
|
|
4772
|
+
|
|
4773
|
+
window.addEventListener('beforeunload', () => {
|
|
4762
4774
|
sendPlaytime();
|
|
4763
4775
|
});
|
|
4764
4776
|
|
|
@@ -4788,8 +4800,8 @@ class MovieVimeoElement extends SvelteComponent {
|
|
|
4788
4800
|
init(
|
|
4789
4801
|
this,
|
|
4790
4802
|
options,
|
|
4791
|
-
instance$
|
|
4792
|
-
create_fragment$
|
|
4803
|
+
instance$9,
|
|
4804
|
+
create_fragment$9,
|
|
4793
4805
|
safe_not_equal,
|
|
4794
4806
|
{
|
|
4795
4807
|
videoId: 2,
|
|
@@ -4799,240 +4811,158 @@ class MovieVimeoElement extends SvelteComponent {
|
|
|
4799
4811
|
mute: 6,
|
|
4800
4812
|
_style: 0
|
|
4801
4813
|
},
|
|
4802
|
-
add_css$
|
|
4814
|
+
add_css$8
|
|
4803
4815
|
);
|
|
4804
4816
|
}
|
|
4805
4817
|
}
|
|
4806
4818
|
|
|
4807
|
-
|
|
4819
|
+
function registerInput({ name, statePath, validator = () => true, initialValue, }) {
|
|
4820
|
+
const writableValue = {
|
|
4821
|
+
subscribe(run) {
|
|
4822
|
+
return formData.subscribe(formData => {
|
|
4823
|
+
run(formData[name]?.value);
|
|
4824
|
+
});
|
|
4825
|
+
},
|
|
4826
|
+
set(value) {
|
|
4827
|
+
formData.update(prev => ({
|
|
4828
|
+
...prev,
|
|
4829
|
+
[name]: {
|
|
4830
|
+
statePath,
|
|
4831
|
+
value,
|
|
4832
|
+
isValid: validator(value),
|
|
4833
|
+
},
|
|
4834
|
+
}));
|
|
4835
|
+
},
|
|
4836
|
+
update(updater) {
|
|
4837
|
+
formData.update(prev => {
|
|
4838
|
+
const prevValue = prev[name]?.value;
|
|
4839
|
+
return {
|
|
4840
|
+
...prev,
|
|
4841
|
+
[name]: {
|
|
4842
|
+
statePath,
|
|
4843
|
+
value: updater(prevValue),
|
|
4844
|
+
isValid: validator(prevValue),
|
|
4845
|
+
},
|
|
4846
|
+
};
|
|
4847
|
+
});
|
|
4848
|
+
},
|
|
4849
|
+
};
|
|
4850
|
+
writableValue.set(initialValue);
|
|
4851
|
+
return writableValue;
|
|
4852
|
+
}
|
|
4853
|
+
function deleteValues(statePath) {
|
|
4854
|
+
formData.update(prev => {
|
|
4855
|
+
const targetNames = Object.entries(prev)
|
|
4856
|
+
.filter(([_, { statePath: s }]) => s === statePath)
|
|
4857
|
+
.map(([name]) => name);
|
|
4858
|
+
targetNames.forEach(name => {
|
|
4859
|
+
delete prev[name];
|
|
4860
|
+
});
|
|
4861
|
+
return { ...prev };
|
|
4862
|
+
});
|
|
4863
|
+
}
|
|
4864
|
+
const getValuesAreValidReader = statePath => ({
|
|
4865
|
+
subscribe(callback) {
|
|
4866
|
+
return formData.subscribe(formData => {
|
|
4867
|
+
const valuesAreValid = Object.entries(formData)
|
|
4868
|
+
.filter(([_, { statePath: s }]) => s === statePath)
|
|
4869
|
+
.every(([_, { isValid }]) => isValid);
|
|
4870
|
+
callback(valuesAreValid);
|
|
4871
|
+
});
|
|
4872
|
+
},
|
|
4873
|
+
});
|
|
4874
|
+
function formDataToEventValues(campaignId, formData) {
|
|
4875
|
+
const questions = [];
|
|
4876
|
+
const answersMap = {};
|
|
4877
|
+
Object.entries(formData).forEach(([name, dataItem]) => {
|
|
4878
|
+
questions.push(name);
|
|
4879
|
+
const value = dataItem.value;
|
|
4880
|
+
const answerKey = `question_${name}`;
|
|
4881
|
+
if (Array.isArray(value)) {
|
|
4882
|
+
answersMap[answerKey] = {
|
|
4883
|
+
choices: value,
|
|
4884
|
+
};
|
|
4885
|
+
}
|
|
4886
|
+
else if (typeof value === 'string') {
|
|
4887
|
+
answersMap[answerKey] = {
|
|
4888
|
+
free_answer: value,
|
|
4889
|
+
};
|
|
4890
|
+
}
|
|
4891
|
+
});
|
|
4892
|
+
return {
|
|
4893
|
+
[campaignId]: {
|
|
4894
|
+
questions,
|
|
4895
|
+
...answersMap,
|
|
4896
|
+
},
|
|
4897
|
+
};
|
|
4898
|
+
}
|
|
4899
|
+
function submit() {
|
|
4900
|
+
const systemConfig = getSystem();
|
|
4901
|
+
const campaignId = systemConfig.campaignId;
|
|
4902
|
+
if (campaignId) {
|
|
4903
|
+
const formData$1 = get(formData);
|
|
4904
|
+
const values = formDataToEventValues(campaignId, formData$1);
|
|
4905
|
+
send_event('_answer_question', values);
|
|
4906
|
+
}
|
|
4907
|
+
{
|
|
4908
|
+
const formData$1 = get(formData);
|
|
4909
|
+
const values = formDataToEventValues('mock', formData$1);
|
|
4910
|
+
console.log('values: ', values);
|
|
4911
|
+
}
|
|
4912
|
+
}
|
|
4913
|
+
|
|
4914
|
+
/* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
|
|
4808
4915
|
|
|
4809
|
-
function add_css$
|
|
4810
|
-
append_styles(target, "svelte-
|
|
4916
|
+
function add_css$7(target) {
|
|
4917
|
+
append_styles(target, "svelte-kyay3k", ".textarea-wrapper.svelte-kyay3k{display:flex;align-items:center;width:100%;height:100%}.textarea.svelte-kyay3k{width:100%;resize:none}");
|
|
4811
4918
|
}
|
|
4812
4919
|
|
|
4813
|
-
function create_fragment$
|
|
4920
|
+
function create_fragment$8(ctx) {
|
|
4814
4921
|
let div;
|
|
4815
|
-
let
|
|
4816
|
-
|
|
4817
|
-
|
|
4922
|
+
let textarea;
|
|
4923
|
+
let mounted;
|
|
4924
|
+
let dispose;
|
|
4818
4925
|
|
|
4819
4926
|
return {
|
|
4820
4927
|
c() {
|
|
4821
4928
|
div = element("div");
|
|
4822
|
-
|
|
4929
|
+
textarea = element("textarea");
|
|
4823
4930
|
this.h();
|
|
4824
4931
|
},
|
|
4825
4932
|
l(nodes) {
|
|
4826
4933
|
div = claim_element(nodes, "DIV", { class: true });
|
|
4827
4934
|
var div_nodes = children(div);
|
|
4828
|
-
|
|
4935
|
+
|
|
4936
|
+
textarea = claim_element(div_nodes, "TEXTAREA", {
|
|
4937
|
+
class: true,
|
|
4938
|
+
rows: true,
|
|
4939
|
+
placeholder: true
|
|
4940
|
+
});
|
|
4941
|
+
|
|
4942
|
+
children(textarea).forEach(detach);
|
|
4829
4943
|
div_nodes.forEach(detach);
|
|
4830
4944
|
this.h();
|
|
4831
4945
|
},
|
|
4832
4946
|
h() {
|
|
4833
|
-
attr(
|
|
4947
|
+
attr(textarea, "class", "textarea svelte-kyay3k");
|
|
4948
|
+
textarea.value = /*$value*/ ctx[3];
|
|
4949
|
+
textarea.required = /*required*/ ctx[0];
|
|
4950
|
+
attr(textarea, "rows", /*rows*/ ctx[1]);
|
|
4951
|
+
attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
|
|
4952
|
+
attr(div, "class", "textarea-wrapper svelte-kyay3k");
|
|
4834
4953
|
},
|
|
4835
4954
|
m(target, anchor) {
|
|
4836
4955
|
insert_hydration(target, div, anchor);
|
|
4956
|
+
append_hydration(div, textarea);
|
|
4837
4957
|
|
|
4838
|
-
if (
|
|
4839
|
-
|
|
4958
|
+
if (!mounted) {
|
|
4959
|
+
dispose = listen(textarea, "input", /*handleInput*/ ctx[5]);
|
|
4960
|
+
mounted = true;
|
|
4840
4961
|
}
|
|
4841
|
-
|
|
4842
|
-
current = true;
|
|
4843
4962
|
},
|
|
4844
4963
|
p(ctx, [dirty]) {
|
|
4845
|
-
if (
|
|
4846
|
-
|
|
4847
|
-
update_slot_base(
|
|
4848
|
-
default_slot,
|
|
4849
|
-
default_slot_template,
|
|
4850
|
-
ctx,
|
|
4851
|
-
/*$$scope*/ ctx[3],
|
|
4852
|
-
!current
|
|
4853
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[3])
|
|
4854
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[3], dirty, null),
|
|
4855
|
-
null
|
|
4856
|
-
);
|
|
4857
|
-
}
|
|
4858
|
-
}
|
|
4859
|
-
},
|
|
4860
|
-
i(local) {
|
|
4861
|
-
if (current) return;
|
|
4862
|
-
transition_in(default_slot, local);
|
|
4863
|
-
current = true;
|
|
4864
|
-
},
|
|
4865
|
-
o(local) {
|
|
4866
|
-
transition_out(default_slot, local);
|
|
4867
|
-
current = false;
|
|
4868
|
-
},
|
|
4869
|
-
d(detaching) {
|
|
4870
|
-
if (detaching) detach(div);
|
|
4871
|
-
if (default_slot) default_slot.d(detaching);
|
|
4872
|
-
}
|
|
4873
|
-
};
|
|
4874
|
-
}
|
|
4875
|
-
|
|
4876
|
-
const FORM_CONTEXT_KEY = Symbol();
|
|
4877
|
-
|
|
4878
|
-
function getValue($formData, name) {
|
|
4879
|
-
return $formData._data[name];
|
|
4880
|
-
}
|
|
4881
|
-
|
|
4882
|
-
function updateValue(data, name, update) {
|
|
4883
|
-
data.update(prev => {
|
|
4884
|
-
const { value, isValid } = update(prev._data[name]);
|
|
4885
|
-
prev._data[name] = value;
|
|
4886
|
-
prev._isValidMap[name] = isValid;
|
|
4887
|
-
return { ...prev };
|
|
4888
|
-
});
|
|
4889
|
-
}
|
|
4890
|
-
|
|
4891
|
-
function checkIfDataAreValid($formData) {
|
|
4892
|
-
const dataAreValid = Object.entries($formData._data).reduce(
|
|
4893
|
-
(dataAreValid, [name]) => {
|
|
4894
|
-
return dataAreValid && ($formData._isValidMap[name] ?? true);
|
|
4895
|
-
},
|
|
4896
|
-
true
|
|
4897
|
-
);
|
|
4898
|
-
|
|
4899
|
-
return dataAreValid;
|
|
4900
|
-
}
|
|
4901
|
-
|
|
4902
|
-
const createFormDataAccessor = formId => {
|
|
4903
|
-
const variableKey = `_form_${formId}`;
|
|
4904
|
-
|
|
4905
|
-
const update = updater => {
|
|
4906
|
-
customVariables.update(prev => {
|
|
4907
|
-
const updatedFormData = updater(prev[variableKey] ?? {});
|
|
4908
|
-
return { ...prev, [variableKey]: updatedFormData };
|
|
4909
|
-
});
|
|
4910
|
-
};
|
|
4911
|
-
|
|
4912
|
-
const subscribe = run => {
|
|
4913
|
-
return customVariables.subscribe(value => {
|
|
4914
|
-
const formData = value[variableKey] ?? {};
|
|
4915
|
-
run(formData);
|
|
4916
|
-
});
|
|
4917
|
-
};
|
|
4918
|
-
|
|
4919
|
-
const set = value => {
|
|
4920
|
-
customVariables.update(prev => {
|
|
4921
|
-
return { ...prev, [variableKey]: value };
|
|
4922
|
-
});
|
|
4923
|
-
};
|
|
4924
|
-
|
|
4925
|
-
return { update, set, subscribe };
|
|
4926
|
-
};
|
|
4927
|
-
|
|
4928
|
-
function instance$6($$self, $$props, $$invalidate) {
|
|
4929
|
-
let $formData;
|
|
4930
|
-
let $formComponentData;
|
|
4931
|
-
let { $$slots: slots = {}, $$scope } = $$props;
|
|
4932
|
-
let { formId = 'form0' } = $$props;
|
|
4933
|
-
const formComponentData = writable({ _data: {}, _isValidMap: {} });
|
|
4934
|
-
component_subscribe($$self, formComponentData, value => $$invalidate(6, $formComponentData = value));
|
|
4935
|
-
|
|
4936
|
-
setContext(FORM_CONTEXT_KEY, {
|
|
4937
|
-
formComponentData,
|
|
4938
|
-
submit: ({ stateId }) => {
|
|
4939
|
-
if (checkIfDataAreValid($formComponentData)) {
|
|
4940
|
-
formData.update(prev => ({ ...prev, ...$formComponentData._data }));
|
|
4941
|
-
console.log('will send', $formData);
|
|
4942
|
-
setState$1(stateId, true);
|
|
4943
|
-
}
|
|
4944
|
-
},
|
|
4945
|
-
next: ({ stateId }) => {
|
|
4946
|
-
if (checkIfDataAreValid($formComponentData)) {
|
|
4947
|
-
formData.update(prev => ({ ...prev, ...$formComponentData._data }));
|
|
4948
|
-
setState$1(stateId, true);
|
|
4949
|
-
console.log('formData after next()', $formData);
|
|
4950
|
-
}
|
|
4951
|
-
},
|
|
4952
|
-
prev: ({ stateId }) => {
|
|
4953
|
-
formData.update(prev => {
|
|
4954
|
-
Object.keys($formComponentData._data).forEach(name => {
|
|
4955
|
-
delete prev[name];
|
|
4956
|
-
});
|
|
4957
|
-
|
|
4958
|
-
return { ...prev };
|
|
4959
|
-
});
|
|
4960
|
-
|
|
4961
|
-
setState$1(stateId, true);
|
|
4962
|
-
console.log('formData after prev()', $formData);
|
|
4963
|
-
}
|
|
4964
|
-
});
|
|
4965
|
-
|
|
4966
|
-
const formData = createFormDataAccessor(formId);
|
|
4967
|
-
component_subscribe($$self, formData, value => $$invalidate(5, $formData = value));
|
|
4968
|
-
|
|
4969
|
-
$$self.$$set = $$props => {
|
|
4970
|
-
if ('formId' in $$props) $$invalidate(2, formId = $$props.formId);
|
|
4971
|
-
if ('$$scope' in $$props) $$invalidate(3, $$scope = $$props.$$scope);
|
|
4972
|
-
};
|
|
4973
|
-
|
|
4974
|
-
return [formComponentData, formData, formId, $$scope, slots];
|
|
4975
|
-
}
|
|
4976
|
-
|
|
4977
|
-
class Form extends SvelteComponent {
|
|
4978
|
-
constructor(options) {
|
|
4979
|
-
super();
|
|
4980
|
-
init(this, options, instance$6, create_fragment$6, safe_not_equal, { formId: 2 }, add_css$5);
|
|
4981
|
-
}
|
|
4982
|
-
}
|
|
4983
|
-
|
|
4984
|
-
/* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
|
|
4985
|
-
|
|
4986
|
-
function add_css$4(target) {
|
|
4987
|
-
append_styles(target, "svelte-13z4kn0", ".textarea-wrapper.svelte-13z4kn0{display:flex;align-items:center;width:100%;height:100%}.textarea.svelte-13z4kn0{width:100%;resize:none}");
|
|
4988
|
-
}
|
|
4989
|
-
|
|
4990
|
-
function create_fragment$5(ctx) {
|
|
4991
|
-
let div;
|
|
4992
|
-
let textarea;
|
|
4993
|
-
let mounted;
|
|
4994
|
-
let dispose;
|
|
4995
|
-
|
|
4996
|
-
return {
|
|
4997
|
-
c() {
|
|
4998
|
-
div = element("div");
|
|
4999
|
-
textarea = element("textarea");
|
|
5000
|
-
this.h();
|
|
5001
|
-
},
|
|
5002
|
-
l(nodes) {
|
|
5003
|
-
div = claim_element(nodes, "DIV", { class: true });
|
|
5004
|
-
var div_nodes = children(div);
|
|
5005
|
-
|
|
5006
|
-
textarea = claim_element(div_nodes, "TEXTAREA", {
|
|
5007
|
-
class: true,
|
|
5008
|
-
rows: true,
|
|
5009
|
-
placeholder: true
|
|
5010
|
-
});
|
|
5011
|
-
|
|
5012
|
-
children(textarea).forEach(detach);
|
|
5013
|
-
div_nodes.forEach(detach);
|
|
5014
|
-
this.h();
|
|
5015
|
-
},
|
|
5016
|
-
h() {
|
|
5017
|
-
attr(textarea, "class", "textarea svelte-13z4kn0");
|
|
5018
|
-
textarea.value = /*value*/ ctx[3];
|
|
5019
|
-
textarea.required = /*required*/ ctx[0];
|
|
5020
|
-
attr(textarea, "rows", /*rows*/ ctx[1]);
|
|
5021
|
-
attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
|
|
5022
|
-
attr(div, "class", "textarea-wrapper svelte-13z4kn0");
|
|
5023
|
-
},
|
|
5024
|
-
m(target, anchor) {
|
|
5025
|
-
insert_hydration(target, div, anchor);
|
|
5026
|
-
append_hydration(div, textarea);
|
|
5027
|
-
|
|
5028
|
-
if (!mounted) {
|
|
5029
|
-
dispose = listen(textarea, "input", /*handleInput*/ ctx[5]);
|
|
5030
|
-
mounted = true;
|
|
5031
|
-
}
|
|
5032
|
-
},
|
|
5033
|
-
p(ctx, [dirty]) {
|
|
5034
|
-
if (dirty & /*value*/ 8) {
|
|
5035
|
-
textarea.value = /*value*/ ctx[3];
|
|
4964
|
+
if (dirty & /*$value*/ 8) {
|
|
4965
|
+
textarea.value = /*$value*/ ctx[3];
|
|
5036
4966
|
}
|
|
5037
4967
|
|
|
5038
4968
|
if (dirty & /*required*/ 1) {
|
|
@@ -5057,30 +4987,30 @@ function create_fragment$5(ctx) {
|
|
|
5057
4987
|
};
|
|
5058
4988
|
}
|
|
5059
4989
|
|
|
5060
|
-
function instance$
|
|
5061
|
-
let value;
|
|
5062
|
-
let $formComponentData;
|
|
4990
|
+
function instance$8($$self, $$props, $$invalidate) {
|
|
4991
|
+
let $value;
|
|
5063
4992
|
let { name = '' } = $$props;
|
|
5064
4993
|
let { required = true } = $$props;
|
|
5065
4994
|
let { rows = 2 } = $$props;
|
|
5066
4995
|
let { placeholder = '' } = $$props;
|
|
5067
|
-
const {
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
4996
|
+
const { path: statePath } = getStateItemContext();
|
|
4997
|
+
|
|
4998
|
+
const value = registerInput({
|
|
4999
|
+
name,
|
|
5000
|
+
statePath,
|
|
5001
|
+
initialValue: '',
|
|
5002
|
+
validator(value) {
|
|
5003
|
+
return required ? !!value : true;
|
|
5004
|
+
}
|
|
5005
|
+
});
|
|
5006
|
+
|
|
5007
|
+
component_subscribe($$self, value, value => $$invalidate(3, $value = value));
|
|
5076
5008
|
|
|
5077
5009
|
function handleInput(event) {
|
|
5078
|
-
const
|
|
5079
|
-
|
|
5010
|
+
const updated = event.target.value;
|
|
5011
|
+
value.set(updated);
|
|
5080
5012
|
}
|
|
5081
5013
|
|
|
5082
|
-
setValue(value);
|
|
5083
|
-
|
|
5084
5014
|
$$self.$$set = $$props => {
|
|
5085
5015
|
if ('name' in $$props) $$invalidate(6, name = $$props.name);
|
|
5086
5016
|
if ('required' in $$props) $$invalidate(0, required = $$props.required);
|
|
@@ -5088,22 +5018,7 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
|
5088
5018
|
if ('placeholder' in $$props) $$invalidate(2, placeholder = $$props.placeholder);
|
|
5089
5019
|
};
|
|
5090
5020
|
|
|
5091
|
-
|
|
5092
|
-
if ($$self.$$.dirty & /*$formComponentData, name*/ 192) {
|
|
5093
|
-
$$invalidate(3, value = getValue($formComponentData, name) ?? '');
|
|
5094
|
-
}
|
|
5095
|
-
};
|
|
5096
|
-
|
|
5097
|
-
return [
|
|
5098
|
-
required,
|
|
5099
|
-
rows,
|
|
5100
|
-
placeholder,
|
|
5101
|
-
value,
|
|
5102
|
-
formComponentData,
|
|
5103
|
-
handleInput,
|
|
5104
|
-
name,
|
|
5105
|
-
$formComponentData
|
|
5106
|
-
];
|
|
5021
|
+
return [required, rows, placeholder, $value, value, handleInput, name];
|
|
5107
5022
|
}
|
|
5108
5023
|
|
|
5109
5024
|
class FormTextarea extends SvelteComponent {
|
|
@@ -5113,8 +5028,8 @@ class FormTextarea extends SvelteComponent {
|
|
|
5113
5028
|
init(
|
|
5114
5029
|
this,
|
|
5115
5030
|
options,
|
|
5116
|
-
instance$
|
|
5117
|
-
create_fragment$
|
|
5031
|
+
instance$8,
|
|
5032
|
+
create_fragment$8,
|
|
5118
5033
|
safe_not_equal,
|
|
5119
5034
|
{
|
|
5120
5035
|
name: 6,
|
|
@@ -5122,14 +5037,14 @@ class FormTextarea extends SvelteComponent {
|
|
|
5122
5037
|
rows: 1,
|
|
5123
5038
|
placeholder: 2
|
|
5124
5039
|
},
|
|
5125
|
-
add_css$
|
|
5040
|
+
add_css$7
|
|
5126
5041
|
);
|
|
5127
5042
|
}
|
|
5128
5043
|
}
|
|
5129
5044
|
|
|
5130
5045
|
/* src/components/FormButton.svelte generated by Svelte v3.53.1 */
|
|
5131
5046
|
|
|
5132
|
-
function create_fragment$
|
|
5047
|
+
function create_fragment$7(ctx) {
|
|
5133
5048
|
let input;
|
|
5134
5049
|
let mounted;
|
|
5135
5050
|
let dispose;
|
|
@@ -5154,7 +5069,7 @@ function create_fragment$4(ctx) {
|
|
|
5154
5069
|
insert_hydration(target, input, anchor);
|
|
5155
5070
|
|
|
5156
5071
|
if (!mounted) {
|
|
5157
|
-
dispose = listen(input, "click", /*handleClick*/ ctx[
|
|
5072
|
+
dispose = listen(input, "click", /*handleClick*/ ctx[2]);
|
|
5158
5073
|
mounted = true;
|
|
5159
5074
|
}
|
|
5160
5075
|
},
|
|
@@ -5177,89 +5092,90 @@ function create_fragment$4(ctx) {
|
|
|
5177
5092
|
};
|
|
5178
5093
|
}
|
|
5179
5094
|
|
|
5180
|
-
function instance$
|
|
5095
|
+
function instance$7($$self, $$props, $$invalidate) {
|
|
5181
5096
|
let disabled;
|
|
5182
|
-
let $
|
|
5097
|
+
let $valuesAreValid;
|
|
5183
5098
|
let { text = '' } = $$props;
|
|
5184
5099
|
let { type = { type: 'submit' } } = $$props;
|
|
5185
|
-
const {
|
|
5186
|
-
component_subscribe($$self, formComponentData, value => $$invalidate(5, $formComponentData = value));
|
|
5100
|
+
const { path: statePath } = getStateItemContext();
|
|
5187
5101
|
|
|
5188
5102
|
function handleClick() {
|
|
5189
5103
|
switch (type.type) {
|
|
5190
5104
|
case 'submit':
|
|
5191
5105
|
{
|
|
5192
|
-
|
|
5193
|
-
|
|
5106
|
+
if ($valuesAreValid) {
|
|
5107
|
+
submit();
|
|
5108
|
+
const stateId = type.stateId;
|
|
5109
|
+
setState$1(stateId, true);
|
|
5110
|
+
}
|
|
5111
|
+
|
|
5194
5112
|
break;
|
|
5195
5113
|
}
|
|
5196
5114
|
case 'next':
|
|
5197
5115
|
{
|
|
5198
|
-
|
|
5199
|
-
|
|
5116
|
+
if ($valuesAreValid) {
|
|
5117
|
+
const stateId = type.stateId;
|
|
5118
|
+
setState$1(stateId, true);
|
|
5119
|
+
}
|
|
5120
|
+
|
|
5200
5121
|
break;
|
|
5201
5122
|
}
|
|
5202
5123
|
case 'prev':
|
|
5203
5124
|
{
|
|
5125
|
+
deleteValues(statePath);
|
|
5204
5126
|
const stateId = type.stateId;
|
|
5205
|
-
|
|
5127
|
+
setState$1(stateId, true);
|
|
5206
5128
|
break;
|
|
5207
5129
|
}
|
|
5208
5130
|
}
|
|
5209
5131
|
}
|
|
5210
5132
|
|
|
5133
|
+
const valuesAreValid = getValuesAreValidReader(statePath);
|
|
5134
|
+
component_subscribe($$self, valuesAreValid, value => $$invalidate(5, $valuesAreValid = value));
|
|
5135
|
+
|
|
5211
5136
|
$$self.$$set = $$props => {
|
|
5212
5137
|
if ('text' in $$props) $$invalidate(0, text = $$props.text);
|
|
5213
5138
|
if ('type' in $$props) $$invalidate(4, type = $$props.type);
|
|
5214
5139
|
};
|
|
5215
5140
|
|
|
5216
5141
|
$$self.$$.update = () => {
|
|
5217
|
-
if ($$self.$$.dirty & /*type, $
|
|
5142
|
+
if ($$self.$$.dirty & /*type, $valuesAreValid*/ 48) {
|
|
5218
5143
|
$$invalidate(1, disabled = (() => {
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
const dataAreValid = Object.entries($formComponentData._data).reduce(
|
|
5222
|
-
(dataAreValid, [name]) => {
|
|
5223
|
-
return dataAreValid && ($formComponentData._isValidMap[name] ?? true);
|
|
5224
|
-
},
|
|
5225
|
-
true
|
|
5226
|
-
);
|
|
5227
|
-
|
|
5228
|
-
return !dataAreValid;
|
|
5144
|
+
const enabled = type.type === 'prev' || $valuesAreValid;
|
|
5145
|
+
return !enabled;
|
|
5229
5146
|
})());
|
|
5230
5147
|
}
|
|
5231
5148
|
};
|
|
5232
5149
|
|
|
5233
|
-
return [text, disabled,
|
|
5150
|
+
return [text, disabled, handleClick, valuesAreValid, type, $valuesAreValid];
|
|
5234
5151
|
}
|
|
5235
5152
|
|
|
5236
5153
|
class FormButton extends SvelteComponent {
|
|
5237
5154
|
constructor(options) {
|
|
5238
5155
|
super();
|
|
5239
|
-
init(this, options, instance$
|
|
5156
|
+
init(this, options, instance$7, create_fragment$7, safe_not_equal, { text: 0, type: 4 });
|
|
5240
5157
|
}
|
|
5241
5158
|
}
|
|
5242
5159
|
|
|
5243
5160
|
/* src/components/FormRadioButtons.svelte generated by Svelte v3.53.1 */
|
|
5244
5161
|
|
|
5245
|
-
function add_css$
|
|
5246
|
-
append_styles(target, "svelte-
|
|
5162
|
+
function add_css$6(target) {
|
|
5163
|
+
append_styles(target, "svelte-1ajmbw1", ".radio-buttons.svelte-1ajmbw1{display:flex;justify-content:center;flex-direction:column;width:100%;height:100%}");
|
|
5247
5164
|
}
|
|
5248
5165
|
|
|
5249
|
-
function get_each_context(ctx, list, i) {
|
|
5166
|
+
function get_each_context$1(ctx, list, i) {
|
|
5250
5167
|
const child_ctx = ctx.slice();
|
|
5251
|
-
child_ctx[
|
|
5252
|
-
child_ctx[
|
|
5168
|
+
child_ctx[7] = list[i];
|
|
5169
|
+
child_ctx[9] = i;
|
|
5253
5170
|
return child_ctx;
|
|
5254
5171
|
}
|
|
5255
5172
|
|
|
5256
|
-
// (
|
|
5257
|
-
function create_each_block(ctx) {
|
|
5173
|
+
// (23:2) {#each _options as option, i}
|
|
5174
|
+
function create_each_block$1(ctx) {
|
|
5258
5175
|
let label;
|
|
5259
5176
|
let input;
|
|
5260
|
-
let input_value_value;
|
|
5261
5177
|
let t0;
|
|
5262
|
-
let t1_value = /*option*/ ctx[
|
|
5178
|
+
let t1_value = /*option*/ ctx[7] + "";
|
|
5263
5179
|
let t1;
|
|
5264
5180
|
let t2;
|
|
5265
5181
|
let mounted;
|
|
@@ -5287,7 +5203,7 @@ function create_each_block(ctx) {
|
|
|
5287
5203
|
h() {
|
|
5288
5204
|
attr(input, "type", "radio");
|
|
5289
5205
|
attr(input, "name", /*name*/ ctx[0]);
|
|
5290
|
-
input.value =
|
|
5206
|
+
input.value = /*$value*/ ctx[2];
|
|
5291
5207
|
},
|
|
5292
5208
|
m(target, anchor) {
|
|
5293
5209
|
insert_hydration(target, label, anchor);
|
|
@@ -5297,7 +5213,7 @@ function create_each_block(ctx) {
|
|
|
5297
5213
|
append_hydration(label, t2);
|
|
5298
5214
|
|
|
5299
5215
|
if (!mounted) {
|
|
5300
|
-
dispose = listen(input, "change", /*handleChange*/ ctx[
|
|
5216
|
+
dispose = listen(input, "change", /*handleChange*/ ctx[4](/*i*/ ctx[9]));
|
|
5301
5217
|
mounted = true;
|
|
5302
5218
|
}
|
|
5303
5219
|
},
|
|
@@ -5308,11 +5224,11 @@ function create_each_block(ctx) {
|
|
|
5308
5224
|
attr(input, "name", /*name*/ ctx[0]);
|
|
5309
5225
|
}
|
|
5310
5226
|
|
|
5311
|
-
if (dirty &
|
|
5312
|
-
input.value =
|
|
5227
|
+
if (dirty & /*$value*/ 4) {
|
|
5228
|
+
input.value = /*$value*/ ctx[2];
|
|
5313
5229
|
}
|
|
5314
5230
|
|
|
5315
|
-
if (dirty & /*_options*/ 2 && t1_value !== (t1_value = /*option*/ ctx[
|
|
5231
|
+
if (dirty & /*_options*/ 2 && t1_value !== (t1_value = /*option*/ ctx[7] + "")) set_data(t1, t1_value);
|
|
5316
5232
|
},
|
|
5317
5233
|
d(detaching) {
|
|
5318
5234
|
if (detaching) detach(label);
|
|
@@ -5322,13 +5238,13 @@ function create_each_block(ctx) {
|
|
|
5322
5238
|
};
|
|
5323
5239
|
}
|
|
5324
5240
|
|
|
5325
|
-
function create_fragment$
|
|
5241
|
+
function create_fragment$6(ctx) {
|
|
5326
5242
|
let div;
|
|
5327
5243
|
let each_value = /*_options*/ ctx[1];
|
|
5328
5244
|
let each_blocks = [];
|
|
5329
5245
|
|
|
5330
5246
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
5331
|
-
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
5247
|
+
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
|
|
5332
5248
|
}
|
|
5333
5249
|
|
|
5334
5250
|
return {
|
|
@@ -5353,7 +5269,7 @@ function create_fragment$3(ctx) {
|
|
|
5353
5269
|
this.h();
|
|
5354
5270
|
},
|
|
5355
5271
|
h() {
|
|
5356
|
-
attr(div, "class", "radio-buttons svelte-
|
|
5272
|
+
attr(div, "class", "radio-buttons svelte-1ajmbw1");
|
|
5357
5273
|
},
|
|
5358
5274
|
m(target, anchor) {
|
|
5359
5275
|
insert_hydration(target, div, anchor);
|
|
@@ -5363,17 +5279,17 @@ function create_fragment$3(ctx) {
|
|
|
5363
5279
|
}
|
|
5364
5280
|
},
|
|
5365
5281
|
p(ctx, [dirty]) {
|
|
5366
|
-
if (dirty & /*_options, name, handleChange*/
|
|
5282
|
+
if (dirty & /*_options, name, $value, handleChange*/ 23) {
|
|
5367
5283
|
each_value = /*_options*/ ctx[1];
|
|
5368
5284
|
let i;
|
|
5369
5285
|
|
|
5370
5286
|
for (i = 0; i < each_value.length; i += 1) {
|
|
5371
|
-
const child_ctx = get_each_context(ctx, each_value, i);
|
|
5287
|
+
const child_ctx = get_each_context$1(ctx, each_value, i);
|
|
5372
5288
|
|
|
5373
5289
|
if (each_blocks[i]) {
|
|
5374
5290
|
each_blocks[i].p(child_ctx, dirty);
|
|
5375
5291
|
} else {
|
|
5376
|
-
each_blocks[i] = create_each_block(child_ctx);
|
|
5292
|
+
each_blocks[i] = create_each_block$1(child_ctx);
|
|
5377
5293
|
each_blocks[i].c();
|
|
5378
5294
|
each_blocks[i].m(div, null);
|
|
5379
5295
|
}
|
|
@@ -5395,45 +5311,853 @@ function create_fragment$3(ctx) {
|
|
|
5395
5311
|
};
|
|
5396
5312
|
}
|
|
5397
5313
|
|
|
5398
|
-
function instance$
|
|
5314
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
5399
5315
|
let _options;
|
|
5316
|
+
let $value;
|
|
5400
5317
|
let { name = '' } = $$props;
|
|
5401
5318
|
let { options = '人参,レタス,キャベツ' } = $$props;
|
|
5402
|
-
const {
|
|
5319
|
+
const { path: statePath } = getStateItemContext();
|
|
5320
|
+
|
|
5321
|
+
const value = registerInput({
|
|
5322
|
+
name,
|
|
5323
|
+
statePath,
|
|
5324
|
+
initialValue: [],
|
|
5325
|
+
validator(value) {
|
|
5326
|
+
return value.length > 0;
|
|
5327
|
+
}
|
|
5328
|
+
});
|
|
5329
|
+
|
|
5330
|
+
component_subscribe($$self, value, value => $$invalidate(2, $value = value));
|
|
5403
5331
|
|
|
5404
5332
|
const handleChange = index => event => {
|
|
5405
5333
|
if (event.target.checked) {
|
|
5406
|
-
|
|
5334
|
+
value.set([_options[index]]);
|
|
5407
5335
|
}
|
|
5408
5336
|
};
|
|
5409
5337
|
|
|
5410
|
-
updateValue(formComponentData, name, () => ({ value: '', isValid: false }));
|
|
5411
|
-
|
|
5412
5338
|
$$self.$$set = $$props => {
|
|
5413
5339
|
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
|
5414
|
-
if ('options' in $$props) $$invalidate(
|
|
5340
|
+
if ('options' in $$props) $$invalidate(5, options = $$props.options);
|
|
5415
5341
|
};
|
|
5416
5342
|
|
|
5417
5343
|
$$self.$$.update = () => {
|
|
5418
|
-
if ($$self.$$.dirty & /*options*/
|
|
5344
|
+
if ($$self.$$.dirty & /*options*/ 32) {
|
|
5419
5345
|
$$invalidate(1, _options = options.split(','));
|
|
5420
5346
|
}
|
|
5421
5347
|
};
|
|
5422
5348
|
|
|
5423
|
-
return [name, _options, handleChange, options];
|
|
5349
|
+
return [name, _options, $value, value, handleChange, options];
|
|
5424
5350
|
}
|
|
5425
5351
|
|
|
5426
5352
|
class FormRadioButtons extends SvelteComponent {
|
|
5427
5353
|
constructor(options) {
|
|
5428
5354
|
super();
|
|
5429
|
-
init(this, options, instance$
|
|
5355
|
+
init(this, options, instance$6, create_fragment$6, safe_not_equal, { name: 0, options: 5 }, add_css$6);
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5358
|
+
|
|
5359
|
+
/* src/components/FormSelect.svelte generated by Svelte v3.53.1 */
|
|
5360
|
+
|
|
5361
|
+
function add_css$5(target) {
|
|
5362
|
+
append_styles(target, "svelte-1ajmbw1", ".radio-buttons.svelte-1ajmbw1{display:flex;justify-content:center;flex-direction:column;width:100%;height:100%}");
|
|
5363
|
+
}
|
|
5364
|
+
|
|
5365
|
+
function get_each_context(ctx, list, i) {
|
|
5366
|
+
const child_ctx = ctx.slice();
|
|
5367
|
+
child_ctx[6] = list[i];
|
|
5368
|
+
child_ctx[8] = i;
|
|
5369
|
+
return child_ctx;
|
|
5370
|
+
}
|
|
5371
|
+
|
|
5372
|
+
// (28:8) {:else}
|
|
5373
|
+
function create_else_block(ctx) {
|
|
5374
|
+
let t;
|
|
5375
|
+
|
|
5376
|
+
return {
|
|
5377
|
+
c() {
|
|
5378
|
+
t = text("回答を選択して下さい");
|
|
5379
|
+
},
|
|
5380
|
+
l(nodes) {
|
|
5381
|
+
t = claim_text(nodes, "回答を選択して下さい");
|
|
5382
|
+
},
|
|
5383
|
+
m(target, anchor) {
|
|
5384
|
+
insert_hydration(target, t, anchor);
|
|
5385
|
+
},
|
|
5386
|
+
p: noop,
|
|
5387
|
+
d(detaching) {
|
|
5388
|
+
if (detaching) detach(t);
|
|
5389
|
+
}
|
|
5390
|
+
};
|
|
5391
|
+
}
|
|
5392
|
+
|
|
5393
|
+
// (26:8) {#if option}
|
|
5394
|
+
function create_if_block(ctx) {
|
|
5395
|
+
let t_value = /*option*/ ctx[6] + "";
|
|
5396
|
+
let t;
|
|
5397
|
+
|
|
5398
|
+
return {
|
|
5399
|
+
c() {
|
|
5400
|
+
t = text(t_value);
|
|
5401
|
+
},
|
|
5402
|
+
l(nodes) {
|
|
5403
|
+
t = claim_text(nodes, t_value);
|
|
5404
|
+
},
|
|
5405
|
+
m(target, anchor) {
|
|
5406
|
+
insert_hydration(target, t, anchor);
|
|
5407
|
+
},
|
|
5408
|
+
p(ctx, dirty) {
|
|
5409
|
+
if (dirty & /*_options*/ 1 && t_value !== (t_value = /*option*/ ctx[6] + "")) set_data(t, t_value);
|
|
5410
|
+
},
|
|
5411
|
+
d(detaching) {
|
|
5412
|
+
if (detaching) detach(t);
|
|
5413
|
+
}
|
|
5414
|
+
};
|
|
5415
|
+
}
|
|
5416
|
+
|
|
5417
|
+
// (24:4) {#each _options as option, i}
|
|
5418
|
+
function create_each_block(ctx) {
|
|
5419
|
+
let option;
|
|
5420
|
+
let t;
|
|
5421
|
+
let option_value_value;
|
|
5422
|
+
|
|
5423
|
+
function select_block_type(ctx, dirty) {
|
|
5424
|
+
if (/*option*/ ctx[6]) return create_if_block;
|
|
5425
|
+
return create_else_block;
|
|
5426
|
+
}
|
|
5427
|
+
|
|
5428
|
+
let current_block_type = select_block_type(ctx);
|
|
5429
|
+
let if_block = current_block_type(ctx);
|
|
5430
|
+
|
|
5431
|
+
return {
|
|
5432
|
+
c() {
|
|
5433
|
+
option = element("option");
|
|
5434
|
+
if_block.c();
|
|
5435
|
+
t = space();
|
|
5436
|
+
this.h();
|
|
5437
|
+
},
|
|
5438
|
+
l(nodes) {
|
|
5439
|
+
option = claim_element(nodes, "OPTION", {});
|
|
5440
|
+
var option_nodes = children(option);
|
|
5441
|
+
if_block.l(option_nodes);
|
|
5442
|
+
t = claim_space(option_nodes);
|
|
5443
|
+
option_nodes.forEach(detach);
|
|
5444
|
+
this.h();
|
|
5445
|
+
},
|
|
5446
|
+
h() {
|
|
5447
|
+
option.__value = option_value_value = /*option*/ ctx[6];
|
|
5448
|
+
option.value = option.__value;
|
|
5449
|
+
},
|
|
5450
|
+
m(target, anchor) {
|
|
5451
|
+
insert_hydration(target, option, anchor);
|
|
5452
|
+
if_block.m(option, null);
|
|
5453
|
+
append_hydration(option, t);
|
|
5454
|
+
},
|
|
5455
|
+
p(ctx, dirty) {
|
|
5456
|
+
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
5457
|
+
if_block.p(ctx, dirty);
|
|
5458
|
+
} else {
|
|
5459
|
+
if_block.d(1);
|
|
5460
|
+
if_block = current_block_type(ctx);
|
|
5461
|
+
|
|
5462
|
+
if (if_block) {
|
|
5463
|
+
if_block.c();
|
|
5464
|
+
if_block.m(option, t);
|
|
5465
|
+
}
|
|
5466
|
+
}
|
|
5467
|
+
|
|
5468
|
+
if (dirty & /*_options*/ 1 && option_value_value !== (option_value_value = /*option*/ ctx[6])) {
|
|
5469
|
+
option.__value = option_value_value;
|
|
5470
|
+
option.value = option.__value;
|
|
5471
|
+
}
|
|
5472
|
+
},
|
|
5473
|
+
d(detaching) {
|
|
5474
|
+
if (detaching) detach(option);
|
|
5475
|
+
if_block.d();
|
|
5476
|
+
}
|
|
5477
|
+
};
|
|
5478
|
+
}
|
|
5479
|
+
|
|
5480
|
+
function create_fragment$5(ctx) {
|
|
5481
|
+
let div;
|
|
5482
|
+
let select;
|
|
5483
|
+
let mounted;
|
|
5484
|
+
let dispose;
|
|
5485
|
+
let each_value = /*_options*/ ctx[0];
|
|
5486
|
+
let each_blocks = [];
|
|
5487
|
+
|
|
5488
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
5489
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
5490
|
+
}
|
|
5491
|
+
|
|
5492
|
+
return {
|
|
5493
|
+
c() {
|
|
5494
|
+
div = element("div");
|
|
5495
|
+
select = element("select");
|
|
5496
|
+
|
|
5497
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
5498
|
+
each_blocks[i].c();
|
|
5499
|
+
}
|
|
5500
|
+
|
|
5501
|
+
this.h();
|
|
5502
|
+
},
|
|
5503
|
+
l(nodes) {
|
|
5504
|
+
div = claim_element(nodes, "DIV", { class: true });
|
|
5505
|
+
var div_nodes = children(div);
|
|
5506
|
+
select = claim_element(div_nodes, "SELECT", {});
|
|
5507
|
+
var select_nodes = children(select);
|
|
5508
|
+
|
|
5509
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
5510
|
+
each_blocks[i].l(select_nodes);
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
select_nodes.forEach(detach);
|
|
5514
|
+
div_nodes.forEach(detach);
|
|
5515
|
+
this.h();
|
|
5516
|
+
},
|
|
5517
|
+
h() {
|
|
5518
|
+
attr(div, "class", "radio-buttons svelte-1ajmbw1");
|
|
5519
|
+
},
|
|
5520
|
+
m(target, anchor) {
|
|
5521
|
+
insert_hydration(target, div, anchor);
|
|
5522
|
+
append_hydration(div, select);
|
|
5523
|
+
|
|
5524
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
5525
|
+
each_blocks[i].m(select, null);
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
if (!mounted) {
|
|
5529
|
+
dispose = listen(select, "change", /*handleChange*/ ctx[1]);
|
|
5530
|
+
mounted = true;
|
|
5531
|
+
}
|
|
5532
|
+
},
|
|
5533
|
+
p(ctx, [dirty]) {
|
|
5534
|
+
if (dirty & /*_options*/ 1) {
|
|
5535
|
+
each_value = /*_options*/ ctx[0];
|
|
5536
|
+
let i;
|
|
5537
|
+
|
|
5538
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
5539
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
5540
|
+
|
|
5541
|
+
if (each_blocks[i]) {
|
|
5542
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
5543
|
+
} else {
|
|
5544
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
5545
|
+
each_blocks[i].c();
|
|
5546
|
+
each_blocks[i].m(select, null);
|
|
5547
|
+
}
|
|
5548
|
+
}
|
|
5549
|
+
|
|
5550
|
+
for (; i < each_blocks.length; i += 1) {
|
|
5551
|
+
each_blocks[i].d(1);
|
|
5552
|
+
}
|
|
5553
|
+
|
|
5554
|
+
each_blocks.length = each_value.length;
|
|
5555
|
+
}
|
|
5556
|
+
},
|
|
5557
|
+
i: noop,
|
|
5558
|
+
o: noop,
|
|
5559
|
+
d(detaching) {
|
|
5560
|
+
if (detaching) detach(div);
|
|
5561
|
+
destroy_each(each_blocks, detaching);
|
|
5562
|
+
mounted = false;
|
|
5563
|
+
dispose();
|
|
5564
|
+
}
|
|
5565
|
+
};
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
function instance$5($$self, $$props, $$invalidate) {
|
|
5569
|
+
let _options;
|
|
5570
|
+
let { name = '' } = $$props;
|
|
5571
|
+
let { options = 'プルダウン1,プルダウン2,プルダウン3' } = $$props;
|
|
5572
|
+
const { path: statePath } = getStateItemContext();
|
|
5573
|
+
|
|
5574
|
+
const value = registerInput({
|
|
5575
|
+
name,
|
|
5576
|
+
statePath,
|
|
5577
|
+
initialValue: [],
|
|
5578
|
+
validator(value) {
|
|
5579
|
+
return value.length > 0;
|
|
5580
|
+
}
|
|
5581
|
+
});
|
|
5582
|
+
|
|
5583
|
+
function handleChange(event) {
|
|
5584
|
+
const updated = event.target.value ? [event.target.value] : [];
|
|
5585
|
+
value.set(updated);
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5588
|
+
$$self.$$set = $$props => {
|
|
5589
|
+
if ('name' in $$props) $$invalidate(2, name = $$props.name);
|
|
5590
|
+
if ('options' in $$props) $$invalidate(3, options = $$props.options);
|
|
5591
|
+
};
|
|
5592
|
+
|
|
5593
|
+
$$self.$$.update = () => {
|
|
5594
|
+
if ($$self.$$.dirty & /*options*/ 8) {
|
|
5595
|
+
$$invalidate(0, _options = ['', ...options.split(',')]);
|
|
5596
|
+
}
|
|
5597
|
+
};
|
|
5598
|
+
|
|
5599
|
+
return [_options, handleChange, name, options];
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
class FormSelect extends SvelteComponent {
|
|
5603
|
+
constructor(options) {
|
|
5604
|
+
super();
|
|
5605
|
+
init(this, options, instance$5, create_fragment$5, safe_not_equal, { name: 2, options: 3 }, add_css$5);
|
|
5606
|
+
}
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
/* src/components/Slider.svelte generated by Svelte v3.53.1 */
|
|
5610
|
+
|
|
5611
|
+
function add_css$4(target) {
|
|
5612
|
+
append_styles(target, "svelte-16jk4x2", ".root.svelte-16jk4x2{width:100%;height:100%;position:relative}.container.svelte-16jk4x2{width:100%;height:100%;position:relative;overflow:hidden}.slide.svelte-16jk4x2{height:100%;position:absolute;display:flex}.transition.svelte-16jk4x2{transition:left 0.2s cubic-bezier(.04,.67,.53,.96)}.item.svelte-16jk4x2{height:100%;flex:none}.prev-button.svelte-16jk4x2,.next-button.svelte-16jk4x2{height:50px;top:calc(50% - 25px);position:absolute}.prev-button.svelte-16jk4x2{left:8px}.next-button.svelte-16jk4x2{right:8px}");
|
|
5613
|
+
}
|
|
5614
|
+
|
|
5615
|
+
function create_fragment$4(ctx) {
|
|
5616
|
+
let div4;
|
|
5617
|
+
let div1;
|
|
5618
|
+
let div0;
|
|
5619
|
+
let div0_class_value;
|
|
5620
|
+
let t0;
|
|
5621
|
+
let div2;
|
|
5622
|
+
let t1;
|
|
5623
|
+
let t2;
|
|
5624
|
+
let div3;
|
|
5625
|
+
let t3;
|
|
5626
|
+
let current;
|
|
5627
|
+
let mounted;
|
|
5628
|
+
let dispose;
|
|
5629
|
+
const default_slot_template = /*#slots*/ ctx[11].default;
|
|
5630
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[10], null);
|
|
5631
|
+
|
|
5632
|
+
return {
|
|
5633
|
+
c() {
|
|
5634
|
+
div4 = element("div");
|
|
5635
|
+
div1 = element("div");
|
|
5636
|
+
div0 = element("div");
|
|
5637
|
+
if (default_slot) default_slot.c();
|
|
5638
|
+
t0 = space();
|
|
5639
|
+
div2 = element("div");
|
|
5640
|
+
t1 = text("<");
|
|
5641
|
+
t2 = space();
|
|
5642
|
+
div3 = element("div");
|
|
5643
|
+
t3 = text(">");
|
|
5644
|
+
this.h();
|
|
5645
|
+
},
|
|
5646
|
+
l(nodes) {
|
|
5647
|
+
div4 = claim_element(nodes, "DIV", { class: true });
|
|
5648
|
+
var div4_nodes = children(div4);
|
|
5649
|
+
div1 = claim_element(div4_nodes, "DIV", { class: true });
|
|
5650
|
+
var div1_nodes = children(div1);
|
|
5651
|
+
div0 = claim_element(div1_nodes, "DIV", { class: true, style: true });
|
|
5652
|
+
var div0_nodes = children(div0);
|
|
5653
|
+
if (default_slot) default_slot.l(div0_nodes);
|
|
5654
|
+
div0_nodes.forEach(detach);
|
|
5655
|
+
div1_nodes.forEach(detach);
|
|
5656
|
+
t0 = claim_space(div4_nodes);
|
|
5657
|
+
div2 = claim_element(div4_nodes, "DIV", { class: true });
|
|
5658
|
+
var div2_nodes = children(div2);
|
|
5659
|
+
t1 = claim_text(div2_nodes, "<");
|
|
5660
|
+
div2_nodes.forEach(detach);
|
|
5661
|
+
t2 = claim_space(div4_nodes);
|
|
5662
|
+
div3 = claim_element(div4_nodes, "DIV", { class: true });
|
|
5663
|
+
var div3_nodes = children(div3);
|
|
5664
|
+
t3 = claim_text(div3_nodes, ">");
|
|
5665
|
+
div3_nodes.forEach(detach);
|
|
5666
|
+
div4_nodes.forEach(detach);
|
|
5667
|
+
this.h();
|
|
5668
|
+
},
|
|
5669
|
+
h() {
|
|
5670
|
+
attr(div0, "class", div0_class_value = "" + (null_to_empty(/*slideClass*/ ctx[2]) + " svelte-16jk4x2"));
|
|
5671
|
+
attr(div0, "style", /*slideStyle*/ ctx[3]);
|
|
5672
|
+
attr(div1, "class", "container svelte-16jk4x2");
|
|
5673
|
+
attr(div2, "class", "prev-button svelte-16jk4x2");
|
|
5674
|
+
attr(div3, "class", "next-button svelte-16jk4x2");
|
|
5675
|
+
attr(div4, "class", "root svelte-16jk4x2");
|
|
5676
|
+
},
|
|
5677
|
+
m(target, anchor) {
|
|
5678
|
+
insert_hydration(target, div4, anchor);
|
|
5679
|
+
append_hydration(div4, div1);
|
|
5680
|
+
append_hydration(div1, div0);
|
|
5681
|
+
|
|
5682
|
+
if (default_slot) {
|
|
5683
|
+
default_slot.m(div0, null);
|
|
5684
|
+
}
|
|
5685
|
+
|
|
5686
|
+
/*div0_binding*/ ctx[12](div0);
|
|
5687
|
+
/*div1_binding*/ ctx[13](div1);
|
|
5688
|
+
append_hydration(div4, t0);
|
|
5689
|
+
append_hydration(div4, div2);
|
|
5690
|
+
append_hydration(div2, t1);
|
|
5691
|
+
append_hydration(div4, t2);
|
|
5692
|
+
append_hydration(div4, div3);
|
|
5693
|
+
append_hydration(div3, t3);
|
|
5694
|
+
current = true;
|
|
5695
|
+
|
|
5696
|
+
if (!mounted) {
|
|
5697
|
+
dispose = [
|
|
5698
|
+
listen(div2, "click", /*prev*/ ctx[4]),
|
|
5699
|
+
listen(div3, "click", /*next*/ ctx[5])
|
|
5700
|
+
];
|
|
5701
|
+
|
|
5702
|
+
mounted = true;
|
|
5703
|
+
}
|
|
5704
|
+
},
|
|
5705
|
+
p(ctx, dirty) {
|
|
5706
|
+
if (default_slot) {
|
|
5707
|
+
if (default_slot.p && (!current || dirty[0] & /*$$scope*/ 1024)) {
|
|
5708
|
+
update_slot_base(
|
|
5709
|
+
default_slot,
|
|
5710
|
+
default_slot_template,
|
|
5711
|
+
ctx,
|
|
5712
|
+
/*$$scope*/ ctx[10],
|
|
5713
|
+
!current
|
|
5714
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[10])
|
|
5715
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[10], dirty, null),
|
|
5716
|
+
null
|
|
5717
|
+
);
|
|
5718
|
+
}
|
|
5719
|
+
}
|
|
5720
|
+
|
|
5721
|
+
if (!current || dirty[0] & /*slideClass*/ 4 && div0_class_value !== (div0_class_value = "" + (null_to_empty(/*slideClass*/ ctx[2]) + " svelte-16jk4x2"))) {
|
|
5722
|
+
attr(div0, "class", div0_class_value);
|
|
5723
|
+
}
|
|
5724
|
+
|
|
5725
|
+
if (!current || dirty[0] & /*slideStyle*/ 8) {
|
|
5726
|
+
attr(div0, "style", /*slideStyle*/ ctx[3]);
|
|
5727
|
+
}
|
|
5728
|
+
},
|
|
5729
|
+
i(local) {
|
|
5730
|
+
if (current) return;
|
|
5731
|
+
transition_in(default_slot, local);
|
|
5732
|
+
current = true;
|
|
5733
|
+
},
|
|
5734
|
+
o(local) {
|
|
5735
|
+
transition_out(default_slot, local);
|
|
5736
|
+
current = false;
|
|
5737
|
+
},
|
|
5738
|
+
d(detaching) {
|
|
5739
|
+
if (detaching) detach(div4);
|
|
5740
|
+
if (default_slot) default_slot.d(detaching);
|
|
5741
|
+
/*div0_binding*/ ctx[12](null);
|
|
5742
|
+
/*div1_binding*/ ctx[13](null);
|
|
5743
|
+
mounted = false;
|
|
5744
|
+
run_all(dispose);
|
|
5745
|
+
}
|
|
5746
|
+
};
|
|
5747
|
+
}
|
|
5748
|
+
|
|
5749
|
+
function calcPositionIndex(shift, index, length) {
|
|
5750
|
+
let tmpPositionIndex = shift - index;
|
|
5751
|
+
|
|
5752
|
+
if (tmpPositionIndex > 0) {
|
|
5753
|
+
return tmpPositionIndex - length;
|
|
5754
|
+
} else if (tmpPositionIndex < -(length - 1)) {
|
|
5755
|
+
return tmpPositionIndex + length;
|
|
5756
|
+
} else {
|
|
5757
|
+
return tmpPositionIndex;
|
|
5758
|
+
}
|
|
5759
|
+
}
|
|
5760
|
+
|
|
5761
|
+
function instance$4($$self, $$props, $$invalidate) {
|
|
5762
|
+
let slideStyle;
|
|
5763
|
+
let slideClass;
|
|
5764
|
+
let _loop;
|
|
5765
|
+
let { $$slots: slots = {}, $$scope } = $$props;
|
|
5766
|
+
let items = [];
|
|
5767
|
+
const dispatch = createEventDispatcher();
|
|
5768
|
+
|
|
5769
|
+
setContext('SLIDE', {
|
|
5770
|
+
registerItem: ({ onBeforeSlide, onMount }) => {
|
|
5771
|
+
const id = new Date().getTime().toString();
|
|
5772
|
+
$$invalidate(7, items = [...items, { id, onBeforeSlide, onMount }]);
|
|
5773
|
+
return id;
|
|
5774
|
+
},
|
|
5775
|
+
unregisterItem: id => {
|
|
5776
|
+
$$invalidate(7, items = items.filter(item => item.id !== id));
|
|
5777
|
+
}
|
|
5778
|
+
});
|
|
5779
|
+
|
|
5780
|
+
let containerElement;
|
|
5781
|
+
let slideElement;
|
|
5782
|
+
let containerWidth;
|
|
5783
|
+
let currentSlideId = 0;
|
|
5784
|
+
let slidePosition = 0;
|
|
5785
|
+
let shiftCount = 0;
|
|
5786
|
+
let previousShiftCount = 0;
|
|
5787
|
+
let moving = false;
|
|
5788
|
+
let transitioning = false;
|
|
5789
|
+
let previousMove = null;
|
|
5790
|
+
let moveSpeed = 0;
|
|
5791
|
+
|
|
5792
|
+
async function fixSlidePosition() {
|
|
5793
|
+
if (!_loop) return;
|
|
5794
|
+
|
|
5795
|
+
return new Promise(resolve => {
|
|
5796
|
+
window.requestAnimationFrame(() => {
|
|
5797
|
+
shiftCount = currentSlideId - Math.floor(items.length / 2);
|
|
5798
|
+
|
|
5799
|
+
items.forEach(({ onBeforeSlide }, index) => {
|
|
5800
|
+
onBeforeSlide({ shiftCount, index, length: items.length });
|
|
5801
|
+
});
|
|
5802
|
+
|
|
5803
|
+
$$invalidate(8, slidePosition = slidePosition + containerWidth * (calcPositionIndex(shiftCount, currentSlideId, items.length) - calcPositionIndex(previousShiftCount, currentSlideId, items.length)));
|
|
5804
|
+
previousShiftCount = shiftCount;
|
|
5805
|
+
resolve();
|
|
5806
|
+
});
|
|
5807
|
+
});
|
|
5808
|
+
}
|
|
5809
|
+
|
|
5810
|
+
async function cancelTransition() {
|
|
5811
|
+
if (transitioning) {
|
|
5812
|
+
const slideRect = slideElement.getBoundingClientRect();
|
|
5813
|
+
const containerRect = containerElement.getBoundingClientRect();
|
|
5814
|
+
$$invalidate(9, transitioning = false);
|
|
5815
|
+
$$invalidate(8, slidePosition = slideRect.x - containerRect.x);
|
|
5816
|
+
}
|
|
5817
|
+
}
|
|
5818
|
+
|
|
5819
|
+
function setIndex(slideIndex) {
|
|
5820
|
+
window.requestAnimationFrame(() => {
|
|
5821
|
+
if (_loop) {
|
|
5822
|
+
if (slideIndex < 0) {
|
|
5823
|
+
slideIndex = items.length + slideIndex;
|
|
5824
|
+
} else if (items.length <= slideIndex) {
|
|
5825
|
+
slideIndex = slideIndex - items.length;
|
|
5826
|
+
}
|
|
5827
|
+
} else {
|
|
5828
|
+
if (slideIndex < 0) {
|
|
5829
|
+
slideIndex = 0;
|
|
5830
|
+
} else if (items.length - 1 < slideIndex) {
|
|
5831
|
+
slideIndex = items.length - 1;
|
|
5832
|
+
}
|
|
5833
|
+
}
|
|
5834
|
+
|
|
5835
|
+
$$invalidate(9, transitioning = true);
|
|
5836
|
+
$$invalidate(8, slidePosition = containerWidth * calcPositionIndex(shiftCount, slideIndex, items.length));
|
|
5837
|
+
dispatch('change', { nextIndex: slideIndex });
|
|
5838
|
+
currentSlideId = slideIndex;
|
|
5839
|
+
});
|
|
5840
|
+
}
|
|
5841
|
+
|
|
5842
|
+
async function handleMoveStart() {
|
|
5843
|
+
cancelTransition();
|
|
5844
|
+
await fixSlidePosition();
|
|
5845
|
+
moving = true;
|
|
5846
|
+
previousMove = null;
|
|
5847
|
+
moveSpeed = 0;
|
|
5848
|
+
}
|
|
5849
|
+
|
|
5850
|
+
function handleMoving(clientX, timeStamp) {
|
|
5851
|
+
if (!moving) return;
|
|
5852
|
+
|
|
5853
|
+
if (previousMove) {
|
|
5854
|
+
const dx = clientX - previousMove.clientX;
|
|
5855
|
+
const dt = timeStamp - previousMove.timeStamp;
|
|
5856
|
+
moveSpeed = dx / dt;
|
|
5857
|
+
const updatedSlidePosition = slidePosition + dx;
|
|
5858
|
+
|
|
5859
|
+
window.requestAnimationFrame(() => {
|
|
5860
|
+
$$invalidate(8, slidePosition = updatedSlidePosition);
|
|
5861
|
+
});
|
|
5862
|
+
}
|
|
5863
|
+
|
|
5864
|
+
previousMove = { clientX, timeStamp };
|
|
5865
|
+
}
|
|
5866
|
+
|
|
5867
|
+
function handleMoveEnd() {
|
|
5868
|
+
if (!moving) return;
|
|
5869
|
+
moving = false;
|
|
5870
|
+
let nextIndex = currentSlideId;
|
|
5871
|
+
|
|
5872
|
+
if (moveSpeed > 0) {
|
|
5873
|
+
nextIndex = currentSlideId - 1;
|
|
5874
|
+
} else if (moveSpeed < 0) {
|
|
5875
|
+
nextIndex = currentSlideId + 1;
|
|
5876
|
+
}
|
|
5877
|
+
|
|
5878
|
+
setIndex(nextIndex);
|
|
5879
|
+
}
|
|
5880
|
+
|
|
5881
|
+
// DOM Event Handlers
|
|
5882
|
+
function handleMouseDown() {
|
|
5883
|
+
handleMoveStart();
|
|
5884
|
+
}
|
|
5885
|
+
|
|
5886
|
+
function handleMouseUp() {
|
|
5887
|
+
handleMoveEnd();
|
|
5888
|
+
}
|
|
5889
|
+
|
|
5890
|
+
function handleMouseLeave() {
|
|
5891
|
+
handleMoveEnd();
|
|
5892
|
+
}
|
|
5893
|
+
|
|
5894
|
+
function handleMouseMove(event) {
|
|
5895
|
+
const { clientX, timeStamp } = event;
|
|
5896
|
+
handleMoving(clientX, timeStamp);
|
|
5897
|
+
}
|
|
5898
|
+
|
|
5899
|
+
function handleTouchStart(event) {
|
|
5900
|
+
event.preventDefault();
|
|
5901
|
+
handleMoveStart();
|
|
5902
|
+
}
|
|
5903
|
+
|
|
5904
|
+
function handleTouchEnd(event) {
|
|
5905
|
+
event.preventDefault();
|
|
5906
|
+
handleMoveEnd();
|
|
5907
|
+
}
|
|
5908
|
+
|
|
5909
|
+
function handleTouchMove(event) {
|
|
5910
|
+
event.preventDefault();
|
|
5911
|
+
const clientX = event.touches[0].clientX;
|
|
5912
|
+
const timeStamp = event.timeStamp;
|
|
5913
|
+
handleMoving(clientX, timeStamp);
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5916
|
+
function handleTransitionEnd() {
|
|
5917
|
+
$$invalidate(9, transitioning = false);
|
|
5918
|
+
fixSlidePosition();
|
|
5919
|
+
}
|
|
5920
|
+
|
|
5921
|
+
onMount(async () => {
|
|
5922
|
+
containerWidth = containerElement.clientWidth;
|
|
5923
|
+
|
|
5924
|
+
items.forEach(item => {
|
|
5925
|
+
item.onMount({ containerElement });
|
|
5926
|
+
});
|
|
5927
|
+
|
|
5928
|
+
currentSlideId = 0;
|
|
5929
|
+
|
|
5930
|
+
if (_loop) {
|
|
5931
|
+
await fixSlidePosition();
|
|
5932
|
+
}
|
|
5933
|
+
|
|
5934
|
+
containerElement.addEventListener('mousedown', handleMouseDown);
|
|
5935
|
+
containerElement.addEventListener('mousemove', handleMouseMove);
|
|
5936
|
+
containerElement.addEventListener('mouseup', handleMouseUp);
|
|
5937
|
+
containerElement.addEventListener('mouseleave', handleMouseLeave);
|
|
5938
|
+
containerElement.addEventListener('touchstart', handleTouchStart);
|
|
5939
|
+
containerElement.addEventListener('touchmove', handleTouchMove);
|
|
5940
|
+
containerElement.addEventListener('touchend', handleTouchEnd);
|
|
5941
|
+
containerElement.addEventListener('transitionend', handleTransitionEnd);
|
|
5942
|
+
|
|
5943
|
+
// setIndex(0);
|
|
5944
|
+
dispatch('mount', { itemsCount: items.length });
|
|
5945
|
+
|
|
5946
|
+
return () => {
|
|
5947
|
+
containerElement.removeEventListener('mousedown', handleMouseDown);
|
|
5948
|
+
containerElement.removeEventListener('mousemove', handleMouseMove);
|
|
5949
|
+
containerElement.removeEventListener('mouseup', handleMouseUp);
|
|
5950
|
+
containerElement.removeEventListener('mouseleave', handleMouseLeave);
|
|
5951
|
+
containerElement.removeEventListener('touchstart', handleTouchStart);
|
|
5952
|
+
containerElement.removeEventListener('touchmove', handleTouchMove);
|
|
5953
|
+
containerElement.removeEventListener('touchend', handleTouchEnd);
|
|
5954
|
+
containerElement.removeEventListener('transitionend', handleTransitionEnd);
|
|
5955
|
+
};
|
|
5956
|
+
});
|
|
5957
|
+
|
|
5958
|
+
async function prev() {
|
|
5959
|
+
cancelTransition();
|
|
5960
|
+
await fixSlidePosition();
|
|
5961
|
+
setIndex(currentSlideId - 1);
|
|
5962
|
+
}
|
|
5963
|
+
|
|
5964
|
+
async function next() {
|
|
5965
|
+
cancelTransition();
|
|
5966
|
+
await fixSlidePosition();
|
|
5967
|
+
setIndex(currentSlideId + 1);
|
|
5968
|
+
}
|
|
5969
|
+
|
|
5970
|
+
let { loop = false } = $$props;
|
|
5971
|
+
|
|
5972
|
+
function div0_binding($$value) {
|
|
5973
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
5974
|
+
slideElement = $$value;
|
|
5975
|
+
$$invalidate(1, slideElement);
|
|
5976
|
+
});
|
|
5977
|
+
}
|
|
5978
|
+
|
|
5979
|
+
function div1_binding($$value) {
|
|
5980
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
5981
|
+
containerElement = $$value;
|
|
5982
|
+
$$invalidate(0, containerElement);
|
|
5983
|
+
});
|
|
5984
|
+
}
|
|
5985
|
+
|
|
5986
|
+
$$self.$$set = $$props => {
|
|
5987
|
+
if ('loop' in $$props) $$invalidate(6, loop = $$props.loop);
|
|
5988
|
+
if ('$$scope' in $$props) $$invalidate(10, $$scope = $$props.$$scope);
|
|
5989
|
+
};
|
|
5990
|
+
|
|
5991
|
+
$$self.$$.update = () => {
|
|
5992
|
+
if ($$self.$$.dirty[0] & /*slidePosition*/ 256) {
|
|
5993
|
+
$$invalidate(3, slideStyle = slidePosition != null ? `left: ${slidePosition}px;` : '');
|
|
5994
|
+
}
|
|
5995
|
+
|
|
5996
|
+
if ($$self.$$.dirty[0] & /*transitioning*/ 512) {
|
|
5997
|
+
$$invalidate(2, slideClass = ['slide', transitioning ? 'transition' : ''].join(' '));
|
|
5998
|
+
}
|
|
5999
|
+
|
|
6000
|
+
if ($$self.$$.dirty[0] & /*items, loop*/ 192) {
|
|
6001
|
+
_loop = items.length >= 3 ? loop : false;
|
|
6002
|
+
}
|
|
6003
|
+
};
|
|
6004
|
+
|
|
6005
|
+
return [
|
|
6006
|
+
containerElement,
|
|
6007
|
+
slideElement,
|
|
6008
|
+
slideClass,
|
|
6009
|
+
slideStyle,
|
|
6010
|
+
prev,
|
|
6011
|
+
next,
|
|
6012
|
+
loop,
|
|
6013
|
+
items,
|
|
6014
|
+
slidePosition,
|
|
6015
|
+
transitioning,
|
|
6016
|
+
$$scope,
|
|
6017
|
+
slots,
|
|
6018
|
+
div0_binding,
|
|
6019
|
+
div1_binding
|
|
6020
|
+
];
|
|
6021
|
+
}
|
|
6022
|
+
|
|
6023
|
+
class Slider extends SvelteComponent {
|
|
6024
|
+
constructor(options) {
|
|
6025
|
+
super();
|
|
6026
|
+
init(this, options, instance$4, create_fragment$4, safe_not_equal, { loop: 6 }, add_css$4, [-1, -1]);
|
|
6027
|
+
}
|
|
6028
|
+
}
|
|
6029
|
+
|
|
6030
|
+
/* src/components/SliderItem.svelte generated by Svelte v3.53.1 */
|
|
6031
|
+
|
|
6032
|
+
function add_css$3(target) {
|
|
6033
|
+
append_styles(target, "svelte-1c77iik", ".item.svelte-1c77iik{height:100%;flex:none}.item.svelte-1c77iik img{user-select:none;-webkit-user-drag:none}");
|
|
6034
|
+
}
|
|
6035
|
+
|
|
6036
|
+
function create_fragment$3(ctx) {
|
|
6037
|
+
let div;
|
|
6038
|
+
let current;
|
|
6039
|
+
const default_slot_template = /*#slots*/ ctx[4].default;
|
|
6040
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);
|
|
6041
|
+
|
|
6042
|
+
return {
|
|
6043
|
+
c() {
|
|
6044
|
+
div = element("div");
|
|
6045
|
+
if (default_slot) default_slot.c();
|
|
6046
|
+
this.h();
|
|
6047
|
+
},
|
|
6048
|
+
l(nodes) {
|
|
6049
|
+
div = claim_element(nodes, "DIV", { class: true, style: true });
|
|
6050
|
+
var div_nodes = children(div);
|
|
6051
|
+
if (default_slot) default_slot.l(div_nodes);
|
|
6052
|
+
div_nodes.forEach(detach);
|
|
6053
|
+
this.h();
|
|
6054
|
+
},
|
|
6055
|
+
h() {
|
|
6056
|
+
attr(div, "class", "item svelte-1c77iik");
|
|
6057
|
+
attr(div, "style", /*itemStyle*/ ctx[0]);
|
|
6058
|
+
},
|
|
6059
|
+
m(target, anchor) {
|
|
6060
|
+
insert_hydration(target, div, anchor);
|
|
6061
|
+
|
|
6062
|
+
if (default_slot) {
|
|
6063
|
+
default_slot.m(div, null);
|
|
6064
|
+
}
|
|
6065
|
+
|
|
6066
|
+
current = true;
|
|
6067
|
+
},
|
|
6068
|
+
p(ctx, [dirty]) {
|
|
6069
|
+
if (default_slot) {
|
|
6070
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 8)) {
|
|
6071
|
+
update_slot_base(
|
|
6072
|
+
default_slot,
|
|
6073
|
+
default_slot_template,
|
|
6074
|
+
ctx,
|
|
6075
|
+
/*$$scope*/ ctx[3],
|
|
6076
|
+
!current
|
|
6077
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[3])
|
|
6078
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[3], dirty, null),
|
|
6079
|
+
null
|
|
6080
|
+
);
|
|
6081
|
+
}
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
if (!current || dirty & /*itemStyle*/ 1) {
|
|
6085
|
+
attr(div, "style", /*itemStyle*/ ctx[0]);
|
|
6086
|
+
}
|
|
6087
|
+
},
|
|
6088
|
+
i(local) {
|
|
6089
|
+
if (current) return;
|
|
6090
|
+
transition_in(default_slot, local);
|
|
6091
|
+
current = true;
|
|
6092
|
+
},
|
|
6093
|
+
o(local) {
|
|
6094
|
+
transition_out(default_slot, local);
|
|
6095
|
+
current = false;
|
|
6096
|
+
},
|
|
6097
|
+
d(detaching) {
|
|
6098
|
+
if (detaching) detach(div);
|
|
6099
|
+
if (default_slot) default_slot.d(detaching);
|
|
6100
|
+
}
|
|
6101
|
+
};
|
|
6102
|
+
}
|
|
6103
|
+
|
|
6104
|
+
function instance$3($$self, $$props, $$invalidate) {
|
|
6105
|
+
let itemStyle;
|
|
6106
|
+
let { $$slots: slots = {}, $$scope } = $$props;
|
|
6107
|
+
const { registerItem, unregisterItem } = getContext('SLIDE');
|
|
6108
|
+
|
|
6109
|
+
const id = registerItem({
|
|
6110
|
+
onMount({ containerElement }) {
|
|
6111
|
+
$$invalidate(1, itemWidth = containerElement.clientWidth);
|
|
6112
|
+
},
|
|
6113
|
+
onBeforeSlide({ shiftCount, index, length }) {
|
|
6114
|
+
let fixedShiftCount;
|
|
6115
|
+
|
|
6116
|
+
if (index - shiftCount < 0) {
|
|
6117
|
+
fixedShiftCount = shiftCount - length;
|
|
6118
|
+
} else if (index - shiftCount > length - 1) {
|
|
6119
|
+
fixedShiftCount = shiftCount + length;
|
|
6120
|
+
} else {
|
|
6121
|
+
fixedShiftCount = shiftCount;
|
|
6122
|
+
}
|
|
6123
|
+
|
|
6124
|
+
$$invalidate(2, itemTransform = -fixedShiftCount * (itemWidth ?? 0));
|
|
6125
|
+
}
|
|
6126
|
+
});
|
|
6127
|
+
|
|
6128
|
+
onDestroy$1(() => {
|
|
6129
|
+
unregisterItem(id);
|
|
6130
|
+
});
|
|
6131
|
+
|
|
6132
|
+
let itemWidth = null;
|
|
6133
|
+
let itemTransform = 0;
|
|
6134
|
+
|
|
6135
|
+
$$self.$$set = $$props => {
|
|
6136
|
+
if ('$$scope' in $$props) $$invalidate(3, $$scope = $$props.$$scope);
|
|
6137
|
+
};
|
|
6138
|
+
|
|
6139
|
+
$$self.$$.update = () => {
|
|
6140
|
+
if ($$self.$$.dirty & /*itemWidth, itemTransform*/ 6) {
|
|
6141
|
+
$$invalidate(0, itemStyle = itemWidth != null
|
|
6142
|
+
? `width: ${itemWidth}px; transform: translateX(${itemTransform}px);`
|
|
6143
|
+
: '');
|
|
6144
|
+
}
|
|
6145
|
+
};
|
|
6146
|
+
|
|
6147
|
+
return [itemStyle, itemWidth, itemTransform, $$scope, slots];
|
|
6148
|
+
}
|
|
6149
|
+
|
|
6150
|
+
class SliderItem extends SvelteComponent {
|
|
6151
|
+
constructor(options) {
|
|
6152
|
+
super();
|
|
6153
|
+
init(this, options, instance$3, create_fragment$3, safe_not_equal, {}, add_css$3);
|
|
5430
6154
|
}
|
|
5431
6155
|
}
|
|
5432
6156
|
|
|
5433
6157
|
/* src/components/TextBlock.svelte generated by Svelte v3.53.1 */
|
|
5434
6158
|
|
|
5435
6159
|
function add_css$2(target) {
|
|
5436
|
-
append_styles(target, "svelte-
|
|
6160
|
+
append_styles(target, "svelte-11rpuv5", ".text-block.svelte-11rpuv5.svelte-11rpuv5{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-block-inner.svelte-11rpuv5.svelte-11rpuv5{width:100%;height:auto}.text-direction-vertical.svelte-11rpuv5.svelte-11rpuv5{writing-mode:vertical-rl}.text-direction-vertical.svelte-11rpuv5 .text-block-inner.svelte-11rpuv5{width:auto;height:100%}");
|
|
5437
6161
|
}
|
|
5438
6162
|
|
|
5439
6163
|
function create_fragment$2(ctx) {
|
|
@@ -5462,8 +6186,8 @@ function create_fragment$2(ctx) {
|
|
|
5462
6186
|
this.h();
|
|
5463
6187
|
},
|
|
5464
6188
|
h() {
|
|
5465
|
-
attr(div0, "class", "text-block-inner svelte-
|
|
5466
|
-
attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-block text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-
|
|
6189
|
+
attr(div0, "class", "text-block-inner svelte-11rpuv5");
|
|
6190
|
+
attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-block text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-11rpuv5"));
|
|
5467
6191
|
attr(div1, "style", /*style*/ ctx[2]);
|
|
5468
6192
|
},
|
|
5469
6193
|
m(target, anchor) {
|
|
@@ -5477,7 +6201,7 @@ function create_fragment$2(ctx) {
|
|
|
5477
6201
|
if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
|
|
5478
6202
|
rendertext.$set(rendertext_changes);
|
|
5479
6203
|
|
|
5480
|
-
if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-block text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-
|
|
6204
|
+
if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-block text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-11rpuv5"))) {
|
|
5481
6205
|
attr(div1, "class", div1_class_value);
|
|
5482
6206
|
}
|
|
5483
6207
|
|
|
@@ -5548,7 +6272,7 @@ class TextBlock extends SvelteComponent {
|
|
|
5548
6272
|
/* src/components/TextButtonBlock.svelte generated by Svelte v3.53.1 */
|
|
5549
6273
|
|
|
5550
6274
|
function add_css$1(target) {
|
|
5551
|
-
append_styles(target, "svelte-
|
|
6275
|
+
append_styles(target, "svelte-1t5i3za", ".text-button-block.svelte-1t5i3za{width:100%;height:100%}.text-button.svelte-1t5i3za{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:transparent;border:none;box-shadow:transparent;box-sizing:border-box;cursor:pointer;transition:box-shadow 0.2s}.text-button.svelte-1t5i3za:active{box-shadow:inset 0 0 100px 100px rgba(0, 0, 0, 0.3)}.text-button.svelte-1t5i3za:hover{box-shadow:inset 0 0 100px 100px rgba(255, 255, 255, 0.3)}");
|
|
5552
6276
|
}
|
|
5553
6277
|
|
|
5554
6278
|
function create_fragment$1(ctx) {
|
|
@@ -5578,9 +6302,9 @@ function create_fragment$1(ctx) {
|
|
|
5578
6302
|
this.h();
|
|
5579
6303
|
},
|
|
5580
6304
|
h() {
|
|
5581
|
-
attr(button, "class", "text-button svelte-
|
|
6305
|
+
attr(button, "class", "text-button svelte-1t5i3za");
|
|
5582
6306
|
attr(button, "style", /*_buttonStyle*/ ctx[1]);
|
|
5583
|
-
attr(div, "class", "text-button-block svelte-
|
|
6307
|
+
attr(div, "class", "text-button-block svelte-1t5i3za");
|
|
5584
6308
|
attr(div, "style", /*_style*/ ctx[2]);
|
|
5585
6309
|
},
|
|
5586
6310
|
m(target, anchor) {
|
|
@@ -5677,7 +6401,7 @@ class TextButtonBlock extends SvelteComponent {
|
|
|
5677
6401
|
/* src/components/ImageBlock.svelte generated by Svelte v3.53.1 */
|
|
5678
6402
|
|
|
5679
6403
|
function add_css(target) {
|
|
5680
|
-
append_styles(target, "svelte-
|
|
6404
|
+
append_styles(target, "svelte-1ec6zfb", ".image-block.svelte-1ec6zfb{display:flex;position:relative;width:100%;height:100%;max-width:100%;max-height:100%;justify-content:center;align-items:center;white-space:nowrap;box-sizing:border-box;overflow:hidden}.image.svelte-1ec6zfb{width:100%;height:100%}.transport.svelte-1ec6zfb:hover,.transport.svelte-1ec6zfb:focus{opacity:0.75;box-shadow:0 5px 16px rgba(0, 0, 0, 0.1), 0 8px 28px rgba(0, 0, 0, 0.16)}");
|
|
5681
6405
|
}
|
|
5682
6406
|
|
|
5683
6407
|
function create_fragment(ctx) {
|
|
@@ -5712,14 +6436,14 @@ function create_fragment(ctx) {
|
|
|
5712
6436
|
this.h();
|
|
5713
6437
|
},
|
|
5714
6438
|
h() {
|
|
5715
|
-
attr(img, "class", "image svelte-
|
|
6439
|
+
attr(img, "class", "image svelte-1ec6zfb");
|
|
5716
6440
|
attr(img, "loading", "lazy");
|
|
5717
6441
|
attr(img, "width", "auto");
|
|
5718
6442
|
attr(img, "height", "auto");
|
|
5719
6443
|
attr(img, "style", /*_imageStyle*/ ctx[3]);
|
|
5720
6444
|
if (!src_url_equal(img.src, img_src_value = /*src*/ ctx[0])) attr(img, "src", img_src_value);
|
|
5721
6445
|
attr(img, "alt", /*alt*/ ctx[1]);
|
|
5722
|
-
attr(div, "class", div_class_value = "" + (null_to_empty('image-block' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-
|
|
6446
|
+
attr(div, "class", div_class_value = "" + (null_to_empty('image-block' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-1ec6zfb"));
|
|
5723
6447
|
attr(div, "style", /*_style*/ ctx[4]);
|
|
5724
6448
|
},
|
|
5725
6449
|
m(target, anchor) {
|
|
@@ -5744,7 +6468,7 @@ function create_fragment(ctx) {
|
|
|
5744
6468
|
attr(img, "alt", /*alt*/ ctx[1]);
|
|
5745
6469
|
}
|
|
5746
6470
|
|
|
5747
|
-
if (dirty & /*transport*/ 4 && div_class_value !== (div_class_value = "" + (null_to_empty('image-block' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-
|
|
6471
|
+
if (dirty & /*transport*/ 4 && div_class_value !== (div_class_value = "" + (null_to_empty('image-block' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-1ec6zfb"))) {
|
|
5748
6472
|
attr(div, "class", div_class_value);
|
|
5749
6473
|
}
|
|
5750
6474
|
|
|
@@ -5817,4 +6541,4 @@ class ImageBlock extends SvelteComponent {
|
|
|
5817
6541
|
}
|
|
5818
6542
|
}
|
|
5819
6543
|
|
|
5820
|
-
export { ACTION_CHANGE_STATE_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_SHOW_EVENT, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, Alignments, AnimationStyles, BackgroundSizes, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem,
|
|
6544
|
+
export { ACTION_CHANGE_STATE_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_SHOW_EVENT, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, Alignments, AnimationStyles, BackgroundSizes, ClipPaths, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem, FormButton, FormRadioButtons, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_ACTION_RID, KARTE_ACTION_ROOT, KARTE_ACTION_SHORTEN_ID, KARTE_MODAL_ROOT, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, NOOP, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, Slider, SliderItem, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, actionId, actionSetting, addState, applyCss, applyGlobalCss, close, closeAction, closeApp, closed, collection$1 as collection, create, createApp, createFog, customAnimation, customHandlers, customVariables, destroy, destroyed, dispatchDestroyEvent, embed, ensureActionRoot, ensureModalRoot, execOnClickOperation, finalize, formData, getActionSetting, getActionShadowRoot, getCustomHandlers, getCustomVariables, getInternalHandlers, getMarginStyle, getPositionStyle, getState$1 as getState, getStates, getStoreState, getSystem, getTransform, h, handleFocus, handleKeydown, handleState, hasSuffix, hashCode, haveFunction, hideOnScroll, hideOnTime, initialize, internalHandlers, isClosed, isDestroyed, isOpened, isPreview, isStopped, linkTo, loadGlobalScript, loadGlobalStyle, loadStyle, maximumZindex, moveTo, none, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, randStr, resetActionSetting, runScript, send_event, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setDestroyed, setInternalHandlers, setMaximumZindex, setOpened, setPreviousFocus, setState$1 as setState, setStopped, setSystem, show, showAction, showModal, showOnScroll, showOnTime, state, states, stopped, system, toBr, updateCustomHandlers, updateCustomVariables, updateInternalHandlers, widget };
|