import{C as e,k as t}from"./utils-BakkG8Vx.js";import{At as n,Ct as r,F as i,I as a,Mt as o,St as s,Y as c,z as l}from"./content_renderer-CoENEE63.js";import{n as u,s as d}from"./options-CDt8ZGCW.js";import{Z as f}from"./hooks-CSTgmcXO.js";import{t as p}from"./note_autocomplete-CXZAuuiO.js";import{r as m}from"./experimental_features-3wqZ4yO-.js";import{t as h}from"./attribute_autocomplete-Cf0iqRoq.js";var g=`
<div class="attr-detail tn-tool-dialog">
    <style>
        .attr-detail {
            display: block;
            background-color: var(--accented-background-color);
            border: 1px solid var(--main-border-color);
            border-radius: 4px;
            z-index: 1000;
            padding: 15px;
            position: absolute;
            width: 500px;
            max-height: 600px;
            overflow: auto;
            box-shadow: 10px 10px 93px -25px black;
            contain: none;
        }

        .attr-help td {
            color: var(--muted-text-color);
            padding: 5px;
        }

        .related-notes-list {
            padding-inline-start: 20px;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .attr-edit-table {
            width: 100%;
        }

        .attr-edit-table th {
            text-align: start;
        }

        .attr-edit-table td input[not(type="checkbox")] {
            width: 100%;
        }

        .attr-edit-table td input[type="checkbox"] {
            display: inline-block;
        }

        .close-attr-detail-button {
            font-size: x-large;
            cursor: pointer;
            position: relative;
            top: -2px;
        }

        .attr-save-delete-button-container {
            display: flex;
            margin-top: 15px;
        }

        .attr-detail input[readonly] {
            background-color: var(--accented-background-color) !important;
        }

        .attr-edit-table td {
            padding: 4px 0;
        }
    </style>

    <div style="display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px;">
        <h5 class="attr-detail-title">${d(`attribute_detail.attr_detail_title`)}</h5>

        <button class="close-attr-detail-button icon-action bx bx-x" title="${d(`attribute_detail.close_button_title`)}"></button>
    </div>

    <div class="attr-is-owned-by">${d(`attribute_detail.attr_is_owned_by`)}</div>

    <table class="attr-edit-table">
        <tr title="${d(`attribute_detail.attr_name_title`)}">
            <th>${d(`attribute_detail.name`)}</th>
            <td><input type="text" class="attr-input-name form-control" /></td>
        </tr>
        <tr class="attr-help"></tr>
        <tr class="attr-row-value">
            <th>${d(`attribute_detail.value`)}</th>
            <td><input type="text" class="attr-input-value form-control" /></td>
        </tr>
        <tr class="attr-row-target-note">
            <th title="${d(`attribute_detail.target_note_title`)}">${d(`attribute_detail.target_note`)}</th>
            <td>
                <div class="input-group">
                    <input type="text" class="attr-input-target-note form-control" />
                </div>
            </td>
        </tr>
        <tr class="attr-row-promoted"
            title="${d(`attribute_detail.promoted_title`)}">
            <th></th>
            <td>
                <label class="tn-checkbox">
                    <input type="checkbox" class="attr-input-promoted" />
                    ${d(`attribute_detail.promoted`)}
                </label>
            </td>
        </tr>
        <tr class="attr-row-promoted-alias">
            <th title="${d(`attribute_detail.promoted_alias_title`)}">${d(`attribute_detail.promoted_alias`)}</th>
            <td>
                <div class="input-group">
                    <input type="text" class="attr-input-promoted-alias form-control" />
                </div>
            </td>
        </tr>
        <tr class="attr-row-multiplicity">
            <th title="${d(`attribute_detail.multiplicity_title`)}">${d(`attribute_detail.multiplicity`)}</th>
            <td>
                <select class="attr-input-multiplicity form-control">
                  <option value="single">${d(`attribute_detail.single_value`)}</option>
                  <option value="multi">${d(`attribute_detail.multi_value`)}</option>
                </select>
            </td>
        </tr>
        <tr class="attr-row-label-type">
            <th title="${d(`attribute_detail.label_type_title`)}">${d(`attribute_detail.label_type`)}</th>
            <td>
                <select class="attr-input-label-type form-control">
                  <option value="text">${d(`attribute_detail.text`)}</option>
                  <option value="textarea">${d(`attribute_detail.textarea`)}</option>
                  <option value="number">${d(`attribute_detail.number`)}</option>
                  <option value="boolean">${d(`attribute_detail.boolean`)}</option>
                  <option value="date">${d(`attribute_detail.date`)}</option>
                  <option value="datetime">${d(`attribute_detail.date_time`)}</option>
                  <option value="time">${d(`attribute_detail.time`)}</option>
                  <option value="url">${d(`attribute_detail.url`)}</option>
                  <option value="color">${d(`attribute_detail.color_type`)}</option>
                </select>
            </td>
        </tr>
        <tr class="attr-row-number-precision">
            <th title="${d(`attribute_detail.precision_title`)}">${d(`attribute_detail.precision`)}</th>
            <td>
                <div class="input-group">
                    <input type="number" class="form-control attr-input-number-precision" style="text-align: end">
                    <span class="input-group-text">${d(`attribute_detail.digits`)}</span>
                </div>
            </td>
        </tr>
        <tr class="attr-row-inverse-relation">
            <th title="${d(`attribute_detail.inverse_relation_title`)}">${d(`attribute_detail.inverse_relation`)}</th>
            <td>
                <div class="input-group">
                    <input type="text" class="attr-input-inverse-relation form-control" />
                </div>
            </td>
        </tr>
        <tr title="${d(`attribute_detail.inheritable_title`)}">
            <th></th>
            <td>
                <label class="tn-checkbox">
                    <input type="checkbox" class="attr-input-inheritable" />
                    ${d(`attribute_detail.inheritable`)}
                </label>
            </td>
        </tr>
    </table>

    <div class="attr-save-delete-button-container">
        <button class="btn btn-primary btn-sm attr-save-changes-and-close-button"
            style="flex-grow: 1; margin-inline-end: 20px">
            ${d(`attribute_detail.save_and_close`)}</button>

        <button class="btn btn-secondary btn-sm attr-delete-button">
            ${d(`attribute_detail.delete`)}</button>
    </div>

    <div class="related-notes-container">
        <br/>

        <h5 class="related-notes-tile">${d(`attribute_detail.related_notes_title`)}</h5>

        <ul class="related-notes-list"></ul>

        <div class="related-notes-more-notes">${d(`attribute_detail.more_notes`)}</div>
    </div>
</div>`,_=10,v={label:d(`attribute_detail.label`),"label-definition":d(`attribute_detail.label_definition`),relation:d(`attribute_detail.relation`),"relation-definition":d(`attribute_detail.relation_definition`)},y={label:{disableVersioning:d(`attribute_detail.disable_versioning`),calendarRoot:d(`attribute_detail.calendar_root`),archived:d(`attribute_detail.archived`),excludeFromExport:d(`attribute_detail.exclude_from_export`),run:d(`attribute_detail.run`),runOnInstance:d(`attribute_detail.run_on_instance`),runAtHour:d(`attribute_detail.run_at_hour`),disableInclusion:d(`attribute_detail.disable_inclusion`),sorted:d(`attribute_detail.sorted`),sortDirection:d(`attribute_detail.sort_direction`),sortFoldersFirst:d(`attribute_detail.sort_folders_first`),top:d(`attribute_detail.top`),hidePromotedAttributes:d(`attribute_detail.hide_promoted_attributes`),readOnly:d(`attribute_detail.read_only`),autoReadOnlyDisabled:d(`attribute_detail.auto_read_only_disabled`),appCss:d(`attribute_detail.app_css`),appTheme:d(`attribute_detail.app_theme`),appThemeBase:d(`attribute_detail.app_theme_base`),cssClass:d(`attribute_detail.css_class`),iconClass:d(`attribute_detail.icon_class`),pageSize:d(`attribute_detail.page_size`),customRequestHandler:{description:d(`attribute_detail.custom_request_handler`),helpPage:`J5Ex1ZrMbyJ6`},customResourceProvider:{description:d(`attribute_detail.custom_resource_provider`),helpPage:`J5Ex1ZrMbyJ6`},widget:d(`attribute_detail.widget`),workspace:d(`attribute_detail.workspace`),workspaceIconClass:d(`attribute_detail.workspace_icon_class`),workspaceTabBackgroundColor:d(`attribute_detail.workspace_tab_background_color`),workspaceCalendarRoot:d(`attribute_detail.workspace_calendar_root`),workspaceTemplate:d(`attribute_detail.workspace_template`),searchHome:d(`attribute_detail.search_home`),workspaceSearchHome:d(`attribute_detail.workspace_search_home`),inbox:d(`attribute_detail.inbox`),workspaceInbox:d(`attribute_detail.workspace_inbox`),sqlConsoleHome:d(`attribute_detail.sql_console_home`),bookmarkFolder:d(`attribute_detail.bookmark_folder`),shareHiddenFromTree:d(`attribute_detail.share_hidden_from_tree`),shareExternalLink:d(`attribute_detail.share_external_link`),shareAlias:d(`attribute_detail.share_alias`),shareOmitDefaultCss:d(`attribute_detail.share_omit_default_css`),shareRoot:d(`attribute_detail.share_root`),shareDescription:d(`attribute_detail.share_description`),shareRaw:d(`attribute_detail.share_raw`),shareDisallowRobotIndexing:d(`attribute_detail.share_disallow_robot_indexing`),shareCredentials:d(`attribute_detail.share_credentials`),shareIndex:d(`attribute_detail.share_index`),displayRelations:d(`attribute_detail.display_relations`),hideRelations:d(`attribute_detail.hide_relations`),titleTemplate:d(`attribute_detail.title_template`),template:d(`attribute_detail.template`),toc:d(`attribute_detail.toc`),color:d(`attribute_detail.color`),keyboardShortcut:d(`attribute_detail.keyboard_shortcut`),keepCurrentHoisting:d(`attribute_detail.keep_current_hoisting`),executeButton:d(`attribute_detail.execute_button`),executeDescription:d(`attribute_detail.execute_description`),excludeFromNoteMap:d(`attribute_detail.exclude_from_note_map`),newNotesOnTop:d(`attribute_detail.new_notes_on_top`),hideHighlightWidget:d(`attribute_detail.hide_highlight_widget`),printLandscape:d(`attribute_detail.print_landscape`),printPageSize:d(`attribute_detail.print_page_size`),printScale:d(`attribute_detail.print_scale`),printMargins:d(`attribute_detail.print_margins`)},relation:{runOnNoteCreation:d(`attribute_detail.run_on_note_creation`),runOnChildNoteCreation:d(`attribute_detail.run_on_child_note_creation`),runOnNoteTitleChange:d(`attribute_detail.run_on_note_title_change`),runOnNoteContentChange:d(`attribute_detail.run_on_note_content_change`),runOnNoteChange:d(`attribute_detail.run_on_note_change`),runOnNoteDeletion:d(`attribute_detail.run_on_note_deletion`),runOnBranchCreation:d(`attribute_detail.run_on_branch_creation`),runOnBranchChange:d(`attribute_detail.run_on_branch_change`),runOnBranchDeletion:d(`attribute_detail.run_on_branch_deletion`),runOnAttributeCreation:d(`attribute_detail.run_on_attribute_creation`),runOnAttributeChange:d(`attribute_detail.run_on_attribute_change`),template:d(`attribute_detail.relation_template`),inherit:d(`attribute_detail.inherit`),renderNote:d(`attribute_detail.render_note`),widget:d(`attribute_detail.widget_relation`),shareCss:d(`attribute_detail.share_css`),shareJs:d(`attribute_detail.share_js`),shareTemplate:d(`attribute_detail.share_template`),shareFavicon:d(`attribute_detail.share_favicon`)}},b=m(`new-layout`),x=class extends f{$title;$inputName;$inputValue;$rowPromoted;$inputPromoted;$inputPromotedAlias;$inputMultiplicity;$inputInverseRelation;$inputLabelType;$inputTargetNote;$inputNumberPrecision;$inputInheritable;$rowValue;$rowMultiplicity;$rowLabelType;$rowNumberPrecision;$rowInverseRelation;$rowTargetNote;$rowPromotedAlias;$attrIsOwnedBy;$attrSaveDeleteButtonContainer;$closeAttrDetailButton;$saveAndCloseButton;$deleteButton;$relatedNotesContainer;$relatedNotesTitle;$relatedNotesList;$relatedNotesMoreNotes;$attrHelp;$statusBar;relatedNotesSpacedUpdate;attribute;allAttributes;attrType;async refresh(){this.hide()}doRender(){this.relatedNotesSpacedUpdate=new l(async()=>this.updateRelatedNotes(),1e3),this.$widget=$(g),n.bindElShortcut(this.$widget,`ctrl+return`,()=>this.saveAndClose()),n.bindElShortcut(this.$widget,`esc`,()=>this.cancelAndClose()),this.$title=this.$widget.find(`.attr-detail-title`),this.$inputName=this.$widget.find(`.attr-input-name`),this.$inputName.on(`input`,e=>{e.originalEvent?.isComposing||this.userEditedAttribute()}),this.$inputName.on(`change`,()=>this.userEditedAttribute()),this.$inputName.on(`autocomplete:closed`,()=>this.userEditedAttribute()),this.$inputName.on(`focus`,()=>{h.initAttributeNameAutocomplete({$el:this.$inputName,attributeType:()=>[`relation`,`relation-definition`].includes(this.attrType||``)?`relation`:`label`,open:!0})}),this.$rowValue=this.$widget.find(`.attr-row-value`),this.$inputValue=this.$widget.find(`.attr-input-value`),this.$inputValue.on(`input`,e=>{e.originalEvent?.isComposing||this.userEditedAttribute()}),this.$inputValue.on(`change`,()=>this.userEditedAttribute()),this.$inputValue.on(`autocomplete:closed`,()=>this.userEditedAttribute()),this.$inputValue.on(`focus`,()=>{h.initLabelValueAutocomplete({$el:this.$inputValue,open:!0,nameCallback:()=>String(this.$inputName.val())})}),this.$rowPromoted=this.$widget.find(`.attr-row-promoted`),this.$inputPromoted=this.$widget.find(`.attr-input-promoted`),this.$inputPromoted.on(`change`,()=>this.userEditedAttribute()),this.$rowPromotedAlias=this.$widget.find(`.attr-row-promoted-alias`),this.$inputPromotedAlias=this.$widget.find(`.attr-input-promoted-alias`),this.$inputPromotedAlias.on(`change`,()=>this.userEditedAttribute()),this.$rowMultiplicity=this.$widget.find(`.attr-row-multiplicity`),this.$inputMultiplicity=this.$widget.find(`.attr-input-multiplicity`),this.$inputMultiplicity.on(`change`,()=>this.userEditedAttribute()),this.$rowLabelType=this.$widget.find(`.attr-row-label-type`),this.$inputLabelType=this.$widget.find(`.attr-input-label-type`),this.$inputLabelType.on(`change`,()=>this.userEditedAttribute()),this.$rowNumberPrecision=this.$widget.find(`.attr-row-number-precision`),this.$inputNumberPrecision=this.$widget.find(`.attr-input-number-precision`),this.$inputNumberPrecision.on(`change`,()=>this.userEditedAttribute()),this.$rowInverseRelation=this.$widget.find(`.attr-row-inverse-relation`),this.$inputInverseRelation=this.$widget.find(`.attr-input-inverse-relation`),this.$inputInverseRelation.on(`input`,e=>{e.originalEvent?.isComposing||this.userEditedAttribute()}),this.$rowTargetNote=this.$widget.find(`.attr-row-target-note`),this.$inputTargetNote=this.$widget.find(`.attr-input-target-note`),p.initNoteAutocomplete(this.$inputTargetNote,{allowCreatingNotes:!0}).on(`autocomplete:noteselected`,(e,t,n)=>{if(!t.notePath)return!1;let r=t.notePath.split(`/`);this.attribute.value=r[r.length-1],this.triggerCommand(`updateAttributeList`,{attributes:this.allAttributes??[]}),this.updateRelatedNotes()}),this.$inputInheritable=this.$widget.find(`.attr-input-inheritable`),this.$inputInheritable.on(`change`,()=>this.userEditedAttribute()),this.$closeAttrDetailButton=this.$widget.find(`.close-attr-detail-button`),this.$closeAttrDetailButton.on(`click`,()=>this.cancelAndClose()),this.$attrIsOwnedBy=this.$widget.find(`.attr-is-owned-by`),this.$attrSaveDeleteButtonContainer=this.$widget.find(`.attr-save-delete-button-container`),this.$saveAndCloseButton=this.$widget.find(`.attr-save-changes-and-close-button`),this.$saveAndCloseButton.on(`click`,()=>this.saveAndClose()),this.$deleteButton=this.$widget.find(`.attr-delete-button`),this.$deleteButton.on(`click`,async()=>{await this.triggerCommand(`updateAttributeList`,{attributes:(this.allAttributes||[]).filter(e=>e!==this.attribute)}),await this.triggerCommand(`saveAttributes`),this.hide()}),this.$attrHelp=this.$widget.find(`.attr-help`),this.$relatedNotesContainer=this.$widget.find(`.related-notes-container`),this.$relatedNotesTitle=this.$relatedNotesContainer.find(`.related-notes-tile`),this.$relatedNotesList=this.$relatedNotesContainer.find(`.related-notes-list`),this.$relatedNotesMoreNotes=this.$relatedNotesContainer.find(`.related-notes-more-notes`),$(window).on(`mousedown`,e=>{!$(e.target).closest(this.$widget[0]).length&&!$(e.target).closest(`.algolia-autocomplete`).length&&!$(e.target).closest(`#context-menu-container`).length&&this.hide()})}async showAttributeDetail({allAttributes:e,attribute:t,isOwned:n,x:a,y:s,focus:l,hideMultiplicity:u}){if(!t){this.hide();return}r(),this.attrType=this.getAttrType(t);let f=this.attrType===`label-definition`?t.name.substr(6):this.attrType===`relation-definition`?t.name.substr(9):t.name,p=this.attrType?.endsWith(`-definition`)?o.parse(t.value||``):{};this.attrType&&this.$title.text(v[this.attrType]),this.allAttributes=e,this.attribute=t,this.updateRelatedNotes(),this.$attrSaveDeleteButtonContainer.toggle(!!n),n?this.$attrIsOwnedBy.hide():t.noteId&&this.$attrIsOwnedBy.show().empty().append(t.type===`label`?`Label`:`Relation`).append(` ${d(`attribute_detail.is_owned_by_note`)} `).append(await c.createLink(t.noteId));let m=()=>n?void 0:`true`;if(this.$inputName.val(f).attr(`readonly`,m),this.$rowValue.toggle(this.attrType===`label`),this.$rowTargetNote.toggle(this.attrType===`relation`),this.$rowPromoted.toggle([`label-definition`,`relation-definition`].includes(this.attrType||``)),this.$inputPromoted.prop(`checked`,!!p.isPromoted).attr(`disabled`,m),this.$rowPromotedAlias.toggle(!!p.isPromoted),this.$inputPromotedAlias.val(p.promotedAlias||``).attr(`disabled`,m),this.$rowMultiplicity.toggle([`label-definition`,`relation-definition`].includes(this.attrType||``)&&!u),this.$inputMultiplicity.val(p.multiplicity||``).attr(`disabled`,m),this.$rowLabelType.toggle(this.attrType===`label-definition`),this.$inputLabelType.val(p.labelType||``).attr(`disabled`,m),this.$rowNumberPrecision.toggle(this.attrType===`label-definition`&&p.labelType===`number`),this.$inputNumberPrecision.val(p.numberPrecision||``).attr(`disabled`,m),this.$rowInverseRelation.toggle(this.attrType===`relation-definition`),this.$inputInverseRelation.val(p.inverseRelation||``).attr(`disabled`,m),t.type===`label`)this.$inputValue.val(t.value||``).attr(`readonly`,m);else if(t.type===`relation`&&(this.$inputTargetNote.attr(`readonly`,m).val(``).setSelectedNotePath(``),t.value)){let e=await i.getNote(t.value);e&&this.$inputTargetNote.val(e?e.title:``).setSelectedNotePath(t.value)}this.$inputInheritable.prop(`checked`,!!t.isInheritable).attr(`disabled`,m),this.updateHelp(),this.toggleInt(!0);let h=this.parent?.$widget?.offset()||{top:0,left:0},g=this.getDetailPosition(a,h),_=this.$widget.outerHeight(),y=$(window).height();if(!g||!_||!y){console.warn(`Can't position popup, is it attached?`);return}if(b){this.$statusBar||=$(document.body).find(`.component.status-bar`);let e=this.$statusBar.outerHeight()??0,t=document.body.clientHeight-e;this.$widget.css(`left`,h.left+(typeof g.left==`number`?g.left:0)).css(`top`,`unset`).css(`bottom`,e??0).css(`max-height`,t)}else this.$widget.css(`left`,g.left).css(`right`,g.right).css(`top`,s-h.top+70).css(`max-height`,_+s>y-50?y-s-50:1e4);l===`name`&&this.$inputName.trigger(`focus`).trigger(`select`)}getDetailPosition(e,t){let n=this.$widget.outerWidth();if(!n)return null;let r=e-t.left-n/2,i=``;return r<0?r=10:r+n>n-10&&(r=``,i=10),{left:r,right:i}}async saveAndClose(){await this.triggerCommand(`saveAttributes`),this.hide(),s()}async cancelAndClose(){await this.triggerCommand(`reloadAttributes`),this.hide(),s()}userEditedAttribute(){this.updateAttributeInEditor(),this.updateHelp(),this.relatedNotesSpacedUpdate.scheduleUpdate()}updateHelp(){let t=String(this.$inputName.val());if(this.attrType&&this.attrType in y&&t&&t in y[this.attrType]){let n=y[this.attrType][t],r=typeof n==`string`?n:n.description,i=typeof n==`string`?void 0:n.helpPage,a=$(`<td colspan=2>`).append($(`<strong>`).text(t)).append(` - `).append(r);if(i){let t=$(`<button class="icon-action bx bx-help-circle" type="button" style="margin-left: 5px; vertical-align: middle;" />`);t.on(`click`,()=>e(i)),a.append(t)}this.$attrHelp.empty().append(a).show()}else this.$attrHelp.empty().hide()}async updateRelatedNotes(){let{results:e,count:t}=await u.post(`search-related`,this.attribute);for(let t of e)t.noteId=t.notePathArray[t.notePathArray.length-1];if(e=e.filter(({noteId:e})=>e!==this.noteId),e.length===0)this.$relatedNotesContainer.hide();else{this.$relatedNotesContainer.show(),this.$relatedNotesTitle.text(d(`attribute_detail.other_notes_with_name`,{attributeType:this.attribute.type,attributeName:this.attribute.name})),this.$relatedNotesList.empty();let n=e.length<=_?e:e.slice(0,_),r=await i.getNotes(n.map(e=>e.noteId)),o=a.tabManager.getActiveContext()?.hoistedNoteId;for(let e of r){let t=e.getBestNotePathString(o),n=await c.createLink(t,{showNotePath:!0});this.$relatedNotesList.append($(`<li>`).append(n))}e.length>_?this.$relatedNotesMoreNotes.show().text(d(`attribute_detail.and_more`,{count:t-_})):this.$relatedNotesMoreNotes.hide()}}getAttrType(e){if(e.type===`label`)return e.name.startsWith(`label:`)?`label-definition`:e.name.startsWith(`relation:`)?`relation-definition`:`label`;if(e.type===`relation`)return`relation`;this.$title.text(``)}updateAttributeInEditor(){let e=String(this.$inputName.val());t.isValidAttributeName(e)||(e=t.filterAttributeName(e),this.$inputName.val(e)),this.attrType===`label-definition`?e=`label:${e}`:this.attrType===`relation-definition`&&(e=`relation:${e}`),this.attribute.name=e,this.attribute.isInheritable=this.$inputInheritable.is(`:checked`),this.attrType?.endsWith(`-definition`)?this.attribute.value=this.buildDefinitionValue():this.attrType===`relation`?this.attribute.value=this.$inputTargetNote.getSelectedNoteId()||``:this.attribute.value=String(this.$inputValue.val()),this.triggerCommand(`updateAttributeList`,{attributes:this.allAttributes??[]})}buildDefinitionValue(){let e=[];if(this.$inputPromoted.is(`:checked`)&&(e.push(`promoted`),this.$inputPromotedAlias.val()!==``&&e.push(`alias=${this.$inputPromotedAlias.val()}`)),e.push(this.$inputMultiplicity.val()),this.attrType===`label-definition`)e.push(this.$inputLabelType.val()),this.$inputLabelType.val()===`number`&&this.$inputNumberPrecision.val()!==``&&e.push(`precision=${this.$inputNumberPrecision.val()}`);else if(this.attrType===`relation-definition`&&String(this.$inputInverseRelation.val())?.trim().length>0){let n=this.$inputInverseRelation.val();e.push(`inverse=${t.filterAttributeName(String(n))}`)}return this.$rowNumberPrecision.toggle(this.attrType===`label-definition`&&this.$inputLabelType.val()===`number`),this.$rowPromotedAlias.toggle(this.$inputPromoted.is(`:checked`)),e.join(`,`)}hide(){this.toggleInt(!1)}createLink(e){return $(`<a>`,{href:`#root/${e}`,class:`reference-link`})}async noteSwitched(){this.hide()}};export{x as t};