Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@felte/element

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@felte/element - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.nyc_output/d2bffbc5-3bdf-4155-89b8-3fc33a1f14f3.json

2

.nyc_output/processinfo/index.json

@@ -1,1 +0,1 @@

{"processes":{"a67c74bb-f582-45d9-a935-d38496485d69":{"parent":null,"children":["f7fbc9cc-3ab4-42c1-a528-9e80db9d567e"]},"f7fbc9cc-3ab4-42c1-a528-9e80db9d567e":{"parent":"a67c74bb-f582-45d9-a935-d38496485d69","children":[]}},"files":{"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/validation-message.ts":["f7fbc9cc-3ab4-42c1-a528-9e80db9d567e"],"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/stores.ts":["f7fbc9cc-3ab4-42c1-a528-9e80db9d567e"],"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/reporter.ts":["f7fbc9cc-3ab4-42c1-a528-9e80db9d567e"],"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/index.ts":["f7fbc9cc-3ab4-42c1-a528-9e80db9d567e"]},"externalIds":{}}
{"processes":{"d2bffbc5-3bdf-4155-89b8-3fc33a1f14f3":{"parent":"e963020f-01c5-4131-bfca-187f157c9cd4","children":[]},"e963020f-01c5-4131-bfca-187f157c9cd4":{"parent":null,"children":["d2bffbc5-3bdf-4155-89b8-3fc33a1f14f3"]}},"files":{"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/felte-field.ts":["d2bffbc5-3bdf-4155-89b8-3fc33a1f14f3"],"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/felte-form.ts":["d2bffbc5-3bdf-4155-89b8-3fc33a1f14f3"],"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/stores.ts":["d2bffbc5-3bdf-4155-89b8-3fc33a1f14f3"],"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/index.ts":["d2bffbc5-3bdf-4155-89b8-3fc33a1f14f3"]},"externalIds":{}}

@@ -1,5 +0,5 @@

{"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/index.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/index.ts","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"1a44510024e22c790edc415fa804f137f1d93af3"}
,"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/reporter.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/reporter.ts","statementMap":{"0":{"start":{"line":9,"column":17},"end":{"line":9,"column":35}},"1":{"start":{"line":10,"column":2},"end":{"line":18,"column":3}},"2":{"start":{"line":11,"column":4},"end":{"line":16,"column":5}},"3":{"start":{"line":12,"column":17},"end":{"line":12,"column":29}},"4":{"start":{"line":13,"column":6},"end":{"line":13,"column":43}},"5":{"start":{"line":14,"column":6},"end":{"line":14,"column":43}},"6":{"start":{"line":15,"column":6},"end":{"line":15,"column":47}},"7":{"start":{"line":17,"column":4},"end":{"line":17,"column":14}},"8":{"start":{"line":19,"column":2},"end":{"line":21,"column":3}},"9":{"start":{"line":20,"column":4},"end":{"line":20,"column":96}},"10":{"start":{"line":22,"column":2},"end":{"line":29,"column":4}},"11":{"start":{"line":24,"column":34},"end":{"line":26,"column":22}},"12":{"start":{"line":27,"column":6},"end":{"line":27,"column":35}}},"fnMap":{"0":{"name":"reporter","decl":{"start":{"line":6,"column":16},"end":{"line":6,"column":24}},"loc":{"start":{"line":8,"column":25},"end":{"line":30,"column":1}},"line":8},"1":{"name":"(anonymous_1)","decl":{"start":{"line":23,"column":4},"end":{"line":23,"column":5}},"loc":{"start":{"line":23,"column":20},"end":{"line":28,"column":5}},"line":23}},"branchMap":{"0":{"loc":{"start":{"line":10,"column":2},"end":{"line":18,"column":3}},"type":"if","locations":[{"start":{"line":10,"column":2},"end":{"line":18,"column":3}},{"start":{"line":10,"column":2},"end":{"line":18,"column":3}}],"line":10},"1":{"loc":{"start":{"line":11,"column":4},"end":{"line":16,"column":5}},"type":"if","locations":[{"start":{"line":11,"column":4},"end":{"line":16,"column":5}},{"start":{"line":11,"column":4},"end":{"line":16,"column":5}}],"line":11},"2":{"loc":{"start":{"line":19,"column":2},"end":{"line":21,"column":3}},"type":"if","locations":[{"start":{"line":19,"column":2},"end":{"line":21,"column":3}},{"start":{"line":19,"column":2},"end":{"line":21,"column":3}}],"line":19}},"s":{"0":8,"1":8,"2":4,"3":4,"4":4,"5":4,"6":4,"7":4,"8":4,"9":4,"10":4,"11":1,"12":1},"f":{"0":8,"1":1},"b":{"0":[4,4],"1":[4,0],"2":[4,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"10d3e4899090e225b3307d525a8becb25ca3b712"}
,"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/stores.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/stores.ts","statementMap":{"0":{"start":{"line":7,"column":40},"end":{"line":7,"column":42}},"1":{"start":{"line":8,"column":42},"end":{"line":8,"column":44}}},"fnMap":{},"branchMap":{},"s":{"0":1,"1":1},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"086e6374bdeaf250de8e734a5f6029ac18e493e2"}
,"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/validation-message.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/reporter-element/src/validation-message.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":58}},"1":{"start":{"line":1,"column":58},"end":{"line":1,"column":null}},"2":{"start":{"line":2,"column":47},"end":{"line":2,"column":null}},"3":{"start":{"line":3,"column":43},"end":{"line":3,"column":null}},"4":{"start":{"line":4,"column":21},"end":{"line":4,"column":null}},"5":{"start":{"line":7,"column":7},"end":{"line":128,"column":null}},"6":{"start":{"line":7,"column":7},"end":{"line":7,"column":44}},"7":{"start":{"line":9,"column":2},"end":{"line":9,"column":null}},"8":{"start":{"line":21,"column":2},"end":{"line":21,"column":null}},"9":{"start":{"line":30,"column":2},"end":{"line":30,"column":null}},"10":{"start":{"line":33,"column":2},"end":{"line":33,"column":null}},"11":{"start":{"line":38,"column":17},"end":{"line":38,"column":null}},"12":{"start":{"line":39,"column":4},"end":{"line":39,"column":null}},"13":{"start":{"line":39,"column":15},"end":{"line":39,"column":null}},"14":{"start":{"line":40,"column":21},"end":{"line":40,"column":null}},"15":{"start":{"line":41,"column":21},"end":{"line":41,"column":null}},"16":{"start":{"line":42,"column":21},"end":{"line":50,"column":null}},"17":{"start":{"line":50,"column":22},"end":{"line":50,"column":null}},"18":{"start":{"line":52,"column":4},"end":{"line":52,"column":null}},"19":{"start":{"line":52,"column":19},"end":{"line":52,"column":null}},"20":{"start":{"line":53,"column":4},"end":{"line":53,"column":null}},"21":{"start":{"line":54,"column":17},"end":{"line":54,"column":null}},"22":{"start":{"line":55,"column":4},"end":{"line":55,"column":null}},"23":{"start":{"line":55,"column":15},"end":{"line":55,"column":null}},"24":{"start":{"line":56,"column":4},"end":{"line":56,"column":null}},"25":{"start":{"line":57,"column":4},"end":{"line":57,"column":null}},"26":{"start":{"line":58,"column":5},"end":{"line":58,"column":null}},"27":{"start":{"line":62,"column":24},"end":{"line":62,"column":null}},"28":{"start":{"line":63,"column":17},"end":{"line":63,"column":null}},"29":{"start":{"line":64,"column":4},"end":{"line":65,"column":null}},"30":{"start":{"line":65,"column":6},"end":{"line":65,"column":null}},"31":{"start":{"line":66,"column":23},"end":{"line":66,"column":null}},"32":{"start":{"line":67,"column":4},"end":{"line":69,"column":null}},"33":{"start":{"line":68,"column":6},"end":{"line":69,"column":null}},"34":{"start":{"line":72,"column":6},"end":{"line":74,"column":null}},"35":{"start":{"line":75,"column":4},"end":{"line":91,"column":null}},"36":{"start":{"line":76,"column":27},"end":{"line":76,"column":null}},"37":{"start":{"line":77,"column":6},"end":{"line":77,"column":null}},"38":{"start":{"line":77,"column":39},"end":{"line":77,"column":null}},"39":{"start":{"line":78,"column":23},"end":{"line":78,"column":null}},"40":{"start":{"line":79,"column":6},"end":{"line":79,"column":null}},"41":{"start":{"line":80,"column":6},"end":{"line":82,"column":null}},"42":{"start":{"line":81,"column":8},"end":{"line":81,"column":null}},"43":{"start":{"line":82,"column":8},"end":{"line":82,"column":null}},"44":{"start":{"line":84,"column":6},"end":{"line":84,"column":null}},"45":{"start":{"line":84,"column":28},"end":{"line":84,"column":null}},"46":{"start":{"line":85,"column":6},"end":{"line":89,"column":null}},"47":{"start":{"line":86,"column":21},"end":{"line":86,"column":null}},"48":{"start":{"line":87,"column":31},"end":{"line":87,"column":null}},"49":{"start":{"line":88,"column":8},"end":{"line":88,"column":null}},"50":{"start":{"line":89,"column":8},"end":{"line":89,"column":null}},"51":{"start":{"line":91,"column":6},"end":{"line":91,"column":null}},"52":{"start":{"line":96,"column":4},"end":{"line":101,"column":null}},"53":{"start":{"line":97,"column":6},"end":{"line":99,"column":null}},"54":{"start":{"line":98,"column":8},"end":{"line":98,"column":null}},"55":{"start":{"line":98,"column":55},"end":{"line":98,"column":null}},"56":{"start":{"line":99,"column":8},"end":{"line":99,"column":null}},"57":{"start":{"line":101,"column":6},"end":{"line":101,"column":null}},"58":{"start":{"line":106,"column":4},"end":{"line":106,"column":null}},"59":{"start":{"line":107,"column":4},"end":{"line":107,"column":9}},"60":{"start":{"line":111,"column":4},"end":{"line":111,"column":null}},"61":{"start":{"line":112,"column":4},"end":{"line":119,"column":null}},"62":{"start":{"line":113,"column":6},"end":{"line":119,"column":null}},"63":{"start":{"line":114,"column":8},"end":{"line":119,"column":null}},"64":{"start":{"line":115,"column":10},"end":{"line":115,"column":null}},"65":{"start":{"line":116,"column":10},"end":{"line":116,"column":null}},"66":{"start":{"line":117,"column":10},"end":{"line":117,"column":null}},"67":{"start":{"line":119,"column":10},"end":{"line":119,"column":null}},"68":{"start":{"line":126,"column":4},"end":{"line":128,"column":null}},"69":{"start":{"line":9,"column":2},"end":{"line":9,"column":19}},"70":{"start":{"line":12,"column":2},"end":{"line":12,"column":null}},"71":{"start":{"line":15,"column":2},"end":{"line":15,"column":null}},"72":{"start":{"line":18,"column":2},"end":{"line":18,"column":null}},"73":{"start":{"line":21,"column":2},"end":{"line":21,"column":30}},"74":{"start":{"line":24,"column":2},"end":{"line":24,"column":null}},"75":{"start":{"line":27,"column":2},"end":{"line":27,"column":null}},"76":{"start":{"line":30,"column":2},"end":{"line":30,"column":25}},"77":{"start":{"line":33,"column":2},"end":{"line":33,"column":47}}},"fnMap":{"0":{"name":"(anonymous_15)","decl":{"start":{"line":1,"column":0},"end":{"line":1,"column":58}},"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":58}}},"1":{"name":"(anonymous_16)","decl":{"start":{"line":7,"column":7},"end":{"line":7,"column":44}},"loc":{"start":{"line":1,"column":0},"end":{"line":33,"column":null}}},"2":{"name":"(anonymous_17)","decl":{"start":{"line":37,"column":10},"end":{"line":37,"column":19}},"loc":{"start":{"line":37,"column":19},"end":{"line":58,"column":null}}},"3":{"name":"(anonymous_18)","decl":{"start":{"line":50,"column":12},"end":{"line":50,"column":13}},"loc":{"start":{"line":50,"column":22},"end":{"line":50,"column":null}}},"4":{"name":"(anonymous_19)","decl":{"start":{"line":61,"column":10},"end":{"line":61,"column":19}},"loc":{"start":{"line":61,"column":19},"end":{"line":91,"column":null}}},"5":{"name":"(anonymous_20)","decl":{"start":{"line":75,"column":35},"end":{"line":75,"column":36}},"loc":{"start":{"line":75,"column":50},"end":{"line":91,"column":null}}},"6":{"name":"(anonymous_21)","decl":{"start":{"line":85,"column":23},"end":{"line":85,"column":24}},"loc":{"start":{"line":85,"column":51},"end":{"line":89,"column":null}}},"7":{"name":"(anonymous_22)","decl":{"start":{"line":95,"column":2},"end":{"line":95,"column":10}},"loc":{"start":{"line":95,"column":51},"end":{"line":101,"column":null}}},"8":{"name":"(anonymous_23)","decl":{"start":{"line":105,"column":2},"end":{"line":105,"column":25}},"loc":{"start":{"line":105,"column":25},"end":{"line":107,"column":9}}},"9":{"name":"(anonymous_24)","decl":{"start":{"line":110,"column":2},"end":{"line":110,"column":22}},"loc":{"start":{"line":110,"column":22},"end":{"line":119,"column":null}}},"10":{"name":"(anonymous_25)","decl":{"start":{"line":112,"column":23},"end":{"line":112,"column":24}},"loc":{"start":{"line":112,"column":44},"end":{"line":119,"column":null}}},"11":{"name":"(anonymous_26)","decl":{"start":{"line":113,"column":17},"end":{"line":113,"column":23}},"loc":{"start":{"line":113,"column":23},"end":{"line":119,"column":null}}},"12":{"name":"(anonymous_27)","decl":{"start":{"line":125,"column":2},"end":{"line":125,"column":11}},"loc":{"start":{"line":125,"column":11},"end":{"line":128,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":39,"column":4},"end":{"line":39,"column":null}},"type":"if","locations":[{"start":{"line":39,"column":4},"end":{"line":39,"column":null}},{"start":{"line":39,"column":4},"end":{"line":39,"column":null}}]},"1":{"loc":{"start":{"line":41,"column":21},"end":{"line":41,"column":31}},"type":"cond-expr","locations":[{"start":{"line":41,"column":21},"end":{"line":41,"column":31}},{"start":{"line":41,"column":21},"end":{"line":41,"column":null}}]},"2":{"loc":{"start":{"line":41,"column":21},"end":{"line":41,"column":31}},"type":"cond-expr","locations":[{"start":{"line":41,"column":21},"end":{"line":41,"column":31}},{"start":{"line":41,"column":21},"end":{"line":41,"column":37}}]},"3":{"loc":{"start":{"line":43,"column":10},"end":{"line":45,"column":null}},"type":"cond-expr","locations":[{"start":{"line":43,"column":10},"end":{"line":45,"column":null}},{"start":{"line":47,"column":9},"end":{"line":50,"column":null}}]},"4":{"loc":{"start":{"line":43,"column":10},"end":{"line":43,"column":null}},"type":"binary-expr","locations":[{"start":{"line":43,"column":10},"end":{"line":43,"column":null}},{"start":{"line":44,"column":10},"end":{"line":45,"column":null}}]},"5":{"loc":{"start":{"line":43,"column":10},"end":{"line":43,"column":20}},"type":"cond-expr","locations":[{"start":{"line":43,"column":10},"end":{"line":43,"column":20}},{"start":{"line":43,"column":10},"end":{"line":43,"column":null}}]},"6":{"loc":{"start":{"line":52,"column":4},"end":{"line":52,"column":null}},"type":"if","locations":[{"start":{"line":52,"column":4},"end":{"line":52,"column":null}},{"start":{"line":52,"column":4},"end":{"line":52,"column":null}}]},"7":{"loc":{"start":{"line":55,"column":4},"end":{"line":55,"column":null}},"type":"if","locations":[{"start":{"line":55,"column":4},"end":{"line":55,"column":null}},{"start":{"line":55,"column":4},"end":{"line":55,"column":null}}]},"8":{"loc":{"start":{"line":58,"column":5},"end":{"line":58,"column":10}},"type":"cond-expr","locations":[{"start":{"line":58,"column":5},"end":{"line":58,"column":10}},{"start":{"line":58,"column":5},"end":{"line":58,"column":null}}]},"9":{"loc":{"start":{"line":58,"column":5},"end":{"line":58,"column":23}},"type":"binary-expr","locations":[{"start":{"line":58,"column":5},"end":{"line":58,"column":23}},{"start":{"line":58,"column":23},"end":{"line":58,"column":38}}]},"10":{"loc":{"start":{"line":64,"column":4},"end":{"line":65,"column":null}},"type":"if","locations":[{"start":{"line":64,"column":4},"end":{"line":65,"column":null}},{"start":{"line":64,"column":4},"end":{"line":65,"column":null}}]},"11":{"loc":{"start":{"line":66,"column":23},"end":{"line":66,"column":36}},"type":"cond-expr","locations":[{"start":{"line":66,"column":23},"end":{"line":66,"column":36}},{"start":{"line":66,"column":23},"end":{"line":66,"column":null}}]},"12":{"loc":{"start":{"line":67,"column":4},"end":{"line":69,"column":null}},"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":69,"column":null}},{"start":{"line":67,"column":4},"end":{"line":69,"column":null}}]},"13":{"loc":{"start":{"line":73,"column":10},"end":{"line":73,"column":null}},"type":"cond-expr","locations":[{"start":{"line":73,"column":10},"end":{"line":73,"column":null}},{"start":{"line":74,"column":10},"end":{"line":74,"column":null}}]},"14":{"loc":{"start":{"line":77,"column":6},"end":{"line":77,"column":null}},"type":"if","locations":[{"start":{"line":77,"column":6},"end":{"line":77,"column":null}},{"start":{"line":77,"column":6},"end":{"line":77,"column":null}}]},"15":{"loc":{"start":{"line":77,"column":10},"end":{"line":77,"column":24}},"type":"binary-expr","locations":[{"start":{"line":77,"column":10},"end":{"line":77,"column":24}},{"start":{"line":77,"column":24},"end":{"line":77,"column":39}}]},"16":{"loc":{"start":{"line":80,"column":6},"end":{"line":82,"column":null}},"type":"if","locations":[{"start":{"line":80,"column":6},"end":{"line":82,"column":null}},{"start":{"line":80,"column":6},"end":{"line":82,"column":null}}]},"17":{"loc":{"start":{"line":80,"column":10},"end":{"line":80,"column":23}},"type":"binary-expr","locations":[{"start":{"line":80,"column":10},"end":{"line":80,"column":23}},{"start":{"line":80,"column":23},"end":{"line":80,"column":46}}]},"18":{"loc":{"start":{"line":84,"column":6},"end":{"line":84,"column":null}},"type":"if","locations":[{"start":{"line":84,"column":6},"end":{"line":84,"column":null}},{"start":{"line":84,"column":6},"end":{"line":84,"column":null}}]},"19":{"loc":{"start":{"line":86,"column":21},"end":{"line":86,"column":42}},"type":"binary-expr","locations":[{"start":{"line":86,"column":21},"end":{"line":86,"column":42}},{"start":{"line":86,"column":42},"end":{"line":86,"column":null}}]},"20":{"loc":{"start":{"line":87,"column":31},"end":{"line":87,"column":73}},"type":"binary-expr","locations":[{"start":{"line":87,"column":31},"end":{"line":87,"column":73}},{"start":{"line":87,"column":73},"end":{"line":87,"column":null}}]},"21":{"loc":{"start":{"line":96,"column":4},"end":{"line":101,"column":null}},"type":"if","locations":[{"start":{"line":96,"column":4},"end":{"line":101,"column":null}},{"start":{"line":96,"column":4},"end":{"line":101,"column":null}}]},"22":{"loc":{"start":{"line":96,"column":8},"end":{"line":96,"column":42}},"type":"binary-expr","locations":[{"start":{"line":96,"column":8},"end":{"line":96,"column":42}},{"start":{"line":96,"column":42},"end":{"line":96,"column":58}}]},"23":{"loc":{"start":{"line":98,"column":8},"end":{"line":98,"column":null}},"type":"if","locations":[{"start":{"line":98,"column":8},"end":{"line":98,"column":null}},{"start":{"line":98,"column":8},"end":{"line":98,"column":null}}]},"24":{"loc":{"start":{"line":107,"column":4},"end":{"line":107,"column":9}},"type":"cond-expr","locations":[{"start":{"line":107,"column":4},"end":{"line":107,"column":9}},{"start":{"line":107,"column":4},"end":{"line":107,"column":9}}]},"25":{"loc":{"start":{"line":128,"column":41},"end":{"line":128,"column":51}},"type":"cond-expr","locations":[{"start":{"line":128,"column":41},"end":{"line":128,"column":51}},{"start":{"line":128,"column":51},"end":{"line":128,"column":null}}]}},"s":{"0":2,"1":1,"2":1,"3":1,"4":1,"5":1,"6":20,"7":19,"8":19,"9":19,"10":19,"11":34,"12":34,"13":0,"14":34,"15":34,"16":34,"17":54,"18":34,"19":1,"20":33,"21":33,"22":33,"23":0,"24":33,"25":33,"26":33,"27":19,"28":19,"29":19,"30":1,"31":18,"32":18,"33":3,"34":15,"35":15,"36":35,"37":35,"38":0,"39":35,"40":35,"41":35,"42":15,"43":15,"44":20,"45":1,"46":20,"47":20,"48":20,"49":20,"50":20,"51":20,"52":72,"53":22,"54":30,"55":6,"56":24,"57":22,"58":15,"59":15,"60":19,"61":19,"62":19,"63":19,"64":19,"65":19,"66":15,"67":4,"68":72,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1},"f":{"0":0,"1":19,"2":34,"3":54,"4":19,"5":35,"6":20,"7":72,"8":15,"9":19,"10":19,"11":19,"12":72},"b":{"0":[0,34],"1":[34,0],"2":[0,34],"3":[3,31],"4":[3,3],"5":[3,0],"6":[1,33],"7":[0,33],"8":[0,33],"9":[33,13],"10":[1,18],"11":[3,15],"12":[3,15],"13":[14,1],"14":[0,35],"15":[35,35],"16":[15,20],"17":[35,20],"18":[1,19],"19":[20,10],"20":[20,20],"21":[22,50],"22":[72,54],"23":[6,24],"24":[4,11],"25":[32,40]}}
{"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/felte-field.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/felte-field.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":3,"column":33},"end":{"line":3,"column":null}},"2":{"start":{"line":8,"column":7},"end":{"line":8,"column":null}},"3":{"start":{"line":9,"column":28},"end":{"line":9,"column":null}},"4":{"start":{"line":12,"column":2},"end":{"line":14,"column":null}},"5":{"start":{"line":13,"column":4},"end":{"line":14,"column":null}},"6":{"start":{"line":20,"column":7},"end":{"line":112,"column":null}},"7":{"start":{"line":20,"column":7},"end":{"line":20,"column":null}},"8":{"start":{"line":27,"column":2},"end":{"line":27,"column":null}},"9":{"start":{"line":30,"column":2},"end":{"line":30,"column":null}},"10":{"start":{"line":33,"column":2},"end":{"line":33,"column":null}},"11":{"start":{"line":36,"column":2},"end":{"line":36,"column":null}},"12":{"start":{"line":43,"column":10},"end":{"line":43,"column":null}},"13":{"start":{"line":54,"column":10},"end":{"line":54,"column":null}},"14":{"start":{"line":46,"column":4},"end":{"line":46,"column":null}},"15":{"start":{"line":56,"column":4},"end":{"line":56,"column":null}},"16":{"start":{"line":68,"column":8},"end":{"line":68,"column":null}},"17":{"start":{"line":69,"column":4},"end":{"line":69,"column":null}},"18":{"start":{"line":69,"column":15},"end":{"line":69,"column":null}},"19":{"start":{"line":70,"column":22},"end":{"line":70,"column":null}},"20":{"start":{"line":71,"column":4},"end":{"line":71,"column":null}},"21":{"start":{"line":71,"column":18},"end":{"line":71,"column":null}},"22":{"start":{"line":72,"column":5},"end":{"line":72,"column":null}},"23":{"start":{"line":73,"column":39},"end":{"line":75,"column":null}},"24":{"start":{"line":77,"column":4},"end":{"line":77,"column":null}},"25":{"start":{"line":78,"column":4},"end":{"line":78,"column":null}},"26":{"start":{"line":79,"column":24},"end":{"line":79,"column":null}},"27":{"start":{"line":80,"column":24},"end":{"line":82,"column":null}},"28":{"start":{"line":81,"column":21},"end":{"line":81,"column":null}},"29":{"start":{"line":82,"column":6},"end":{"line":82,"column":null}},"30":{"start":{"line":84,"column":23},"end":{"line":85,"column":null}},"31":{"start":{"line":85,"column":6},"end":{"line":85,"column":null}},"32":{"start":{"line":87,"column":4},"end":{"line":87,"column":null}},"33":{"start":{"line":88,"column":4},"end":{"line":88,"column":null}},"34":{"start":{"line":89,"column":4},"end":{"line":92,"column":null}},"35":{"start":{"line":90,"column":6},"end":{"line":90,"column":null}},"36":{"start":{"line":91,"column":6},"end":{"line":91,"column":null}},"37":{"start":{"line":92,"column":6},"end":{"line":92,"column":null}},"38":{"start":{"line":95,"column":4},"end":{"line":95,"column":null}},"39":{"start":{"line":96,"column":4},"end":{"line":96,"column":9}},"40":{"start":{"line":97,"column":4},"end":{"line":97,"column":null}},"41":{"start":{"line":101,"column":4},"end":{"line":102,"column":null}},"42":{"start":{"line":102,"column":6},"end":{"line":102,"column":null}},"43":{"start":{"line":107,"column":4},"end":{"line":107,"column":null}},"44":{"start":{"line":108,"column":4},"end":{"line":108,"column":9}},"45":{"start":{"line":112,"column":4},"end":{"line":112,"column":null}},"46":{"start":{"line":24,"column":2},"end":{"line":24,"column":null}},"47":{"start":{"line":27,"column":2},"end":{"line":27,"column":18}},"48":{"start":{"line":30,"column":2},"end":{"line":30,"column":14}},"49":{"start":{"line":33,"column":2},"end":{"line":33,"column":15}},"50":{"start":{"line":36,"column":2},"end":{"line":36,"column":14}},"51":{"start":{"line":39,"column":2},"end":{"line":39,"column":null}},"52":{"start":{"line":50,"column":2},"end":{"line":50,"column":null}}},"fnMap":{"0":{"name":"(anonymous_13)","decl":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}}},"1":{"name":"failFor","decl":{"start":{"line":11,"column":0},"end":{"line":11,"column":17}},"loc":{"start":{"line":11,"column":31},"end":{"line":14,"column":null}}},"2":{"name":"(anonymous_15)","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":21}},"loc":{"start":{"line":12,"column":21},"end":{"line":14,"column":null}}},"3":{"name":"(anonymous_16)","decl":{"start":{"line":20,"column":7},"end":{"line":20,"column":null}},"loc":{"start":{"line":1,"column":0},"end":{"line":54,"column":null}}},"4":{"name":"(anonymous_17)","decl":{"start":{"line":45,"column":2},"end":{"line":45,"column":9}},"loc":{"start":{"line":45,"column":9},"end":{"line":46,"column":null}}},"5":{"name":"(anonymous_18)","decl":{"start":{"line":46,"column":9},"end":{"line":46,"column":null}},"loc":{"start":{"line":55,"column":14},"end":{"line":56,"column":null}}},"6":{"name":"(anonymous_19)","decl":{"start":{"line":61,"column":2},"end":{"line":61,"column":17}},"loc":{"start":{"line":61,"column":17},"end":{"line":97,"column":null}}},"7":{"name":"(anonymous_20)","decl":{"start":{"line":80,"column":24},"end":{"line":80,"column":25}},"loc":{"start":{"line":80,"column":38},"end":{"line":82,"column":null}}},"8":{"name":"(anonymous_21)","decl":{"start":{"line":84,"column":23},"end":{"line":84,"column":29}},"loc":{"start":{"line":84,"column":29},"end":{"line":85,"column":null}}},"9":{"name":"(anonymous_22)","decl":{"start":{"line":89,"column":20},"end":{"line":89,"column":26}},"loc":{"start":{"line":89,"column":26},"end":{"line":92,"column":null}}},"10":{"name":"(anonymous_23)","decl":{"start":{"line":100,"column":2},"end":{"line":100,"column":10}},"loc":{"start":{"line":100,"column":41},"end":{"line":102,"column":null}}},"11":{"name":"(anonymous_24)","decl":{"start":{"line":106,"column":2},"end":{"line":106,"column":25}},"loc":{"start":{"line":106,"column":25},"end":{"line":108,"column":9}}},"12":{"name":"(anonymous_25)","decl":{"start":{"line":111,"column":2},"end":{"line":111,"column":11}},"loc":{"start":{"line":111,"column":11},"end":{"line":112,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":69,"column":4},"end":{"line":69,"column":null}},"type":"if","locations":[{"start":{"line":69,"column":4},"end":{"line":69,"column":null}},{"start":{"line":69,"column":4},"end":{"line":69,"column":null}}]},"1":{"loc":{"start":{"line":71,"column":4},"end":{"line":71,"column":null}},"type":"if","locations":[{"start":{"line":71,"column":4},"end":{"line":71,"column":null}},{"start":{"line":71,"column":4},"end":{"line":71,"column":null}}]},"2":{"loc":{"start":{"line":90,"column":6},"end":{"line":90,"column":null}},"type":"cond-expr","locations":[{"start":{"line":90,"column":6},"end":{"line":90,"column":null}},{"start":{"line":90,"column":6},"end":{"line":90,"column":null}}]},"3":{"loc":{"start":{"line":96,"column":4},"end":{"line":96,"column":9}},"type":"cond-expr","locations":[{"start":{"line":96,"column":4},"end":{"line":96,"column":9}},{"start":{"line":96,"column":4},"end":{"line":96,"column":9}}]},"4":{"loc":{"start":{"line":101,"column":4},"end":{"line":102,"column":null}},"type":"if","locations":[{"start":{"line":101,"column":4},"end":{"line":102,"column":null}},{"start":{"line":101,"column":4},"end":{"line":102,"column":null}}]},"5":{"loc":{"start":{"line":102,"column":6},"end":{"line":102,"column":11}},"type":"cond-expr","locations":[{"start":{"line":102,"column":6},"end":{"line":102,"column":11}},{"start":{"line":102,"column":6},"end":{"line":102,"column":null}}]},"6":{"loc":{"start":{"line":108,"column":4},"end":{"line":108,"column":9}},"type":"cond-expr","locations":[{"start":{"line":108,"column":4},"end":{"line":108,"column":9}},{"start":{"line":108,"column":4},"end":{"line":108,"column":9}}]}},"s":{"0":2,"1":1,"2":1,"3":1,"4":5,"5":1,"6":1,"7":6,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":2,"15":1,"16":5,"17":5,"18":0,"19":5,"20":5,"21":0,"22":5,"23":5,"24":5,"25":5,"26":5,"27":5,"28":0,"29":0,"30":5,"31":0,"32":5,"33":5,"34":5,"35":5,"36":5,"37":5,"38":5,"39":5,"40":5,"41":7,"42":4,"43":5,"44":5,"45":7,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1},"f":{"0":0,"1":5,"2":1,"3":5,"4":2,"5":1,"6":5,"7":0,"8":0,"9":5,"10":7,"11":5,"12":7},"b":{"0":[0,5],"1":[0,5],"2":[1,4],"3":[1,4],"4":[4,3],"5":[0,4],"6":[0,5]}}
,"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/felte-form.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/felte-form.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":6,"column":7},"end":{"line":6,"column":null}},"2":{"start":{"line":21,"column":33},"end":{"line":21,"column":null}},"3":{"start":{"line":27,"column":7},"end":{"line":27,"column":null}},"4":{"start":{"line":34,"column":7},"end":{"line":34,"column":null}},"5":{"start":{"line":35,"column":25},"end":{"line":35,"column":null}},"6":{"start":{"line":59,"column":0},"end":{"line":61,"column":null}},"7":{"start":{"line":60,"column":2},"end":{"line":61,"column":null}},"8":{"start":{"line":69,"column":2},"end":{"line":69,"column":null}},"9":{"start":{"line":71,"column":2},"end":{"line":78,"column":null}},"10":{"start":{"line":73,"column":24},"end":{"line":73,"column":null}},"11":{"start":{"line":74,"column":6},"end":{"line":74,"column":null}},"12":{"start":{"line":74,"column":31},"end":{"line":74,"column":null}},"13":{"start":{"line":75,"column":6},"end":{"line":75,"column":null}},"14":{"start":{"line":76,"column":6},"end":{"line":76,"column":null}},"15":{"start":{"line":78,"column":4},"end":{"line":78,"column":null}},"16":{"start":{"line":83,"column":2},"end":{"line":85,"column":null}},"17":{"start":{"line":84,"column":4},"end":{"line":85,"column":null}},"18":{"start":{"line":90,"column":18},"end":{"line":99,"column":null}},"19":{"start":{"line":103,"column":7},"end":{"line":349,"column":null}},"20":{"start":{"line":103,"column":7},"end":{"line":103,"column":55}},"21":{"start":{"line":107,"column":2},"end":{"line":107,"column":null}},"22":{"start":{"line":110,"column":2},"end":{"line":110,"column":null}},"23":{"start":{"line":119,"column":10},"end":{"line":128,"column":null}},"24":{"start":{"line":137,"column":2},"end":{"line":137,"column":null}},"25":{"start":{"line":139,"column":2},"end":{"line":139,"column":null}},"26":{"start":{"line":141,"column":2},"end":{"line":142,"column":null}},"27":{"start":{"line":145,"column":2},"end":{"line":145,"column":null}},"28":{"start":{"line":147,"column":2},"end":{"line":147,"column":null}},"29":{"start":{"line":149,"column":2},"end":{"line":149,"column":null}},"30":{"start":{"line":151,"column":2},"end":{"line":151,"column":null}},"31":{"start":{"line":153,"column":2},"end":{"line":153,"column":null}},"32":{"start":{"line":155,"column":2},"end":{"line":155,"column":null}},"33":{"start":{"line":157,"column":2},"end":{"line":157,"column":null}},"34":{"start":{"line":159,"column":2},"end":{"line":160,"column":null}},"35":{"start":{"line":169,"column":2},"end":{"line":169,"column":null}},"36":{"start":{"line":177,"column":2},"end":{"line":177,"column":null}},"37":{"start":{"line":185,"column":2},"end":{"line":186,"column":null}},"38":{"start":{"line":195,"column":2},"end":{"line":196,"column":null}},"39":{"start":{"line":205,"column":2},"end":{"line":205,"column":null}},"40":{"start":{"line":225,"column":2},"end":{"line":226,"column":null}},"41":{"start":{"line":229,"column":10},"end":{"line":229,"column":null}},"42":{"start":{"line":236,"column":2},"end":{"line":236,"column":null}},"43":{"start":{"line":113,"column":4},"end":{"line":113,"column":null}},"44":{"start":{"line":132,"column":4},"end":{"line":132,"column":null}},"45":{"start":{"line":164,"column":4},"end":{"line":164,"column":null}},"46":{"start":{"line":172,"column":4},"end":{"line":172,"column":null}},"47":{"start":{"line":180,"column":4},"end":{"line":180,"column":null}},"48":{"start":{"line":190,"column":4},"end":{"line":190,"column":null}},"49":{"start":{"line":200,"column":4},"end":{"line":200,"column":null}},"50":{"start":{"line":208,"column":4},"end":{"line":208,"column":null}},"51":{"start":{"line":214,"column":4},"end":{"line":214,"column":null}},"52":{"start":{"line":220,"column":4},"end":{"line":220,"column":null}},"53":{"start":{"line":231,"column":4},"end":{"line":231,"column":null}},"54":{"start":{"line":244,"column":26},"end":{"line":244,"column":null}},"55":{"start":{"line":245,"column":4},"end":{"line":245,"column":null}},"56":{"start":{"line":245,"column":39},"end":{"line":245,"column":null}},"57":{"start":{"line":246,"column":4},"end":{"line":246,"column":null}},"58":{"start":{"line":248,"column":39},"end":{"line":249,"column":null}},"59":{"start":{"line":248,"column":39},"end":{"line":248,"column":56}},"60":{"start":{"line":248,"column":30},"end":{"line":null,"column":-1}},"61":{"start":{"line":251,"column":4},"end":{"line":251,"column":null}},"62":{"start":{"line":252,"column":4},"end":{"line":252,"column":null}},"63":{"start":{"line":253,"column":4},"end":{"line":253,"column":null}},"64":{"start":{"line":254,"column":4},"end":{"line":254,"column":null}},"65":{"start":{"line":255,"column":4},"end":{"line":255,"column":null}},"66":{"start":{"line":256,"column":4},"end":{"line":256,"column":null}},"67":{"start":{"line":257,"column":4},"end":{"line":257,"column":null}},"68":{"start":{"line":258,"column":4},"end":{"line":258,"column":null}},"69":{"start":{"line":259,"column":4},"end":{"line":259,"column":null}},"70":{"start":{"line":260,"column":4},"end":{"line":260,"column":null}},"71":{"start":{"line":261,"column":4},"end":{"line":261,"column":null}},"72":{"start":{"line":262,"column":4},"end":{"line":262,"column":null}},"73":{"start":{"line":263,"column":4},"end":{"line":263,"column":null}},"74":{"start":{"line":264,"column":4},"end":{"line":264,"column":null}},"75":{"start":{"line":265,"column":4},"end":{"line":265,"column":null}},"76":{"start":{"line":266,"column":4},"end":{"line":266,"column":null}},"77":{"start":{"line":267,"column":4},"end":{"line":267,"column":null}},"78":{"start":{"line":268,"column":4},"end":{"line":268,"column":null}},"79":{"start":{"line":270,"column":19},"end":{"line":278,"column":null}},"80":{"start":{"line":271,"column":6},"end":{"line":278,"column":null}},"81":{"start":{"line":273,"column":10},"end":{"line":273,"column":null}},"82":{"start":{"line":273,"column":65},"end":{"line":273,"column":null}},"83":{"start":{"line":274,"column":10},"end":{"line":274,"column":null}},"84":{"start":{"line":275,"column":20},"end":{"line":275,"column":null}},"85":{"start":{"line":276,"column":26},"end":{"line":276,"column":null}},"86":{"start":{"line":277,"column":10},"end":{"line":277,"column":null}},"87":{"start":{"line":277,"column":45},"end":{"line":277,"column":null}},"88":{"start":{"line":278,"column":10},"end":{"line":278,"column":null}},"89":{"start":{"line":282,"column":24},"end":{"line":282,"column":null}},"90":{"start":{"line":284,"column":30},"end":{"line":291,"column":null}},"91":{"start":{"line":285,"column":20},"end":{"line":285,"column":null}},"92":{"start":{"line":286,"column":26},"end":{"line":286,"column":null}},"93":{"start":{"line":287,"column":6},"end":{"line":287,"column":null}},"94":{"start":{"line":288,"column":6},"end":{"line":288,"column":null}},"95":{"start":{"line":288,"column":40},"end":{"line":288,"column":null}},"96":{"start":{"line":289,"column":6},"end":{"line":289,"column":null}},"97":{"start":{"line":290,"column":6},"end":{"line":290,"column":null}},"98":{"start":{"line":291,"column":6},"end":{"line":291,"column":null}},"99":{"start":{"line":294,"column":31},"end":{"line":297,"column":null}},"100":{"start":{"line":295,"column":20},"end":{"line":295,"column":null}},"101":{"start":{"line":296,"column":27},"end":{"line":296,"column":null}},"102":{"start":{"line":297,"column":6},"end":{"line":297,"column":null}},"103":{"start":{"line":300,"column":29},"end":{"line":305,"column":null}},"104":{"start":{"line":301,"column":20},"end":{"line":301,"column":null}},"105":{"start":{"line":302,"column":25},"end":{"line":302,"column":null}},"106":{"start":{"line":303,"column":6},"end":{"line":303,"column":null}},"107":{"start":{"line":304,"column":6},"end":{"line":304,"column":null}},"108":{"start":{"line":305,"column":6},"end":{"line":305,"column":null}},"109":{"start":{"line":305,"column":39},"end":{"line":305,"column":null}},"110":{"start":{"line":308,"column":4},"end":{"line":308,"column":null}},"111":{"start":{"line":309,"column":4},"end":{"line":309,"column":null}},"112":{"start":{"line":310,"column":4},"end":{"line":310,"column":null}},"113":{"start":{"line":311,"column":4},"end":{"line":317,"column":null}},"114":{"start":{"line":312,"column":6},"end":{"line":312,"column":null}},"115":{"start":{"line":313,"column":6},"end":{"line":313,"column":null}},"116":{"start":{"line":314,"column":6},"end":{"line":314,"column":null}},"117":{"start":{"line":315,"column":6},"end":{"line":315,"column":null}},"118":{"start":{"line":316,"column":6},"end":{"line":316,"column":null}},"119":{"start":{"line":317,"column":6},"end":{"line":317,"column":null}},"120":{"start":{"line":317,"column":32},"end":{"line":317,"column":null}},"121":{"start":{"line":319,"column":4},"end":{"line":319,"column":null}},"122":{"start":{"line":320,"column":4},"end":{"line":320,"column":9}},"123":{"start":{"line":321,"column":4},"end":{"line":322,"column":null}},"124":{"start":{"line":327,"column":4},"end":{"line":327,"column":null}},"125":{"start":{"line":328,"column":24},"end":{"line":328,"column":null}},"126":{"start":{"line":329,"column":4},"end":{"line":330,"column":null}},"127":{"start":{"line":330,"column":6},"end":{"line":330,"column":null}},"128":{"start":{"line":335,"column":4},"end":{"line":339,"column":null}},"129":{"start":{"line":336,"column":6},"end":{"line":336,"column":11}},"130":{"start":{"line":337,"column":6},"end":{"line":337,"column":null}},"131":{"start":{"line":338,"column":6},"end":{"line":338,"column":null}},"132":{"start":{"line":339,"column":6},"end":{"line":339,"column":null}},"133":{"start":{"line":344,"column":4},"end":{"line":344,"column":null}},"134":{"start":{"line":345,"column":4},"end":{"line":345,"column":9}},"135":{"start":{"line":349,"column":4},"end":{"line":349,"column":null}},"136":{"start":{"line":107,"column":2},"end":{"line":107,"column":7}},"137":{"start":{"line":110,"column":2},"end":{"line":110,"column":37}},"138":{"start":{"line":239,"column":2},"end":{"line":239,"column":null}}},"fnMap":{"0":{"name":"(anonymous_20)","decl":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}}},"1":{"name":"prepareForm","decl":{"start":{"line":65,"column":7},"end":{"line":65,"column":null}},"loc":{"start":{"line":68,"column":33},"end":{"line":78,"column":null}}},"2":{"name":"(anonymous_27)","decl":{"start":{"line":71,"column":21},"end":{"line":71,"column":22}},"loc":{"start":{"line":71,"column":34},"end":{"line":78,"column":null}}},"3":{"name":"handleReady","decl":{"start":{"line":72,"column":4},"end":{"line":72,"column":25}},"loc":{"start":{"line":72,"column":35},"end":{"line":76,"column":null}}},"4":{"name":"failFor","decl":{"start":{"line":82,"column":0},"end":{"line":82,"column":17}},"loc":{"start":{"line":82,"column":31},"end":{"line":85,"column":null}}},"5":{"name":"(anonymous_30)","decl":{"start":{"line":83,"column":9},"end":{"line":83,"column":21}},"loc":{"start":{"line":83,"column":21},"end":{"line":85,"column":null}}},"6":{"name":"(anonymous_31)","decl":{"start":{"line":103,"column":7},"end":{"line":103,"column":55}},"loc":{"start":{"line":1,"column":0},"end":{"line":236,"column":null}}},"7":{"name":"(anonymous_32)","decl":{"start":{"line":112,"column":2},"end":{"line":112,"column":19}},"loc":{"start":{"line":112,"column":45},"end":{"line":113,"column":null}}},"8":{"name":"(anonymous_33)","decl":{"start":{"line":113,"column":26},"end":{"line":113,"column":null}},"loc":{"start":{"line":131,"column":13},"end":{"line":132,"column":null}}},"9":{"name":"(anonymous_34)","decl":{"start":{"line":132,"column":29},"end":{"line":132,"column":null}},"loc":{"start":{"line":163,"column":15},"end":{"line":164,"column":null}}},"10":{"name":"(anonymous_35)","decl":{"start":{"line":164,"column":29},"end":{"line":164,"column":null}},"loc":{"start":{"line":171,"column":16},"end":{"line":172,"column":null}}},"11":{"name":"(anonymous_36)","decl":{"start":{"line":172,"column":29},"end":{"line":172,"column":null}},"loc":{"start":{"line":179,"column":17},"end":{"line":180,"column":null}}},"12":{"name":"(anonymous_37)","decl":{"start":{"line":180,"column":29},"end":{"line":180,"column":null}},"loc":{"start":{"line":189,"column":21},"end":{"line":190,"column":null}}},"13":{"name":"(anonymous_38)","decl":{"start":{"line":190,"column":29},"end":{"line":190,"column":null}},"loc":{"start":{"line":199,"column":16},"end":{"line":200,"column":null}}},"14":{"name":"(anonymous_39)","decl":{"start":{"line":200,"column":29},"end":{"line":200,"column":null}},"loc":{"start":{"line":207,"column":16},"end":{"line":208,"column":null}}},"15":{"name":"(anonymous_40)","decl":{"start":{"line":208,"column":29},"end":{"line":208,"column":null}},"loc":{"start":{"line":213,"column":21},"end":{"line":214,"column":null}}},"16":{"name":"(anonymous_41)","decl":{"start":{"line":214,"column":29},"end":{"line":214,"column":null}},"loc":{"start":{"line":219,"column":19},"end":{"line":220,"column":null}}},"17":{"name":"(anonymous_42)","decl":{"start":{"line":220,"column":29},"end":{"line":220,"column":null}},"loc":{"start":{"line":230,"column":14},"end":{"line":231,"column":null}}},"18":{"name":"(anonymous_43)","decl":{"start":{"line":243,"column":10},"end":{"line":243,"column":22}},"loc":{"start":{"line":243,"column":48},"end":{"line":322,"column":null}}},"19":{"name":"(anonymous_44)","decl":{"start":{"line":270,"column":33},"end":{"line":270,"column":34}},"loc":{"start":{"line":270,"column":42},"end":{"line":278,"column":null}}},"20":{"name":"(anonymous_45)","decl":{"start":{"line":272,"column":8},"end":{"line":272,"column":9}},"loc":{"start":{"line":272,"column":20},"end":{"line":278,"column":null}}},"21":{"name":"(anonymous_46)","decl":{"start":{"line":284,"column":30},"end":{"line":284,"column":31}},"loc":{"start":{"line":284,"column":44},"end":{"line":291,"column":null}}},"22":{"name":"(anonymous_47)","decl":{"start":{"line":294,"column":31},"end":{"line":294,"column":32}},"loc":{"start":{"line":294,"column":45},"end":{"line":297,"column":null}}},"23":{"name":"(anonymous_48)","decl":{"start":{"line":300,"column":29},"end":{"line":300,"column":30}},"loc":{"start":{"line":300,"column":43},"end":{"line":305,"column":null}}},"24":{"name":"(anonymous_49)","decl":{"start":{"line":311,"column":20},"end":{"line":311,"column":26}},"loc":{"start":{"line":311,"column":26},"end":{"line":317,"column":null}}},"25":{"name":"(anonymous_50)","decl":{"start":{"line":317,"column":21},"end":{"line":317,"column":22}},"loc":{"start":{"line":317,"column":32},"end":{"line":317,"column":null}}},"26":{"name":"(anonymous_51)","decl":{"start":{"line":326,"column":2},"end":{"line":326,"column":22}},"loc":{"start":{"line":326,"column":22},"end":{"line":330,"column":null}}},"27":{"name":"(anonymous_52)","decl":{"start":{"line":334,"column":2},"end":{"line":334,"column":10}},"loc":{"start":{"line":334,"column":41},"end":{"line":339,"column":null}}},"28":{"name":"(anonymous_53)","decl":{"start":{"line":343,"column":2},"end":{"line":343,"column":25}},"loc":{"start":{"line":343,"column":25},"end":{"line":345,"column":9}}},"29":{"name":"(anonymous_54)","decl":{"start":{"line":348,"column":2},"end":{"line":348,"column":11}},"loc":{"start":{"line":348,"column":11},"end":{"line":349,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":59,"column":0},"end":{"line":61,"column":null}},"type":"if","locations":[{"start":{"line":59,"column":0},"end":{"line":61,"column":null}},{"start":{"line":59,"column":0},"end":{"line":61,"column":null}}]},"1":{"loc":{"start":{"line":59,"column":4},"end":{"line":59,"column":37}},"type":"binary-expr","locations":[{"start":{"line":59,"column":4},"end":{"line":59,"column":37}},{"start":{"line":59,"column":37},"end":{"line":59,"column":56}}]},"2":{"loc":{"start":{"line":74,"column":6},"end":{"line":74,"column":null}},"type":"if","locations":[{"start":{"line":74,"column":6},"end":{"line":74,"column":null}},{"start":{"line":74,"column":6},"end":{"line":74,"column":null}}]},"3":{"loc":{"start":{"line":245,"column":4},"end":{"line":245,"column":null}},"type":"if","locations":[{"start":{"line":245,"column":4},"end":{"line":245,"column":null}},{"start":{"line":245,"column":4},"end":{"line":245,"column":null}}]},"4":{"loc":{"start":{"line":245,"column":8},"end":{"line":245,"column":24}},"type":"binary-expr","locations":[{"start":{"line":245,"column":8},"end":{"line":245,"column":24}},{"start":{"line":245,"column":24},"end":{"line":245,"column":39}}]},"5":{"loc":{"start":{"line":273,"column":10},"end":{"line":273,"column":null}},"type":"if","locations":[{"start":{"line":273,"column":10},"end":{"line":273,"column":null}},{"start":{"line":273,"column":10},"end":{"line":273,"column":null}}]},"6":{"loc":{"start":{"line":277,"column":10},"end":{"line":277,"column":null}},"type":"if","locations":[{"start":{"line":277,"column":10},"end":{"line":277,"column":null}},{"start":{"line":277,"column":10},"end":{"line":277,"column":null}}]},"7":{"loc":{"start":{"line":288,"column":6},"end":{"line":288,"column":null}},"type":"if","locations":[{"start":{"line":288,"column":6},"end":{"line":288,"column":null}},{"start":{"line":288,"column":6},"end":{"line":288,"column":null}}]},"8":{"loc":{"start":{"line":305,"column":6},"end":{"line":305,"column":null}},"type":"if","locations":[{"start":{"line":305,"column":6},"end":{"line":305,"column":null}},{"start":{"line":305,"column":6},"end":{"line":305,"column":null}}]},"9":{"loc":{"start":{"line":320,"column":4},"end":{"line":320,"column":9}},"type":"cond-expr","locations":[{"start":{"line":320,"column":4},"end":{"line":320,"column":9}},{"start":{"line":320,"column":4},"end":{"line":320,"column":9}}]},"10":{"loc":{"start":{"line":329,"column":4},"end":{"line":330,"column":null}},"type":"if","locations":[{"start":{"line":329,"column":4},"end":{"line":330,"column":null}},{"start":{"line":329,"column":4},"end":{"line":330,"column":null}}]},"11":{"loc":{"start":{"line":330,"column":28},"end":{"line":330,"column":48}},"type":"binary-expr","locations":[{"start":{"line":330,"column":28},"end":{"line":330,"column":48}},{"start":{"line":330,"column":48},"end":{"line":330,"column":null}}]},"12":{"loc":{"start":{"line":335,"column":4},"end":{"line":339,"column":null}},"type":"if","locations":[{"start":{"line":335,"column":4},"end":{"line":339,"column":null}},{"start":{"line":335,"column":4},"end":{"line":339,"column":null}}]},"13":{"loc":{"start":{"line":336,"column":6},"end":{"line":336,"column":11}},"type":"cond-expr","locations":[{"start":{"line":336,"column":6},"end":{"line":336,"column":11}},{"start":{"line":336,"column":6},"end":{"line":336,"column":11}}]},"14":{"loc":{"start":{"line":345,"column":4},"end":{"line":345,"column":9}},"type":"cond-expr","locations":[{"start":{"line":345,"column":4},"end":{"line":345,"column":9}},{"start":{"line":345,"column":4},"end":{"line":345,"column":9}}]}},"s":{"0":5,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":3,"9":3,"10":3,"11":3,"12":0,"13":3,"14":3,"15":3,"16":72,"17":1,"18":1,"19":1,"20":5,"21":4,"22":4,"23":4,"24":4,"25":4,"26":4,"27":4,"28":4,"29":4,"30":4,"31":4,"32":4,"33":4,"34":4,"35":4,"36":4,"37":4,"38":4,"39":4,"40":4,"41":4,"42":4,"43":1,"44":1,"45":2,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":2,"54":4,"55":4,"56":0,"57":4,"58":4,"59":4,"60":4,"61":4,"62":4,"63":4,"64":4,"65":4,"66":4,"67":4,"68":4,"69":4,"70":4,"71":4,"72":4,"73":4,"74":4,"75":4,"76":4,"77":4,"78":4,"79":4,"80":36,"81":93,"82":35,"83":58,"84":58,"85":58,"86":58,"87":0,"88":58,"89":4,"90":4,"91":3,"92":3,"93":3,"94":3,"95":0,"96":3,"97":3,"98":3,"99":4,"100":2,"101":2,"102":2,"103":4,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":4,"111":4,"112":4,"113":4,"114":4,"115":4,"116":4,"117":4,"118":4,"119":4,"120":36,"121":4,"122":4,"123":4,"124":4,"125":4,"126":4,"127":3,"128":4,"129":4,"130":4,"131":4,"132":4,"133":4,"134":4,"135":4,"136":1,"137":1,"138":1},"f":{"0":3,"1":3,"2":3,"3":3,"4":72,"5":1,"6":4,"7":1,"8":1,"9":2,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":2,"18":4,"19":36,"20":93,"21":3,"22":2,"23":1,"24":4,"25":36,"26":4,"27":4,"28":4,"29":4},"b":{"0":[1,0],"1":[1,1],"2":[0,3],"3":[0,4],"4":[4,4],"5":[35,58],"6":[0,58],"7":[0,3],"8":[1,0],"9":[1,3],"10":[3,1],"11":[3,0],"12":[4,0],"13":[4,0],"14":[0,4]}}
,"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/index.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/index.ts","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"bd096a3a71c89d26adea5f021a272bb7402be7b4"}
,"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/stores.ts": {"path":"/Users/pberganza/Documents/Personal/JavaScript/Svelte/felte/packages/element/src/stores.ts","statementMap":{"0":{"start":{"line":45,"column":32},"end":{"line":45,"column":34}},"1":{"start":{"line":47,"column":13},"end":{"line":47,"column":28}},"2":{"start":{"line":47,"column":19},"end":{"line":47,"column":28}},"3":{"start":{"line":50,"column":2},"end":{"line":52,"column":73}},"4":{"start":{"line":65,"column":56},"end":{"line":65,"column":65}},"5":{"start":{"line":68,"column":4},"end":{"line":84,"column":5}},"6":{"start":{"line":69,"column":6},"end":{"line":69,"column":24}},"7":{"start":{"line":70,"column":6},"end":{"line":83,"column":7}},"8":{"start":{"line":72,"column":26},"end":{"line":72,"column":50}},"9":{"start":{"line":73,"column":8},"end":{"line":76,"column":9}},"10":{"start":{"line":74,"column":10},"end":{"line":74,"column":26}},"11":{"start":{"line":75,"column":10},"end":{"line":75,"column":51}},"12":{"start":{"line":77,"column":8},"end":{"line":82,"column":9}},"13":{"start":{"line":78,"column":10},"end":{"line":80,"column":11}},"14":{"start":{"line":78,"column":23},"end":{"line":78,"column":24}},"15":{"start":{"line":79,"column":12},"end":{"line":79,"column":60}},"16":{"start":{"line":81,"column":10},"end":{"line":81,"column":38}},"17":{"start":{"line":88,"column":4},"end":{"line":88,"column":26}},"18":{"start":{"line":95,"column":52},"end":{"line":95,"column":69}},"19":{"start":{"line":96,"column":4},"end":{"line":96,"column":32}},"20":{"start":{"line":97,"column":4},"end":{"line":99,"column":5}},"21":{"start":{"line":98,"column":6},"end":{"line":98,"column":32}},"22":{"start":{"line":100,"column":4},"end":{"line":100,"column":22}},"23":{"start":{"line":102,"column":4},"end":{"line":108,"column":6}},"24":{"start":{"line":103,"column":6},"end":{"line":103,"column":37}},"25":{"start":{"line":104,"column":6},"end":{"line":107,"column":7}},"26":{"start":{"line":105,"column":8},"end":{"line":105,"column":15}},"27":{"start":{"line":106,"column":8},"end":{"line":106,"column":20}},"28":{"start":{"line":111,"column":2},"end":{"line":111,"column":36}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":47,"column":13},"end":{"line":47,"column":14}},"loc":{"start":{"line":47,"column":19},"end":{"line":47,"column":28}},"line":47},"1":{"name":"safe_not_equal","decl":{"start":{"line":49,"column":16},"end":{"line":49,"column":30}},"loc":{"start":{"line":49,"column":55},"end":{"line":53,"column":1}},"line":49},"2":{"name":"writable","decl":{"start":{"line":60,"column":16},"end":{"line":60,"column":24}},"loc":{"start":{"line":63,"column":15},"end":{"line":112,"column":1}},"line":63},"3":{"name":"set","decl":{"start":{"line":67,"column":11},"end":{"line":67,"column":14}},"loc":{"start":{"line":67,"column":35},"end":{"line":85,"column":3}},"line":67},"4":{"name":"update","decl":{"start":{"line":87,"column":11},"end":{"line":87,"column":17}},"loc":{"start":{"line":87,"column":40},"end":{"line":89,"column":3}},"line":87},"5":{"name":"subscribe","decl":{"start":{"line":91,"column":11},"end":{"line":91,"column":20}},"loc":{"start":{"line":94,"column":18},"end":{"line":109,"column":3}},"line":94},"6":{"name":"(anonymous_6)","decl":{"start":{"line":102,"column":11},"end":{"line":102,"column":12}},"loc":{"start":{"line":102,"column":17},"end":{"line":108,"column":5}},"line":102}},"branchMap":{"0":{"loc":{"start":{"line":50,"column":9},"end":{"line":52,"column":72}},"type":"cond-expr","locations":[{"start":{"line":51,"column":6},"end":{"line":51,"column":12}},{"start":{"line":52,"column":6},"end":{"line":52,"column":72}}],"line":50},"1":{"loc":{"start":{"line":52,"column":6},"end":{"line":52,"column":72}},"type":"binary-expr","locations":[{"start":{"line":52,"column":6},"end":{"line":52,"column":13}},{"start":{"line":52,"column":18},"end":{"line":52,"column":19}},{"start":{"line":52,"column":23},"end":{"line":52,"column":44}},{"start":{"line":52,"column":49},"end":{"line":52,"column":72}}],"line":52},"2":{"loc":{"start":{"line":62,"column":2},"end":{"line":62,"column":36}},"type":"default-arg","locations":[{"start":{"line":62,"column":32},"end":{"line":62,"column":36}}],"line":62},"3":{"loc":{"start":{"line":68,"column":4},"end":{"line":84,"column":5}},"type":"if","locations":[{"start":{"line":68,"column":4},"end":{"line":84,"column":5}},{"start":{"line":68,"column":4},"end":{"line":84,"column":5}}],"line":68},"4":{"loc":{"start":{"line":70,"column":6},"end":{"line":83,"column":7}},"type":"if","locations":[{"start":{"line":70,"column":6},"end":{"line":83,"column":7}},{"start":{"line":70,"column":6},"end":{"line":83,"column":7}}],"line":70},"5":{"loc":{"start":{"line":77,"column":8},"end":{"line":82,"column":9}},"type":"if","locations":[{"start":{"line":77,"column":8},"end":{"line":82,"column":9}},{"start":{"line":77,"column":8},"end":{"line":82,"column":9}}],"line":77},"6":{"loc":{"start":{"line":93,"column":4},"end":{"line":93,"column":37}},"type":"default-arg","locations":[{"start":{"line":93,"column":33},"end":{"line":93,"column":37}}],"line":93},"7":{"loc":{"start":{"line":97,"column":4},"end":{"line":99,"column":5}},"type":"if","locations":[{"start":{"line":97,"column":4},"end":{"line":99,"column":5}},{"start":{"line":97,"column":4},"end":{"line":99,"column":5}}],"line":97},"8":{"loc":{"start":{"line":98,"column":13},"end":{"line":98,"column":31}},"type":"binary-expr","locations":[{"start":{"line":98,"column":13},"end":{"line":98,"column":23}},{"start":{"line":98,"column":27},"end":{"line":98,"column":31}}],"line":98},"9":{"loc":{"start":{"line":104,"column":6},"end":{"line":107,"column":7}},"type":"if","locations":[{"start":{"line":104,"column":6},"end":{"line":107,"column":7}},{"start":{"line":104,"column":6},"end":{"line":107,"column":7}}],"line":104},"10":{"loc":{"start":{"line":104,"column":10},"end":{"line":104,"column":40}},"type":"binary-expr","locations":[{"start":{"line":104,"column":10},"end":{"line":104,"column":14}},{"start":{"line":104,"column":18},"end":{"line":104,"column":40}}],"line":104}},"s":{"0":1,"1":1,"2":291,"3":136,"4":64,"5":136,"6":109,"7":109,"8":93,"9":93,"10":163,"11":163,"12":93,"13":50,"14":50,"15":163,"16":50,"17":8,"18":103,"19":103,"20":103,"21":64,"22":103,"23":103,"24":103,"25":103,"26":64,"27":64,"28":64},"f":{"0":291,"1":136,"2":64,"3":136,"4":8,"5":103,"6":103},"b":{"0":[0,136],"1":[136,27,4,27],"2":[64],"3":[109,27],"4":[93,16],"5":[50,43],"6":[103],"7":[64,39],"8":[64,64],"9":[64,39],"10":[103,103]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"722c6dca797eafc4298feb525b665ca8fc6430f3"}
}

@@ -31,3 +31,3 @@ /*! *****************************************************************************

*/
var p;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:f}),(null!==(o=globalThis.reactiveElementVersions)&&void 0!==o?o:globalThis.reactiveElementVersions=[]).push("1.3.0");const v=globalThis.trustedTypes,y=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,g="?"+m,A=`<${g}>`,b=document,_=(t="")=>b.createComment(t),$=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S=/-->/g,O=/>/g,C=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,T=/'/g,k=/"/g,x=/^(?:script|style|textarea|title)$/i,P=(t=>(e,...n)=>({_$litType$:t,strings:e,values:n}))(1),N=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),V=new WeakMap,U=b.createTreeWalker(b,129,null,!1),D=(t,e)=>{const n=t.length-1,r=[];let i,s=2===e?"<svg>":"",o=w;for(let e=0;e<n;e++){const n=t[e];let a,l,u=-1,d=0;for(;d<n.length&&(o.lastIndex=d,l=o.exec(n),null!==l);)d=o.lastIndex,o===w?"!--"===l[1]?o=S:void 0!==l[1]?o=O:void 0!==l[2]?(x.test(l[2])&&(i=RegExp("</"+l[2],"g")),o=C):void 0!==l[3]&&(o=C):o===C?">"===l[0]?(o=null!=i?i:w,u=-1):void 0===l[1]?u=-2:(u=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?C:'"'===l[3]?k:T):o===k||o===T?o=C:o===S||o===O?o=w:(o=C,i=void 0);const c=o===C&&t[e+1].startsWith("/>")?" ":"";s+=o===w?n+A:u>=0?(r.push(a),n.slice(0,u)+"$lit$"+n.slice(u)+m+c):n+m+(-2===u?(r.push(void 0),e):c)}const a=s+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==y?y.createHTML(a):a,r]};class H{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,s=0;const o=t.length-1,a=this.parts,[l,u]=D(t,e);if(this.el=H.createElement(l,n),U.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=U.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(m)){const n=u[s++];if(t.push(e),void 0!==n){const t=r.getAttribute(n.toLowerCase()+"$lit$").split(m),e=/([.?@])?(.*)/.exec(n);a.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?F:"?"===e[1]?B:"@"===e[1]?W:I})}else a.push({type:6,index:i})}for(const e of t)r.removeAttribute(e)}if(x.test(r.tagName)){const t=r.textContent.split(m),e=t.length-1;if(e>0){r.textContent=v?v.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],_()),U.nextNode(),a.push({type:2,index:++i});r.append(t[e],_())}}}else if(8===r.nodeType)if(r.data===g)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(m,t+1));)a.push({type:7,index:i}),t+=m.length-1}i++}}static createElement(t,e){const n=b.createElement("template");return n.innerHTML=t,n}}function L(t,e,n=t,r){var i,s,o,a;if(e===N)return e;let l=void 0!==r?null===(i=n._$Cl)||void 0===i?void 0:i[r]:n._$Cu;const u=$(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===u?l=void 0:(l=new u(t),l._$AT(t,n,r)),void 0!==r?(null!==(o=(a=n)._$Cl)&&void 0!==o?o:a._$Cl=[])[r]=l:n._$Cu=l),void 0!==l&&(e=L(t,l._$AS(t,e.values),l,r)),e}class M{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:n},parts:r}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:b).importNode(n,!0);U.currentNode=i;let s=U.nextNode(),o=0,a=0,l=r[0];for(;void 0!==l;){if(o===l.index){let e;2===l.type?e=new R(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new q(s,this,t)),this.v.push(e),l=r[++a]}o!==(null==l?void 0:l.index)&&(s=U.nextNode(),o++)}return i}m(t){let e=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class R{constructor(t,e,n,r){var i;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cg=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=L(this,t,e),$(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==N&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var e;return E(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==j&&$(this._$AH)?this._$AA.nextSibling.data=t:this.k(b.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=H.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.m(n);else{const t=new M(i,this),e=t.p(this.options);t.m(n),this.k(e),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new H(t)),e}S(t){E(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new R(this.A(_()),this.A(_()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class I{constructor(t,e,n,r,i){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let s=!1;if(void 0===i)t=L(this,t,e,0),s=!$(t)||t!==this._$AH&&t!==N,s&&(this._$AH=t);else{const r=t;let o,a;for(t=i[0],o=0;o<i.length-1;o++)a=L(this,r[n+o],e,o),a===N&&(a=this._$AH[o]),s||(s=!$(a)||a!==this._$AH[o]),a===j?t=j:t!==j&&(t+=(null!=a?a:"")+i[o+1]),this._$AH[o]=a}s&&!r&&this.C(t)}C(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends I{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===j?void 0:t}}const z=v?v.emptyScript:"";class B extends I{constructor(){super(...arguments),this.type=4}C(t){t&&t!==j?this.element.setAttribute(this.name,z):this.element.removeAttribute(this.name)}}class W extends I{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=L(this,t,e,0))&&void 0!==n?n:j)===N)return;const r=this._$AH,i=t===j&&r!==j||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==j&&(r===j||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class q{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const K=window.litHtmlPolyfillSupport;
var v;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:f}),(null!==(o=globalThis.reactiveElementVersions)&&void 0!==o?o:globalThis.reactiveElementVersions=[]).push("1.3.0");const p=globalThis.trustedTypes,y=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,g="?"+m,b=`<${g}>`,A=document,_=(t="")=>A.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S=/-->/g,O=/>/g,C=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,T=/'/g,k=/"/g,P=/^(?:script|style|textarea|title)$/i,x=(t=>(e,...n)=>({_$litType$:t,strings:e,values:n}))(1),V=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),j=new WeakMap,F=A.createTreeWalker(A,129,null,!1),L=(t,e)=>{const n=t.length-1,r=[];let i,s=2===e?"<svg>":"",o=w;for(let e=0;e<n;e++){const n=t[e];let a,l,u=-1,d=0;for(;d<n.length&&(o.lastIndex=d,l=o.exec(n),null!==l);)d=o.lastIndex,o===w?"!--"===l[1]?o=S:void 0!==l[1]?o=O:void 0!==l[2]?(P.test(l[2])&&(i=RegExp("</"+l[2],"g")),o=C):void 0!==l[3]&&(o=C):o===C?">"===l[0]?(o=null!=i?i:w,u=-1):void 0===l[1]?u=-2:(u=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?C:'"'===l[3]?k:T):o===k||o===T?o=C:o===S||o===O?o=w:(o=C,i=void 0);const c=o===C&&t[e+1].startsWith("/>")?" ":"";s+=o===w?n+b:u>=0?(r.push(a),n.slice(0,u)+"$lit$"+n.slice(u)+m+c):n+m+(-2===u?(r.push(void 0),e):c)}const a=s+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==y?y.createHTML(a):a,r]};class U{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,s=0;const o=t.length-1,a=this.parts,[l,u]=L(t,e);if(this.el=U.createElement(l,n),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=F.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(m)){const n=u[s++];if(t.push(e),void 0!==n){const t=r.getAttribute(n.toLowerCase()+"$lit$").split(m),e=/([.?@])?(.*)/.exec(n);a.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?R:"?"===e[1]?z:"@"===e[1]?W:M})}else a.push({type:6,index:i})}for(const e of t)r.removeAttribute(e)}if(P.test(r.tagName)){const t=r.textContent.split(m),e=t.length-1;if(e>0){r.textContent=p?p.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],_()),F.nextNode(),a.push({type:2,index:++i});r.append(t[e],_())}}}else if(8===r.nodeType)if(r.data===g)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(m,t+1));)a.push({type:7,index:i}),t+=m.length-1}i++}}static createElement(t,e){const n=A.createElement("template");return n.innerHTML=t,n}}function D(t,e,n=t,r){var i,s,o,a;if(e===V)return e;let l=void 0!==r?null===(i=n._$Cl)||void 0===i?void 0:i[r]:n._$Cu;const u=E(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===u?l=void 0:(l=new u(t),l._$AT(t,n,r)),void 0!==r?(null!==(o=(a=n)._$Cl)&&void 0!==o?o:a._$Cl=[])[r]=l:n._$Cu=l),void 0!==l&&(e=D(t,l._$AS(t,e.values),l,r)),e}class I{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:n},parts:r}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:A).importNode(n,!0);F.currentNode=i;let s=F.nextNode(),o=0,a=0,l=r[0];for(;void 0!==l;){if(o===l.index){let e;2===l.type?e=new H(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new q(s,this,t)),this.v.push(e),l=r[++a]}o!==(null==l?void 0:l.index)&&(s=F.nextNode(),o++)}return i}m(t){let e=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class H{constructor(t,e,n,r){var i;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cg=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=D(this,t,e),E(t)?t===N||null==t||""===t?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==V&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var e;return $(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==N&&E(this._$AH)?this._$AA.nextSibling.data=t:this.k(A.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=U.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.m(n);else{const t=new I(i,this),e=t.p(this.options);t.m(n),this.k(e),this._$AH=t}}_$AC(t){let e=j.get(t.strings);return void 0===e&&j.set(t.strings,e=new U(t)),e}S(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new H(this.A(_()),this.A(_()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class M{constructor(t,e,n,r,i){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=N}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let s=!1;if(void 0===i)t=D(this,t,e,0),s=!E(t)||t!==this._$AH&&t!==V,s&&(this._$AH=t);else{const r=t;let o,a;for(t=i[0],o=0;o<i.length-1;o++)a=D(this,r[n+o],e,o),a===V&&(a=this._$AH[o]),s||(s=!E(a)||a!==this._$AH[o]),a===N?t=N:t!==N&&(t+=(null!=a?a:"")+i[o+1]),this._$AH[o]=a}s&&!r&&this.C(t)}C(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends M{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===N?void 0:t}}const B=p?p.emptyScript:"";class z extends M{constructor(){super(...arguments),this.type=4}C(t){t&&t!==N?this.element.setAttribute(this.name,B):this.element.removeAttribute(this.name)}}class W extends M{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=D(this,t,e,0))&&void 0!==n?n:N)===V)return;const r=this._$AH,i=t===N&&r!==N||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==N&&(r===N||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class q{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const K=window.litHtmlPolyfillSupport;
/**

@@ -38,3 +38,3 @@ * @license

*/
var J,Z;null==K||K(H,R),(null!==(p=globalThis.litHtmlVersions)&&void 0!==p?p:globalThis.litHtmlVersions=[]).push("2.2.0");class X extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,n)=>{var r,i;const s=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let o=s._$litPart$;if(void 0===o){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;s._$litPart$=o=new R(e.insertBefore(_(),t),t,void 0,null!=n?n:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return N}}X.finalized=!0,X._$litElement$=!0,null===(J=globalThis.litElementHydrateSupport)||void 0===J||J.call(globalThis,{LitElement:X});const G=globalThis.litElementPolyfillSupport;null==G||G({LitElement:X}),(null!==(Z=globalThis.litElementVersions)&&void 0!==Z?Z:globalThis.litElementVersions=[]).push("3.2.0");
var J,Z;null==K||K(U,H),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.2.0");class X extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,n)=>{var r,i;const s=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let o=s._$litPart$;if(void 0===o){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;s._$litPart$=o=new H(e.insertBefore(_(),t),t,void 0,null!=n?n:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return V}}X.finalized=!0,X._$litElement$=!0,null===(J=globalThis.litElementHydrateSupport)||void 0===J||J.call(globalThis,{LitElement:X});const G=globalThis.litElementPolyfillSupport;null==G||G({LitElement:X}),(null!==(Z=globalThis.litElementVersions)&&void 0!==Z?Z:globalThis.litElementVersions=[]).push("3.2.0");
/**

@@ -45,3 +45,3 @@ * @license

*/
const Q=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,t)}};
const Q=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:n,elements:r}=e;return{kind:n,elements:r,finisher(e){window.customElements.define(t,e)}}})(t,e)
/**

@@ -51,9 +51,14 @@ * @license

* SPDX-License-Identifier: BSD-3-Clause
*/
*/,Y=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,t)}};function tt(t){return(e,n)=>void 0!==n?((t,e,n)=>{e.constructor.createProperty(n,t)})(t,e,n):Y(t,e)
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var Y;const tt=null!=(null===(Y=window.HTMLSlotElement)||void 0===Y?void 0:Y.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function et(t){let e;return function(t,...e){const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(t,(t=>e=t))(),e}class nt extends Error{constructor(t,e){super(t),this.name="FelteSubmitError",this.response=e}}function rt(t){var e;return"INPUT"===(null===(e=t)||void 0===e?void 0:e.nodeName)}function it(t){var e;return"SELECT"===(null===(e=t)||void 0===e?void 0:e.nodeName)}function st(t){var e;return"FIELDSET"===(null===(e=t)||void 0===e?void 0:e.nodeName)}function ot(t){return rt(t)||function(t){var e;return"TEXTAREA"===(null===(e=t)||void 0===e?void 0:e.nodeName)}(t)||it(t)}function at(t){return t.nodeType===Node.ELEMENT_NODE}function lt(t,e,n){const r=n=>String.prototype.split.call(e,n).filter(Boolean).reduce(((t,e)=>null!=t?t[e]:t),t),i=r(/[,[\]]+?/)||r(/[,[\].]+?/);return void 0===i||i===t?n:i}function ut(t){return"[object Object]"===Object.prototype.toString.call(t)}function dt(t){return Object.keys(t||{}).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:ut(t[n])?dt(t[n]):Array.isArray(t[n])?[...t[n]]:t[n]})),{})}function ct(t,e,n){t&&(t=dt(t)),ut(t)||(t={});const r=Array.isArray(e)?e:e.match(/[^.[\]]+/g)||[],i=r[r.length-1];if(!i)return t;let s=t;for(let t=0;t<r.length-1;t++){const e=r[t];if(!s[e]||!ut(s[e])&&!Array.isArray(s[e])){const n=r[t+1];isNaN(Number(n))?s[e]={}:s[e]=[]}s=s[e]}return s[i]=n(s[i]),t}function ht(t,e,n){return ct(t,e,(()=>n))}function ft(t,e){return null!=e?e:ot(t)?t.name:""}function pt(t){if(ot(t))return[t];if(0===t.childElementCount)return[];const e=new Set;for(const n of t.children){if(ot(n)&&e.add(n),st(n))for(const t of n.elements)ot(t)&&e.add(t);n.childElementCount>0&&pt(n).forEach((t=>e.add(t)))}return Array.from(e)}function vt(t){for(const e of t.elements)(ot(e)||st(e))&&t.hasAttribute("data-felte-keep-on-remove")&&!e.hasAttribute("data-felte-keep-on-remove")&&(e.dataset.felteKeepOnRemove=t.dataset.felteKeepOnRemove)}function yt(t){return t.type.match(/^(number|range)$/)?t.value?+t.value:void 0:t.value}function mt(t){var e;let n={},r={};for(const i of t.elements){if(st(i)&&vt(i),!ot(i)||!i.name)continue;const s=ft(i);if(rt(i)){if("checkbox"===i.type){if(void 0===lt(n,s)){if(1===Array.from(t.querySelectorAll(`[name="${i.name}"]`)).filter((t=>!!ot(t)&&s===ft(t))).length){n=ht(n,s,i.checked),r=ht(r,s,!1);continue}n=ht(n,s,i.checked?[i.value]:[]),r=ht(r,s,!1);continue}Array.isArray(lt(n,s))&&i.checked&&(n=ct(n,s,(t=>[...t,i.value])));continue}if("radio"===i.type){if(lt(n,s))continue;n=ht(n,s,i.checked?i.value:void 0),r=ht(r,s,!1);continue}if("file"===i.type){n=ht(n,s,i.multiple?Array.from(i.files||[]):null===(e=i.files)||void 0===e?void 0:e[0]),r=ht(r,s,!1);continue}}else if(it(i)){if(i.multiple){const t=Array.from(i.options).filter((t=>t.selected)).map((t=>t.value));n=ht(n,s,t)}else n=ht(n,s,i.value);r=ht(r,s,!1);continue}const o=yt(i);n=ht(n,s,o),r=ht(r,s,!1)}return{defaultData:n,defaultTouched:r}}function gt(t,e){var n;if(!ot(t))return;const r=e;if(rt(t)){if("checkbox"===t.type){const e=r;return void 0===e||"boolean"==typeof e?void(t.checked=!!e):void(Array.isArray(e)&&(e.includes(t.value)?t.checked=!0:t.checked=!1))}if("radio"===t.type){const e=r;return void(t.value===e?t.checked=!0:t.checked=!1)}if("file"===t.type)return t.files=null,void(t.value="")}else if(it(t)){if(t.multiple){if(Array.isArray(r)){t.value=String(null!==(n=r[0])&&void 0!==n?n:"");for(const e of t.options)r.includes(e.value)?e.selected=!0:e.selected=!1}}else{t.value=String(null!=r?r:"");for(const e of t.options)e.value===r?e.selected=!0:e.selected=!1}return}t.value=String(null!=r?r:"")}function At(t,e){for(const n of t.elements){if(st(n)&&vt(n),!ot(n)||!n.name)continue;gt(n,lt(e,ft(n)))}}
var et;const nt=null!=(null===(et=window.HTMLSlotElement)||void 0===et?void 0:et.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function rt(t){const{slot:e,selector:n}=null!=t?t:{};return(({finisher:t,descriptor:e})=>(n,r)=>{var i;if(void 0===r){const r=null!==(i=n.originalKey)&&void 0!==i?i:n.key,s=null!=e?{kind:"method",placement:"prototype",key:r,descriptor:e(n.key)}:{...n,key:r};return null!=t&&(s.finisher=function(e){t(e,r)}),s}{const i=n.constructor;void 0!==e&&Object.defineProperty(n,r,e(r)),null==t||t(i,r)}})({descriptor:r=>({get(){var r;const i="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(i),o=null!=s?nt(s,t):[];return n?o.filter((t=>t.matches(n))):o},enumerable:!0,configurable:!0})})}function it(t){let e;return function(t,...e){const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(t,(t=>e=t))(),e}class st extends Error{constructor(t,e){super(t),this.name="FelteSubmitError",this.response=e}}function ot(t){var e;return"INPUT"===(null===(e=t)||void 0===e?void 0:e.nodeName)}function at(t){var e;return"SELECT"===(null===(e=t)||void 0===e?void 0:e.nodeName)}function lt(t){var e;return"FIELDSET"===(null===(e=t)||void 0===e?void 0:e.nodeName)}function ut(t){return ot(t)||function(t){var e;return"TEXTAREA"===(null===(e=t)||void 0===e?void 0:e.nodeName)}(t)||at(t)}function dt(t){return t.nodeType===Node.ELEMENT_NODE}function ct(t,e,n){const r=n=>String.prototype.split.call(e,n).filter(Boolean).reduce(((t,e)=>null!=t?t[e]:t),t),i=r(/[,[\]]+?/)||r(/[,[\].]+?/);return void 0===i||i===t?n:i}function ht(t){return"[object Object]"===Object.prototype.toString.call(t)}function ft(t){return Object.keys(t||{}).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:ht(t[n])?ft(t[n]):Array.isArray(t[n])?[...t[n]]:t[n]})),{})}function vt(t,e,n){t&&(t=ft(t)),ht(t)||(t={});const r=Array.isArray(e)?e:e.match(/[^.[\]]+/g)||[],i=r[r.length-1];if(!i)return t;let s=t;for(let t=0;t<r.length-1;t++){const e=r[t];if(!s[e]||!ht(s[e])&&!Array.isArray(s[e])){const n=r[t+1];isNaN(Number(n))?s[e]={}:s[e]=[]}s=s[e]}return s[i]=n(s[i]),t}function pt(t,e,n){return vt(t,e,(()=>n))}function yt(t,e){return null!=e?e:ut(t)?t.name:""}function mt(t){if(ut(t))return[t];if(0===t.childElementCount)return[];const e=new Set;for(const n of t.children){if(ut(n)&&e.add(n),lt(n))for(const t of n.elements)ut(t)&&e.add(t);n.childElementCount>0&&mt(n).forEach((t=>e.add(t)))}return Array.from(e)}function gt(t){for(const e of t.elements)(ut(e)||lt(e))&&t.hasAttribute("data-felte-keep-on-remove")&&!e.hasAttribute("data-felte-keep-on-remove")&&(e.dataset.felteKeepOnRemove=t.dataset.felteKeepOnRemove)}function bt(t){return t.type.match(/^(number|range)$/)?t.value?+t.value:void 0:t.value}function At(t){var e;let n={},r={};for(const i of t.elements){if(lt(i)&&gt(i),!ut(i)||!i.name)continue;const s=yt(i);if(ot(i)){if("checkbox"===i.type){if(void 0===ct(n,s)){if(1===Array.from(t.querySelectorAll(`[name="${i.name}"]`)).filter((t=>!!ut(t)&&s===yt(t))).length){n=pt(n,s,i.checked),r=pt(r,s,!1);continue}n=pt(n,s,i.checked?[i.value]:[]),r=pt(r,s,!1);continue}Array.isArray(ct(n,s))&&i.checked&&(n=vt(n,s,(t=>[...t,i.value])));continue}if("radio"===i.type){if(ct(n,s))continue;n=pt(n,s,i.checked?i.value:void 0),r=pt(r,s,!1);continue}if("file"===i.type){n=pt(n,s,i.multiple?Array.from(i.files||[]):null===(e=i.files)||void 0===e?void 0:e[0]),r=pt(r,s,!1);continue}}else if(at(i)){if(i.multiple){const t=Array.from(i.options).filter((t=>t.selected)).map((t=>t.value));n=pt(n,s,t)}else n=pt(n,s,i.value);r=pt(r,s,!1);continue}const o=bt(i);n=pt(n,s,o),r=pt(r,s,!1)}return{defaultData:n,defaultTouched:r}}function _t(t,e){var n;if(!ut(t))return;const r=e;if(ot(t)){if("checkbox"===t.type){const e=r;return void 0===e||"boolean"==typeof e?void(t.checked=!!e):void(Array.isArray(e)&&(e.includes(t.value)?t.checked=!0:t.checked=!1))}if("radio"===t.type){const e=r;return void(t.value===e?t.checked=!0:t.checked=!1)}if("file"===t.type)return t.files=null,void(t.value="")}else if(at(t)){if(t.multiple){if(Array.isArray(r)){t.value=String(null!==(n=r[0])&&void 0!==n?n:"");for(const e of t.options)r.includes(e.value)?e.selected=!0:e.selected=!1}}else{t.value=String(null!=r?r:"");for(const e of t.options)e.value===r?e.selected=!0:e.selected=!1}return}t.value=String(null!=r?r:"")}function Et(t,e){for(const n of t.elements){if(lt(n)&&gt(n),!ut(n)||!n.name)continue;_t(n,ct(e,yt(n)))}}const $t={attributes:!0,attributeFilter:["data-felte-validation-message","aria-invalid"]};
/*! *****************************************************************************

@@ -72,3 +77,4 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function bt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function _t(t,e){return Object.keys(t).reduce(((n,r)=>Object.assign(Object.assign({},n),{[r]:e(t[r])})),{})}function $t(t,e){return _t(t,(t=>ut(t)?$t(t,e):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?e:t.map((t=>bt($t(t,e),["key"]))):e))}function Et(t=8){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function wt(t){return t?_t(t,(t=>ut(t)?wt(t):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?t:t.map((t=>{if(!ut(t))return t;const e=wt(t);return e.key||(e.key=Et()),e})):t)):{}}function St(t){return t?_t(t,(t=>ut(t)?wt(t):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?t:t.map((t=>{if(!ut(t))return t;return bt(wt(t),["key"])})):t)):{}}
***************************************************************************** */
function wt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function St(t,e){return Object.keys(t).reduce(((n,r)=>Object.assign(Object.assign({},n),{[r]:e(t[r])})),{})}function Ot(t,e){return St(t,(t=>ht(t)?Ot(t,e):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?e:t.map((t=>wt(Ot(t,e),["key"]))):e))}function Ct(t=8){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function Tt(t){return t?St(t,(t=>ht(t)?Tt(t):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?t:t.map((t=>{if(!ht(t))return t;const e=Tt(t);return e.key||(e.key=Ct()),e})):t)):{}}function kt(t){return t?St(t,(t=>ht(t)?Tt(t):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?t:t.map((t=>{if(!ht(t))return t;return wt(Tt(t),["key"])})):t)):{}}
/*! *****************************************************************************

@@ -87,3 +93,3 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Ot(t){return function(e){if(ut(e)){return function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(Ct(e,t),["key"])}return t}}function Ct(t,e){return _t(t,(t=>ut(t)?Ct(t,e):Array.isArray(t)?t.map(Ot(e)):e))}function Tt(t,e){if(!t||Object(t)!==t)return;void 0!==t&&(t=dt(t));const n=Array.isArray(e)?e:e.toString().match(/[^.[\]]+/g)||[],r=1===n.length?t:lt(t,n.slice(0,-1).join("."));return Array.isArray(r)?r.splice(Number(n[n.length-1]),1):null==r||delete r[n[n.length-1]],t}function kt(t,e,n,r){return ct(t,e,(t=>void 0===t||Array.isArray(t)?(t||(t=[]),void 0===r?t.push(n):t.splice(r,0,n),t):t))}function xt(t){return"function"==typeof t}function Pt(t){return(e,n)=>{if("string"==typeof e){const r=e;t((t=>{const e=xt(n)?n(lt(t,r)):n;return ht(t,r,e)}))}else t((t=>xt(e)?e(t):e))}}function Nt({stores:t,config:e,validateErrors:n,validateWarnings:r}){var i;let s,o=wt(null!==(i=e.initialValues)&&void 0!==i?i:{});const{data:a,touched:l,errors:u,warnings:d,isDirty:c,isSubmitting:h,interacted:f}=t,p=Pt(a.update),v=Pt(l.update),y=Pt(u.update),m=Pt(d.update);function g(t){p((e=>{const n=t(e);return s&&At(s,n),n}))}const A=(t,e,n)=>{Pt(g)(t,e),"string"==typeof t&&n&&v(t,!0)};function b(t){u.update(t),d.update(t),l.update(t),a.update((e=>{const n=t(e);return setTimeout((()=>s&&At(s,n))),n}))}const _=Pt(h.update),$=Pt(c.update),E=Pt(f.update);return{public:{setData:p,setFields:A,setTouched:v,setErrors:y,setWarnings:m,setIsSubmitting:_,setIsDirty:$,setInteracted:E,validate:async function(){const t=et(a);l.set($t(t,!0)),f.set(null);const e=await n(t);return await r(t),e},reset:function(){A(dt(o)),v((t=>Ct(t,!1))),f.set(null),c.set(!1)},unsetField:function(t){b((e=>Tt(e,t)))},resetField:function(t){const e=lt(o,t),n=!!ut(e)&&$t(e,!1),r=ut(n)?Ct(n,[]):[];a.update((n=>{const r=ht(n,t,e);return s&&At(s,r),r})),l.update((e=>ht(e,t,n))),u.update((e=>ht(e,t,r))),d.update((e=>ht(e,t,r)))},addField:function(t,e,n){const r=!!ut(e)&&$t(e,!1),i=ut(r)?Ct(r,[]):[];e=ut(e)?Object.assign(Object.assign({},e),{key:Et()}):e,u.update((e=>kt(e,t,i,n))),d.update((e=>kt(e,t,i,n))),l.update((e=>kt(e,t,r,n))),a.update((r=>{const i=kt(r,t,e,n);return setTimeout((()=>s&&At(s,i))),i}))},swapFields:function(t,e,n){b((r=>function(t,e,n,r){return ct(t,e,(t=>t&&Array.isArray(t)?([t[n],t[r]]=[t[r],t[n]],t):t))}(r,t,e,n)))},moveField:function(t,e,n){b((r=>function(t,e,n,r){return ct(t,e,(t=>t&&Array.isArray(t)?(t.splice(r,0,t.splice(n,1)[0]),t):t))}(r,t,e,n)))},setInitialValues:t=>{o=wt(t)}},private:{_setFormNode(t){s=t},_getFormNode:()=>s,_getInitialValues:()=>o}}}function jt(...t){const e=t.pop(),n=dt(t.shift());if(0===t.length)return n;for(const r of t){if(!r)continue;let t=e(n,r);if(void 0!==t)return t;const i=Array.from(new Set(Object.keys(n).concat(Object.keys(r))));for(const s of i)if(t=e(n[s],r[s]),void 0!==t)n[s]=t;else if(ut(r[s])&&ut(n[s]))n[s]=jt(n[s],r[s],e);else if(Array.isArray(r[s]))n[s]=r[s].map(((t,r)=>{if(!ut(t))return t;return jt(Array.isArray(n[s])?n[s][r]:n[s],t,e)}));else if(ut(r[s])){const t=Ct(dt(r[s]),void 0);n[s]=jt(t,r[s],e)}else void 0!==r[s]&&(n[s]=r[s])}return n}function Vt(...t){return jt(...t,(()=>{}))}function Ut(t,e){return function(t,e){return Object.keys(t).some((n=>e(t[n])))}(t,(t=>ut(t)?Ut(t,e):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?e(t):t.some((t=>ut(t)?Ut(t,e):e(t))):e(t)))}function Dt(t){let e=t;for(;e&&"FORM"!==e.nodeName;){if(e.hasAttribute("data-felte-ignore"))return!0;e=e.parentElement}return!1}function Ht(t,e){if(!ut(t)||!ut(e)){if(Array.isArray(e)){if(e.some(ut))return;const n=Array.isArray(t)?t:[];return e.map(((t,e)=>{var r;return null!==(r=n[e])&&void 0!==r?r:t}))}return void 0!==t?t:void 0}}function Lt(...t){return jt(...t,Ht)}function Mt({helpers:t,stores:e,config:n,extender:r,validateErrors:i,validateWarnings:s,_setFormNode:o,_getFormNode:a,_getInitialValues:l,_setCurrentExtenders:u,_getCurrentExtenders:d}){const{setFields:c,setTouched:h,reset:f,setInitialValues:p}=t,{addValidator:v,addTransformer:y,validate:m,setIsDirty:g,setIsSubmitting:A}=t,b=bt(t,["addValidator","addTransformer","validate","setIsDirty","setIsSubmitting"]),{data:_,errors:$,warnings:E,touched:w,isSubmitting:S,isDirty:O,interacted:C}=e;function T(t){var e,r;const o=null!==(e=null==t?void 0:t.onError)&&void 0!==e?e:n.onError,l=null!==(r=null==t?void 0:t.onSuccess)&&void 0!==r?r:n.onSuccess;return async function(e){var r,u;const c=a(),h=null!==(u=null!==(r=null==t?void 0:t.onSubmit)&&void 0!==r?r:n.onSubmit)&&void 0!==u?u:function(t){if(t)return async function(){let e=new FormData(t);const n=new URL(t.action),r="get"===t.method.toLowerCase()?"get":n.searchParams.get("_method")||t.method;let i,s=t.enctype;t.querySelector('input[type="file"]')&&(s="multipart/form-data"),"get"!==r&&"application/x-www-form-urlencoded"!==s||(e=new URLSearchParams(e)),"get"===r?(e.forEach(((t,e)=>{n.searchParams.append(e,t)})),i={method:r}):i={method:r,body:e,headers:{"Content-Type":s}};const o=await window.fetch(n.toString(),i);if(o.ok)return o;throw new nt("An error occurred while submitting the form",o)}}(c);if(!h)return;null==e||e.preventDefault(),S.set(!0),C.set(null);const f=St(et(_)),p=await i(f,null==t?void 0:t.validate),v=await s(f,null==t?void 0:t.warn);if(v&&E.set(Vt(Ct(f,[]),v)),w.set($t(f,!0)),p){if(Ut(p,(t=>Array.isArray(t)?t.length>=1:!!t)))return await new Promise((t=>setTimeout(t))),d().forEach((t=>{var e;return null===(e=t.onSubmitError)||void 0===e?void 0:e.call(t,{data:f,errors:p})})),void S.set(!1)}const y=Object.assign(Object.assign({},b),{form:c,controls:c&&Array.from(c.elements).filter(ot),config:Object.assign(Object.assign({},n),t)});try{const t=await h(f,y);null==c||c.dispatchEvent(new CustomEvent("feltesuccess",{detail:Object.assign({response:t},y)})),await(null==l?void 0:l(t,y))}catch(t){if(null==c||c.dispatchEvent(new CustomEvent("felteerror",{detail:Object.assign({error:t},y)})),!o)return;const e=await o(t,y);e&&($.set(e),await new Promise((t=>setTimeout(t))),d().forEach((t=>{var n;return null===(n=t.onSubmitError)||void 0===n?void 0:n.call(t,{data:f,errors:e})})))}finally{S.set(!1)}}}const k=T();return{form:function(t){function e(e){return function(r){return r({form:t,stage:e,controls:Array.from(t.elements).filter(ot),data:_,errors:$,warnings:E,touched:w,config:n,addValidator:v,addTransformer:y,setFields:c,validate:m,reset:f})}}t.requestSubmit||(t.requestSubmit=k),u(r.map(e("MOUNT"))),t.noValidate=!!n.validate;const{defaultData:i,defaultTouched:s}=mt(t);function a(t){const e=t.target;if(!e||!ot(e)||it(e)||Dt(e))return;if(["checkbox","radio","file"].includes(e.type))return;if(!e.name)return;O.set(!0);const n=yt(e);C.set(e.name),_.update((t=>ht(t,ft(e),n)))}function g(e){const n=e.target;if(n&&ot(n)&&!Dt(n)&&n.name)if(h(ft(n),!0),C.set(n.name),(it(n)||["checkbox","radio","file","hidden"].includes(n.type))&&O.set(!0),"hidden"===n.type&&_.update((t=>ht(t,ft(n),n.value))),it(n))!function(t){if(t.multiple){const e=Array.from(t.options).filter((t=>t.selected)).map((t=>t.value));_.update((n=>ht(n,ft(t),e)))}else _.update((e=>ht(e,ft(t),t.value)))}(n);else{if(!rt(n))return;"checkbox"===n.type?function(e){const n=ft(e),r=Array.from(t.querySelectorAll(`[name="${e.name}"]`)).filter((t=>!!ot(t)&&n===ft(t)));if(0!==r.length)1===r.length?_.update((t=>ht(t,ft(e),e.checked))):_.update((t=>ht(t,ft(e),r.filter(rt).filter((t=>t.checked)).map((t=>t.value)))))}(n):"radio"===n.type?function(e){const n=t.querySelectorAll(`[name="${e.name}"]`),r=Array.from(n).find((t=>rt(t)&&t.checked));_.update((t=>ht(t,ft(e),null==r?void 0:r.value)))}(n):"file"===n.type&&function(t){var e;const n=Array.from(null!==(e=t.files)&&void 0!==e?e:[]);_.update((e=>ht(e,ft(t),t.multiple?n:n[0])))}(n)}}function A(t){const e=t.target;e&&ot(e)&&!Dt(e)&&e.name&&(h(ft(e),!0),C.set(e.name))}function b(t){t.preventDefault(),f()}function S(t){for(const e of t.reverse()){if(e.hasAttribute("data-felte-keep-on-remove")&&"false"!==e.dataset.felteKeepOnRemove)continue;const t=/.*(\[[0-9]+\]|\.[0-9]+)\.[^.]+$/;let n=ft(e);const r=et(w);if(t.test(n)){const t=n.split(".").slice(0,-1).join("."),e=lt(r,t);ut(e)&&Object.keys(e).length<=1&&(n=t)}_.update((t=>Tt(t,n))),w.update((t=>Tt(t,n))),$.update((t=>Tt(t,n))),E.update((t=>Tt(t,n)))}}o(t),p(Vt(dt(i),l())),c(l()),w.set(s);const T=new MutationObserver((function(n){for(const i of n)if("childList"===i.type){if(i.addedNodes.length>0){if(!Array.from(i.addedNodes).some((t=>{if(!at(t))return!1;if(ot(t))return!0;return pt(t).length>0})))continue;d().forEach((t=>{var e;return null===(e=t.destroy)||void 0===e?void 0:e.call(t)})),u(r.map(e("UPDATE")));const{defaultData:n,defaultTouched:s}=mt(t);_.update((t=>Lt(t,n))),w.update((t=>Lt(t,s)))}if(i.removedNodes.length>0)for(const t of i.removedNodes){if(!at(t))continue;const n=pt(t);0!==n.length&&(d().forEach((t=>{var e;return null===(e=t.destroy)||void 0===e?void 0:e.call(t)})),u(r.map(e("UPDATE"))),S(n))}}}));T.observe(t,{childList:!0,subtree:!0}),t.addEventListener("input",a),t.addEventListener("change",g),t.addEventListener("focusout",A),t.addEventListener("submit",k),t.addEventListener("reset",b);const x=$.subscribe((e=>{for(const n of t.elements){if(!ot(n)||!n.name)continue;const t=lt(e,ft(n)),r=Array.isArray(t)?t.join("\n"):"string"==typeof t?t:void 0;r!==n.dataset.felteValidationMessage&&(r?(n.dataset.felteValidationMessage=r,n.setAttribute("aria-invalid","true")):(delete n.dataset.felteValidationMessage,n.removeAttribute("aria-invalid")))}}));return{destroy(){T.disconnect(),t.removeEventListener("input",a),t.removeEventListener("change",g),t.removeEventListener("focusout",A),t.removeEventListener("submit",k),t.removeEventListener("reset",b),x(),d().forEach((t=>{var e;return null===(e=t.destroy)||void 0===e?void 0:e.call(t)}))}}},createSubmitHandler:T,handleSubmit:k}}function Rt(t,e){return e?Array.isArray(e)?e.reduce(((t,e)=>e(t)),t):e(t):t}function It(t,e){if(!ut(t)&&!ut(e)){if(null===t||""===t)return e;if(null===e||""===e)return t;if(!e)return t;if(t&&e){if(Array.isArray(t)){if(!Array.isArray(e))return[...t,e];const n=[],r=Math.max(e.length,t.length);for(let i=0;i<r;i++){let r=t[i],s=e[i];ut(r)||ut(s)?n.push(Ft([null!=r?r:{},null!=s?s:{}])):(Array.isArray(r)||(r=[r]),Array.isArray(s)||(s=[s]),n.push(...r,...s))}return n.filter(Boolean)}return Array.isArray(e)||(e=[e]),[t,...e].reduce(((t,e)=>t.concat(e)),[]).filter(Boolean)}}}function Ft(t){return jt(...t,It)}function zt(t,e){if(ut(t))return!e||ut(e)&&0===Object.keys(e).length?Ct(t,null):void 0;if(Array.isArray(t)){if(t.some(ut))return;const n=Array.isArray(e)?e:[];return t.map(((t,e)=>{const r=n[e];return Array.isArray(r)&&0===r.length?null:t&&r||null}))}return Array.isArray(e)&&0===e.length?null:Array.isArray(e)?t?e:null:t&&e?[e]:null}function Bt(t,e){if(ut(t))return!e||ut(e)&&0===Object.keys(e).length?Ct(t,null):void 0;if(Array.isArray(t)){if(t.some(ut))return;const n=Array.isArray(e)?e:[];return t.map(((t,e)=>{const r=n[e];return Array.isArray(r)&&0===r.length?null:r||null}))}return Array.isArray(e)&&0===e.length?null:Array.isArray(e)?e:e?[e]:null}function Wt([t,e]){return jt(e,t,zt)}function qt([t,e]){return jt(e,t,Bt)}function Kt(t,e=300){let n;return(...r)=>{clearTimeout(n),n=setTimeout((()=>{t.apply(this,r)}),e)}}function Jt(t,e){var n,r,i,s,o,a,l;const u=function(t){return function(e,n,r){const i=Array.isArray(e)?e:[e],s=new Array(i.length),o=t(r),a=o.set,l=o.subscribe;let u;return o.subscribe=function(t){const e=l(t);return()=>{e()}},[o,function(){u=i.map(((t,e)=>t.subscribe((t=>{s[e]=t,a(n(s))}))))},function(){null==u||u.forEach((t=>t()))}]}}(t),d=e.initialValues=e.initialValues?wt(Rt(dt(e.initialValues),e.transform)):{},c=$t(St(d),!1),h=t(c),f=t(0),[p,v,y]=u([h,f],(([t,e])=>Ut(t,(t=>!!t))&&e>=1),!1);function m(t){let e;return async function(n,r,i,s=!1){if(!i||!n)return;let o=r&&Object.keys(r).length>0?r:Ct(n,[]);const a=function(t){const e={aborted:!1,priority:t};return{signal:e,abort(){e.aborted=!0}}}(s);if((null==e?void 0:e.signal.priority)&&!s||(null==e||e.abort(),e=a),e.signal.priority&&!s)return;f.update((t=>t+1));const l=(u=n,(d=i)?(Array.isArray(d)?d:[d]).map((t=>t(u))):[]);var u,d;return l.forEach((async e=>{const n=await e;a.signal.aborted||(o=Ft([o,n]),t.set(o))})),await Promise.all(l),e=void 0,f.update((t=>t-1)),o}}delete p.set,delete p.update;let g=Ct(c,[]);const A=t(d),b=Ct(c,[]),_=t(b),$=t(dt(b)),[E,w,S]=u([_,$],Ft,dt(b)),O=Ct(c,[]),C=t(O),T=t(dt(O)),[k,x,P]=u([C,T],Ft,dt(O)),[N,j,V]=u([E,h],Wt,dt(b)),[U,D,H]=u([k,h],qt,dt(O));let L=!1;const[M,R,I]=u(E,(([t])=>{var n;return L?!Ut(t,(t=>Array.isArray(t)?t.length>=1:!!t)):(L=!0,!e.validate&&!(null===(n=e.debounced)||void 0===n?void 0:n.validate))}),!e.validate&&!(null===(n=e.debounced)||void 0===n?void 0:n.validate));delete M.set,delete M.update;const F=t(!1),z=t(!1),B=t(null),W=m(_),q=m(C),K=m($),J=m(T),Z=Kt(K,null!==(i=null===(r=e.debounced)||void 0===r?void 0:r.validateTimeout)&&void 0!==i?i:null===(s=e.debounced)||void 0===s?void 0:s.timeout),X=Kt(J,null!==(a=null===(o=e.debounced)||void 0===o?void 0:o.warnTimeout)&&void 0!==a?a:null===(l=e.debounced)||void 0===l?void 0:l.timeout);let G=b,Q=O;function Y(){const t=A.subscribe((t=>{var n,r;const i=St(t);W(i,g,e.validate),q(i,g,e.warn),Z(i,g,null===(n=e.debounced)||void 0===n?void 0:n.validate),X(i,g,null===(r=e.debounced)||void 0===r?void 0:r.warn)})),n=h.subscribe((t=>{g=Ct(t,[])})),r=E.subscribe((t=>{G=t})),i=k.subscribe((t=>{Q=t}));return w(),R(),x(),j(),D(),v(),function(){t(),V(),S(),P(),H(),I(),y(),n(),r(),i()}}function tt(t){_.set(t(G)),$.set({})}function et(t){C.set(t(Q)),T.set({})}return N.set=function(t){tt((()=>t))},N.update=tt,U.set=function(t){et((()=>t))},U.update=et,{data:A,errors:N,warnings:U,touched:h,isValid:M,isSubmitting:F,isDirty:z,isValidating:p,interacted:B,validateErrors:async function(t,n){var r;const i=St(t),s=W(i,g,null!=n?n:e.validate,!0);if(n)return s;const o=K(i,g,null===(r=e.debounced)||void 0===r?void 0:r.validate,!0);return Ft(await Promise.all([s,o]))},validateWarnings:async function(t,n){var r;const i=St(t),s=q(i,g,null!=n?n:e.warn,!0);if(n)return s;const o=J(i,g,null===(r=e.debounced)||void 0===r?void 0:r.warn,!0);return Ft(await Promise.all([s,o]))},cleanup:e.preventStoreStart?()=>{}:Y(),start:Y}}function Zt(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every(((t,n)=>Zt(t,e[n])));if(ut(t)&&ut(e)){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every((n=>Zt(t[n],e[n])))}return!1}const Xt=[],Gt=()=>{};function Qt(t,e=Gt){let n;const r=new Set;function i(e){if(function(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}(t,e)&&(t=e,n)){const e=!Xt.length;for(const e of r)e[1](),Xt.push(e,t);if(e){for(let t=0;t<Xt.length;t+=2)Xt[t][0](Xt[t+1]);Xt.length=0}}}return{set:i,update:function(e){i(e(t))},subscribe:function(s,o=Gt){const a=[s,o];return r.add(a),1===r.size&&(n=e(i)||Gt),s(t),()=>{r.delete(a),n&&0===r.size&&(n(),n=null)}}}}function Yt(t,e){window.__FELTE__.configs[t]=e}"undefined"==typeof window||window.__FELTE__||(window.__FELTE__={configs:{}});let te=class extends X{constructor(){super(...arguments),this.id="",this._storeValues={data:void 0,errors:void 0,touched:void 0,warnings:void 0,isSubmitting:!1,isDirty:!1,isValid:void 0,isValidating:!1,interacted:null}}get data(){return this._storeValues.data}get errors(){return this._storeValues.errors}get touched(){return this._storeValues.touched}get warnings(){return this._storeValues.warnings}get isSubmitting(){return this._storeValues.isSubmitting}get isDirty(){return this._storeValues.isDirty}get isValid(){return this._storeValues.isValid}get isValidating(){return this._storeValues.isValidating}get interacted(){return this._storeValues.interacted}handleSlotChange(){const[t]=this.formElements;if(!t||this.destroy)return;const{configs:e}=window.__FELTE__;let n={};this.id&&(n=e[this.id]);const{form:r,data:i,errors:s,touched:o,warnings:a,isSubmitting:l,isDirty:u,isValid:d,isValidating:c,interacted:h,cleanup:f}=function(t,e){var n,r;function i(e,{debounced:n,level:r}={debounced:!1,level:"error"}){var i;const s="error"===r?"validate":"warn";null!==(i=t.debounced)&&void 0!==i||(t.debounced={});const o=n?t.debounced:t;o[s]?o[s]=[...o[s],e]:o[s]=[e]}function s(e){t.transform?t.transform=[...t.transform,e]:t.transform=[e]}null!==(n=t.extend)&&void 0!==n||(t.extend=[]),null!==(r=t.debounced)&&void 0!==r||(t.debounced={}),t.validate&&!Array.isArray(t.validate)&&(t.validate=[t.validate]),t.debounced.validate&&!Array.isArray(t.debounced.validate)&&(t.debounced.validate=[t.debounced.validate]),t.transform&&!Array.isArray(t.transform)&&(t.transform=[t.transform]),t.warn&&!Array.isArray(t.warn)&&(t.warn=[t.warn]),t.debounced.warn&&!Array.isArray(t.debounced.warn)&&(t.debounced.warn=[t.debounced.warn]);const o=Array.isArray(t.extend)?t.extend:[t.extend];let a=[];const{isSubmitting:l,isValidating:u,data:d,errors:c,warnings:h,touched:f,isValid:p,isDirty:v,cleanup:y,start:m,validateErrors:g,validateWarnings:A,interacted:b}=Jt(e.storeFactory,t),_=d.update,$=d.set;d.update=e=>_((n=>wt(Rt(e(n),t.transform)))),d.set=e=>$(wt(Rt(e,t.transform)));const E=Nt({extender:o,config:t,addValidator:i,addTransformer:s,validateErrors:g,validateWarnings:A,stores:{data:d,errors:c,warnings:h,touched:f,isValid:p,isValidating:u,isSubmitting:l,isDirty:v,interacted:b}});a=o.map((e=>e({stage:"SETUP",errors:c,warnings:h,touched:f,data:d,config:t,addValidator:i,addTransformer:s,setFields:E.public.setFields,reset:E.public.reset,validate:E.public.validate})));const w=Object.assign({config:t,stores:{data:d,touched:f,errors:c,warnings:h,isSubmitting:l,isValidating:u,isValid:p,isDirty:v,interacted:b},helpers:Object.assign(Object.assign({},E.public),{addTransformer:s,addValidator:i}),extender:o,validateErrors:g,validateWarnings:A,_getCurrentExtenders:()=>a,_setCurrentExtenders:t=>{a=t}},E.private),{form:S,createSubmitHandler:O,handleSubmit:C}=Mt(w);return Object.assign({data:d,errors:c,warnings:h,touched:f,isValid:p,isSubmitting:l,isValidating:u,isDirty:v,interacted:b,form:S,handleSubmit:C,createSubmitHandler:O,cleanup:y,startStores:m},E.public)}(n,{storeFactory:Qt}),p={data:i,errors:s,touched:o,warnings:a,isSubmitting:l,isDirty:u,isValid:d,isValidating:c,interacted:h},v=Object.keys(p).map((t=>p[t].subscribe((e=>{Zt(e,this._storeValues[t])||(this._storeValues[t]=e,this.dispatchEvent(new Event(`${t.toLowerCase()}change`,{bubbles:!0,composed:!0})))})))),{destroy:y}=r(t);this.destroy=()=>{y(),f(),v.forEach((t=>t()))}}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.destroy)||void 0===t||t.call(this)}render(){return P`<slot @slotchange=${this.handleSlotChange}></slot>`}};t([function(t){return(e,n)=>void 0!==n?((t,e,n)=>{e.constructor.createProperty(n,t)})(t,e,n):Q(t,e)
***************************************************************************** */function Pt(t){return function(e){if(ht(e)){return function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(xt(e,t),["key"])}return t}}function xt(t,e){return St(t,(t=>ht(t)?xt(t,e):Array.isArray(t)?t.map(Pt(e)):e))}function Vt(t,e){if(!t||Object(t)!==t)return;void 0!==t&&(t=ft(t));const n=Array.isArray(e)?e:e.toString().match(/[^.[\]]+/g)||[],r=1===n.length?t:ct(t,n.slice(0,-1).join("."));return Array.isArray(r)?r.splice(Number(n[n.length-1]),1):null==r||delete r[n[n.length-1]],t}function Nt(t,e,n,r){return vt(t,e,(t=>void 0===t||Array.isArray(t)?(t||(t=[]),void 0===r?t.push(n):t.splice(r,0,n),t):t))}function jt(t){return"function"==typeof t}function Ft(t){return(e,n)=>{if("string"==typeof e){const r=e;t((t=>{const e=jt(n)?n(ct(t,r)):n;return pt(t,r,e)}))}else t((t=>jt(e)?e(t):e))}}function Lt({stores:t,config:e,validateErrors:n,validateWarnings:r}){var i;let s,o=Tt(null!==(i=e.initialValues)&&void 0!==i?i:{});const{data:a,touched:l,errors:u,warnings:d,isDirty:c,isSubmitting:h,interacted:f}=t,v=Ft(a.update),p=Ft(l.update),y=Ft(u.update),m=Ft(d.update);function g(t){v((e=>{const n=t(e);return s&&Et(s,n),n}))}const b=(t,e,n)=>{Ft(g)(t,e),"string"==typeof t&&n&&p(t,!0)};function A(t){u.update(t),d.update(t),l.update(t),a.update((e=>{const n=t(e);return setTimeout((()=>s&&Et(s,n))),n}))}const _=Ft(h.update),E=Ft(c.update),$=Ft(f.update);return{public:{setData:v,setFields:b,setTouched:p,setErrors:y,setWarnings:m,setIsSubmitting:_,setIsDirty:E,setInteracted:$,validate:async function(){const t=it(a);l.set(Ot(t,!0)),f.set(null);const e=await n(t);return await r(t),e},reset:function(){b(ft(o)),p((t=>xt(t,!1))),f.set(null),c.set(!1)},unsetField:function(t){A((e=>Vt(e,t)))},resetField:function(t){const e=ct(o,t),n=!!ht(e)&&Ot(e,!1),r=ht(n)?xt(n,[]):[];a.update((n=>{const r=pt(n,t,e);return s&&Et(s,r),r})),l.update((e=>pt(e,t,n))),u.update((e=>pt(e,t,r))),d.update((e=>pt(e,t,r)))},addField:function(t,e,n){const r=!!ht(e)&&Ot(e,!1),i=ht(r)?xt(r,[]):[];e=ht(e)?Object.assign(Object.assign({},e),{key:Ct()}):e,u.update((e=>Nt(e,t,i,n))),d.update((e=>Nt(e,t,i,n))),l.update((e=>Nt(e,t,r,n))),a.update((r=>{const i=Nt(r,t,e,n);return setTimeout((()=>s&&Et(s,i))),i}))},swapFields:function(t,e,n){A((r=>function(t,e,n,r){return vt(t,e,(t=>t&&Array.isArray(t)?([t[n],t[r]]=[t[r],t[n]],t):t))}(r,t,e,n)))},moveField:function(t,e,n){A((r=>function(t,e,n,r){return vt(t,e,(t=>t&&Array.isArray(t)?(t.splice(r,0,t.splice(n,1)[0]),t):t))}(r,t,e,n)))},setInitialValues:t=>{o=Tt(t)}},private:{_setFormNode(t){s=t},_getFormNode:()=>s,_getInitialValues:()=>o}}}class Ut extends CustomEvent{constructor(t){super("feltesuccess",{detail:t})}}class Dt extends CustomEvent{constructor(t){super("felteerror",{detail:t,cancelable:!0})}setErrors(t){this.preventDefault(),this.errors=t}}class It extends Event{constructor(){super("feltesubmit",{cancelable:!0})}handleSubmit(t){this.onSubmit=t}handleError(t){this.onError=t}handleSuccess(t){this.onSuccess=t}}function Ht(...t){const e=t.pop(),n=ft(t.shift());if(0===t.length)return n;for(const r of t){if(!r)continue;let t=e(n,r);if(void 0!==t)return t;const i=Array.from(new Set(Object.keys(n).concat(Object.keys(r))));for(const s of i)if(t=e(n[s],r[s]),void 0!==t)n[s]=t;else if(ht(r[s])&&ht(n[s]))n[s]=Ht(n[s],r[s],e);else if(Array.isArray(r[s]))n[s]=r[s].map(((t,r)=>{if(!ht(t))return t;return Ht(Array.isArray(n[s])?n[s][r]:n[s],t,e)}));else if(ht(r[s])){const t=xt(ft(r[s]),void 0);n[s]=Ht(t,r[s],e)}else void 0!==r[s]&&(n[s]=r[s])}return n}function Mt(...t){return Ht(...t,(()=>{}))}function Rt(t,e){return function(t,e){return Object.keys(t).some((n=>e(t[n])))}(t,(t=>ht(t)?Rt(t,e):Array.isArray(t)?0===t.length||t.every((t=>"string"==typeof t))?e(t):t.some((t=>ht(t)?Rt(t,e):e(t))):e(t)))}function Bt(t){let e=t;for(;e&&"FORM"!==e.nodeName;){if(e.hasAttribute("data-felte-ignore"))return!0;e=e.parentElement}return!1}function zt(t,e){if(!ht(t)||!ht(e)){if(Array.isArray(e)){if(e.some(ht))return;const n=Array.isArray(t)?t:[];return e.map(((t,e)=>{var r;return null!==(r=n[e])&&void 0!==r?r:t}))}return void 0!==t?t:void 0}}function Wt(...t){return Ht(...t,zt)}function qt({helpers:t,stores:e,config:n,extender:r,validateErrors:i,validateWarnings:s,_setFormNode:o,_getFormNode:a,_getInitialValues:l,_setCurrentExtenders:u,_getCurrentExtenders:d}){const{setFields:c,setTouched:h,reset:f,setInitialValues:v}=t,{addValidator:p,addTransformer:y,validate:m,setIsDirty:g,setIsSubmitting:b}=t,A=wt(t,["addValidator","addTransformer","validate","setIsDirty","setIsSubmitting"]),{data:_,errors:E,warnings:$,touched:w,isSubmitting:S,isDirty:O,interacted:C}=e;function T(t){return async function(e){var r,o,l,u,c,h,f;const v=a(),p=new It;null==v||v.dispatchEvent(p);const y=null!==(o=null!==(r=p.onError)&&void 0!==r?r:null==t?void 0:t.onError)&&void 0!==o?o:n.onError,m=null!==(u=null!==(l=p.onSuccess)&&void 0!==l?l:null==t?void 0:t.onSuccess)&&void 0!==u?u:n.onSuccess,g=null!==(f=null!==(h=null!==(c=p.onSubmit)&&void 0!==c?c:null==t?void 0:t.onSubmit)&&void 0!==h?h:n.onSubmit)&&void 0!==f?f:function(t){if(t)return async function(){let e=new FormData(t);const n=new URL(t.action),r="get"===t.method.toLowerCase()?"get":n.searchParams.get("_method")||t.method;let i,s=t.enctype;t.querySelector('input[type="file"]')&&(s="multipart/form-data"),"get"!==r&&"application/x-www-form-urlencoded"!==s||(e=new URLSearchParams(e)),"get"===r?(e.forEach(((t,e)=>{n.searchParams.append(e,t)})),i={method:r}):i={method:r,body:e,headers:{"Content-Type":s}};const o=await window.fetch(n.toString(),i);if(o.ok)return o;throw new st("An error occurred while submitting the form",o)}}(v);if(!g)return;if(null==e||e.preventDefault(),p.defaultPrevented)return;S.set(!0),C.set(null);const b=kt(it(_)),O=await i(b,null==t?void 0:t.validate),T=await s(b,null==t?void 0:t.warn);if(T&&$.set(Mt(xt(b,[]),T)),w.set(Ot(b,!0)),O){w.set(Ot(O,!0));if(Rt(O,(t=>Array.isArray(t)?t.length>=1:!!t)))return await new Promise((t=>setTimeout(t))),d().forEach((t=>{var e;return null===(e=t.onSubmitError)||void 0===e?void 0:e.call(t,{data:b,errors:O})})),void S.set(!1)}const k=Object.assign(Object.assign({},A),{form:v,controls:v&&Array.from(v.elements).filter(ut),config:Object.assign(Object.assign({},n),t)});try{const t=await g(b,k);null==v||v.dispatchEvent(new Ut(Object.assign({response:t},k))),await(null==m?void 0:m(t,k))}catch(t){const e=new Dt(Object.assign({error:t},k));if(null==v||v.dispatchEvent(e),!y&&!e.defaultPrevented)throw t;if(!y&&!e.errors)return;const n=e.errors||await(null==y?void 0:y(t,k));n&&(w.set(Ot(n,!0)),E.set(n),await new Promise((t=>setTimeout(t))),d().forEach((t=>{var e;return null===(e=t.onSubmitError)||void 0===e?void 0:e.call(t,{data:b,errors:it(E)})})))}finally{S.set(!1)}}}const k=T();return{form:function(t){function e(e){return function(r){return r({form:t,stage:e,controls:Array.from(t.elements).filter(ut),data:_,errors:E,warnings:$,touched:w,config:n,addValidator:p,addTransformer:y,setFields:c,validate:m,reset:f})}}t.requestSubmit||(t.requestSubmit=k),u(r.map(e("MOUNT"))),t.noValidate=!!n.validate;const{defaultData:i,defaultTouched:s}=At(t);function a(t){const e=t.target;if(!e||!ut(e)||at(e)||Bt(e))return;if(["checkbox","radio","file"].includes(e.type))return;if(!e.name)return;O.set(!0);const n=bt(e);C.set(e.name),_.update((t=>pt(t,yt(e),n)))}function g(e){const n=e.target;if(n&&ut(n)&&!Bt(n)&&n.name)if(h(yt(n),!0),C.set(n.name),(at(n)||["checkbox","radio","file","hidden"].includes(n.type))&&O.set(!0),"hidden"===n.type&&_.update((t=>pt(t,yt(n),n.value))),at(n))!function(t){if(t.multiple){const e=Array.from(t.options).filter((t=>t.selected)).map((t=>t.value));_.update((n=>pt(n,yt(t),e)))}else _.update((e=>pt(e,yt(t),t.value)))}(n);else{if(!ot(n))return;"checkbox"===n.type?function(e){const n=yt(e),r=Array.from(t.querySelectorAll(`[name="${e.name}"]`)).filter((t=>!!ut(t)&&n===yt(t)));if(0!==r.length)1===r.length?_.update((t=>pt(t,yt(e),e.checked))):_.update((t=>pt(t,yt(e),r.filter(ot).filter((t=>t.checked)).map((t=>t.value)))))}(n):"radio"===n.type?function(e){const n=t.querySelectorAll(`[name="${e.name}"]`),r=Array.from(n).find((t=>ot(t)&&t.checked));_.update((t=>pt(t,yt(e),null==r?void 0:r.value)))}(n):"file"===n.type&&function(t){var e;const n=Array.from(null!==(e=t.files)&&void 0!==e?e:[]);_.update((e=>pt(e,yt(t),t.multiple?n:n[0])))}(n)}}function b(t){const e=t.target;e&&ut(e)&&!Bt(e)&&e.name&&(h(yt(e),!0),C.set(e.name))}function A(t){t.preventDefault(),f()}function S(t){for(const e of t.reverse()){if(e.hasAttribute("data-felte-keep-on-remove")&&"false"!==e.dataset.felteKeepOnRemove)continue;const t=/.*(\[[0-9]+\]|\.[0-9]+)\.[^.]+$/;let n=yt(e);const r=it(w);if(t.test(n)){const t=n.split(".").slice(0,-1).join("."),e=ct(r,t);ht(e)&&Object.keys(e).length<=1&&(n=t)}_.update((t=>Vt(t,n))),w.update((t=>Vt(t,n))),E.update((t=>Vt(t,n))),$.update((t=>Vt(t,n)))}}o(t),v(Mt(ft(i),l())),c(l()),w.set(s);const T=new MutationObserver((function(n){for(const i of n)if("childList"===i.type){if(i.addedNodes.length>0){if(!Array.from(i.addedNodes).some((t=>{if(!dt(t))return!1;if(ut(t))return!0;return mt(t).length>0})))continue;d().forEach((t=>{var e;return null===(e=t.destroy)||void 0===e?void 0:e.call(t)})),u(r.map(e("UPDATE")));const{defaultData:n,defaultTouched:s}=At(t);_.update((t=>Wt(t,n))),w.update((t=>Wt(t,s)))}if(i.removedNodes.length>0)for(const t of i.removedNodes){if(!dt(t))continue;const n=mt(t);0!==n.length&&(d().forEach((t=>{var e;return null===(e=t.destroy)||void 0===e?void 0:e.call(t)})),u(r.map(e("UPDATE"))),S(n))}}}));T.observe(t,{childList:!0,subtree:!0}),t.addEventListener("input",a),t.addEventListener("change",g),t.addEventListener("focusout",b),t.addEventListener("submit",k),t.addEventListener("reset",A);const P=E.subscribe((e=>{for(const n of t.elements){if(!ut(n)||!n.name)continue;const t=ct(e,yt(n)),r=Array.isArray(t)?t.join("\n"):"string"==typeof t?t:void 0;r!==n.dataset.felteValidationMessage&&(r?(n.dataset.felteValidationMessage=r,n.setAttribute("aria-invalid","true")):(delete n.dataset.felteValidationMessage,n.removeAttribute("aria-invalid")))}}));return{destroy(){T.disconnect(),t.removeEventListener("input",a),t.removeEventListener("change",g),t.removeEventListener("focusout",b),t.removeEventListener("submit",k),t.removeEventListener("reset",A),P(),d().forEach((t=>{var e;return null===(e=t.destroy)||void 0===e?void 0:e.call(t)}))}}},createSubmitHandler:T,handleSubmit:k}}function Kt(t,e){return e?Array.isArray(e)?e.reduce(((t,e)=>e(t)),t):e(t):t}function Jt(t,e){if(!ht(t)&&!ht(e)){if(null===t||""===t)return e;if(null===e||""===e)return t;if(!e)return t;if(t&&e){if(Array.isArray(t)){if(!Array.isArray(e))return[...t,e];const n=[],r=Math.max(e.length,t.length);for(let i=0;i<r;i++){let r=t[i],s=e[i];ht(r)||ht(s)?n.push(Zt([null!=r?r:{},null!=s?s:{}])):(Array.isArray(r)||(r=[r]),Array.isArray(s)||(s=[s]),n.push(...r,...s))}return n.filter(Boolean)}return Array.isArray(e)||(e=[e]),[t,...e].reduce(((t,e)=>t.concat(e)),[]).filter(Boolean)}}}function Zt(t){return Ht(...t,Jt)}function Xt(t,e){if(ht(t))return!e||ht(e)&&0===Object.keys(e).length?xt(t,null):void 0;if(Array.isArray(t)){if(t.some(ht))return;const n=Array.isArray(e)?e:[];return t.map(((t,e)=>{const r=n[e];return Array.isArray(r)&&0===r.length?null:t&&r||null}))}return Array.isArray(e)&&0===e.length?null:Array.isArray(e)?t?e:null:t&&e?[e]:null}function Gt(t,e){if(ht(t))return!e||ht(e)&&0===Object.keys(e).length?xt(t,null):void 0;if(Array.isArray(t)){if(t.some(ht))return;const n=Array.isArray(e)?e:[];return t.map(((t,e)=>{const r=n[e];return Array.isArray(r)&&0===r.length?null:r||null}))}return Array.isArray(e)&&0===e.length?null:Array.isArray(e)?e:e?[e]:null}function Qt([t,e]){return Ht(e,t,Xt)}function Yt([t,e]){return Ht(e,t,Gt)}function te(t,e=300){let n;return(...r)=>{clearTimeout(n),n=setTimeout((()=>{t.apply(this,r)}),e)}}function ee(t,e){var n,r,i,s,o,a,l;const u=function(t){return function(e,n,r){const i=Array.isArray(e)?e:[e],s=new Array(i.length),o=t(r),a=o.set,l=o.subscribe;let u;return o.subscribe=function(t){const e=l(t);return()=>{e()}},[o,function(){u=i.map(((t,e)=>t.subscribe((t=>{s[e]=t,a(n(s))}))))},function(){null==u||u.forEach((t=>t()))}]}}(t),d=e.initialValues=e.initialValues?Tt(Kt(ft(e.initialValues),e.transform)):{},c=Ot(kt(d),!1),h=t(c),f=t(0),[v,p,y]=u([h,f],(([t,e])=>Rt(t,(t=>!!t))&&e>=1),!1);function m(t){let e;return async function(n,r,i,s=!1){if(!i||!n)return;let o=r&&Object.keys(r).length>0?r:xt(n,[]);const a=function(t){const e={aborted:!1,priority:t};return{signal:e,abort(){e.aborted=!0}}}(s);if((null==e?void 0:e.signal.priority)&&!s||(null==e||e.abort(),e=a),e.signal.priority&&!s)return;f.update((t=>t+1));const l=(u=n,(d=i)?(Array.isArray(d)?d:[d]).map((t=>t(u))):[]);var u,d;return l.forEach((async e=>{const n=await e;a.signal.aborted||(o=Zt([o,n]),t.set(o))})),await Promise.all(l),e=void 0,f.update((t=>t-1)),o}}delete v.set,delete v.update;let g=xt(c,[]);const b=t(d),A=xt(c,[]),_=t(A),E=t(ft(A)),[$,w,S]=u([_,E],Zt,ft(A)),O=xt(c,[]),C=t(O),T=t(ft(O)),[k,P,x]=u([C,T],Zt,ft(O)),[V,N,j]=u([$,h],Qt,ft(A)),[F,L,U]=u([k,h],Yt,ft(O));let D=!1;const[I,H,M]=u($,(([t])=>{var n;return D?!Rt(t,(t=>Array.isArray(t)?t.length>=1:!!t)):(D=!0,!e.validate&&!(null===(n=e.debounced)||void 0===n?void 0:n.validate))}),!e.validate&&!(null===(n=e.debounced)||void 0===n?void 0:n.validate));delete I.set,delete I.update;const R=t(!1),B=t(!1),z=t(null),W=m(_),q=m(C),K=m(E),J=m(T),Z=te(K,null!==(i=null===(r=e.debounced)||void 0===r?void 0:r.validateTimeout)&&void 0!==i?i:null===(s=e.debounced)||void 0===s?void 0:s.timeout),X=te(J,null!==(a=null===(o=e.debounced)||void 0===o?void 0:o.warnTimeout)&&void 0!==a?a:null===(l=e.debounced)||void 0===l?void 0:l.timeout);let G=A,Q=O;function Y(){const t=b.subscribe((t=>{var n,r;const i=kt(t);W(i,g,e.validate),q(i,g,e.warn),Z(i,g,null===(n=e.debounced)||void 0===n?void 0:n.validate),X(i,g,null===(r=e.debounced)||void 0===r?void 0:r.warn)})),n=h.subscribe((t=>{g=xt(t,[])})),r=$.subscribe((t=>{G=t})),i=k.subscribe((t=>{Q=t}));return w(),H(),P(),N(),L(),p(),function(){t(),j(),S(),x(),U(),M(),y(),n(),r(),i()}}function tt(t){_.set(t(G)),E.set({})}function et(t){C.set(t(Q)),T.set({})}return V.set=function(t){tt((()=>t))},V.update=tt,F.set=function(t){et((()=>t))},F.update=et,{data:b,errors:V,warnings:F,touched:h,isValid:I,isSubmitting:R,isDirty:B,isValidating:v,interacted:z,validateErrors:async function(t,n){var r;const i=kt(t),s=W(i,g,null!=n?n:e.validate,!0);if(n)return s;const o=K(i,g,null===(r=e.debounced)||void 0===r?void 0:r.validate,!0);return Zt(await Promise.all([s,o]))},validateWarnings:async function(t,n){var r;const i=kt(t),s=q(i,g,null!=n?n:e.warn,!0);if(n)return s;const o=J(i,g,null===(r=e.debounced)||void 0===r?void 0:r.warn,!0);return Zt(await Promise.all([s,o]))},cleanup:e.preventStoreStart?()=>{}:Y(),start:Y}}function ne(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every(((t,n)=>ne(t,e[n])));if(ht(t)&&ht(e)){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every((n=>ne(t[n],e[n])))}return!1}let re=class extends X{constructor(){var t;super(...arguments),this.touchOnChange=!1,this.valueProp="value",this.inputEvent="input",this.blurEvent="focusout",this._onBlur=(t="blur",function(){throw new TypeError(`Can't call "${t}" on HTMLFelteFieldElement. The element is not ready yet.`)}),this._ready=!1}blur(){this._onBlur()}get ready(){return this._ready}firstUpdated(){var t;const{name:e,inputEvent:n,blurEvent:r,touchOnChange:i,value:s}=this;if(!e)throw new Error('<felte-field> must have a "name" attribute');const[o]=this._assignedElements;if(!o)return;o[this.valueProp]=s;const{field:a,onInput:l,onBlur:u}=function(t,e){var n,r;let i,s,o,a,l;function u(t,e){if(!l)return;_t(l,e);const n=new Event(t,{bubbles:!0,cancelable:!0});l.dispatchEvent(n)}function d(t){t.forEach((()=>{const t=l.getAttribute("aria-invalid");t?a.setAttribute("aria-invalid",t):a.removeAttribute("aria-invalid");const e=l.getAttribute("data-felte-validation-message");e?a.setAttribute("data-felte-validation-message",e):a.removeAttribute("data-felte-validation-message")}))}function c(t){u(o?"change":"input",t)}return"string"==typeof t?(i=t,s=null==e?void 0:e.defaultValue,o=null!==(n=null==e?void 0:e.touchOnChange)&&void 0!==n&&n):(i=t.name,s=t.defaultValue,o=null!==(r=t.touchOnChange)&&void 0!==r&&r),{field:function(t){let e;return a=t,ut(t)?(l=t,l.name=i,{}):(setTimeout((()=>{const n=a.parentNode;if(!n||!dt(n))return;const r=n.querySelector(`[name="${i}"]`);if(r&&ut(r))l=r;else{const e=document.createElement("input");e.type="hidden",e.name=i,n.insertBefore(e,t.nextSibling),l=e}_t(l,s),e=new MutationObserver(d),e.observe(l,$t)})),{destroy(){null==e||e.disconnect()}})},onInput:c,onChange:c,onBlur:function(){u("focusout")}}}(e,{touchOnChange:i,defaultValue:s});this._onInput=l,this._onBlur=u;const{destroy:d}=a(o),c=t=>{const e=t.target;this.value=e[this.valueProp]},h=()=>{u()};o.addEventListener(n,c),o.addEventListener(r,h),this._destroy=()=>{null==d||d(),o.removeEventListener(n,c),o.removeEventListener(n,h)},this._ready=!0,null===(t=this.onfeltefieldready)||void 0===t||t.call(this),this.dispatchEvent(new Event("feltefieldready"))}updated(t){var e;t.has("value")&&(null===(e=this._onInput)||void 0===e||e.call(this,this.value))}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._destroy)||void 0===t||t.call(this)}render(){return x`<slot></slot>`}};t([tt()],re.prototype,"name",void 0),t([tt({type:Boolean})],re.prototype,"touchOnChange",void 0),t([tt()],re.prototype,"valueProp",void 0),t([tt()],re.prototype,"inputEvent",void 0),t([tt()],re.prototype,"blurEvent",void 0),t([tt()],re.prototype,"value",void 0),t([rt({flatten:!0})],re.prototype,"_assignedElements",void 0),re=t([Q("felte-field")],re);const ie=[],se=()=>{};function oe(t,e=se){let n;const r=new Set;function i(e){if(function(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}(t,e)&&(t=e,n)){const e=!ie.length;for(const e of r)e[1](),ie.push(e,t);if(e){for(let t=0;t<ie.length;t+=2)ie[t][0](ie[t+1]);ie.length=0}}}return{set:i,update:function(e){i(e(t))},subscribe:function(s,o=se){const a=[s,o];return r.add(a),1===r.size&&(n=e(i)||se),s(t),()=>{r.delete(a),n&&0===r.size&&(n(),n=null)}}}}function ae(t,e){return window.__FELTE__.configs[t]=e,new Promise((e=>{document.addEventListener("felteready",(function n(r){const i=r.composedPath()[0];i.id===t&&(e(i),document.removeEventListener("felteready",n))}))}))}function le(t){return function(){throw new TypeError(`Can't call "${t}" on HTMLFelteFormElement. The element is not ready yet.`)}}"undefined"==typeof window||window.__FELTE__||(window.__FELTE__={configs:{}});const ue=["data","errors","touched","warnings","isSubmitting","isDirty","isValid","isValidating","interacted"];let de=class extends X{constructor(){super(...arguments),this.id="",this._configuration={},this._storeValues={data:void 0,errors:void 0,touched:void 0,warnings:void 0,isSubmitting:!1,isDirty:!1,isValid:void 0,isValidating:!1,interacted:null},this.setData=le("setData"),this.setFields=le("setFields"),this.setInitialValues=le("setInitialValues"),this.addField=le("addField"),this.unsetField=le("unsetField"),this.swapFields=le("swapFields"),this.moveField=le("moveField"),this.resetField=le("resetField"),this.reset=le("reset"),this.submit=le("submit"),this.createSubmitHandler=le("createSubmitHandler"),this.setErrors=le("setErrors"),this.setTouched=le("setTouched"),this.setWarnings=le("setWarnings"),this.setIsSubmitting=le("setIsSubmitting"),this.setIsDirty=le("setIsDirty"),this.setInteracted=le("setInteracted"),this._ready=!1,this.validate=le("validate")}setConfiguration(t){this._configuration=t}get data(){return this._storeValues.data}get errors(){return this._storeValues.errors}get touched(){return this._storeValues.touched}get warnings(){return this._storeValues.warnings}get isSubmitting(){return this._storeValues.isSubmitting}get isDirty(){return this._storeValues.isDirty}get isValid(){return this._storeValues.isValid}get isValidating(){return this._storeValues.isValidating}get interacted(){return this._storeValues.interacted}get ready(){return this._ready}_createForm(t){var e;const[n]=this.formElements;if(!n||this._destroy)return;this.elements=n.elements;const{form:r,cleanup:i,...s}=function(t,e){var n,r;function i(e,{debounced:n,level:r}={debounced:!1,level:"error"}){var i;const s="error"===r?"validate":"warn";null!==(i=t.debounced)&&void 0!==i||(t.debounced={});const o=n?t.debounced:t;o[s]?o[s]=[...o[s],e]:o[s]=[e]}function s(e){t.transform?t.transform=[...t.transform,e]:t.transform=[e]}null!==(n=t.extend)&&void 0!==n||(t.extend=[]),null!==(r=t.debounced)&&void 0!==r||(t.debounced={}),t.validate&&!Array.isArray(t.validate)&&(t.validate=[t.validate]),t.debounced.validate&&!Array.isArray(t.debounced.validate)&&(t.debounced.validate=[t.debounced.validate]),t.transform&&!Array.isArray(t.transform)&&(t.transform=[t.transform]),t.warn&&!Array.isArray(t.warn)&&(t.warn=[t.warn]),t.debounced.warn&&!Array.isArray(t.debounced.warn)&&(t.debounced.warn=[t.debounced.warn]);const o=Array.isArray(t.extend)?t.extend:[t.extend];let a=[];const{isSubmitting:l,isValidating:u,data:d,errors:c,warnings:h,touched:f,isValid:v,isDirty:p,cleanup:y,start:m,validateErrors:g,validateWarnings:b,interacted:A}=ee(e.storeFactory,t),_=d.update,E=d.set;d.update=e=>_((n=>Tt(Kt(e(n),t.transform)))),d.set=e=>E(Tt(Kt(e,t.transform)));const $=Lt({extender:o,config:t,addValidator:i,addTransformer:s,validateErrors:g,validateWarnings:b,stores:{data:d,errors:c,warnings:h,touched:f,isValid:v,isValidating:u,isSubmitting:l,isDirty:p,interacted:A}});a=o.map((e=>e({stage:"SETUP",errors:c,warnings:h,touched:f,data:d,config:t,addValidator:i,addTransformer:s,setFields:$.public.setFields,reset:$.public.reset,validate:$.public.validate})));const w=Object.assign({config:t,stores:{data:d,touched:f,errors:c,warnings:h,isSubmitting:l,isValidating:u,isValid:v,isDirty:p,interacted:A},helpers:Object.assign(Object.assign({},$.public),{addTransformer:s,addValidator:i}),extender:o,validateErrors:g,validateWarnings:b,_getCurrentExtenders:()=>a,_setCurrentExtenders:t=>{a=t}},$.private),{form:S,createSubmitHandler:O,handleSubmit:C}=qt(w);return Object.assign({data:d,errors:c,warnings:h,touched:f,isValid:v,isSubmitting:l,isValidating:u,isDirty:p,interacted:A,form:S,handleSubmit:C,createSubmitHandler:O,cleanup:y,startStores:m},$.public)}(t,{storeFactory:oe});this.setData=s.setData,this.setFields=s.setFields,this.setErrors=s.setErrors,this.setTouched=s.setTouched,this.setWarnings=s.setWarnings,this.setIsSubmitting=s.setIsSubmitting,this.setIsDirty=s.setIsDirty,this.setInteracted=s.setInteracted,this.setInitialValues=s.setInitialValues,this.validate=s.validate,this.addField=s.addField,this.unsetField=s.unsetField,this.swapFields=s.swapFields,this.moveField=s.moveField,this.resetField=s.resetField,this.reset=s.reset,this.submit=s.handleSubmit,this.createSubmitHandler=s.createSubmitHandler;const o=ue.map((t=>s[t].subscribe((e=>{if(ne(e,this._storeValues[t]))return;this._storeValues[t]=e;const n=t.toLowerCase(),r=this[`on${n}change`];"function"==typeof r&&r(e),this.dispatchEvent(new Event(`${n}change`))})))),{destroy:a}=r(n),l=t=>{const e=t,n=new It;this.dispatchEvent(n),n.defaultPrevented&&e.preventDefault(),e.onSubmit=n.onSubmit,e.onSuccess=n.onSuccess,e.onError=n.onError},u=t=>{const e=new Ut(t.detail);this.dispatchEvent(e)},d=t=>{const e=t,n=new Dt(e.detail);this.dispatchEvent(n),e.errors=n.errors,n.defaultPrevented&&e.preventDefault()};n.addEventListener("feltesubmit",l),n.addEventListener("feltesuccess",u),n.addEventListener("felteerror",d),this._destroy=()=>{a(),i(),n.removeEventListener("feltesubmit",l),n.removeEventListener("feltesuccess",u),n.removeEventListener("felteerror",d),o.forEach((t=>t()))},this._ready=!0,null===(e=this.onfelteready)||void 0===e||e.call(this),this.dispatchEvent(new Event("felteready",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback();const{configs:t}=window.__FELTE__;this.id&&(this._configuration=t[this.id]||this._configuration)}updated(t){var e;t.has("_configuration")&&(null===(e=this._destroy)||void 0===e||e.call(this),this._destroy=void 0,this._ready=!1,this._createForm(this._configuration))}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._destroy)||void 0===t||t.call(this)}render(){return x`<slot></slot>`}};t([tt()],de.prototype,"id",void 0),t([function(t){return tt({...t,state:!0})}
/**

@@ -93,3 +99,3 @@ * @license

* SPDX-License-Identifier: BSD-3-Clause
*/}()],te.prototype,"id",void 0),t([function(t){const{slot:e,selector:n}=null!=t?t:{};return(({finisher:t,descriptor:e})=>(n,r)=>{var i;if(void 0===r){const r=null!==(i=n.originalKey)&&void 0!==i?i:n.key,s=null!=e?{kind:"method",placement:"prototype",key:r,descriptor:e(n.key)}:{...n,key:r};return null!=t&&(s.finisher=function(e){t(e,r)}),s}{const i=n.constructor;void 0!==e&&Object.defineProperty(n,r,e(r)),null==t||t(i,r)}})({descriptor:r=>({get(){var r;const i="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(i),o=null!=s?tt(s,t):[];return n?o.filter((t=>t.matches(n))):o},enumerable:!0,configurable:!0})})}({selector:"form",flatten:!0})],te.prototype,"formElements",void 0),te=t([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:n,elements:r}=e;return{kind:n,elements:r,finisher(e){window.customElements.define(t,e)}}})(t,e))("felte-form")],te);export{te as FelteForm,Yt as prepareForm};
*/()],de.prototype,"_configuration",void 0),t([rt({selector:"form",flatten:!0})],de.prototype,"formElements",void 0),de=t([Q("felte-form")],de);export{Dt as FelteErrorEvent,re as FelteField,de as FelteForm,st as FelteSubmitError,It as FelteSubmitEvent,Ut as FelteSuccessEvent,ae as prepareForm};
//# sourceMappingURL=index.min.js.map

@@ -1,20 +0,82 @@

import { Obj, FormConfig, Keyed, Errors, Touched } from "@felte/core";
import { LitElement } from "lit";
declare function prepareForm<Data extends Obj = any>(id: string, config: FormConfig<Data>): void;
import { PropertyValues, LitElement } from "lit";
import { FieldValue, Obj, FormConfig, Keyed, Errors, Touched, Helpers, Form, Paths, FieldsSetter, ObjectSetter } from "@felte/core";
declare class FelteField<Value extends FieldValue = FieldValue> extends LitElement {
name?: string;
touchOnChange: boolean;
valueProp: string;
inputEvent: string;
blurEvent: string;
value?: Value;
private _onInput?;
private _onBlur;
blur(): void;
_assignedElements: HTMLElement[];
private _destroy?;
private _ready;
get ready(): boolean;
onfeltefieldready?(): void;
firstUpdated(): void;
updated(changed: PropertyValues<this>): void;
disconnectedCallback(): void;
render(): import("lit").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
"felte-field": FelteField;
}
type HTMLFelteFieldElement<Value extends FieldValue = FieldValue> = FelteField<Value>;
}
declare function prepareForm<Data extends Obj = any>(id: string, config: FormConfig<Data>): Promise<HTMLFelteFormElement>;
declare class FelteForm<Data extends Obj = any> extends LitElement {
[key: string]: unknown;
id: string;
_configuration: FormConfig<Data>;
setConfiguration(config: FormConfig<Data>): void;
elements?: HTMLFormElement["elements"];
/* Stores (observables) */
private _storeValues;
get data(): Keyed<Data> | undefined;
ondatachange?(data: Data): void;
setData: ObjectSetter<Data, Paths<Data>>;
setFields: FieldsSetter<Data, Paths<Data>>;
setInitialValues: Helpers<Data, Paths<Data>>["setInitialValues"];
addField: Helpers<Data, Paths<Data>>["addField"];
unsetField: Helpers<Data, Paths<Data>>["unsetField"];
swapFields: Helpers<Data, Paths<Data>>["swapFields"];
moveField: Helpers<Data, Paths<Data>>["moveField"];
resetField: Helpers<Data, Paths<Data>>["resetField"];
reset: Helpers<Data, Paths<Data>>["reset"];
submit: () => void;
createSubmitHandler: Form<Data>["createSubmitHandler"];
get errors(): Errors<Data> | undefined;
onerrorschange?(errors: Errors<Data>): void;
setErrors: Helpers<Data, Paths<Data>>["setErrors"];
get touched(): Touched<Data> | undefined;
ontouchedchange?(touched: Touched<Data>): void;
setTouched: Helpers<Data, Paths<Data>>["setTouched"];
get warnings(): Errors<Data> | undefined;
onwarningschange?(warnings: Errors<Data>): void;
setWarnings: Helpers<Data, Paths<Data>>["setWarnings"];
get isSubmitting(): boolean;
onissubmittingchange?(isSubmitting: boolean): void;
setIsSubmitting: Helpers<Data, Paths<Data>>["setIsSubmitting"];
get isDirty(): boolean;
onisdirtychange?(isDirty: boolean): void;
setIsDirty: Helpers<Data, Paths<Data>>["setIsDirty"];
get isValid(): boolean | undefined;
onisvalidchange?(isValid: boolean): void;
get isValidating(): boolean;
onisvalidatingchange?(isValidating: boolean): void;
get interacted(): string | null;
oninteractedchange?(interacted: string | null): void;
setInteracted: Helpers<Data, Paths<Data>>["setInteracted"];
private _ready;
get ready(): boolean;
onfelteready?(): void;
validate: Helpers<Data, Paths<Data>>["validate"];
formElements: HTMLFormElement[];
private destroy?;
handleSlotChange(): void;
private _destroy?;
private _createForm;
connectedCallback(): void;
updated(changed: PropertyValues<this>): void;
disconnectedCallback(): void;

@@ -27,3 +89,3 @@ render(): import("lit").TemplateResult<1>;

}
type HTMLFelteFormElement<Data extends Obj> = FelteForm<Data>;
type HTMLFelteFormElement<Data extends Obj = any> = FelteForm<Data>;
interface Window {

@@ -35,3 +97,4 @@ __FELTE__: {

}
export { prepareForm, FelteForm };
export { FelteField, prepareForm, FelteForm };
export { FelteSubmitEvent, FelteErrorEvent, FelteSuccessEvent, FelteSubmitError } from "@felte/core";
//# sourceMappingURL=index.cjs.d.ts.map

@@ -1,20 +0,82 @@

import { Obj, FormConfig, Keyed, Errors, Touched } from "@felte/core";
import { LitElement } from "lit";
declare function prepareForm<Data extends Obj = any>(id: string, config: FormConfig<Data>): void;
import { PropertyValues, LitElement } from "lit";
import { FieldValue, Obj, FormConfig, Keyed, Errors, Touched, Helpers, Form, Paths, FieldsSetter, ObjectSetter } from "@felte/core";
declare class FelteField<Value extends FieldValue = FieldValue> extends LitElement {
name?: string;
touchOnChange: boolean;
valueProp: string;
inputEvent: string;
blurEvent: string;
value?: Value;
private _onInput?;
private _onBlur;
blur(): void;
_assignedElements: HTMLElement[];
private _destroy?;
private _ready;
get ready(): boolean;
onfeltefieldready?(): void;
firstUpdated(): void;
updated(changed: PropertyValues<this>): void;
disconnectedCallback(): void;
render(): import("lit").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
"felte-field": FelteField;
}
type HTMLFelteFieldElement<Value extends FieldValue = FieldValue> = FelteField<Value>;
}
declare function prepareForm<Data extends Obj = any>(id: string, config: FormConfig<Data>): Promise<HTMLFelteFormElement>;
declare class FelteForm<Data extends Obj = any> extends LitElement {
[key: string]: unknown;
id: string;
_configuration: FormConfig<Data>;
setConfiguration(config: FormConfig<Data>): void;
elements?: HTMLFormElement["elements"];
/* Stores (observables) */
private _storeValues;
get data(): Keyed<Data> | undefined;
ondatachange?(data: Data): void;
setData: ObjectSetter<Data, Paths<Data>>;
setFields: FieldsSetter<Data, Paths<Data>>;
setInitialValues: Helpers<Data, Paths<Data>>["setInitialValues"];
addField: Helpers<Data, Paths<Data>>["addField"];
unsetField: Helpers<Data, Paths<Data>>["unsetField"];
swapFields: Helpers<Data, Paths<Data>>["swapFields"];
moveField: Helpers<Data, Paths<Data>>["moveField"];
resetField: Helpers<Data, Paths<Data>>["resetField"];
reset: Helpers<Data, Paths<Data>>["reset"];
submit: () => void;
createSubmitHandler: Form<Data>["createSubmitHandler"];
get errors(): Errors<Data> | undefined;
onerrorschange?(errors: Errors<Data>): void;
setErrors: Helpers<Data, Paths<Data>>["setErrors"];
get touched(): Touched<Data> | undefined;
ontouchedchange?(touched: Touched<Data>): void;
setTouched: Helpers<Data, Paths<Data>>["setTouched"];
get warnings(): Errors<Data> | undefined;
onwarningschange?(warnings: Errors<Data>): void;
setWarnings: Helpers<Data, Paths<Data>>["setWarnings"];
get isSubmitting(): boolean;
onissubmittingchange?(isSubmitting: boolean): void;
setIsSubmitting: Helpers<Data, Paths<Data>>["setIsSubmitting"];
get isDirty(): boolean;
onisdirtychange?(isDirty: boolean): void;
setIsDirty: Helpers<Data, Paths<Data>>["setIsDirty"];
get isValid(): boolean | undefined;
onisvalidchange?(isValid: boolean): void;
get isValidating(): boolean;
onisvalidatingchange?(isValidating: boolean): void;
get interacted(): string | null;
oninteractedchange?(interacted: string | null): void;
setInteracted: Helpers<Data, Paths<Data>>["setInteracted"];
private _ready;
get ready(): boolean;
onfelteready?(): void;
validate: Helpers<Data, Paths<Data>>["validate"];
formElements: HTMLFormElement[];
private destroy?;
handleSlotChange(): void;
private _destroy?;
private _createForm;
connectedCallback(): void;
updated(changed: PropertyValues<this>): void;
disconnectedCallback(): void;

@@ -27,3 +89,3 @@ render(): import("lit").TemplateResult<1>;

}
type HTMLFelteFormElement<Data extends Obj> = FelteForm<Data>;
type HTMLFelteFormElement<Data extends Obj = any> = FelteForm<Data>;
interface Window {

@@ -35,3 +97,4 @@ __FELTE__: {

}
export { prepareForm, FelteForm };
export { FelteField, prepareForm, FelteForm };
export { FelteSubmitEvent, FelteErrorEvent, FelteSuccessEvent, FelteSubmitError } from "@felte/core";
//# sourceMappingURL=index.d.ts.map

@@ -1,20 +0,82 @@

import { Obj, FormConfig, Keyed, Errors, Touched } from "@felte/core";
import { LitElement } from "lit";
declare function prepareForm<Data extends Obj = any>(id: string, config: FormConfig<Data>): void;
import { PropertyValues, LitElement } from "lit";
import { FieldValue, Obj, FormConfig, Keyed, Errors, Touched, Helpers, Form, Paths, FieldsSetter, ObjectSetter } from "@felte/core";
declare class FelteField<Value extends FieldValue = FieldValue> extends LitElement {
name?: string;
touchOnChange: boolean;
valueProp: string;
inputEvent: string;
blurEvent: string;
value?: Value;
private _onInput?;
private _onBlur;
blur(): void;
_assignedElements: HTMLElement[];
private _destroy?;
private _ready;
get ready(): boolean;
onfeltefieldready?(): void;
firstUpdated(): void;
updated(changed: PropertyValues<this>): void;
disconnectedCallback(): void;
render(): import("lit").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
"felte-field": FelteField;
}
type HTMLFelteFieldElement<Value extends FieldValue = FieldValue> = FelteField<Value>;
}
declare function prepareForm<Data extends Obj = any>(id: string, config: FormConfig<Data>): Promise<HTMLFelteFormElement>;
declare class FelteForm<Data extends Obj = any> extends LitElement {
[key: string]: unknown;
id: string;
_configuration: FormConfig<Data>;
setConfiguration(config: FormConfig<Data>): void;
elements?: HTMLFormElement["elements"];
/* Stores (observables) */
private _storeValues;
get data(): Keyed<Data> | undefined;
ondatachange?(data: Data): void;
setData: ObjectSetter<Data, Paths<Data>>;
setFields: FieldsSetter<Data, Paths<Data>>;
setInitialValues: Helpers<Data, Paths<Data>>["setInitialValues"];
addField: Helpers<Data, Paths<Data>>["addField"];
unsetField: Helpers<Data, Paths<Data>>["unsetField"];
swapFields: Helpers<Data, Paths<Data>>["swapFields"];
moveField: Helpers<Data, Paths<Data>>["moveField"];
resetField: Helpers<Data, Paths<Data>>["resetField"];
reset: Helpers<Data, Paths<Data>>["reset"];
submit: () => void;
createSubmitHandler: Form<Data>["createSubmitHandler"];
get errors(): Errors<Data> | undefined;
onerrorschange?(errors: Errors<Data>): void;
setErrors: Helpers<Data, Paths<Data>>["setErrors"];
get touched(): Touched<Data> | undefined;
ontouchedchange?(touched: Touched<Data>): void;
setTouched: Helpers<Data, Paths<Data>>["setTouched"];
get warnings(): Errors<Data> | undefined;
onwarningschange?(warnings: Errors<Data>): void;
setWarnings: Helpers<Data, Paths<Data>>["setWarnings"];
get isSubmitting(): boolean;
onissubmittingchange?(isSubmitting: boolean): void;
setIsSubmitting: Helpers<Data, Paths<Data>>["setIsSubmitting"];
get isDirty(): boolean;
onisdirtychange?(isDirty: boolean): void;
setIsDirty: Helpers<Data, Paths<Data>>["setIsDirty"];
get isValid(): boolean | undefined;
onisvalidchange?(isValid: boolean): void;
get isValidating(): boolean;
onisvalidatingchange?(isValidating: boolean): void;
get interacted(): string | null;
oninteractedchange?(interacted: string | null): void;
setInteracted: Helpers<Data, Paths<Data>>["setInteracted"];
private _ready;
get ready(): boolean;
onfelteready?(): void;
validate: Helpers<Data, Paths<Data>>["validate"];
formElements: HTMLFormElement[];
private destroy?;
handleSlotChange(): void;
private _destroy?;
private _createForm;
connectedCallback(): void;
updated(changed: PropertyValues<this>): void;
disconnectedCallback(): void;

@@ -27,3 +89,3 @@ render(): import("lit").TemplateResult<1>;

}
type HTMLFelteFormElement<Data extends Obj> = FelteForm<Data>;
type HTMLFelteFormElement<Data extends Obj = any> = FelteForm<Data>;
interface Window {

@@ -35,3 +97,4 @@ __FELTE__: {

}
export { prepareForm, FelteForm };
export { FelteField, prepareForm, FelteForm };
export { FelteSubmitEvent, FelteErrorEvent, FelteSuccessEvent, FelteSubmitError } from "@felte/core";
//# sourceMappingURL=index.min.d.ts.map
{
"name": "@felte/element",
"version": "0.1.0",
"version": "0.2.0",
"description": "An extensible form library that can be used as a custom element",

@@ -26,3 +26,3 @@ "main": "dist/index.cjs",

"dependencies": {
"@felte/core": "1.0.1",
"@felte/core": "1.1.0",
"lit": "^2.2.0"

@@ -39,2 +39,12 @@ },

},
"./dist/esm/felte-form": {
"import": "./dist/esm/felte-form.js",
"require": "./dist/felte-form.cjs",
"default": "./dist/esm/felte-form.js"
},
"./dist/esm/felte-field": {
"import": "./dist/esm/felte-field.js",
"require": "./dist/felte-field.cjs",
"default": "./dist/esm/felte-field.js"
},
"./package.json": "./package.json"

@@ -49,3 +59,3 @@ },

},
"readme": "# @felte/element\n\n[![Tests](https://github.com/pablo-abc/felte/workflows/Tests/badge.svg)](https://github.com/pablo-abc/felte/actions/workflows/test.yml)\n[![Bundle size](https://img.shields.io/bundlephobia/min/@felte/element)](https://bundlephobia.com/result?p=@felte/element)\n[![NPM Version](https://img.shields.io/npm/v/@felte/element)](https://www.npmjs.com/package/@felte/element)\n[![NPM Downloads](https://img.shields.io/npm/dw/@felte/element)](https://www.npmjs.com/package/@felte/element)\n[![codecov](https://codecov.io/gh/pablo-abc/felte/branch/main/graph/badge.svg?token=T73OJZ50LC)](https://codecov.io/gh/pablo-abc/felte)\n\n\nFelte is an extensible form library originally bult for Svelte. This package aims to provide Felte's functionality using a custom element. Felte, on its most simple form, only requires you to provide a `<form>` element to it in order to work.\n\n## Features\n\n- Single action to make your form reactive.\n- Use HTML5 native elements to create your form. (Only the `name` attribute is necessary).\n- Provides stores and helper functions to handle more complex use cases.\n- No assumptions on your validation strategy. Use any validation library you want or write your own strategy.\n- Handles addition and removal of form controls during runtime.\n- Official solutions for error reporting using `reporter` packages.\n- Well tested. Currently at [99% code coverage](https://app.codecov.io/gh/pablo-abc/felte) and constantly working on improving test quality.\n- Supports validation with [yup](./packages/validator-yup/README.md), [zod](./packages/validator-zod/README.md) and [superstruct](./packages/validator-superstruct/README.md).\n- Easily [extend its functionality](https://felte.dev/docs/element/extending-felte).\n\n## Simple usage example\n\nUsing Svelte as an example:\n\n**TODO**: Add proper example\n\n```html\n<script>\n import { prepareForm } from '@felte/element'\n\n prepareForm('signin', {\n onSubmit: async (values) => {\n /* call to an api */\n },\n })\n</script>\n\n<felte-form id=\"signin\">\n <form>\n <input type=text name=email>\n <input type=password name=password>\n <input type=submit value=\"Sign in\">\n </form>\n</felte-form>\n```\n\n## Installation\n\n```sh\nnpm install --save @felte/element\n\n# Or if you use yarn\n\nyarn add @felte/element\n```\n\n## Usage\n\nTo learn more about how to use `felte` to handle your forms, check the [official documentation](https://felte.dev/docs/element/getting-started). **TODO**: Add documentation\n"
"readme": "# Felte: A form library for vanilla JS (web component)\n\n[![Tests](https://github.com/pablo-abc/felte/workflows/Tests/badge.svg)](https://github.com/pablo-abc/felte/actions/workflows/test.yml)\n[![Bundle size](https://img.shields.io/bundlephobia/min/@felte/element)](https://bundlephobia.com/result?p=@felte/element)\n[![NPM Version](https://img.shields.io/npm/v/@felte/element)](https://www.npmjs.com/package/@felte/element)\n[![NPM Downloads](https://img.shields.io/npm/dw/@felte/element)](https://www.npmjs.com/package/@felte/element)\n[![codecov](https://codecov.io/gh/pablo-abc/felte/branch/main/graph/badge.svg?token=T73OJZ50LC)](https://codecov.io/gh/pablo-abc/felte)\n\nFelte is an extensible form library originally bult for Svelte. This package aims to provide Felte's functionality using a custom element. Felte, on its most simple form, only requires you to provide a `<form>` element to it in order to work.\n\n> **WARNING**: This package is under development, things might break on updates and documentation is almost non-existent besides this README.\n\n## Features\n\n- Single action to make your form reactive.\n- Use HTML5 native elements to create your form. (Only the `name` attribute is necessary).\n- Provides stores and helper functions to handle more complex use cases.\n- No assumptions on your validation strategy. Use any validation library you want or write your own strategy.\n- Handles addition and removal of form controls during runtime.\n- Official solutions for error reporting using `reporter` packages.\n- Well tested. Currently at [99% code coverage](https://app.codecov.io/gh/pablo-abc/felte) and constantly working on improving test quality.\n- Supports validation with [yup](/packages/validator-yup/README.md), [zod](/packages/validator-zod/README.md) and [superstruct](/packages/validator-superstruct/README.md).\n- Easily [extend its functionality](https://felte.dev/docs/element/extending-felte).\n\n## Simple usage example\n\nUsing Svelte as an example:\n\n```html\n<script type=\"module\">\n import { prepareForm } from '@felte/element';\n\n prepareForm('signin', {\n onSubmit: async (values) => {\n /* call to an api */\n },\n });\n</script>\n\n<felte-form id=\"signin\">\n <form>\n <input type=\"text\" name=\"email\" />\n <input type=\"password\" name=\"password\" />\n <input type=\"submit\" value=\"Sign in\" />\n </form>\n</felte-form>\n```\n\n## Installation\n\n```sh\nnpm install --save @felte/element\n\n# Or if you use yarn\n\nyarn add @felte/element\n```\n\n## Usage\n\nTo learn more about how to use `felte` to handle your forms, check the [official documentation](https://felte.dev/docs/element/getting-started). **TODO**: Add documentation\n\n## Framework compatibility\n\nThis package should work nicely with any framework. Specially if you're using the `prepareForm` method of creating your form. It also works really nice with frameworks that set attributes as properties or frameworks that provide syntax to set values to properties of elements instead of attributes.\n"
}

@@ -1,2 +0,2 @@

# @felte/element
# Felte: A form library for vanilla JS (web component)

@@ -9,5 +9,6 @@ [![Tests](https://github.com/pablo-abc/felte/workflows/Tests/badge.svg)](https://github.com/pablo-abc/felte/actions/workflows/test.yml)

Felte is an extensible form library originally bult for Svelte. This package aims to provide Felte's functionality using a custom element. Felte, on its most simple form, only requires you to provide a `<form>` element to it in order to work.
> **WARNING**: This package is under development, things might break on updates and documentation is almost non-existent besides this README.
## Features

@@ -22,3 +23,3 @@

- Well tested. Currently at [99% code coverage](https://app.codecov.io/gh/pablo-abc/felte) and constantly working on improving test quality.
- Supports validation with [yup](./packages/validator-yup/README.md), [zod](./packages/validator-zod/README.md) and [superstruct](./packages/validator-superstruct/README.md).
- Supports validation with [yup](/packages/validator-yup/README.md), [zod](/packages/validator-zod/README.md) and [superstruct](/packages/validator-superstruct/README.md).
- Easily [extend its functionality](https://felte.dev/docs/element/extending-felte).

@@ -30,7 +31,5 @@

**TODO**: Add proper example
```html
<script>
import { prepareForm } from '@felte/element'
<script type="module">
import { prepareForm } from '@felte/element';

@@ -41,3 +40,3 @@ prepareForm('signin', {

},
})
});
</script>

@@ -47,5 +46,5 @@

<form>
<input type=text name=email>
<input type=password name=password>
<input type=submit value="Sign in">
<input type="text" name="email" />
<input type="password" name="password" />
<input type="submit" value="Sign in" />
</form>

@@ -68,1 +67,5 @@ </felte-form>

To learn more about how to use `felte` to handle your forms, check the [official documentation](https://felte.dev/docs/element/getting-started). **TODO**: Add documentation
## Framework compatibility
This package should work nicely with any framework. Specially if you're using the `prepareForm` method of creating your form. It also works really nice with frameworks that set attributes as properties or frameworks that provide syntax to set values to properties of elements instead of attributes.

@@ -11,33 +11,120 @@ import typescript from 'rollup-plugin-ts';

export default {
input: './src/index.ts',
output: [
{
file: pkg.main,
format: 'umd',
sourcemap: prod,
exports: 'named',
name: 'FelteReporterElement',
},
prod && {
file: 'dist/esm/index.min.js',
format: 'esm',
sourcemap: prod,
exports: 'named',
plugins: [terser()],
},
{ file: pkg.module, format: 'esm', sourcemap: prod, exports: 'named' },
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(
prod ? 'production' : 'development'
),
preventAssignment: true,
}),
resolve({ browser: true, exportConditions: prod ? [] : ['development'] }),
commonjs(),
typescript({ browserslist: false }),
prod && bundleSize(),
],
};
const builds = [
{
input: './src/index.ts',
output: [
{
file: pkg.main,
format: 'umd',
sourcemap: prod,
exports: 'named',
name: 'FelteReporterElement',
},
prod && {
file: 'dist/esm/index.min.js',
format: 'esm',
sourcemap: prod,
exports: 'named',
plugins: [terser()],
},
{
file: pkg.module,
format: 'esm',
sourcemap: prod,
exports: 'named',
},
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(
prod ? 'production' : 'development'
),
preventAssignment: true,
}),
resolve({ browser: true, exportConditions: prod ? [] : ['development'] }),
commonjs(),
typescript({ browserslist: false }),
prod && bundleSize(),
],
},
];
if (prod) {
builds.push({
input: './src/felte-form.ts',
output: [
{
file: 'dist/felte-form.cjs',
format: 'umd',
sourcemap: prod,
exports: 'named',
name: 'FelteReporterElement',
},
{
file: 'dist/esm/felte-form.min.js',
format: 'esm',
sourcemap: prod,
exports: 'named',
plugins: [terser()],
},
{
file: 'dist/esm/felte-form.js',
format: 'esm',
sourcemap: prod,
exports: 'named',
},
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(
prod ? 'production' : 'development'
),
preventAssignment: true,
}),
resolve({ browser: true, exportConditions: prod ? [] : ['development'] }),
commonjs(),
typescript({ browserslist: false }),
prod && bundleSize(),
],
});
builds.push({
input: './src/felte-field.ts',
output: [
{
file: 'dist/felte-field.cjs',
format: 'umd',
sourcemap: prod,
exports: 'named',
name: 'FelteReporterElement',
},
{
file: 'dist/esm/felte-field.min.js',
format: 'esm',
sourcemap: prod,
exports: 'named',
plugins: [terser()],
},
{
file: 'dist/esm/felte-field.js',
format: 'esm',
sourcemap: prod,
exports: 'named',
},
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(
prod ? 'production' : 'development'
),
preventAssignment: true,
}),
resolve({ browser: true, exportConditions: prod ? [] : ['development'] }),
commonjs(),
typescript({ browserslist: false }),
prod && bundleSize(),
],
});
}
export default builds;

@@ -1,2 +0,21 @@

import type { Obj, FormConfig, Keyed, Errors, Touched } from '@felte/core';
export {
FelteSubmitEvent,
FelteErrorEvent,
FelteSuccessEvent,
FelteSubmitError,
} from '@felte/core';
import type { PropertyValues } from 'lit';
import type { Readable } from 'svelte/store';
import type {
Obj,
FormConfig,
Keyed,
Errors,
Touched,
Helpers,
Form,
Paths,
FieldsSetter,
ObjectSetter,
} from '@felte/core';
import { LitElement, html } from 'lit';

@@ -7,4 +26,11 @@ import {

property,
state,
} from 'lit/decorators.js';
import { createForm, isEqual } from '@felte/core';
import {
createForm,
isEqual,
FelteSubmitEvent,
FelteSuccessEvent,
FelteErrorEvent,
} from '@felte/core';
import { writable } from './stores';

@@ -43,11 +69,52 @@

config: FormConfig<Data>
) {
): Promise<HTMLFelteFormElement> {
window.__FELTE__.configs[id] = config;
return new Promise((resolve) => {
function handleReady(e: Event) {
const felteForm = e.composedPath()[0] as HTMLFelteFormElement;
if (felteForm.id !== id) return;
resolve(felteForm);
document.removeEventListener('felteready', handleReady);
}
document.addEventListener('felteready', handleReady);
});
}
function failFor(name: string) {
return function () {
throw new TypeError(
`Can't call "${name}" on HTMLFelteFormElement. The element is not ready yet.`
);
};
}
const storeKeys = [
'data',
'errors',
'touched',
'warnings',
'isSubmitting',
'isDirty',
'isValid',
'isValidating',
'interacted',
];
@customElement('felte-form')
export class FelteForm<Data extends Obj = any> extends LitElement {
[key: string]: unknown;
@property()
id = '';
@state()
_configuration: FormConfig<Data> = {};
setConfiguration(config: FormConfig<Data>) {
this._configuration = config;
}
elements?: HTMLFormElement['elements'];
/* Stores (observables) */

@@ -70,2 +137,30 @@ private _storeValues: StoreValues<Data> = {

ondatachange?(data: Data): void;
setData: ObjectSetter<Data, Paths<Data>> = failFor('setData');
setFields: FieldsSetter<Data, Paths<Data>> = failFor('setFields');
setInitialValues: Helpers<Data, Paths<Data>>['setInitialValues'] = failFor(
'setInitialValues'
);
addField: Helpers<Data, Paths<Data>>['addField'] = failFor('addField');
unsetField: Helpers<Data, Paths<Data>>['unsetField'] = failFor('unsetField');
swapFields: Helpers<Data, Paths<Data>>['swapFields'] = failFor('swapFields');
moveField: Helpers<Data, Paths<Data>>['moveField'] = failFor('moveField');
resetField: Helpers<Data, Paths<Data>>['resetField'] = failFor('resetField');
reset: Helpers<Data, Paths<Data>>['reset'] = failFor('reset');
submit: () => void = failFor('submit');
createSubmitHandler: Form<Data>['createSubmitHandler'] = failFor(
'createSubmitHandler'
);
get errors() {

@@ -75,2 +170,6 @@ return this._storeValues.errors;

onerrorschange?(errors: Errors<Data>): void;
setErrors: Helpers<Data, Paths<Data>>['setErrors'] = failFor('setErrors');
get touched() {

@@ -80,2 +179,6 @@ return this._storeValues.touched;

ontouchedchange?(touched: Touched<Data>): void;
setTouched: Helpers<Data, Paths<Data>>['setTouched'] = failFor('setTouched');
get warnings() {

@@ -85,2 +188,8 @@ return this._storeValues.warnings;

onwarningschange?(warnings: Errors<Data>): void;
setWarnings: Helpers<Data, Paths<Data>>['setWarnings'] = failFor(
'setWarnings'
);
get isSubmitting() {

@@ -90,2 +199,8 @@ return this._storeValues.isSubmitting;

onissubmittingchange?(isSubmitting: boolean): void;
setIsSubmitting: Helpers<Data, Paths<Data>>['setIsSubmitting'] = failFor(
'setIsSubmitting'
);
get isDirty() {

@@ -95,2 +210,6 @@ return this._storeValues.isDirty;

onisdirtychange?(isDirty: boolean): void;
setIsDirty: Helpers<Data, Paths<Data>>['setIsDirty'] = failFor('setIsDirty');
get isValid() {

@@ -100,2 +219,4 @@ return this._storeValues.isValid;

onisvalidchange?(isValid: boolean): void;
get isValidating() {

@@ -105,2 +226,4 @@ return this._storeValues.isValidating;

onisvalidatingchange?(isValidating: boolean): void;
get interacted() {

@@ -110,70 +233,129 @@ return this._storeValues.interacted;

oninteractedchange?(interacted: string | null): void;
setInteracted: Helpers<Data, Paths<Data>>['setInteracted'] = failFor(
'setInteracted'
);
private _ready = false;
get ready() {
return this._ready;
}
onfelteready?(): void;
validate: Helpers<Data, Paths<Data>>['validate'] = failFor('validate');
@queryAssignedElements({ selector: 'form', flatten: true })
formElements!: HTMLFormElement[];
private destroy?: () => void;
private _destroy?: () => void;
handleSlotChange() {
private _createForm(config: FormConfig<Data>) {
const [formElement] = this.formElements;
if (!formElement || this.destroy) return;
const { configs } = window.__FELTE__;
let config = {};
if (this.id) {
config = configs[this.id];
}
if (!formElement || this._destroy) return;
this.elements = formElement.elements;
const {
form,
data,
errors,
touched,
warnings,
isSubmitting,
isDirty,
isValid,
isValidating,
interacted,
cleanup,
} = createForm<Data>(config, {
const { form, cleanup, ...rest } = createForm<Data>(config, {
storeFactory: writable,
});
const stores = {
data,
errors,
touched,
warnings,
isSubmitting,
isDirty,
isValid,
isValidating,
interacted,
};
const storeKeys = Object.keys(stores) as (keyof typeof stores)[];
this.setData = rest.setData;
this.setFields = rest.setFields;
this.setErrors = rest.setErrors;
this.setTouched = rest.setTouched;
this.setWarnings = rest.setWarnings;
this.setIsSubmitting = rest.setIsSubmitting;
this.setIsDirty = rest.setIsDirty;
this.setInteracted = rest.setInteracted;
this.setInitialValues = rest.setInitialValues;
this.validate = rest.validate;
this.addField = rest.addField;
this.unsetField = rest.unsetField;
this.swapFields = rest.swapFields;
this.moveField = rest.moveField;
this.resetField = rest.resetField;
this.reset = rest.reset;
this.submit = rest.handleSubmit;
this.createSubmitHandler = rest.createSubmitHandler;
const unsubs = storeKeys.map((key) => {
return stores[key].subscribe(($value) => {
if (isEqual($value, this._storeValues[key as string])) return;
this._storeValues[key as string] = $value;
this.dispatchEvent(
new Event(`${key.toLowerCase()}change`, {
bubbles: true,
composed: true,
})
);
});
return (rest[key as keyof typeof rest] as Readable<any>).subscribe(
($value) => {
if (isEqual($value, this._storeValues[key as string])) return;
this._storeValues[key as string] = $value;
const k = key.toLowerCase();
const handler = this[`on${k}change`];
if (typeof handler === 'function') handler($value);
this.dispatchEvent(new Event(`${k}change`));
}
);
});
const { destroy } = form(formElement);
this.destroy = () => {
const handleFelteSubmit = (e: Event) => {
const event = e as FelteSubmitEvent;
const submitEvent = new FelteSubmitEvent();
this.dispatchEvent(submitEvent);
if (submitEvent.defaultPrevented) event.preventDefault();
event.onSubmit = submitEvent.onSubmit;
event.onSuccess = submitEvent.onSuccess;
event.onError = submitEvent.onError;
};
const handleFelteSuccess = (e: Event) => {
const event = e as FelteSuccessEvent;
const successEvent = new FelteSuccessEvent(event.detail);
this.dispatchEvent(successEvent);
};
const handleFelteError = (e: Event) => {
const event = e as FelteErrorEvent;
const errorEvent = new FelteErrorEvent(event.detail);
this.dispatchEvent(errorEvent);
event.errors = errorEvent.errors;
if (errorEvent.defaultPrevented) event.preventDefault();
};
formElement.addEventListener('feltesubmit', handleFelteSubmit);
formElement.addEventListener('feltesuccess', handleFelteSuccess);
formElement.addEventListener('felteerror', handleFelteError);
this._destroy = () => {
destroy();
cleanup();
formElement.removeEventListener('feltesubmit', handleFelteSubmit);
formElement.removeEventListener('feltesuccess', handleFelteSuccess);
formElement.removeEventListener('felteerror', handleFelteError);
unsubs.forEach((unsub) => unsub());
};
this._ready = true;
this.onfelteready?.();
this.dispatchEvent(
new Event('felteready', { bubbles: true, composed: true })
);
}
connectedCallback() {
super.connectedCallback();
const { configs } = window.__FELTE__;
if (this.id) {
this._configuration = configs[this.id] || this._configuration;
}
}
updated(changed: PropertyValues<this>) {
if (changed.has('_configuration')) {
this._destroy?.();
this._destroy = undefined;
this._ready = false;
this._createForm(this._configuration);
}
}
disconnectedCallback() {
super.disconnectedCallback();
this.destroy?.();
this._destroy?.();
}
render() {
return html`<slot @slotchange=${this.handleSlotChange}></slot>`;
return html`<slot></slot>`;
}

@@ -187,3 +369,3 @@ }

type HTMLFelteFormElement<Data extends Obj> = FelteForm<Data>;
type HTMLFelteFormElement<Data extends Obj = any> = FelteForm<Data>;

@@ -190,0 +372,0 @@ interface Window {

@@ -0,1 +1,2 @@

export * from './felte-field';
export * from './felte-form';
import 'uvu-expect-dom/extend';
import type { CoreForm } from '@felte/core';
import { createForm as coreCreateForm } from '@felte/core';
import { writable } from 'svelte/store';
import type {
FormConfig,
FormConfigWithTransformFn,
FormConfigWithoutTransformFn,
Obj,
UnknownStores,
Stores,
KnownStores,
Helpers,
UnknownHelpers,
KnownHelpers,
} from '@felte/common';
export function createDOM(): void {
const formElement = document.createElement('form');
formElement.name = 'test-form';
document.body.appendChild(formElement);
}
export function cleanupDOM(): void {

@@ -68,15 +46,1 @@ removeAllChildren(document.body);

}
export function createForm<Data extends Obj>(
config?: FormConfigWithTransformFn<Data>
): CoreForm<Data> & UnknownHelpers<Data> & UnknownStores<Data>;
export function createForm<Data extends Obj>(
config?: FormConfigWithoutTransformFn<Data>
): CoreForm<Data> & KnownHelpers<Data> & KnownStores<Data>;
export function createForm<Data extends Obj>(
config: FormConfig<Data> = {}
): CoreForm<Data> & Helpers<Data> & Stores<Data> {
return coreCreateForm(config as any, {
storeFactory: writable,
});
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc