<form class="{{cssClass}} {{actor.type}} flexcol" autocomplete="off">

    {{!-- Sheet Header --}}
    <header class="sheet-header">
        {{!-- Header stuff goes here --}}
        <div class="header-fields">
            <div class="attributes">
                {{#each attributes}}
                    {{> "systems/DSA_4-1/templates/ui/partial-attribute-button.hbs" this}}
                {{/each}}
            </div>
        </div>
    </header>

    <div class="head-data">
        <h1 class="charname {{#if owner}}secret-identity{{/if}}" {{#if owner}}title="{{originalName}}"{{/if}} ><input
                name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
        <img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{name}}"/>
        <h2 class="sidebar-element header">Kampf Daten</h2>

        <div class="sidebar-element resource-bar">
            <label>LeP: {{this.lep}}</label><span class="resource-fill lep" style="width: {{this.lepper}}%"></span>
        </div>

        {{#if ausdauer}}
        <div class="sidebar-element resource-bar">
            <label>AuP: {{this.aup}}</label><span class="resource-fill aup" style="width: {{this.aupper}}%"></span>
        </div>
        {{/if}}

        {{#if this.hasLiturgies}}
            <div class="sidebar-element resource-bar">
                <label>KE: {{this.ke}}</label><span class="resource-fill kap" style="width: {{this.keper}}%"></span>
            </div>
        {{/if}}

        {{#if this.hasSpells}}
            <div class="sidebar-element resource-bar">
                <label>AsP: {{this.asp}}</label><span class="resource-fill asp" style="width: {{this.aspper}}%"></span>
            </div>
        {{/if}}

        {{#each attacks}}
            <div>
                <h3>{{this.using}} ({{this.name}})</h3>
                <div class="combined">
                {{#if this.at}}
                    <div class="sidebar-element rollable" data-roll="{{this.atroll}}" data-label="Attacke">
                        <label>AT</label>
                        <div class="formula">{{this.at}}</div>
                    </div>
                {{/if}}
                {{#if this.pa}}
                    <div class="sidebar-element rollable" data-roll="{{this.paroll}}" data-label="Parade">
                        <label>PA</label>
                        <div class="formula">{{this.pa}}</div>
                    </div>
                {{/if}}
                </div>
                {{#if this.at}}
                    <div class="sidebar-element rollable" data-roll="{{this.tproll}}" data-label="Schaden">
                        <label>Schaden</label>
                        <div class="formula">{{this.tp}}</div>
                    </div>
                {{/if}}
                {{#if this.ini}}
                    <div class="sidebar-element rollable" data-label="Initiative" data-roll="{{this.iniroll}}"><label>Initiative</label>
                        <div class="formula">{{this.ini}}</div>
                    </div>
                {{/if}}
            </div>
        {{/each}}

        <h2 class="sidebar-element header">Favouriten</h2>

    </div>

    {{!-- Sheet Tab Navigation --}}
    <nav class="sheet-tabs tabs" data-group="primary">
        <a class="item" data-tab="overview">Übersicht</a>
        <a class="item" data-tab="attributes">Eigenschaften</a>
        <a class="item" data-tab="combat">Kampf</a>
        <a class="item" data-tab="skills">Talente</a>
        <a class="item" data-tab="backpack">Inventar</a>
        {{#if this.hasSpells}}<a class="item" data-tab="spells">Zauber</a>{{/if}}
        {{#if this.hasLiturgies}}<a class="item" data-tab="liturgies">Liturgien</a>{{/if}}
        <a class="item" data-tab="effects">Effekte</a>
    </nav>

    {{!-- Sheet Body --}}
    <section class="sheet-body">
        <div class="tab overview" data-group="primary" data-tab="overview">

            <div class="meta-data">

                <div><label>Spezies
                    <input type="text" name="system.meta.spezies" value="{{system.meta.spezies}}"/>
                </label>
                </div>
                <div><label for="system.meta.kultur">Kultur</label>
                    <input type="text" name="system.meta.kultur"
                           value="{{system.meta.kultur}}"/>
                </div>
                <div><label for="system.meta.profession">Profession</label>
                    <input type="text" name="system.meta.profession"
                           value="{{system.meta.profession}}"/>
                </div>
                <div><label for="system.meta.geschlecht">Geschlecht</label>
                    <input type="text" name="system.meta.geschlecht"
                           value="{{system.meta.geschlecht}}"/>
                </div>
                <div class="double"><label>Sozialstatus</label>
                    <input type="text" name="system.meta.stand" value="{{system.meta.stand}}"/>
                    <input type="text" name="system.meta.titel" value="{{system.meta.titel}}"/>
                </div>

                <div><label for="system.meta.groesse">Größe</label>
                    <input type="number" name="system.meta.groesse" value="{{system.meta.groesse}}"/>
                </div>
                <div><label for="system.meta.gewicht">Gewicht</label>
                    <input type="number" name="system.meta.gewicht" value="{{system.meta.gewicht}}"/>
                </div>
                <div class="double"><label>Alter</label>
                    <input type="number" name="system.meta.groesse" value="{{system.meta.alter}}"/>
                    <input type="text" name="system.meta.geburtsdatum" value="{{system.meta.geburtstag}}"/>
                </div>
            </div>
            <div class="meta-data html">
                <div><label>Aussehen</label>
                    {{editor system.meta.aussehen target="system.meta.aussehen" button=true owner=owner
                             editable=editable}}
                </div>
                <div><label>Familie</label>
                    {{editor system.meta.familie target="system.meta.familie" button=true owner=owner
                             editable=editable}}
                </div>
            </div>

        </div>
        <div class="tab attributes" data-group="primary" data-tab="attributes">
            <div class="attributes-overview">
                <div class="attribute">
                    <label>Mut</label>
                    <input value="{{this.system.attribute.mu.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.mu}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>
                </div>
                <div class="attribute">
                    <label>Klugheit</label>
                    <input value="{{this.system.attribute.kl.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.kl}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>
                </div>
                <div class="attribute">
                    <label>Intuition</label>
                    <input value="{{this.system.attribute.in.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.in}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>

                </div>
                <div class="attribute">
                    <label>Charisma</label>
                    <input value="{{this.system.attribute.ch.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.ch}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>

                </div>
                <div class="attribute">
                    <label>Fingerfertigkeit</label>
                    <input value="{{this.system.attribute.ff.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.ff}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>

                </div>
                <div class="attribute">
                    <label>Geschicklichkeit</label>
                    <input value="{{this.system.attribute.ge.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.ge}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>

                </div>
                <div class="attribute">
                    <label>Konstitution</label>
                    <input value="{{this.system.attribute.ko.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.ko}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>

                </div>
                <div class="attribute">
                    <label>Körperkraft</label>
                    <input value="{{this.system.attribute.kk.aktuell}}">
                    <div class="mods">
                        {{#each this.mods.kk}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>

                </div>
                <div class="attribute">
                    <label>Sozialstatus</label>
                    <input value="{{this.system.attribute.so.aktuell}}">
                </div>
                <div class="attribute">
                    <label>AT-Basis</label>
                    <input value="{{derived.at.basis}}">
                    <div class="mods">
                        {{#each this.mods.at}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>
                </div>
                <div class="attribute">
                    <label>PA-Basis</label>
                    <input value="{{derived.pa.basis}}">
                    <div class="mods">
                        {{#each this.mods.pa}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>
                </div>
                <div class="attribute">
                    <label>FK-Basis</label>
                    <input value="{{derived.fk.basis}}">
                    <div class="mods">
                        {{#each this.mods.fk}}
                            <span class="mod" title="{{this.name}}">{{this.value}}</span>
                        {{/each}}
                    </div>
                </div>
            </div>
            <div class="resources-overview">
                <div class="attribute">
                    <label>Lebensenergie</label>
                    <input value="{{actor.system.lep.aktuell}}">
                    <input value="{{actor.system.lep.max}}">
                </div>
                {{#if ausdauer}}
                <div class="attribute">
                    <label>Ausdauer</label>
                    <input value="{{actor.system.aup.aktuell}}">
                    <input value="{{actor.system.aup.max}}">
                </div>
                {{/if}}
                {{#if hasSpells}}
                <div class="attribute">
                    <label>Astralenergie</label>
                    <input value="{{actor.system.asp.aktuell}}">
                    <input value="{{actor.system.asp.max}}">
                </div>
                {{/if}}
                {{#if hasLiturgies}}
                    <div class="attribute">
                    <label>Karmaenergie</label>
                    <input value="{{actor.system.kap.aktuell}}">
                    <input value="{{actor.system.kap.max}}">
                </div>
                {{/if}}
            </div>
            <div class="advantages">
                <h3>Vor- und Nachteile</h3>
            <ul>
                {{#each this.advantages}}
                    <li>{{> "systems/DSA_4-1/templates/ui/partial-advantage-button.hbs" this}}</li>
                {{/each}}
            </ul>
            </div>
            <div class="special-abilities">
                <h3>Sonderfertigkeiten</h3>
                <ul>
                    {{#each this.specialAbilities}}
                        <li>{{> "systems/DSA_4-1/templates/ui/partial-sf-button.hbs" this}}</li>
                    {{/each}}
                </ul>
            </div>
        </div>

        <div class="tab combat {{#if (or trefferzonen zonenruestung)}}zones{{/if}}" data-group="primary"
             data-tab="combat">

            <div class="tab-resources">

                <div class="initiaitve">
                <label>Initiative:</label>
                <input type="number" name="system.attribute.ini.wuerfel" value="{{this.inidice}}"/>
                <span class="inline">w6</span>
                <input type="number" name="system.attribute.ini.aktuell" value="{{this.inivalue}}"/>
            </div>
            <div class="lebensenergie">
                <label>Lebensenergie:</label>
                <input type="number" name="system.lep.aktuell" value="{{actor.system.lep.aktuell}}"/>
                <span class="inline">von</span>
                <input type="number" disabled value="{{actor.system.lep.max}}"/>
            </div>
                {{#if ausdauer}}
            <div class="ausdauer">
                <label>Ausdauerpunkte:</label>
                <input type="number" name="system.aup.aktuell" value="{{actor.system.aup.aktuell}}"/>
                <span class="inline">von</span>
                <input type="number" disabled value="{{actor.system.aup.max}}"/>
            </div>
                {{/if}}
                {{#if (not zonenruestung)}}
                    <div class="armor">
                    <label>RS:</label>
                    {{derived.rs}}
                </div>
                {{/if}}
                <div class="handicap">
                    <label>BE:</label>
                    {{derived.be}}
                </div>


            </div>
            {{#if (not trefferzonen)}}
            <div class="wounds">
                <label data-operation="reduceWounds" data-value="0">Wunden: {{this.wounds}} / {{this.maxWounds}}</label>
                {{#each this.woundsFilled}}
                    {{#if this}}
                        <div class="filled-segment" data-operation="reduceWounds"
                             data-value="{{@index}}">{{@index}}</div>
                    {{else}}
                        <div class="empty-segment" data-operation="addWounds" data-value="{{@index}}">{{@index}}</div>
                    {{/if}}
                {{/each}}
            </div>
            {{/if}}


            <div class="actions">
                <h3>Aktionen im Kampf</h3>
                {{#each this.actions}}
                    {{> "systems/DSA_4-1/templates/ui/partial-action-button.hbs" this}}
                {{/each}}
            </div>

            {{#if (or trefferzonen zonenruestung)}}
                <div class="paperdoll">
                    <h3>{{#if (and trefferzonen zonenruestung)}}Trefferzonen{{/if}}{{#if
                            (and trefferzonen (not zonenruestung))}}Wunden{{/if}}{{#if
                            (and (not trefferzonen) zonenruestung)}}Rüstung{{/if}}</h3>
                    <div>
                        <svg
                                width="280"
                                height="530"
                                viewBox="0 0 70 140"
                                xmlns="http://www.w3.org/2000/svg">
                            <path class="paperdoll-image"
                                  d="m 22.868053,0.6591628 0.658626,-0.52687462 6.270125,4.42573652 3.97809,0.5795595 0.605938,-4.58379633 11.828915,2.02846193 0.07905,2.3182421 3.556578,-0.9220267 6.691636,3.7671414 2.292014,3.7671454 -4.030787,0.05268 0.89573,3.951549 -1.106491,2.23921 -3.345818,-0.632247 0.869387,4.241332 v 2.476303 l 1.422627,-0.02634 0.500563,1.343527 h 3.29312 l 1.975878,3.424677 0.05267,2.818774 2.371046,6.243447 6.665292,14.72611 1.949534,0.658592 0.34249,4.794545 -0.289802,1.606966 0.922074,1.765023 -0.395167,2.897805 2.002222,6.743979 1.027449,1.949433 -0.737657,5.031644 -3.925413,4.399394 -0.922074,-0.553222 0.579595,-1.844054 -1.896847,1.264499 -0.526897,-0.790314 1.475315,-1.369869 -1.36994,-5.690236 -0.974762,4.083275 -1.053803,-0.342473 -0.790345,-3.108552 0.579584,-2.370933 0.526907,-0.658592 -0.263459,-0.500527 0.289803,-1.554277 0.948418,-2.739737 -0.447865,-2.212876 -1.106492,-0.974715 -1.554356,-1.501588 -2.423744,-4.030581 0.711314,-1.264496 -3.793683,-5.532171 -0.02638,-1.554275 -1.475326,-1.554276 -1.185522,-3.213929 -0.869387,-0.763967 -3.029682,4.820892 -1.159179,0.447843 0.447865,0.974716 -0.790345,0.974716 -0.21076,2.002118 0.368823,1.343527 -0.289792,1.923087 1.71243,2.397274 0.02638,1.791371 1.23821,1.975774 2.950651,13.013779 -0.421522,0.684934 2.713536,14.278264 7.113157,18.150786 1.132835,0.0791 3.767339,9.19394 -2.344701,0.73762 1.92318,7.42891 -1.738774,3.87253 1.001116,3.79348 2.687192,4.10961 -0.68497,2.44996 -10.643392,0.079 -0.684969,-8.42997 1.106491,-1.42257 -1.659742,-1.47524 0.07905,-2.00211 -1.949535,-2.18653 -0.55325,-3.84617 -1.422628,0.15805 -0.500553,-7.71869 1.02745,-1.05374 -2.133941,-4.21499 0.421521,-2.42362 -4.32059,-6.322483 -1.317252,-4.056921 -9.247098,-17.702946 -0.395178,0.210749 -3.609266,18.783038 -1.975878,3.635422 -0.289802,10.721871 0.764011,-0.0264 2.397389,7.71869 -4.663069,0.97472 -0.737658,6.74398 -2.212983,1.92309 1.422638,6.74397 -1.896847,3.10855 -4.504997,0.34248 -0.105385,-0.86934 -3.714641,1.2118 -8.140618,0.21075 -0.131729,-2.00212 8.483107,-5.47948 0.711314,-1.89674 -0.316146,-2.18653 0.869386,-0.71128 -1.027449,-1.36986 1.659732,-6.55958 -2.502775,-0.76396 1.317252,-3.42469 -0.289792,-1.2645 2.397389,-3.05585 2.107608,-12.592278 -0.948419,-7.349881 0.316136,-13.90946 -1.554356,-1.159119 4.504996,-21.153968 0.316147,-4.557454 0.948418,-3.345646 -2.160295,2.924147 -4.847487,4.135956 1.264565,1.080091 -3.42485,2.397275 -3.29313,2.766082 -0.68497,1.923087 -1.791461,-0.57956 -1.001116,1.633307 0.07905,4.87358 L 9.168636,68.889233 4.2948053,70.180074 1.5812697,67.466679 0.13228831,66.070468 2.9775532,60.801731 6.5868297,58.825953 6.692205,57.245334 8.0884885,56.059869 v -1.923064 l 2.9769935,-7.824067 2.897953,0.553216 7.323918,-8.166536 v -0.500531 l 3.872714,-4.689172 -0.263448,-2.028463 2.766234,-5.1897 5.163622,-1.448903 0.158063,-1.844055 -0.922074,-2.291899 0.948428,-5.95367 -0.658626,-4.294017 -4.926518,-3.9515498 z"/>
                        </svg>
                        {{#if trefferzonen}}
                            <span class="wound kopf">{{derived.wunden.kopf}}</span>
                            <span class="wound brust">{{derived.wunden.brust}}</span>
                            <span class="wound armlinks">{{derived.wunden.armlinks}}</span>
                            <span class="wound armrechts">{{derived.wunden.armrechts}}</span>
                            <span class="wound bauch">{{derived.wunden.bauch}}</span>
                            <span class="wound beinlinks">{{derived.wunden.beinlinks}}</span>
                            <span class="wound beinrechts">{{derived.wunden.beinrechts}}</span>
                        {{/if}}
                        {{#if zonenruestung}}
                            <span class="armor kopf">{{derived.rs.kopf}}</span>
                            <span class="armor brust">{{derived.rs.brust}}</span>
                            <span class="armor armlinks">{{derived.rs.armlinks}}</span>
                            <span class="armor armrechts">{{derived.rs.armrechts}}</span>
                            <span class="armor bauch">{{derived.rs.bauch}}</span>
                            <span class="armor beinlinks">{{derived.rs.beinlinks}}</span>
                            <span class="armor beinrechts">{{derived.rs.beinrechts}}</span>
                        {{/if}}
                    </div>
                </div>
            {{/if}}

        </div>
        <div class="tab skills" data-group="primary" data-tab="skills">
            <div class="talent-group">
                <h2>Kampftalente</h2>
                <ul>
                    {{#each skills.Kampf}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-weaponskill-button.hbs" this}}
                        </li>
                    {{/each}}
                </ul>
            </div>
            <div class="talent-group">
                <h2>Körperliche Talente</h2>
                <ul>
                <li>
                    {{#each skills.Körperlich}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-button.hbs" this}}
                        </li>
                    {{/each}}
                </ul>
            </div>
            <div class="talent-group">
                <h2>Gesellschaftliche Talente</h2>
                <ul>
                <li>
                    {{#each skills.Gesellschaft}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-button.hbs" this}}
                        </li>
                    {{/each}}
                </ul>
            </div>
            <div class="talent-group">
                <h2>Natur Talente</h2>
                <ul>
                <li>
                    {{#each skills.Natur}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-button.hbs" this}}
                        </li>
                    {{/each}}
                </ul>
            </div>
            <div class="talent-group">
                <h2>Wissenstalente</h2>
                <ul>
                <li>
                    {{#each skills.Wissen}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-button.hbs" this}}
                        </li>
                    {{/each}}
                </ul>
            </div>
            <div class="talent-group">
                <h2>Schriften & Sprachen</h2>
                <ul>
                <li>
                    {{#each skills.Schriften}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-language-button.hbs" this}}
                        </li>
                    {{/each}}
                    {{#each skills.Sprachen}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-language-button.hbs" this}}
                        </li>
                    {{/each}}
                </ul>
            </div>
            <div class="talent-group">
                <h2>Handwerkliche Talente</h2>
                <ul>
                <li>
                    {{#each skills.Handwerk}}
                        <li>
                            {{> "systems/DSA_4-1/templates/ui/partial-rollable-button.hbs" this}}
                        </li>
                    {{/each}}
                </ul>
            </div>

        </div>
        <div class="tab backpack" data-group="primary" data-tab="backpack">

            <div class="capacity">
                <label>Tragkraft: {{this.carryingweight}} von maximal {{this.maxcarryingcapacity}} Stein</label>
                <div class="resource">
                    <span class="fill" style="width: {{this.carryingpercentage}}%"></span>
                </div>
            </div>


            <div class="inventory">
                <h3>Inventar</h3>

                {{> "systems/DSA_4-1/templates/ui/partial-equipment-button.hbs" equipments}}

            </div>

            <div class="paperdoll">
                <h3>Ausrüstung</h3>
                {{!-- Set Tab Navigation --}}
                <nav class="sheet-tabs paperdoll-tabs tabs" data-group="secondary">
                    {{#each this.sets}}
                        <a class="item" data-tab="{{this.tab}}">{{this.name}}</a>
                    {{/each}}
                </nav>
                {{!-- Set Body --}}
                <section class="sheet-body paperdoll-sets">
                    {{#each this.sets}}
                        <div class="tab {{this.tab}}" data-group="secondary" data-tab="{{this.tab}}">

                            <div class="paperdoll">
                                <svg
                                        width="280"
                                        height="530"
                                        viewBox="0 0 70 140"
                                        xmlns="http://www.w3.org/2000/svg">
                                    <path class="paperdoll-image"
                                          d="m 22.868053,0.6591628 0.658626,-0.52687462 6.270125,4.42573652 3.97809,0.5795595 0.605938,-4.58379633 11.828915,2.02846193 0.07905,2.3182421 3.556578,-0.9220267 6.691636,3.7671414 2.292014,3.7671454 -4.030787,0.05268 0.89573,3.951549 -1.106491,2.23921 -3.345818,-0.632247 0.869387,4.241332 v 2.476303 l 1.422627,-0.02634 0.500563,1.343527 h 3.29312 l 1.975878,3.424677 0.05267,2.818774 2.371046,6.243447 6.665292,14.72611 1.949534,0.658592 0.34249,4.794545 -0.289802,1.606966 0.922074,1.765023 -0.395167,2.897805 2.002222,6.743979 1.027449,1.949433 -0.737657,5.031644 -3.925413,4.399394 -0.922074,-0.553222 0.579595,-1.844054 -1.896847,1.264499 -0.526897,-0.790314 1.475315,-1.369869 -1.36994,-5.690236 -0.974762,4.083275 -1.053803,-0.342473 -0.790345,-3.108552 0.579584,-2.370933 0.526907,-0.658592 -0.263459,-0.500527 0.289803,-1.554277 0.948418,-2.739737 -0.447865,-2.212876 -1.106492,-0.974715 -1.554356,-1.501588 -2.423744,-4.030581 0.711314,-1.264496 -3.793683,-5.532171 -0.02638,-1.554275 -1.475326,-1.554276 -1.185522,-3.213929 -0.869387,-0.763967 -3.029682,4.820892 -1.159179,0.447843 0.447865,0.974716 -0.790345,0.974716 -0.21076,2.002118 0.368823,1.343527 -0.289792,1.923087 1.71243,2.397274 0.02638,1.791371 1.23821,1.975774 2.950651,13.013779 -0.421522,0.684934 2.713536,14.278264 7.113157,18.150786 1.132835,0.0791 3.767339,9.19394 -2.344701,0.73762 1.92318,7.42891 -1.738774,3.87253 1.001116,3.79348 2.687192,4.10961 -0.68497,2.44996 -10.643392,0.079 -0.684969,-8.42997 1.106491,-1.42257 -1.659742,-1.47524 0.07905,-2.00211 -1.949535,-2.18653 -0.55325,-3.84617 -1.422628,0.15805 -0.500553,-7.71869 1.02745,-1.05374 -2.133941,-4.21499 0.421521,-2.42362 -4.32059,-6.322483 -1.317252,-4.056921 -9.247098,-17.702946 -0.395178,0.210749 -3.609266,18.783038 -1.975878,3.635422 -0.289802,10.721871 0.764011,-0.0264 2.397389,7.71869 -4.663069,0.97472 -0.737658,6.74398 -2.212983,1.92309 1.422638,6.74397 -1.896847,3.10855 -4.504997,0.34248 -0.105385,-0.86934 -3.714641,1.2118 -8.140618,0.21075 -0.131729,-2.00212 8.483107,-5.47948 0.711314,-1.89674 -0.316146,-2.18653 0.869386,-0.71128 -1.027449,-1.36986 1.659732,-6.55958 -2.502775,-0.76396 1.317252,-3.42469 -0.289792,-1.2645 2.397389,-3.05585 2.107608,-12.592278 -0.948419,-7.349881 0.316136,-13.90946 -1.554356,-1.159119 4.504996,-21.153968 0.316147,-4.557454 0.948418,-3.345646 -2.160295,2.924147 -4.847487,4.135956 1.264565,1.080091 -3.42485,2.397275 -3.29313,2.766082 -0.68497,1.923087 -1.791461,-0.57956 -1.001116,1.633307 0.07905,4.87358 L 9.168636,68.889233 4.2948053,70.180074 1.5812697,67.466679 0.13228831,66.070468 2.9775532,60.801731 6.5868297,58.825953 6.692205,57.245334 8.0884885,56.059869 v -1.923064 l 2.9769935,-7.824067 2.897953,0.553216 7.323918,-8.166536 v -0.500531 l 3.872714,-4.689172 -0.263448,-2.028463 2.766234,-5.1897 5.163622,-1.448903 0.158063,-1.844055 -0.922074,-2.291899 0.948428,-5.95367 -0.658626,-4.294017 -4.926518,-3.9515498 z"/>
                                </svg>

                                {{#each this.slots}}
                                    <div class="equipped {{this.target}}" data-set-id="{{../index}}"
                                         data-target="{{this.target}}" data-actor="{{../../actor.id}}"><img
                                            src="{{this.icon}}"/></div>
                                {{/each}}
                                {{#if (eq ../actor.system.setEquipped @index)}}
                                    <button disabled="disabled">Ausgerüstet</button>
                                {{else}}
                                    <button data-operation="switchSet" data-id="{{@index}}">Wechseln</button>
                                {{/if}}

                            </div>
                        </div>
                    {{/each}}

                </section>
            </div>

        </div>
        {{#if this.hasSpells}}
        <div class="tab spells" data-group="primary" data-tab="spells">

            <div class="tab-resources">

                <div class="astralpoints">
                    <label>AsP:</label>
                    <input type="number" name="system.asp.aktuell" value="{{system.asp.aktuell}}"/>
                    <span class="inline">von</span>
                    <input type="number" disabled value="{{derived.asp.max}}"/>
                </div>
                <div class="mr">
                    <label>MR: </label>
                    <input type="number" disabled value="{{derived.mr.aktuell}}"/>
                </div>
            </div>

            <table>
                <thead>
                <tr>
                    <th class="die-column"></th>
                    <th>Zaubername</th>
                    <th colspan="3">Probe</th>
                    <th>ZfW</th>
                    <th>Merkmale</th>
                </tr>
                </thead>
                <tbody>
                {{#each this.spells}}
                    <tr>
                        <td class="spell rollable">
                            {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                        </td>
                        <td class="clickable" data-id="{{this.id}}" data-operation="openActorSheet">
                            <span>{{this.name}}</span></td>
                        <td>{{this.eigenschaft1}}</td>
                        <td>{{this.eigenschaft2}}</td>
                        <td>{{this.eigenschaft3}}</td>
                        <td>{{this.zfw}}</td>
                        <td>
                            <ul class="merkmal-list">{{#each this.merkmal}}
                                <li>{{this}}</li>{{/each}}</ul>
                        </td>
                    </tr>
                {{/each}}
                </tbody>
            </table>

        </div>
        {{/if}}
        {{#if this.hasLiturgies}}
            <div class="tab liturgies" data-group="primary" data-tab="liturgies">

                <div class="tab-resources">

                    <div class="karmapoints">
                        <label>KaP:</label>
                        <input type="number" name="system.kap.aktuell" value="{{system.kap.aktuell}}"/>
                        <span class="inline">von</span>
                        <input type="number" disabled value="{{derived.kap.max}}"/>
                    </div>
                </div>

                {{#each this.liturgies}}
                    <table class="{{this.deity}}">
                        <thead class="liturgy-header">
                        <tr class="liturgy-header">
                            <th style="width: 0"></th>
                            <th class="banner-top" style="width: 90px"><img
                                    src="systems/DSA_4-1/assets/deities/{{this.deity}}.png"/></th>
                            <th colspan="2">Liturgiekenntnis: {{this.lkp}}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{#if this.countO}}
                            <tr>
                                <th rowspan="{{this.total}}" class="background"></th>
                                <th class="banner-mid" rowspan="{{countO}}">
                                    <div>
                                        <div class="rank-label">{{#if this.count0}}0{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.O}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}" data-operation="openActorSheet">
                                        {{this.name}}</td>
                                    <td></td>
                                </tr>
                            {{/each}}
                        {{/if}}
                        {{#if this.countI}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countI}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countI}}I{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.I}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}" data-operation="openActorSheet">
                                        {{this.name}}</td>
                                    <td></td>
                                </tr>
                            {{/each}}
                        {{/if}}
                        {{#if this.countII}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countII}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countII}}II{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.II}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}"
                                        data-operation="openActorSheet">{{this.name}}</td>
                                </tr>
                            {{/each}}
                        {{/if}}
                        {{#if this.countIII}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countIII}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countIII}}III{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.III}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}"
                                        data-operation="openActorSheet">{{this.name}}</td>
                                </tr>
                            {{/each}}
                        {{/if}}
                        {{#if this.countIV}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countIV}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countIV}}IV{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.IV}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}"
                                        data-operation="openActorSheet">{{this.name}}</td>
                                </tr>
                            {{/each}}{{/if}}
                        {{#if this.countV}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countV}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countV}}V{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.V}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}"
                                        data-operation="openActorSheet">{{this.name}}</td>
                                </tr>
                            {{/each}}
                        {{/if}}
                        {{#if this.countVI}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countVI}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countVI}}VI{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.VI}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}"
                                        data-operation="openActorSheet">{{this.name}}</td>
                                </tr>
                            {{/each}}
                        {{/if}}{{#if this.countVII}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countVII}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countVII}}VII{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.VII}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}"
                                        data-operation="openActorSheet">{{this.name}}</td>
                                </tr>
                            {{/each}}
                        {{/if}}{{#if this.countVIII}}
                            <tr>
                                <th class="banner-mid" rowspan="{{countVIII}}">
                                    <div>
                                        <div class="rank-label">{{#if this.countVIII}}VIII{{/if}}</div>
                                    </div>
                                </th>
                            </tr>
                            {{#each this.VIII}}
                                <tr>
                                    <td class="liturgy rollable" data-id="{{this.id}}" data-rank="{{this.rank}}"
                                        data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
                                        {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
                                    </td>
                                    <td class="clickable" data-id="{{this.id}}"
                                        data-operation="openActorSheet">{{this.name}}</td>
                                </tr>
                            {{/each}}
                        {{/if}}
                        </tbody>
                    </table>
                {{/each}}

        </div>
        {{/if}}

        <div class="tab effects" data-group="primary" data-tab="effects">
            <table class="effects">
                <thead>
                <th>Effekt</th>
                <th>Veränderungen</th>
                <th></th>
                </thead>
                <tbody>
                {{#each this.effects}}
                    <tr>
                        <td>
                            {{this.name}}
                        </td>
                        <td>{{this.conditions}}</td>
                        <td>{{#if ../isGM}}
                            <button data-operation="removeEffect" data-actor-id="{{actor}}" data-effect-id="{{id}}"><i
                                    class="fa-solid fa-trash"></i></button>{{/if}}</td>
                    </tr>
                {{/each}}
                </tbody>
            </table>
        </div>

    </section>
</form>
