@venite/components 0.16.23 → 0.16.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1998,8 +1998,8 @@ const OptionComponent = class {
1998
1998
  const optionsAreLong = (((_m = this.obj) === null || _m === void 0 ? void 0 : _m.value) || [])
1999
1999
  .map((option, optionIndex) => { var _a; return ((_a = this.versionLabel(option, optionIndex)) === null || _a === void 0 ? void 0 : _a.length) > 20; })
2000
2000
  .reduce((a, b) => a || b, false);
2001
- // <= 4, short options
2002
- if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 4) {
2001
+ // <= 3, short options
2002
+ if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 3) {
2003
2003
  return (index.h("ion-segment", { color: "primary", value: currentlySelected.toString() }, (_p = this.obj) === null || _p === void 0 ? void 0 :
2004
2004
  _p.value.map((option, optionIndex) => index.h("ion-segment-button", { value: optionIndex.toString(), onClick: () => this.select(optionIndex, true) }, index.h("ion-label", null, this.versionLabel(option, optionIndex)))), this.editable && index.h("ion-segment-button", { value: 'add', class: 'add', onClick: () => this.select('add', true) }, index.h("ion-label", null, "+"))));
2005
2005
  }
@@ -209,8 +209,8 @@ var OptionComponent = /** @class */ (function () {
209
209
  var optionsAreLong = (((_m = this.obj) === null || _m === void 0 ? void 0 : _m.value) || [])
210
210
  .map(function (option, optionIndex) { var _a; return ((_a = _this.versionLabel(option, optionIndex)) === null || _a === void 0 ? void 0 : _a.length) > 20; })
211
211
  .reduce(function (a, b) { return a || b; }, false);
212
- // <= 4, short options
213
- if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 4) {
212
+ // <= 3, short options
213
+ if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 3) {
214
214
  return (React.createElement("ion-segment", { color: "primary", value: currentlySelected.toString() }, (_p = this.obj) === null || _p === void 0 ? void 0 :
215
215
  _p.value.map(function (option, optionIndex) {
216
216
  return React.createElement("ion-segment-button", { value: optionIndex.toString(), onClick: function () { return _this.select(optionIndex, true); } },
@@ -138,8 +138,8 @@ export class OptionComponent {
138
138
  const optionsAreLong = (((_m = this.obj) === null || _m === void 0 ? void 0 : _m.value) || [])
139
139
  .map((option, optionIndex) => { var _a; return ((_a = this.versionLabel(option, optionIndex)) === null || _a === void 0 ? void 0 : _a.length) > 20; })
140
140
  .reduce((a, b) => a || b, false);
141
- // <= 4, short options
142
- if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 4) {
141
+ // <= 3, short options
142
+ if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 3) {
143
143
  return (h("ion-segment", { color: "primary", value: currentlySelected.toString() }, (_p = this.obj) === null || _p === void 0 ? void 0 :
144
144
  _p.value.map((option, optionIndex) => h("ion-segment-button", { value: optionIndex.toString(), onClick: () => this.select(optionIndex, true) },
145
145
  h("ion-label", null, this.versionLabel(option, optionIndex)))),
@@ -1994,8 +1994,8 @@ const OptionComponent = class {
1994
1994
  const optionsAreLong = (((_m = this.obj) === null || _m === void 0 ? void 0 : _m.value) || [])
1995
1995
  .map((option, optionIndex) => { var _a; return ((_a = this.versionLabel(option, optionIndex)) === null || _a === void 0 ? void 0 : _a.length) > 20; })
1996
1996
  .reduce((a, b) => a || b, false);
1997
- // <= 4, short options
1998
- if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 4) {
1997
+ // <= 3, short options
1998
+ if (!optionsAreLong && ((_o = this.obj) === null || _o === void 0 ? void 0 : _o.value.length) <= 3) {
1999
1999
  return (h("ion-segment", { color: "primary", value: currentlySelected.toString() }, (_p = this.obj) === null || _p === void 0 ? void 0 :
2000
2000
  _p.value.map((option, optionIndex) => h("ion-segment-button", { value: optionIndex.toString(), onClick: () => this.select(optionIndex, true) }, h("ion-label", null, this.versionLabel(option, optionIndex)))), this.editable && h("ion-segment-button", { value: 'add', class: 'add', onClick: () => this.select('add', true) }, h("ion-label", null, "+"))));
2001
2001
  }
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-978e2c6d.js";import{g as t}from"./p-4b80de48.js";import"./p-d282d4f9.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>(t(),o(JSON.parse('[["p-7a9ab85c",[[2,"ldf-prayers-and-thanksgivings",{"base":[513],"index":[513],"modal":[8],"parent":[8],"options":[16],"localeStrings":[32],"currentOptions":[32],"filter":[32],"setOptions":[64]}],[34,"ion-searchbar",{"color":[1],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}],[33,"ion-title",{"color":[1],"size":[1]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[1,"ion-content",{"color":[1],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"],[2,"click","onClick"]]],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[33,"ion-item",{"color":[1],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"href":[1],"rel":[1],"lines":[1],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"multipleInputs":[32]},[[0,"ionStyle","itemStyle"]]],[33,"ion-toolbar",{"color":[1]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}],[34,"ion-label",{"color":[1],"position":[1],"noAnimate":[32]}],[33,"ion-button",{"color":[1],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ariaLabel":[1537,"aria-label"],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32]}],[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-c0ef6296",[[2,"ldf-editable-metadata",{"doc":[1],"path":[513],"visible":[4],"collapsed":[4],"modal":[8],"obj":[32],"localeStrings":[32],"collapsedState":[32],"showAdvanced":[32]}]]],["p-ba9eda0b",[[6,"ldf-editor",{"doc":[1],"users":[16],"uid":[1],"cursors":[16],"listUsers":[4,"list-users"],"preview":[4],"obj":[32],"cursor":[32],"focusObj":[32]},[[0,"ldfCursorMoved","onCursorMoved"],[4,"ldfDocShouldChange","onDocShouldChange"],[0,"ldfDocShouldAdd","onDocShouldAdd"],[0,"ldfAddChildAfter","onAddChildAfter"],[0,"ldfMergeWithPrevious","onMergeWithPrevious"],[4,"ldfAskForBibleIntros","onAskForBibleIntros"],[4,"ldfAskForCanticleOptions","onAskForCanticleOptions"],[4,"ldfAskForPrayersAndThanksgivings","onAskForPT"],[4,"ldfShouldAddGloriaPatri","onShouldAddGloriaPatri"],[8,"paste","onPaste"],[8,"drop","onDrop"],[8,"dragover","onDragOver"],[8,"dragenter","onDragEnter"],[0,"focusObj","onFocusObj"]]]]],["p-594fa9d4",[[2,"ldf-editable-condition",{"path":[513],"obj":[16],"modal":[8],"localeStrings":[32],"currentCondition":[32]}]]],["p-03afc8cb",[[2,"ldf-editable-preferences",{"path":[513],"obj":[16],"modal":[8],"tree":[32],"specialTree":[32],"localeStrings":[32],"currentPreferences":[32],"currentSpecialPreferences":[32]}]]],["p-304a2bdb",[[2,"ldf-editable-filter-documents",{"modal":[8],"type":[1],"versions":[16],"options":[16],"changeCallback":[16],"localeStrings":[32],"filteredOptions":[32],"doc":[32],"version":[32],"setVersions":[64],"setOptions":[64]}]]],["p-c1df632d",[[2,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"options":[16]},[[0,"ionChange","onSelect"]]]]],["p-2c39ce94",[[2,"ldf-editable-add-block-menu",{"localeStrings":[32],"menu":[32]},[[0,"ionChange","onIonChange"]]]]],["p-5be7ff17",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-4e0b3c0f",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-380f8655",[[33,"ion-back-button",{"color":[1],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1]}]]],["p-374118d7",[[33,"ion-fab-button",{"color":[1],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1]}]]],["p-9bd5d1d4",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-2c36a583",[[33,"ion-menu-button",{"color":[1],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-302dc0d5",[[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}]]],["p-e0e12ae3",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}]]],["p-018e57db",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[1],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-ea66c343",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}]]],["p-3f39c2ad",[[33,"ion-item-option",{"color":[1],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}]]],["p-c41e055c",[[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]]]]],["p-7abeb82c",[[34,"ion-modal",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-d7966e9b",[[34,"ion-popover",{"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-c3841978",[[33,"ion-reorder",null,[[2,"click","onClick"]]]]],["p-c82dd468",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[32,"ionTabBarChanged","onTabBarChanged"]]]]],["p-08584ccc",[[0,"ion-app"]]],["p-c6163f81",[[33,"ion-avatar"]]],["p-8c2727db",[[33,"ion-badge",{"color":[1]}]]],["p-c3042920",[[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64]}]]],["p-07d6d3ad",[[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["p-32f7ba8e",[[36,"ion-footer",{"translucent":[4]}]]],["p-9c397c49",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["p-327b14ac",[[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["p-dd99e42a",[[33,"ion-item-divider",{"color":[1],"sticky":[4]}]]],["p-8932ec85",[[32,"ion-item-group"]]],["p-d195c957",[[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}]]],["p-ba021918",[[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["p-21e2f0a3",[[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-fe59a676",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}]]],["p-4a4380fa",[[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"]}]]],["p-69f85ad3",[[33,"ion-note",{"color":[1]}]]],["p-3c9930ff",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[1]}]]],["p-cbfbb80c",[[33,"ion-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-ec5eecdc",[[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["p-84f38db6",[[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["p-b7388aec",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16]}]]],["p-6fe24d85",[[0,"ion-route-redirect",{"from":[1],"to":[1]}]]],["p-25a736f1",[[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]]]],["p-3545fcdc",[[1,"ion-router-link",{"color":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"target":[1]}]]],["p-0873a34a",[[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-c3807857",[[0,"ion-slide"]]],["p-9e2c172e",[[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["p-ca698b8f",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["p-59340423",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}]]],["p-c74d3fd0",[[33,"ion-tab-bar",{"color":[1],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]},[[8,"keyboardWillHide","onKeyboardWillHide"],[8,"keyboardWillShow","onKeyboardWillShow"]]]]],["p-8767a74e",[[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-430c418a",[[1,"ion-text",{"color":[1]}]]],["p-e4be11ad",[[34,"ion-textarea",{"color":[1],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[4,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]],["p-dc445c36",[[1,"ion-thumbnail"]]],["p-ac7a17ce",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["p-fa191f47",[[2,"ldf-editable-text",{"text":[1],"path":[513],"placeholder":[1],"short":[4],"unit":[1],"inputType":[1,"input-type"],"template":[1],"templateMaker":[16],"currentText":[32],"localeStrings":[32]},[[0,"input","onInput"],[0,"focusout","onFocusOut"],[0,"select","onSelect"],[0,"focus","onFocus"],[0,"click","onClick"],[0,"keydown","onKeyDown"]]],[34,"ion-input",{"color":[1],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]],["p-800a115c",[[2,"ldf-editable-preference-option",{"path":[513],"option":[16],"localeStrings":[32],"currentOption":[32]}]]],["p-65ea7ab3",[[2,"ldf-editable-preference",{"path":[513],"preference":[16],"modal":[8],"localeStrings":[32],"currentPreference":[32]}]]],["p-79a526a1",[[1,"ion-spinner",{"color":[1],"duration":[2],"name":[1],"paused":[4]}]]],["p-2ae548b3",[[2,"ldf-editable-string-list",{"path":[513],"property":[513],"value":[16],"localeStrings":[32],"optimisticValues":[32],"currentValue":[32]}]]],["p-04715bf0",[[33,"ion-datetime",{"name":[1],"disabled":[4],"readonly":[4],"min":[1025],"max":[1025],"displayFormat":[1,"display-format"],"displayTimezone":[1,"display-timezone"],"pickerFormat":[1,"picker-format"],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"monthNames":[1,"month-names"],"monthShortNames":[1,"month-short-names"],"dayNames":[1,"day-names"],"dayShortNames":[1,"day-short-names"],"pickerOptions":[16],"placeholder":[1],"value":[1025],"isExpanded":[32],"open":[64]}],[33,"ion-toggle",{"color":[1],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"activated":[32]}]]],["p-65563763",[[2,"ldf-editable-condition-piece",{"path":[513],"condition":[16],"localeStrings":[32],"workingCondition":[32]}]]],["p-52656429",[[32,"ion-picker-column",{"col":[16]}]]],["p-39d4be39",[[2,"ldf-editor-cursors",{"parent":[16],"users":[16],"uid":[513],"cursors":[16],"cursorPos":[32]},[[5,"scroll","onScroll"],[9,"resize","onResize"]]]]],["p-63b5daf6",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-e215fd02",[[33,"ion-list-header",{"color":[1],"lines":[1]}]]],["p-1a8e2899",[[33,"ion-card",{"color":[1],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"target":[1]}],[33,"ion-card-header",{"color":[1],"translucent":[4]}]]],["p-66a7385e",[[33,"ion-radio",{"color":[1],"name":[1],"disabled":[4],"value":[8],"checked":[32]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]}]]],["p-c6b42618",[[33,"ion-chip",{"color":[1],"outline":[4]}]]],["p-b78336d7",[[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}]]],["p-f0de7628",[[2,"ldf-editable-delete",{"base":[513],"index":[520],"type":[1],"obj":[8],"localeStrings":[32]},[[0,"click","onClick"]]],[2,"ldf-editable-boolean",{"path":[513],"property":[513],"value":[4]},[[0,"ionChange","onChange"]]],[33,"ion-checkbox",{"color":[1],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[1]}]]],["p-e301606a",[[1,"ldf-heading",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32]}],[2,"ldf-day-name",{"day":[1],"obj":[32],"localeStrings":[32]}],[6,"ldf-text",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32],"intentions":[32],"setPrayerList":[64]}],[2,"ldf-string",{"text":[1],"citation":[16],"dropcap":[1],"dropcapMinLength":[2,"dropcap-min-length"],"replaceTetragrammaton":[4,"replace-tetragrammaton"],"index":[2],"fragment":[1],"processedString":[32]}],[1,"ldf-label-bar",{"center":[516]}]]],["p-592ea68f",[[6,"ldf-bible-reading",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32],"verses":[32],"loadingError":[32],"changeReading":[64]}],[2,"ldf-liturgical-document",{"doc":[1],"path":[513],"base":[513],"index":[2],"parentType":[513,"parent-type"],"editable":[4],"preview":[4],"padding":[1],"obj":[32],"localeStrings":[32],"hasFocus":[32]},[[0,"dragover","onDragOver"],[4,"selectionchange","selectionChangeHandler"],[3,"mouseover","onMouseOver"],[3,"mouseout","onMouseOut"],[2,"click","onClick"]]],[2,"ldf-editable-add-block",{"visible":[4],"base":[513],"index":[514],"localeStrings":[32]}],[2,"ldf-option",{"doc":[1],"path":[513],"editable":[4],"preview":[4],"obj":[32],"localeStrings":[32],"filteredOptions":[32],"select":[64]}],[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32]}],[33,"ion-segment",{"color":[1],"disabled":[4],"scrollable":[4],"value":[1025],"activated":[32]}],[6,"ldf-psalm",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32],"filteredValue":[32],"focusedVerse":[32],"focusedSection":[32]}],[6,"ldf-responsive-prayer",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32]}],[2,"ldf-editable-metadata-buttons",{"visible":[4],"base":[513],"index":[514],"obj":[16],"parentType":[1,"parent-type"],"preview":[4],"localeStrings":[32],"collapsedState":[32],"modal":[32]}],[2,"ldf-editable-select",{"path":[513],"property":[513],"options":[16],"value":[8],"placeholder":[1]},[[0,"ionChange","onChange"]]],[2,"ldf-liturgy",{"doc":[1],"path":[513],"editable":[4],"preview":[4],"obj":[32],"hasFocus":[32]},[[0,"focusPath","onFocusPath"]]],[6,"ldf-image",{"doc":[1],"path":[513],"editable":[4],"modal":[8],"obj":[32],"localeStrings":[32],"isResizing":[32],"height":[32],"width":[32]},[[5,"mouseup","stopResizing"],[9,"mousemove","resizingMove"]]],[2,"ldf-meditation",{"doc":[1],"path":[513],"editable":[4],"color":[1],"autostart":[4],"obj":[32],"localeStrings":[32],"secondsRemaining":[32],"started":[32],"paused":[32],"start":[64],"pause":[64],"resume":[64],"rewind":[64],"duration":[64],"reset":[64]}],[6,"ldf-refrain",{"doc":[1],"path":[513],"editable":[4],"obj":[32]}],[6,"ldf-rubric",{"doc":[1],"path":[513],"editable":[4],"obj":[32]}],[1,"ion-skeleton-text",{"animated":[4]}]]],["p-9c1973a6",[[2,"ldf-editable-antiphon-field",{"path":[513],"antiphon":[1],"omit_antiphon":[4],"insert_antiphon":[4],"localeStrings":[32],"currentAntiphon":[32],"currentOmitAntiphon":[32],"currentInsertAntiphon":[32],"mode":[32]}],[32,"ion-card-content"],[33,"ion-card-title",{"color":[1]}],[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["p-005ad01b",[[2,"ldf-editable-metadata-metadata-fields",{"path":[513],"doc":[1],"bibleReadingIntros":[16],"localeStrings":[32],"fields":[32],"obj":[32],"currentBibleReadingIntros":[32],"setBibleReadingIntros":[64]}],[2,"ldf-editable-lookup",{"path":[513],"lookup":[16],"types":[16],"currentLookup":[32]}]]],["p-7efa633b",[[33,"ion-card-subtitle",{"color":[1]}]]]]'),e))));
1
+ import{p as e,b as o}from"./p-978e2c6d.js";import{g as t}from"./p-4b80de48.js";import"./p-d282d4f9.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>(t(),o(JSON.parse('[["p-7a9ab85c",[[2,"ldf-prayers-and-thanksgivings",{"base":[513],"index":[513],"modal":[8],"parent":[8],"options":[16],"localeStrings":[32],"currentOptions":[32],"filter":[32],"setOptions":[64]}],[34,"ion-searchbar",{"color":[1],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}],[33,"ion-title",{"color":[1],"size":[1]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[1,"ion-content",{"color":[1],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"],[2,"click","onClick"]]],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[33,"ion-item",{"color":[1],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"href":[1],"rel":[1],"lines":[1],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"multipleInputs":[32]},[[0,"ionStyle","itemStyle"]]],[33,"ion-toolbar",{"color":[1]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}],[34,"ion-label",{"color":[1],"position":[1],"noAnimate":[32]}],[33,"ion-button",{"color":[1],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ariaLabel":[1537,"aria-label"],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32]}],[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-c0ef6296",[[2,"ldf-editable-metadata",{"doc":[1],"path":[513],"visible":[4],"collapsed":[4],"modal":[8],"obj":[32],"localeStrings":[32],"collapsedState":[32],"showAdvanced":[32]}]]],["p-ba9eda0b",[[6,"ldf-editor",{"doc":[1],"users":[16],"uid":[1],"cursors":[16],"listUsers":[4,"list-users"],"preview":[4],"obj":[32],"cursor":[32],"focusObj":[32]},[[0,"ldfCursorMoved","onCursorMoved"],[4,"ldfDocShouldChange","onDocShouldChange"],[0,"ldfDocShouldAdd","onDocShouldAdd"],[0,"ldfAddChildAfter","onAddChildAfter"],[0,"ldfMergeWithPrevious","onMergeWithPrevious"],[4,"ldfAskForBibleIntros","onAskForBibleIntros"],[4,"ldfAskForCanticleOptions","onAskForCanticleOptions"],[4,"ldfAskForPrayersAndThanksgivings","onAskForPT"],[4,"ldfShouldAddGloriaPatri","onShouldAddGloriaPatri"],[8,"paste","onPaste"],[8,"drop","onDrop"],[8,"dragover","onDragOver"],[8,"dragenter","onDragEnter"],[0,"focusObj","onFocusObj"]]]]],["p-594fa9d4",[[2,"ldf-editable-condition",{"path":[513],"obj":[16],"modal":[8],"localeStrings":[32],"currentCondition":[32]}]]],["p-03afc8cb",[[2,"ldf-editable-preferences",{"path":[513],"obj":[16],"modal":[8],"tree":[32],"specialTree":[32],"localeStrings":[32],"currentPreferences":[32],"currentSpecialPreferences":[32]}]]],["p-304a2bdb",[[2,"ldf-editable-filter-documents",{"modal":[8],"type":[1],"versions":[16],"options":[16],"changeCallback":[16],"localeStrings":[32],"filteredOptions":[32],"doc":[32],"version":[32],"setVersions":[64],"setOptions":[64]}]]],["p-c1df632d",[[2,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"options":[16]},[[0,"ionChange","onSelect"]]]]],["p-2c39ce94",[[2,"ldf-editable-add-block-menu",{"localeStrings":[32],"menu":[32]},[[0,"ionChange","onIonChange"]]]]],["p-5be7ff17",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-4e0b3c0f",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-380f8655",[[33,"ion-back-button",{"color":[1],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1]}]]],["p-374118d7",[[33,"ion-fab-button",{"color":[1],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1]}]]],["p-9bd5d1d4",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-2c36a583",[[33,"ion-menu-button",{"color":[1],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-302dc0d5",[[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}]]],["p-e0e12ae3",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}]]],["p-018e57db",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[1],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-ea66c343",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}]]],["p-3f39c2ad",[[33,"ion-item-option",{"color":[1],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}]]],["p-c41e055c",[[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]]]]],["p-7abeb82c",[[34,"ion-modal",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-d7966e9b",[[34,"ion-popover",{"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-c3841978",[[33,"ion-reorder",null,[[2,"click","onClick"]]]]],["p-c82dd468",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[32,"ionTabBarChanged","onTabBarChanged"]]]]],["p-08584ccc",[[0,"ion-app"]]],["p-c6163f81",[[33,"ion-avatar"]]],["p-8c2727db",[[33,"ion-badge",{"color":[1]}]]],["p-c3042920",[[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64]}]]],["p-07d6d3ad",[[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["p-32f7ba8e",[[36,"ion-footer",{"translucent":[4]}]]],["p-9c397c49",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["p-327b14ac",[[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["p-dd99e42a",[[33,"ion-item-divider",{"color":[1],"sticky":[4]}]]],["p-8932ec85",[[32,"ion-item-group"]]],["p-d195c957",[[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}]]],["p-ba021918",[[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["p-21e2f0a3",[[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-fe59a676",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}]]],["p-4a4380fa",[[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"]}]]],["p-69f85ad3",[[33,"ion-note",{"color":[1]}]]],["p-3c9930ff",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[1]}]]],["p-cbfbb80c",[[33,"ion-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-ec5eecdc",[[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["p-84f38db6",[[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["p-b7388aec",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16]}]]],["p-6fe24d85",[[0,"ion-route-redirect",{"from":[1],"to":[1]}]]],["p-25a736f1",[[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]]]],["p-3545fcdc",[[1,"ion-router-link",{"color":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"target":[1]}]]],["p-0873a34a",[[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-c3807857",[[0,"ion-slide"]]],["p-9e2c172e",[[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["p-ca698b8f",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["p-59340423",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}]]],["p-c74d3fd0",[[33,"ion-tab-bar",{"color":[1],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]},[[8,"keyboardWillHide","onKeyboardWillHide"],[8,"keyboardWillShow","onKeyboardWillShow"]]]]],["p-8767a74e",[[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-430c418a",[[1,"ion-text",{"color":[1]}]]],["p-e4be11ad",[[34,"ion-textarea",{"color":[1],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[4,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]],["p-dc445c36",[[1,"ion-thumbnail"]]],["p-ac7a17ce",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["p-fa191f47",[[2,"ldf-editable-text",{"text":[1],"path":[513],"placeholder":[1],"short":[4],"unit":[1],"inputType":[1,"input-type"],"template":[1],"templateMaker":[16],"currentText":[32],"localeStrings":[32]},[[0,"input","onInput"],[0,"focusout","onFocusOut"],[0,"select","onSelect"],[0,"focus","onFocus"],[0,"click","onClick"],[0,"keydown","onKeyDown"]]],[34,"ion-input",{"color":[1],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]],["p-800a115c",[[2,"ldf-editable-preference-option",{"path":[513],"option":[16],"localeStrings":[32],"currentOption":[32]}]]],["p-65ea7ab3",[[2,"ldf-editable-preference",{"path":[513],"preference":[16],"modal":[8],"localeStrings":[32],"currentPreference":[32]}]]],["p-79a526a1",[[1,"ion-spinner",{"color":[1],"duration":[2],"name":[1],"paused":[4]}]]],["p-2ae548b3",[[2,"ldf-editable-string-list",{"path":[513],"property":[513],"value":[16],"localeStrings":[32],"optimisticValues":[32],"currentValue":[32]}]]],["p-04715bf0",[[33,"ion-datetime",{"name":[1],"disabled":[4],"readonly":[4],"min":[1025],"max":[1025],"displayFormat":[1,"display-format"],"displayTimezone":[1,"display-timezone"],"pickerFormat":[1,"picker-format"],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"monthNames":[1,"month-names"],"monthShortNames":[1,"month-short-names"],"dayNames":[1,"day-names"],"dayShortNames":[1,"day-short-names"],"pickerOptions":[16],"placeholder":[1],"value":[1025],"isExpanded":[32],"open":[64]}],[33,"ion-toggle",{"color":[1],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"activated":[32]}]]],["p-65563763",[[2,"ldf-editable-condition-piece",{"path":[513],"condition":[16],"localeStrings":[32],"workingCondition":[32]}]]],["p-52656429",[[32,"ion-picker-column",{"col":[16]}]]],["p-39d4be39",[[2,"ldf-editor-cursors",{"parent":[16],"users":[16],"uid":[513],"cursors":[16],"cursorPos":[32]},[[5,"scroll","onScroll"],[9,"resize","onResize"]]]]],["p-63b5daf6",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-e215fd02",[[33,"ion-list-header",{"color":[1],"lines":[1]}]]],["p-1a8e2899",[[33,"ion-card",{"color":[1],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"target":[1]}],[33,"ion-card-header",{"color":[1],"translucent":[4]}]]],["p-66a7385e",[[33,"ion-radio",{"color":[1],"name":[1],"disabled":[4],"value":[8],"checked":[32]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]}]]],["p-c6b42618",[[33,"ion-chip",{"color":[1],"outline":[4]}]]],["p-b78336d7",[[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}]]],["p-f0de7628",[[2,"ldf-editable-delete",{"base":[513],"index":[520],"type":[1],"obj":[8],"localeStrings":[32]},[[0,"click","onClick"]]],[2,"ldf-editable-boolean",{"path":[513],"property":[513],"value":[4]},[[0,"ionChange","onChange"]]],[33,"ion-checkbox",{"color":[1],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[1]}]]],["p-e301606a",[[1,"ldf-heading",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32]}],[2,"ldf-day-name",{"day":[1],"obj":[32],"localeStrings":[32]}],[6,"ldf-text",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32],"intentions":[32],"setPrayerList":[64]}],[2,"ldf-string",{"text":[1],"citation":[16],"dropcap":[1],"dropcapMinLength":[2,"dropcap-min-length"],"replaceTetragrammaton":[4,"replace-tetragrammaton"],"index":[2],"fragment":[1],"processedString":[32]}],[1,"ldf-label-bar",{"center":[516]}]]],["p-95650471",[[6,"ldf-bible-reading",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32],"verses":[32],"loadingError":[32],"changeReading":[64]}],[2,"ldf-liturgical-document",{"doc":[1],"path":[513],"base":[513],"index":[2],"parentType":[513,"parent-type"],"editable":[4],"preview":[4],"padding":[1],"obj":[32],"localeStrings":[32],"hasFocus":[32]},[[0,"dragover","onDragOver"],[4,"selectionchange","selectionChangeHandler"],[3,"mouseover","onMouseOver"],[3,"mouseout","onMouseOut"],[2,"click","onClick"]]],[2,"ldf-editable-add-block",{"visible":[4],"base":[513],"index":[514],"localeStrings":[32]}],[2,"ldf-option",{"doc":[1],"path":[513],"editable":[4],"preview":[4],"obj":[32],"localeStrings":[32],"filteredOptions":[32],"select":[64]}],[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32]}],[33,"ion-segment",{"color":[1],"disabled":[4],"scrollable":[4],"value":[1025],"activated":[32]}],[6,"ldf-psalm",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32],"filteredValue":[32],"focusedVerse":[32],"focusedSection":[32]}],[6,"ldf-responsive-prayer",{"doc":[1],"path":[513],"editable":[4],"obj":[32],"localeStrings":[32]}],[2,"ldf-editable-metadata-buttons",{"visible":[4],"base":[513],"index":[514],"obj":[16],"parentType":[1,"parent-type"],"preview":[4],"localeStrings":[32],"collapsedState":[32],"modal":[32]}],[2,"ldf-editable-select",{"path":[513],"property":[513],"options":[16],"value":[8],"placeholder":[1]},[[0,"ionChange","onChange"]]],[2,"ldf-liturgy",{"doc":[1],"path":[513],"editable":[4],"preview":[4],"obj":[32],"hasFocus":[32]},[[0,"focusPath","onFocusPath"]]],[6,"ldf-image",{"doc":[1],"path":[513],"editable":[4],"modal":[8],"obj":[32],"localeStrings":[32],"isResizing":[32],"height":[32],"width":[32]},[[5,"mouseup","stopResizing"],[9,"mousemove","resizingMove"]]],[2,"ldf-meditation",{"doc":[1],"path":[513],"editable":[4],"color":[1],"autostart":[4],"obj":[32],"localeStrings":[32],"secondsRemaining":[32],"started":[32],"paused":[32],"start":[64],"pause":[64],"resume":[64],"rewind":[64],"duration":[64],"reset":[64]}],[6,"ldf-refrain",{"doc":[1],"path":[513],"editable":[4],"obj":[32]}],[6,"ldf-rubric",{"doc":[1],"path":[513],"editable":[4],"obj":[32]}],[1,"ion-skeleton-text",{"animated":[4]}]]],["p-9c1973a6",[[2,"ldf-editable-antiphon-field",{"path":[513],"antiphon":[1],"omit_antiphon":[4],"insert_antiphon":[4],"localeStrings":[32],"currentAntiphon":[32],"currentOmitAntiphon":[32],"currentInsertAntiphon":[32],"mode":[32]}],[32,"ion-card-content"],[33,"ion-card-title",{"color":[1]}],[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["p-005ad01b",[[2,"ldf-editable-metadata-metadata-fields",{"path":[513],"doc":[1],"bibleReadingIntros":[16],"localeStrings":[32],"fields":[32],"obj":[32],"currentBibleReadingIntros":[32],"setBibleReadingIntros":[64]}],[2,"ldf-editable-lookup",{"path":[513],"lookup":[16],"types":[16],"currentLookup":[32]}]]],["p-7efa633b",[[33,"ion-card-subtitle",{"color":[1]}]]]]'),e))));
@@ -1 +1 @@
1
- import{r as t,c as i,w as e,h as o,H as n,a as l}from"./p-978e2c6d.js";import{c as s,g as a}from"./p-d282d4f9.js";import{p as r}from"./p-714cf0b2.js";import{c as d,h as c}from"./p-5b51185b.js";import{f as h,l as u,m as p,t as v}from"./p-d7f8c770.js";import{R as b,L as f,d as g}from"./p-4aa9a6f2.js";import{B as m,L as y,M as x,P as k,R as w,a as $}from"./p-d56dff05.js";import{H as C}from"./p-a1729dbd.js";import{v as S,O as j}from"./p-e7a449d7.js";import{C as O}from"./p-991c0877.js";import{g as z}from"./p-0491d1d2.js";import{I as _}from"./p-476327d6.js";import{D as N}from"./p-e911e60d.js";import{R as L}from"./p-5b43e6be.js";import"./p-f3a0c163.js";import"./p-3e8ff66b.js";const T=class{constructor(e){t(this,e),this.ionChange=i(this,"ionChange",7),this.ionSelect=i(this,"ionSelect",7),this.ionStyle=i(this,"ionStyle",7),this.didInit=!1,this.activated=!1,this.disabled=!1,this.scrollable=!1,this.onClick=t=>{const i=t.target,e=this.checked;this.value=i.value,e&&this.scrollable&&this.checkButton(e,i),this.checked=i}}valueChanged(t,i){this.ionSelect.emit({value:t}),(""!==i||this.didInit)&&(this.activated?this.valueAfterGesture=t:this.ionChange.emit({value:t}))}disabledChanged(){this.gestureChanged();const t=this.getButtons();for(const i of t)i.disabled=this.disabled}gestureChanged(){this.gesture&&!this.scrollable&&this.gesture.enable(!this.disabled)}connectedCallback(){this.emitStyle()}componentWillLoad(){this.emitStyle()}async componentDidLoad(){this.setCheckedClasses(),this.gesture=(await import("./p-03389897.js")).createGesture({el:this.el,gestureName:"segment",gesturePriority:100,threshold:0,passive:!1,onStart:t=>this.onStart(t),onMove:t=>this.onMove(t),onEnd:t=>this.onEnd(t)}),this.gesture.enable(!this.scrollable),this.gestureChanged(),this.disabled&&this.disabledChanged(),this.didInit=!0}onStart(t){this.activate(t)}onMove(t){this.setNextIndex(t)}onEnd(t){this.setActivated(!1);const i=this.setNextIndex(t,!0);t.event.stopImmediatePropagation(),i&&this.addRipple(t);const e=this.valueAfterGesture;void 0!==e&&(this.ionChange.emit({value:e}),this.valueAfterGesture=void 0)}getButtons(){return Array.from(this.el.querySelectorAll("ion-segment-button"))}addRipple(t){if(!s.getBoolean("animated",!0)||!s.getBoolean("rippleEffect",!0))return;const i=this.getButtons().find((t=>t.value===this.value)),e=(i.shadowRoot||i).querySelector("ion-ripple-effect");if(!e)return;const{x:o,y:n}=r(t.event);e.addRipple(o,n).then((t=>t()))}setActivated(t){this.getButtons().forEach((i=>{t?i.classList.add("segment-button-activated"):i.classList.remove("segment-button-activated")})),this.activated=t}activate(t){const i=t.event.target,e=this.getButtons().find((t=>t.value===this.value));"ION-SEGMENT-BUTTON"===i.tagName&&(e||(this.value=i.value),this.value===i.value&&this.setActivated(!0))}getIndicator(t){return(t.shadowRoot||t).querySelector(".segment-button-indicator")}checkButton(t,i){const o=this.getIndicator(t),n=this.getIndicator(i);if(null===o||null===n)return;const l=o.getBoundingClientRect(),s=n.getBoundingClientRect(),a=`translate3d(${l.left-s.left}px, 0, 0) scaleX(${l.width/s.width})`;e((()=>{n.classList.remove("segment-button-indicator-animated"),n.style.setProperty("transform",a),n.getBoundingClientRect(),n.classList.add("segment-button-indicator-animated"),n.style.setProperty("transform","")})),this.value=i.value,this.setCheckedClasses()}setCheckedClasses(){const t=this.getButtons(),i=t.findIndex((t=>t.value===this.value))+1;this.checked=t.find((t=>t.value===this.value));for(const i of t)i.classList.remove("segment-button-after-checked");i<t.length&&t[i].classList.add("segment-button-after-checked")}setNextIndex(t,i=!1){const e="rtl"===document.dir,o=this.activated,n=this.getButtons(),l=n.findIndex((t=>t.value===this.value)),s=n[l];let a,r;if(-1===l)return;const d=s.getBoundingClientRect(),c=d.left,h=d.width,u=t.currentX,p=document.elementFromPoint(u,d.top+d.height/2);if(o&&!i){if(e?u>c+h:u<c){const t=l-1;t>=0&&(r=t)}else if((e?u<c:u>c+h)&&o&&!i){const t=l+1;t<n.length&&(r=t)}void 0===r||n[r].disabled||(a=n[r])}if(!o&&i&&(a=p),null!=a){if("ION-SEGMENT"===a.tagName)return!1;s!==a&&this.checkButton(s,a)}return!0}emitStyle(){this.ionStyle.emit({segment:!0})}render(){const t=a(this);return o(n,{onClick:this.onClick,class:Object.assign(Object.assign({},d(this.color)),{[t]:!0,"in-toolbar":c("ion-toolbar",this.el),"in-toolbar-color":c("ion-toolbar[color]",this.el),"segment-activated":this.activated,"segment-disabled":this.disabled,"segment-scrollable":this.scrollable})},o("slot",null))}get el(){return l(this)}static get watchers(){return{value:["valueChanged"],disabled:["disabledChanged"]}}};T.style={ios:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.065);border-radius:8px;overflow:hidden;z-index:0}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.065)}:host(.in-toolbar){margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;width:auto}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-toolbar){margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.in-toolbar:not(.ion-color)){background:var(--ion-toolbar-segment-background, var(--background))}:host(.in-toolbar-color:not(.ion-color)){background:rgba(var(--ion-color-contrast-rgb), 0.11)}",md:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:transparent}:host(.segment-scrollable) ::slotted(ion-segment-button){min-width:auto}"};let M=0;const D=class{constructor(i){t(this,i),this.segmentEl=null,this.checked=!1,this.disabled=!1,this.layout="icon-top",this.type="button",this.value="ion-sb-"+M++,this.updateState=()=>{this.segmentEl&&(this.checked=this.segmentEl.value===this.value)}}connectedCallback(){const t=this.segmentEl=this.el.closest("ion-segment");t&&(this.updateState(),t.addEventListener("ionSelect",this.updateState))}disconnectedCallback(){const t=this.segmentEl;t&&(t.removeEventListener("ionSelect",this.updateState),this.segmentEl=null)}get hasLabel(){return!!this.el.querySelector("ion-label")}get hasIcon(){return!!this.el.querySelector("ion-icon")}render(){const{checked:t,type:i,disabled:e,hasIcon:l,hasLabel:s,layout:r}=this,d=a(this);return o(n,{"aria-disabled":e?"true":null,class:{[d]:!0,"in-toolbar":c("ion-toolbar",this.el),"in-toolbar-color":c("ion-toolbar[color]",this.el),"in-segment":c("ion-segment",this.el),"in-segment-color":c("ion-segment[color]",this.el),"segment-button-has-label":s,"segment-button-has-icon":l,"segment-button-has-label-only":s&&!l,"segment-button-has-icon-only":l&&!s,"segment-button-disabled":e,"segment-button-checked":t,[`segment-button-layout-${r}`]:!0,"ion-activatable":!0,"ion-activatable-instant":!0,"ion-focusable":!0}},o("button",{type:i,"aria-pressed":t?"true":null,class:"button-native",disabled:e},o("span",{class:"button-inner"},o("slot",null)),"md"===d&&o("ion-ripple-effect",null)),o("div",{part:"indicator",class:{"segment-button-indicator":!0,"segment-button-indicator-animated":!0}},o("div",{part:"indicator-background",class:"segment-button-indicator-background"})))}get el(){return l(this)}};D.style={ios:':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:flex;position:relative;flex:1 1 auto;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);transform:translate3d(0, 0, 0);display:flex;position:relative;flex-direction:inherit;flex-grow:1;align-items:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:flex;position:relative;flex-flow:inherit;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){flex-shrink:0;order:-1;pointer-events:none}::slotted(ion-label){display:block;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{transform-origin:left;position:absolute;opacity:0;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);transform:var(--indicator-transform);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{transform:none}.segment-button-indicator-animated{transition:none}}:host{--background:none;--background-checked:none;--background-hover:none;--background-hover-opacity:0;--background-focused:none;--background-focused-opacity:0;--border-radius:7px;--border-width:1px;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);--border-style:solid;--indicator-box-shadow:0 0 5px rgba(0, 0, 0, 0.16);--indicator-color:var(--ion-color-step-350, var(--ion-background-color, #fff));--indicator-height:100%;--indicator-transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--transition:100ms all linear;--padding-top:0;--padding-end:13px;--padding-bottom:0;--padding-start:13px;margin-top:2px;margin-bottom:2px;position:relative;flex-basis:0;flex-direction:row;min-width:70px;min-height:28px;transform:translate3d(0, 0, 0);font-size:13px;font-weight:450;line-height:37px}:host::before{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;transition:160ms opacity ease-in-out;transition-delay:100ms;border-left:var(--border-width) var(--border-style) var(--border-color);content:"";opacity:1;will-change:opacity}:host(:first-of-type)::before{border-left-color:transparent}:host(.segment-button-disabled){opacity:0.3}::slotted(ion-icon){font-size:24px}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:2px;margin-right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:2px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:2px;margin-inline-end:2px}}.segment-button-indicator{padding-left:2px;padding-right:2px;left:0;right:0;top:0;bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.segment-button-indicator{padding-left:unset;padding-right:unset;-webkit-padding-start:2px;padding-inline-start:2px;-webkit-padding-end:2px;padding-inline-end:2px}}.segment-button-indicator-background{border-radius:var(--border-radius);background:var(--indicator-color)}.segment-button-indicator-background{transition:var(--indicator-transition)}:host(.segment-button-checked)::before,:host(.segment-button-after-checked)::before{opacity:0}:host(.segment-button-checked){z-index:-1}:host(.segment-button-activated){--indicator-transform:scale(0.95)}:host(.ion-focused) .button-native{opacity:0.7}@media (any-hover: hover){:host(:hover) .button-native{opacity:0.5}:host(.segment-button-checked:hover) .button-native{opacity:1}}:host(.in-segment-color){background:none;color:var(--ion-text-color, #000)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-step-350, var(--ion-background-color, #fff))}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native,:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-text-color, #000)}}:host(.in-toolbar:not(.in-segment-color)){--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, var(--ion-toolbar-color), initial);--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-toolbar-color), initial);--indicator-color:var(--ion-toolbar-segment-indicator-color, var(--ion-color-step-350, var(--ion-background-color, #fff)))}:host(.in-toolbar-color) .segment-button-indicator-background{background:#fff}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color):hover) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color):hover) .button-native{color:var(--ion-color-base)}}',md:':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:flex;position:relative;flex:1 1 auto;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);transform:translate3d(0, 0, 0);display:flex;position:relative;flex-direction:inherit;flex-grow:1;align-items:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:flex;position:relative;flex-flow:inherit;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){flex-shrink:0;order:-1;pointer-events:none}::slotted(ion-label){display:block;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{transform-origin:left;position:absolute;opacity:0;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);transform:var(--indicator-transform);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{transform:none}.segment-button-indicator-animated{transition:none}}:host{--background:none;--background-checked:none;--background-hover:var(--color-checked);--background-focused:var(--color-checked);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04;--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #3880ff);--indicator-box-shadow:none;--indicator-color:var(--color-checked);--indicator-height:2px;--indicator-transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--padding-top:0;--padding-end:16px;--padding-bottom:0;--padding-start:16px;--transition:color 0.15s linear 0s, opacity 0.15s linear 0s;min-width:90px;max-width:360px;min-height:48px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);font-size:14px;font-weight:500;letter-spacing:0.06em;line-height:40px;text-transform:uppercase}.button-native{min-width:90px}:host(.segment-button-disabled){opacity:0.3}:host(.in-segment-color){background:none;color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color) ion-ripple-effect{color:var(--ion-color-base)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked) .button-native{color:var(--ion-color-base)}:host(.in-segment-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native{color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color:hover) .button-native::after{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-segment-color)){--background:var(--ion-toolbar-segment-background, none);--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6));--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-color-primary, #3880ff));--indicator-color:var(--ion-toolbar-segment-color-checked, var(--color-checked))}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:rgba(var(--ion-color-contrast-rgb), 0.6)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color)) .button-native::after{background:var(--ion-color-contrast)}}::slotted(ion-icon){margin-top:12px;margin-bottom:12px;font-size:24px}::slotted(ion-label){margin-top:12px;margin-bottom:12px}:host(.segment-button-layout-icon-top) ::slotted(ion-label),:host(.segment-button-layout-icon-bottom) ::slotted(ion-icon){margin-top:0}:host(.segment-button-layout-icon-top) ::slotted(ion-icon),:host(.segment-button-layout-icon-bottom) ::slotted(ion-label){margin-bottom:0}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:8px;margin-right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}:host(.segment-button-has-icon-only) ::slotted(ion-icon){margin-top:12px;margin-bottom:12px}:host(.segment-button-has-label-only) ::slotted(ion-label){margin-top:12px;margin-bottom:12px}.segment-button-indicator{left:0;right:0;bottom:0}.segment-button-indicator-background{background:var(--indicator-color)}:host(.in-toolbar:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-toolbar-segment-indicator-color, var(--indicator-color))}:host(.in-toolbar-color:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-color-contrast)}'};const R=class{constructor(i){t(this,i),this.animated=!1}render(){const t=this.animated&&s.getBoolean("animated",!0),i=c("ion-avatar",this.el)||c("ion-thumbnail",this.el),e=a(this);return o(n,{class:{[e]:!0,"skeleton-text-animated":t,"in-media":i}},o("span",null," "))}get el(){return l(this)}};R.style=":host{--background:rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065);border-radius:var(--border-radius, inherit);display:block;width:100%;height:inherit;margin-top:4px;margin-bottom:4px;background:var(--background);line-height:10px;user-select:none;pointer-events:none}span{display:inline-block}:host(.in-media){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;height:100%}:host(.skeleton-text-animated){position:relative;background:linear-gradient(to right, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 8%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.135) 18%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 33%);background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear}@keyframes shimmer{0%{background-position:-468px 0}100%{background-position:468px 0}}";const V={en:{amen:"Amen.",book:"Book",chapter:"Chapter",citation:"Citation (e.g., John 1:1)",label:"Label",loading:"Loading...",verse:"Verse",changeReading:"Change Reading",newCitation:"Biblical citation.",cancel:"Cancel",ok:"OK"},es:{amen:"Amén.",loading:"Se está cargando..."}},A=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7)}docChanged(t){try{this.obj=new m("string"==typeof t?JSON.parse(t):t),this.processIntro()}catch(t){console.warn(t),this.obj=new m}this.loadVerses()}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.loadVerses(),this.processIntro()}processIntro(){var t,i;if(null===(i=null===(t=this.obj)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.intro)try{this.obj.compileIntro(),this.obj=new m(Object.assign({},this.obj))}catch(t){console.warn(t),console.warn(this.obj)}}async loadLocaleStrings(){try{this.localeStrings=V[z(this.element)]}catch(t){console.warn(t)}}async changeReading(){var t;const i=this.localeStrings||{},e=await h.create({header:i.changeReading,inputs:[{name:"citation",type:"text",value:null===(t=this.obj)||void 0===t?void 0:t.citation,placeholder:i.newCitation}],buttons:[{text:i.cancel,role:"cancel",cssClass:"secondary"},{text:i.ok,handler:async t=>{var e,o,n;this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:"citation",oldValue:null===(e=this.obj)||void 0===e?void 0:e.citation,value:null==t?void 0:t.citation}]}));const l=await u.create({message:i.loading});await l.present();const s=await async function(t,i="NRSV",e="https://us-central1-venite-2.cloudfunctions.net"){const o=new URL(`${e}/bible`);o.searchParams.append("citation",t),["NRSV","NRSVAE","ESV","CEB","KJV"].includes(i)?o.searchParams.append("version",i):o.searchParams.append("version","NRSV");const n=await fetch(o.toString()),l=await n.text();try{return JSON.parse(l)}catch(t){throw new Error(l)}}(t.citation,S(null===(o=this.obj)||void 0===o?void 0:o.version));await l.dismiss(),this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:"value",oldValue:null===(n=this.obj)||void 0===n?void 0:n.value,value:(null==s?void 0:s.value)||[]}]})),this.obj=new m(Object.assign(Object.assign({},this.obj),{citation:null==t?void 0:t.citation,value:(null==s?void 0:s.value)||[]})),this.loadVerses()}}]});await e.present()}loadVerses(){this.verses=this.obj.value||[]}paragraphs(){const t=new Array;let i=new Array;return this.verses.forEach((e=>{e.hasOwnProperty("type")&&"heading"===e.type?(t.push(i),i=new Array):i.push(e)})),t.push(i),t}render(){var t,i,e,l,s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k,w;const $=this.localeStrings||{};if(this.verses){if(this.editable){const n=Object.assign(Object.assign({},this.verses[0]),{text:""}),r=t=>Object.assign(Object.assign({},n),{text:t});return o("div",{lang:null===(t=this.obj)||void 0===t?void 0:t.language,class:`editable bible-reading ${(null===(i=this.obj)||void 0===i?void 0:i.display_format)||"default"}`},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"},o("ion-buttons",null,o("ion-button",{onClick:()=>this.changeReading()},o("ion-icon",{name:"swap-horizontal",slot:"start"}),o("ion-label",null,$.changeReading))))),o("ldf-label-bar",null,o("h3",{class:"editable-label",slot:"start"},o("ldf-editable-text",{id:"label",text:null===(e=this.obj)||void 0===e?void 0:e.label,path:`${this.path}/label`,placeholder:$.label})),(null===(l=this.obj)||void 0===l?void 0:l.citation)&&o("button",{class:"citation-button",slot:"end",onClick:()=>this.changeReading()},this.obj.citation)),(null===(a=null===(s=this.obj)||void 0===s?void 0:s.metadata)||void 0===a?void 0:a.compiled_intro)&&o("ldf-liturgical-document",{editable:!0,doc:this.obj.metadata.intro,path:`${this.path}/metadata/intro`}),o("section",{class:"verses"},this.verses.map(((t,i)=>[t.hasOwnProperty("type")&&"heading"===t.type?o("ldf-heading",{editable:!0,doc:t,path:`${this.path}/value/${i}`}):o("div",{class:"editable-verse"},o("div",{class:"editable-citation"},o("ldf-editable-text",{class:"book",id:`verse-${i}-book`,text:t.book,path:`${this.path}/value/${i}/book`,placeholder:$.book,short:!0}),o("ldf-editable-text",{id:`verse-${i}-chapter`,text:t.chapter,path:`${this.path}/value/${i}/chapter`,placeholder:$.chapter,short:!0})," :",o("ldf-editable-text",{id:`verse-${i}-verse`,text:t.verse,path:`${this.path}/value/${i}/verse`,placeholder:$.verse,short:!0})),o("ldf-editable-text",{id:`verse-${i}-text`,text:t.text,path:`${this.path}/value/${i}/text`,placeholder:$.text,short:!1,template:n,templateMaker:r}))]))))}if("short"==this.obj.style){const t=((null===(d=null===(r=this.obj)||void 0===r?void 0:r.metadata)||void 0===d?void 0:d.response)||$.amen).length<=5;let i;return i=(null===(h=null===(c=this.obj)||void 0===c?void 0:c.metadata)||void 0===h?void 0:h.response)?o("span",{class:"response"}," ",this.obj.metadata.response):o("span",{class:"response"}," ",$.amen),o(n,null,(null===(u=this.obj)||void 0===u?void 0:u.label)&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label]})}),o("div",{lang:null===(p=this.obj)||void 0===p?void 0:p.language,class:`bible-reading ${(null===(v=this.obj)||void 0===v?void 0:v.display_format)||"default"}`},o("p",null,this.verses.map(((t,i)=>{var e;return t.hasOwnProperty("type")&&"heading"===t.type?o("ldf-heading",{doc:new C(t)}):o("ldf-string",{citation:{book:t.book,chapter:t.chapter,verse:t.verse},id:this.obj.uid,text:t.text,fragment:this.path,dropcap:"force_dropcap"==(null===(e=this.obj)||void 0===e?void 0:e.display_format)&&0===i?"force":"disabled"})})),t&&!(null===(f=null===(b=this.obj)||void 0===b?void 0:b.metadata)||void 0===f?void 0:f.omit_response)&&i,o("span",{class:"citation"},this.obj.citation)),!t&&!(null===(m=null===(g=this.obj)||void 0===g?void 0:g.metadata)||void 0===m?void 0:m.omit_response)&&o("p",null,i)))}{const t=this.paragraphs();return o("div",{lang:null===(y=this.obj)||void 0===y?void 0:y.language,class:`bible-reading ${(null===(x=this.obj)||void 0===x?void 0:x.display_format)||"default"}`},o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation})}),(null===(w=null===(k=this.obj)||void 0===k?void 0:k.metadata)||void 0===w?void 0:w.compiled_intro)&&o("ldf-liturgical-document",{doc:this.obj.metadata.compiled_intro}),t.map(((t,i)=>o("p",{lang:this.obj.language},t.map(((t,e)=>{var n;return t.hasOwnProperty("type")&&"heading"===t.type?o("ldf-heading",{doc:new C(t)}):[o("sup",null,t.verse),o("ldf-string",{citation:t,dropcap:0==i&&0==e&&"iu"!==(null===(n=this.obj)||void 0===n?void 0:n.language)?"force":"disabled",id:`${t.chapter}-${t.book}-${t.verse}`,text:t.text,index:e,fragment:this.path})]}))))))}}return this.loadingError?o("pre",null,this.loadingError):o("p",null,$.loading)}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};A.style='ldf-bible-reading.sc-ldf-bible-reading,.sc-ldf-bible-reading-h{font-family:var(--ldf-font-face);text-align:var(--ldf-text-align)}.bible-reading[lang=he].sc-ldf-bible-reading{text-align:right;direction:rtl;font-size:1.5em;font-family:"Times New Roman" !important}.bible-reading[lang=he].sc-ldf-bible-reading .drop.sc-ldf-bible-reading{float:right !important;font-family:"Times New Roman" !important}.bible-reading.omit.sc-ldf-bible-reading .verses.sc-ldf-bible-reading{display:none}.editable.bible-reading.sc-ldf-bible-reading .verses.sc-ldf-bible-reading{display:block;color:var(--ldf-greyed-out-text-color)}sup.sc-ldf-bible-reading{display:var(--ldf-bible-reading-verse-number-display);margin-left:0;margin-right:0.25em}.citation.sc-ldf-bible-reading{font-size:80%;font-style:italic;margin-left:1em;float:var(--ldf-bible-reading-citation-float)}.response.sc-ldf-bible-reading{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.verses.sc-ldf-bible-reading .verse.sc-ldf-bible-reading{display:flex;flex-direction:row}sup.sc-ldf-bible-reading:first-of-type{display:var(--ldf-drop-early-verses-display)}.editable-verse.sc-ldf-bible-reading{display:inline}.editable-citation.sc-ldf-bible-reading{display:inline;width:100%}.editable-citation.sc-ldf-bible-reading ldf-editable-text.sc-ldf-bible-reading{display:inline-block;width:25px}.editable-citation.sc-ldf-bible-reading ldf-editable-text.book.sc-ldf-bible-reading{width:75px}h3.editable-label.sc-ldf-bible-reading{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.citation-button.sc-ldf-bible-reading{background:none;border:0;font-family:var(--ldf-font-face);font-size:inherit}';const E={en:{add:"Add",label:"Label",citation:"Citation"}},B=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.ldfDocShouldAdd=i(this,"ldfDocShouldAdd",7)}async componentWillLoad(){this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=E[z(this.element)]}catch(t){console.warn(t)}}render(){const t=this.localeStrings||{};return o(n,null,o("div",{class:{button:!0,hidden:!this.visible}},o("ion-button",{"aria-role":"button",fill:"outline",onClick:()=>this.ldfDocShouldAdd.emit({base:this.base,index:this.index})},o("ion-icon",{name:"add",slot:"icon-only"}),o("ion-label",{class:"visually-hidden"},t.add))))}get element(){return l(this)}};B.style=".sc-ldf-editable-add-block-h{display:flex;flex-direction:column;align-items:center;width:100%}.sc-ldf-editable-add-block-h .button-container.sc-ldf-editable-add-block{display:flex;align-items:center;height:0;justify-content:center;width:100%}.sc-ldf-editable-add-block-h button.sc-ldf-editable-add-block{background-color:var(--ldf-background-color);color:var(--ldf-color);font-family:var(--ldf-controls-font-family);font-weight:lighter}.sc-ldf-editable-add-block-h button.sc-ldf-editable-add-block:hover{cursor:pointer}.sc-ldf-editable-add-block-h .visible.sc-ldf-editable-add-block{height:0;opacity:1;transition:0.25s}.sc-ldf-editable-add-block-h .hidden.sc-ldf-editable-add-block{height:0;opacity:0;transition:2s}.sc-ldf-editable-add-block-h .underlying.sc-ldf-editable-add-block{width:100%;border-top:1px solid #a0a0a0;border-bottom:1px solid #a0a0a0;min-height:1em;position:relative;bottom:0.5em;z-index:-1}.sc-ldf-editable-add-block-h .underlying.visible.sc-ldf-editable-add-block{opacity:0.5;transition:0.25s}.sc-ldf-editable-add-block-h .underlying.visible.expanded.sc-ldf-editable-add-block{z-index:1}.sc-ldf-editable-add-block-h .underlying.collapsed.sc-ldf-editable-add-block{height:1em}.sc-ldf-editable-add-block-h .underlying.hidden.sc-ldf-editable-add-block{opacity:0;transition:1s}.sc-ldf-editable-add-block-h .underlying.hidden.sc-ldf-editable-add-block button.sc-ldf-editable-add-block{z-index:-1}.sc-ldf-editable-add-block-h .visually-hidden.sc-ldf-editable-add-block{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);white-space:nowrap}.button.sc-ldf-editable-add-block{position:absolute;display:flex;flex-direction:row;align-items:center;justify-content:center;opacity:1;transition:all 0.25s}.hidden.sc-ldf-editable-add-block{display:none;height:0;opacity:0;transition:all 0.25s}";const I={en:{abbreviated:"Abbreviated",addOption:"Add an Option",cancel:"Cancel",condition:"Conditions",copy:"Copy",copied:"Copied to Clipboard",default:"Default",displayFormat:"Display",halfverse:"By Half Verse",heading:"Heading Level",heading1:"1. Title",heading2:"2. Section Title",heading3:"3. Label",heading4:"4. Sub-Section Label",move_down:"Move Down",move_up:"Move Up",ok:"OK",omit:"Omit",preferences:"Preferences",settings:"Settings",edit:"Edit",preview:"Preview",responsive:"Responsive Display Settings",responsiveMsg:"What size devices should this appear on?",responsiveAll:"All devices",responsiveSmallOnly:"Only on small screens",responsiveSmallHidden:"Not on small screens",unison:"Unison",wholeverse:"By Whole Verse"}},J=class{constructor(e){t(this,e),this.ldfAddOptionToDoc=i(this,"ldfAddOptionToDoc",7),this.ldfTogglePreview=i(this,"ldfTogglePreview",7),this.ldfDocShouldMove=i(this,"ldfDocShouldMove",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.preview=!1}objChange(t){this.modal&&(this.modal.componentProps=Object.assign(Object.assign({},this.modal.componentProps),{obj:t}))}componentWillLoad(){this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=I[z(this.element)]}catch(t){console.warn(t)}}async openResponsive(){var t;const i=await h.create({header:this.localeStrings.responsive,message:this.localeStrings.responsiveMsg,inputs:[{name:"value",type:"radio",value:b.AllSizes,label:this.localeStrings.responsiveAll},{name:"value",type:"radio",value:b.SmallOnly,label:this.localeStrings.responsiveSmallOnly},{name:"value",type:"radio",value:b.SmallHidden,label:this.localeStrings.responsiveSmallHidden}],buttons:[{role:"cancel",text:this.localeStrings.cancel},this.localeStrings.ok]});await i.present();const{data:e}=await i.onDidDismiss(),{values:o}=e;o&&this.ldfDocShouldChange.emit(new O({path:`${this.base}/${this.index}/responsive`,op:[{type:"set",oldValue:null===(t=this.obj)||void 0===t?void 0:t.responsive,value:o}]}))}async openSettings(){this.modal=await this.openModal("ldf-editable-metadata")}async openCondition(){this.modal=await this.openModal("ldf-editable-condition",`${this.base}/${this.index}/condition`,{obj:this.obj})}async openPreferences(){const t=this.base&&this.index?`${this.base}/${this.index}`:"";this.modal=await this.openModal("ldf-editable-preferences",`${t}/metadata`,{obj:this.obj})}async openModal(t,i,e){const o=await p.create({component:t}),n=i||(this.base&&this.index>=0?`${this.base}/${this.index}`:"/");return o.componentProps=Object.assign(Object.assign({},e),{modal:o,doc:this.obj,path:n,visible:!0,collapsed:!1}),await o.present(),o}addOption(){this.ldfAddOptionToDoc.emit({base:this.base,index:this.index,obj:this.obj})}move(t){this.ldfDocShouldMove.emit({base:this.base,oldIndex:this.index,diff:t})}async headingLevel(){var t,i,e,o,n,l,s,a,r,d;const c=await h.create({header:null===(t=this.localeStrings)||void 0===t?void 0:t.heading,inputs:[{name:"level",type:"radio",value:1,label:null===(i=this.localeStrings)||void 0===i?void 0:i.heading1},{name:"level",type:"radio",value:2,label:null===(e=this.localeStrings)||void 0===e?void 0:e.heading2},{name:"level",type:"radio",value:3,label:null===(o=this.localeStrings)||void 0===o?void 0:o.heading3},{name:"level",type:"radio",value:4,label:null===(n=this.localeStrings)||void 0===n?void 0:n.heading4}],buttons:[{text:null===(l=this.localeStrings)||void 0===l?void 0:l.cancel,role:"cancel",cssClass:"secondary"},{text:null===(s=this.localeStrings)||void 0===s?void 0:s.ok}]});await c.present();const{data:u}=await c.onDidDismiss(),{values:p}=u;(null===(a=this.obj)||void 0===a?void 0:a.metadata)?this.ldfDocShouldChange.emit(new O({path:`${this.base}/${this.index}/metadata/level`,op:[{type:"set",value:p,oldValue:null===(d=null===(r=this.obj)||void 0===r?void 0:r.metadata)||void 0===d?void 0:d.level}]})):this.ldfDocShouldChange.emit(new O({path:`${this.base}/${this.index}/metadata`,op:[{type:"set",value:{level:p}}]}))}async copyDoc(){try{navigator.clipboard.writeText(JSON.stringify(this.obj));const t=await v.create({message:this.localeStrings.copied,duration:1e3,color:"success"});await t.present()}catch(t){console.warn("Clipboard operation not allowed.",t)}}render(){var t,i,e,l,s,a,r,d,c,h,u;const p=this.localeStrings||{},v=void 0!==this.index&&this.index>=0;return o(n,null,o("div",{class:{buttons:!0,hidden:!this.visible||!this.preview}},o("ion-buttons",{slot:"end"},(null===navigator||void 0===navigator?void 0:navigator.clipboard)&&o("ion-button",{onClick:()=>this.copyDoc(),"aria-role":"button","aria-label":p.copy},o("ion-label",{class:"sm-hidden"},p.copy),o("ion-icon",{slot:"end",name:"clipboard"})),o("ion-button",{onClick:()=>this.ldfTogglePreview.emit(!1)},o("ion-label",{class:"sm-hidden"},null===(t=this.localeStrings)||void 0===t?void 0:t.edit),o("ion-icon",{slot:"end",name:"create"})))),o("div",{class:{buttons:!0,hidden:!this.visible||this.preview}},o("ion-buttons",{slot:"end"},o("ion-button",{onClick:()=>this.ldfTogglePreview.emit(!0)},o("ion-label",{class:"sm-hidden"},null===(i=this.localeStrings)||void 0===i?void 0:i.preview),o("ion-icon",{slot:"end",name:"eye"})),"option"!==(null===(e=this.obj)||void 0===e?void 0:e.type)&&"option"!==this.parentType&&this.base&&o("ion-button",{onClick:()=>this.addOption(),"aria-role":"button","aria-label":p.addOption},o("ion-icon",{slot:"icon-only",name:"add"})),"liturgy"==(null===(l=this.obj)||void 0===l?void 0:l.type)&&o("ion-button",{onClick:()=>this.openPreferences(),"aria-role":"button","aria-label":p.preferences},o("ion-icon",{slot:"icon-only",name:"list"})),"heading"==(null===(s=this.obj)||void 0===s?void 0:s.type)&&o("ion-button",{onClick:()=>this.headingLevel()},o("ion-label",null,p[`heading${(null===(r=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===r?void 0:r.level)||3}`]||"Heading")),(null===(c=null===(d=this.obj)||void 0===d?void 0:d.availableDisplayFormats())||void 0===c?void 0:c.length)>0&&o("ldf-editable-select",{placeholder:p.displayFormat,value:this.obj.display_format,path:`${this.base}/${this.index}`,property:"display_format",options:this.obj.availableDisplayFormats().map((t=>({value:t,label:p[t]||t})))}),(this.base&&v||"liturgy"!==(null===(h=this.obj)||void 0===h?void 0:h.type))&&o("ion-button",{onClick:()=>this.openCondition(),"aria-role":"button","aria-label":p.condition},o("ion-icon",{slot:"icon-only",name:"calendar"})),(this.base&&v||"liturgy"!==(null===(u=this.obj)||void 0===u?void 0:u.type))&&o("ion-button",{onClick:()=>this.openResponsive(),"aria-role":"button","aria-label":p.responsive},o("ion-icon",{slot:"icon-only",name:"phone-portrait"})),(null===navigator||void 0===navigator?void 0:navigator.clipboard)&&o("ion-button",{onClick:()=>this.copyDoc(),"aria-role":"button","aria-label":p.copy},o("ion-icon",{slot:"icon-only",name:"clipboard"})),o("ion-button",{onClick:()=>this.openSettings(),"aria-role":"button","aria-label":p.settings},o("ion-icon",{slot:"icon-only",name:"cog"})),this.base&&v&&this.index>0&&o("ion-button",{onClick:()=>this.move(-1),"aria-role":"button","aria-label":p.move_up},o("ion-icon",{slot:"icon-only",name:"arrow-up"})),this.base&&v&&o("ion-button",{onClick:()=>this.move(1),"aria-role":"button","aria-label":p.move_down},o("ion-icon",{slot:"icon-only",name:"arrow-down"})),v&&o("ldf-editable-delete",{base:this.base,index:this.index,obj:this.obj}))))}get element(){return l(this)}static get watchers(){return{obj:["objChange"]}}};J.style=".buttons.sc-ldf-editable-metadata-buttons{position:absolute;height:0;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;opacity:1;transition:all 0.25s}.buttons.sc-ldf-editable-metadata-buttons ion-buttons.sc-ldf-editable-metadata-buttons{background-color:var(--ion-color-light, #f4f5f8);border-radius:3px;flex-wrap:wrap;max-width:100%}.hidden.sc-ldf-editable-metadata-buttons{display:none;height:0;opacity:0;transition:all 0.25s}@media (max-width: 767px){.sm-hidden.sc-ldf-editable-metadata-buttons{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}";const W=class{constructor(e){t(this,e),this.ldfChange=i(this,"ldfChange",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7)}onChange(t){const i=this.value,e=t.detail.value;e!==i&&(this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:this.property,oldValue:i,value:e}]})),this.ldfChange.emit(e))}render(){return o("ion-select",{value:this.value,placeholder:this.placeholder},this.options.map((t=>o("ion-select-option",{value:t.value},t.label))))}get element(){return l(this)}};W.style="";const P={en:{close:"Return to Bulletin",url:"URL"}},H=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.isResizing=!1,this.resizingStartPoint=null,this.resizingCorner=null}docChanged(t){var i,e,o,n;try{this.obj=new _("string"==typeof t?JSON.parse(t):t),this.height=(null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.height)||null,this.width=(null===(n=null===(o=this.obj)||void 0===o?void 0:o.metadata)||void 0===n?void 0:n.width)||null}catch(t){console.warn(t),this.obj=new _}}componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=P[z(this.element)]}catch(t){console.warn(t)}}async showZoomed(){const t=await p.create({component:"ldf-image"});t.componentProps={modal:t,doc:this.obj},await t.present()}startResizing(t,i,e){this.resizingCorner=t,this.resizingStartPoint={x:i,y:e}}stopResizing(){console.log("stopResizing"),this.resizingCorner=null}resizingMove(t){this.resizingCorner&&this.resizingStartPoint&&this.processResizingMove(this.resizingCorner,t.clientX,t.clientY)}processResizingMove(t,i,e){const{x:o}=this.resizingStartPoint,n="nw"===t||"sw"===t?i-o:o-i;this.resizingStartPoint={x:i,y:e},this.width=this.imgElement.clientWidth-n,this.height=null,this.updateDoc()}touchStart(t,i){i.preventDefault();const e=i.touches[0];e&&this.startResizing(t,e.clientX,e.clientY)}touchMove(t,i){i.preventDefault();const e=i.touches[0];e&&this.processResizingMove(t,e.clientX,e.clientY)}updateDoc(){var t,i,e,o,n,l;(null===(t=this.obj)||void 0===t?void 0:t.metadata)||this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:"metadata",oldValue:null===(i=this.obj)||void 0===i?void 0:i.metadata,value:{}}]})),this.ldfDocShouldChange.emit(new O({path:`${this.path}/metadata`,op:[{type:"set",index:"height",oldValue:null===(o=null===(e=this.obj)||void 0===e?void 0:e.metadata)||void 0===o?void 0:o.height,value:this.imgElement.clientHeight},{type:"set",index:"width",oldValue:null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.width,value:this.imgElement.clientWidth}]}))}render(){var t,i,e,l,s;const a=this.localeStrings||{},r=[this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),o("div",{class:`${(null===(t=this.obj)||void 0===t?void 0:t.style)||""} ${(null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.align)||"center"}`},this.obj.value&&this.obj.value.map(((t,i)=>{var e;return this.editable?o("figure",null,o("div",{class:"img-wrapper"},o("img",{src:t,ref:t=>this.imgElement=t,alt:null===(e=this.obj)||void 0===e?void 0:e.label,style:{height:this.height?`${this.height}px`:"auto",width:this.width?`${this.width}px`:"auto"},class:"editable"}),o("button",{class:"resize top-left",onMouseDown:t=>this.startResizing("nw",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("nw",t),onTouchMove:t=>this.touchMove("nw",t),onTouchEnd:()=>this.stopResizing()}),o("button",{class:"resize bottom-left",onMouseDown:t=>this.startResizing("sw",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("sw",t),onTouchMove:t=>this.touchMove("sw",t),onTouchEnd:()=>this.stopResizing()}),o("button",{class:"resize top-right",onMouseDown:t=>this.startResizing("ne",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("ne",t),onTouchMove:t=>this.touchMove("ne",t),onTouchEnd:()=>this.stopResizing()}),o("button",{class:"resize bottom-right",onMouseDown:t=>this.startResizing("se",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("se",t),onTouchMove:t=>this.touchMove("se",t),onTouchEnd:()=>this.stopResizing()})),o("figcaption",null,o("code",null,a.url),o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}`,text:t,path:`${this.path}/value/${i}`}))):o("img",{src:t,onClick:()=>this.showZoomed(),style:{height:this.height?`${this.height}px`:"auto",width:this.width?`${this.width}px`:"auto"}})})))];return this.modal?[o("ion-header",null,o("ion-toolbar",null,o("ion-buttons",{slot:"end"},o("ion-button",{onClick:()=>this.modal.dismiss()},o("ion-label",{slot:"start"},a.close),o("ion-icon",{slot:"end",name:"close"}))))),o("ion-content",{class:"ion-padding",scrollX:!0,lang:null===(s=this.obj)||void 0===s?void 0:s.language},r)]:o(n,{lang:null===(l=this.obj)||void 0===l?void 0:l.language},r)}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};(function(t,i,e,o){var n,l=arguments.length,s=l<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(l<3?n(s):l>3?n(i,e,s):n(i,e))||s);l>3&&s&&Object.defineProperty(i,e,s)})([N(250)],H.prototype,"updateDoc",null),H.style="img.sc-ldf-image{height:auto;max-width:100%;z-index:1}figcaption.sc-ldf-image{background-color:var(--ldf-editable-lookup-background-color);border-radius:4px;color:var(--ldf-editable-lookup-color);display:block;margin:auto;text-align:center}.left.sc-ldf-image{text-align:left}.center.sc-ldf-image{text-align:center}.right.sc-ldf-image{text-align:right}.img-wrapper.sc-ldf-image{margin:0;padding:12px;display:inline-block;position:relative}img.editable.sc-ldf-image{border:3px solid var(--ldf-color)}button.resize.sc-ldf-image{height:30px;width:30px;margin:0;padding:0;background-color:var(--ldf-editable-lookup-background-color);border-radius:50%;border:3px solid var(--ldf-color)}.resize.top-left.sc-ldf-image{position:absolute;left:0;top:-3px;cursor:nwse-resize}.resize.bottom-left.sc-ldf-image{position:absolute;left:-3px;bottom:0;cursor:nesw-resize}.resize.top-right.sc-ldf-image{position:absolute;right:-6px;top:-3px;cursor:nesw-resize}.resize.bottom-right.sc-ldf-image{position:absolute;right:-6px;bottom:0;cursor:nwse-resize}";const F=({doc:t,localeStrings:i},e)=>o("div",{class:"condition"},o("p",null,i.condition,o("code",null,i[t.condition.mode]),i.of_the_following),o("ul",null,t.condition.conditions.map((t=>o(U,{condition:t,localeStrings:i})))),e),U=({condition:t,localeStrings:i})=>{let e=[];return t.day&&(e=e.concat(o(K,{condition:t,field:"day",localeStrings:i}))),t.season&&(e=e.concat(o(K,{condition:t,field:"season",localeStrings:i}))),t.week&&(e=e.concat(o(K,{condition:t,field:"week",localeStrings:i}))),t.weekday&&(e=e.concat(o(K,{condition:t,field:"weekday",localeStrings:i}))),t.day_of_month&&e.push([i.day_of_month_1,(n=Number(t.day_of_month),l=n%10,s=n%100,1==l&&11!=s?n+"st":2==l&&12!=s?n+"nd":3==l&&13!=s?n+"rd":n+"th"),i.day_of_month_2]),t.hasOwnProperty("feastDay")&&e.push([i.the_day,t.feastDay?i.is:i.is_not,i.feastDay]),t.preference&&e.push([i.the_preference,o("code",null,t.preference.key),t.preference.is?i.is:i.is_not,o("code",null,t.preference.value)]),t.date&&e.push([i.the_date,t.date.lt&&`${i.lt} ${t.date.lt}`,t.date.lte&&`${i.lte} ${t.date.lte}`,t.date.gte&&`${i.gte} ${t.date.gte}`,t.date.gt&&`${i.gt} ${t.date.gt}`]),e.map((t=>o("li",null,t)));var n,l,s},K=({condition:t,field:i,localeStrings:e})=>{var o,n;const l=[];return(null===(o=t[i].except)||void 0===o?void 0:o.length)>0&&l.push([e[i],e.is,t[i].except.length>1?e.except:e.except_1,t[i].except.join(", ")]),(null===(n=t[i].only)||void 0===n?void 0:n.length)>0&&l.push([e[i],e.is,t[i].only.length>1?e.only:e.only_1,t[i].only.join(", ")]),l};const G=(t,i)=>"object"==typeof t?o("span",null,i.definedByPreference," ",o("code",null,t.preference)):o("code",null,t),X=({doc:t,localeStrings:i})=>{var e,n,l,s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k,w,$,C,S,j,O,z,_,N,L;let T;if(t.lookup)switch(null===(e=t.lookup)||void 0===e?void 0:e.type){case"lectionary":T=[i.lectionaryReading,G(null===(n=t.lookup)||void 0===n?void 0:n.item,i),i.fromLectionary,G(null===(l=t.lookup)||void 0===l?void 0:l.table,i),"."];break;case"canticle":T=[i[`canticle-${null===(s=t.lookup)||void 0===s?void 0:s.item}`],i.fromCanticleTable,G(null===(a=t.lookup)||void 0===a?void 0:a.table,i),"."];break;case"category":T=[i.category,t.category.map((t=>o("code",null,t))),(null===(r=t.lookup)||void 0===r?void 0:r.filter)&&"seasonal"==(null===(d=t.lookup)||void 0===d?void 0:d.filter)&&i["filter-seasonal"],(null===(c=t.lookup)||void 0===c?void 0:c.filter)&&"evening"==(null===(h=t.lookup)||void 0===h?void 0:h.filter)&&i[`filter-evening-${(null===(u=t.lookup)||void 0===u?void 0:u.item)||!0}`],(null===(p=t.lookup)||void 0===p?void 0:p.filter)&&"day"==(null===(v=t.lookup)||void 0===v?void 0:v.filter)&&i["filter-day"],(null===(b=t.lookup)||void 0===b?void 0:b.filter)&&"day"==(null===(f=t.lookup)||void 0===f?void 0:f.filter)&&o("code",null,null===(g=t.lookup)||void 0===g?void 0:g.item),(null===(m=t.lookup)||void 0===m?void 0:m.hasOwnProperty("rotate"))&&i[`rotate-${null===(y=t.lookup)||void 0===y?void 0:y.rotate}`],"."];break;case"slug":T=[i.slug,o("code",null,t.slug),(null===(x=t.lookup)||void 0===x?void 0:x.filter)&&"seasonal"==(null===(k=t.lookup)||void 0===k?void 0:k.filter)&&i["filter-seasonal"],(null===(w=t.lookup)||void 0===w?void 0:w.filter)&&"evening"==(null===($=t.lookup)||void 0===$?void 0:$.filter)&&i[`filter-evening-${(null===(C=t.lookup)||void 0===C?void 0:C.item)||!0}`],(null===(S=t.lookup)||void 0===S?void 0:S.filter)&&"day"==(null===(j=t.lookup)||void 0===j?void 0:j.filter)&&i["filter-day"],(null===(O=t.lookup)||void 0===O?void 0:O.filter)&&"day"==(null===(z=t.lookup)||void 0===z?void 0:z.filter)&&o("code",null,null===(_=t.lookup)||void 0===_?void 0:_.item),(null===(N=t.lookup)||void 0===N?void 0:N.hasOwnProperty("rotate"))&&i[`rotate-${null===(L=t.lookup)||void 0===L?void 0:L.rotate}`],"."];break;case"collect":T=o("code",null,i.collect);break;default:T=JSON.stringify(t.lookup)}else"bible-reading"===t.type&&t.citation&&(T=[o("code",null,t.citation),i.bible_version,..."string"==typeof t.version?[o("code",null,t.version)]:[i.the_preference_specified,o("code",null,"bibleVersion")]]);return o("article",{class:"lookup"},T)},Z={en:{bible_version:" in the version ","canticle-1":"The first canticle ","canticle-2":"The second canticle ",category:"All items that match the category ",collect:"The Collect of the Day.",day_of_month_1:"It is the ",day_of_month_2:" day of the month",definedByPreference:" defined by the preference ",fromCanticleTable:" from the canticle table ",fromLectionary:" from the lectionary ",lectionaryReading:"The lectionary reading ","filter-seasonal":" and the current season","filter-evening-true":" and are in the evening ","filter-evening-false":" and are not in the evening ","filter-day":" and the liturgical day ","rotate-true":" (rotating by day)","rotate-false":" (including all possibilities)",slug:"All items with the slug ",condition:"Included when ",and:"all",or:"any",the_day:" the day ",of_the_following:" of the following are true: ",day:"the liturgical day",season:"the liturgical season",week:"the liturgical week",weekday:"the day of the week",feastDay:"a Sunday or Holy Day",is:" is ",is_not:" is not ",only:" one of: ",only_1:"",except:" anything but: ",except_1:" not ",the_preference:"the preference ",the_preference_specified:"chosen in the preference ",the_date:"the date ",lte:" ≤ ",lt:" < ",gt:" > ",gte:" ≥ ",smallOnly:"Only appears on small screens",smallHidden:"Doesn't appear on small screens"}},q=class{constructor(e){t(this,e),this.focusPath=i(this,"focusPath",7),this.focusObj=i(this,"focusObj",7),this.ldfSelectionChange=i(this,"ldfSelectionChange",7),this.hasFocus=!1,this.buttonsSelected=!1,this.interrupt=!1,this.parentType=null,this.preview=!1,this.padding=void 0}async docChanged(t){let i;try{i=new f("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),i=new f}this.obj=i||new f}onDragOver(){"/"!==this.path&&(this.hasFocus=!0,this.focusPath.emit(this.path),this.focusObj.emit({obj:this.obj,path:this.path}),console.log("dragged over",this.path))}selectionChangeHandler(t){var i,e;t.preventDefault();const o=document.getSelection(),n=o.anchorNode,l=null===(e=null===(i=null==n?void 0:n.parentElement)||void 0===i?void 0:i.closest("ldf-string"))||void 0===e?void 0:e.citation;if(this.element.contains(n)){const t=o.toString();this.ldfSelectionChange.emit({target:this.element,text:t,citation:l,fragment:this.path})}}componentWillLoad(){this.loadLocaleStrings(),this.docChanged(this.doc)}onMouseOver(){this.hasFocus=!0,this.focusPath.emit(this.path)}onMouseOut(t){const i=this.element.querySelector("div.container");t.relatedTarget==i&&setTimeout((()=>{this.hasFocus=!1,this.focusPath.emit(this.path)}),500)}onClick(){this.hasFocus=!0,this.focusPath.emit(this.path),this.focusObj.emit({obj:this.obj,path:this.path})}async loadLocaleStrings(){try{this.localeStrings=Z[z(this.element)]}catch(t){console.warn(t)}}nodeFromDoc(t,i){return null==t?(null===customElements||void 0===customElements?void 0:customElements.get("ion-skeleton-text"))?o("ion-skeleton-text",null):o("p",null,"..."):this.editable||i?this.editableNode(t):this.chooseComponent(t)}editableNode(t){var i;const e=this.localeStrings||{};return(null===(i=t.value)||void 0===i?void 0:i.length)>0&&Boolean(t.value[0])?t.condition?o(F,{doc:t,localeStrings:e},this.chooseComponent(t)):this.chooseComponent(t):t.condition&&!t.lookup?o(F,{doc:t,localeStrings:e},this.chooseComponent(t)):t.condition&&t.lookup?o(F,{doc:t,localeStrings:e},o(X,{doc:t,localeStrings:e})):!t.condition&&t.lookup||"bible-reading"===t.type?o(X,{doc:t,localeStrings:e}):this.chooseComponent(t)}chooseComponent(t){var i,e;let n;const l=this.editable&&!this.preview;switch(null==t?void 0:t.type){case"liturgy":n=o("ldf-liturgy",{path:this.path,editable:l,preview:this.preview,doc:t});break;case"heading":n=o("ldf-heading",{path:this.path,editable:l,doc:t});break;case"image":n=o("ldf-image",{path:this.path,editable:l,doc:t});break;case"meditation":const s=null===(e=null===(i=this.obj)||void 0===i?void 0:i.day)||void 0===e?void 0:e.color,a=(null==s?void 0:s.hasOwnProperty("hex"))?s.hex:s||"#3489eb";n=o("ldf-meditation",{path:this.path,editable:this.editable||this.preview,doc:t,color:a});break;case"option":n=o("ldf-option",{path:this.path,editable:l,preview:this.preview,doc:t});break;case"refrain":n=o("ldf-refrain",{path:this.path,editable:l,doc:t});break;case"rubric":n=o("ldf-rubric",{path:this.path,editable:l,doc:t});break;case"text":n=o("ldf-text",{path:this.path,editable:l,doc:t});break;case"responsive":n=o("ldf-responsive-prayer",{path:this.path,editable:l,doc:t});break;case"bible-reading":n=o("ldf-bible-reading",{path:this.path,editable:l,doc:t});break;case"psalm":n=o("ldf-psalm",{path:this.path,editable:l,doc:t});break;default:console.warn("invalid type for document",t)}return n}setPreview(t){this.preview=t,this.editable=!0}render(){var t,i,e,l,s,a,r,d,c,h,u;const p=this.nodeFromDoc(this.obj);return p&&o(n,{lang:(null===(t=this.obj)||void 0===t?void 0:t.language)||"en"},o("div",{class:{container:!0,editable:this.editable||this.preview,"small-only":!this.editable&&!this.preview&&void 0!==(null===(i=this.obj)||void 0===i?void 0:i.responsive)&&(null===(e=this.obj)||void 0===e?void 0:e.responsive)==b.SmallOnly,"small-hidden":!this.editable&&!this.preview&&void 0!==(null===(l=this.obj)||void 0===l?void 0:l.responsive)&&(null===(s=this.obj)||void 0===s?void 0:s.responsive)==b.SmallHidden}},(this.editable||this.preview)&&o("ldf-editable-metadata-buttons",{visible:this.hasFocus,base:this.base,index:this.index,obj:this.obj,parentType:this.parentType,preview:this.preview,onLdfTogglePreview:t=>this.setPreview(t.detail),class:{"top-level":"liturgy"===(null===(a=this.obj)||void 0===a?void 0:a.type)||"option"===(null===(r=this.obj)||void 0===r?void 0:r.type)}}),(this.editable||this.preview)&&((null===(d=this.obj)||void 0===d?void 0:d.responsive)===b.SmallHidden||(null===(c=this.obj)||void 0===c?void 0:c.responsive)===b.SmallOnly)&&o("ion-chip",{class:"responsive-banner"},o("ion-icon",{name:"phone-portrait-outline"}),(null===(h=this.obj)||void 0===h?void 0:h.responsive)===b.SmallOnly&&o("ion-label",null,this.localeStrings.smallOnly),(null===(u=this.obj)||void 0===u?void 0:u.responsive)===b.SmallHidden&&o("ion-label",null,this.localeStrings.smallHidden)),o("div",{id:(this.path||"").replace(/\//g,"-"),class:{doc:!0,editable:this.editable||this.preview},style:{padding:this.padding}},p)))}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};q.style="ldf-liturgical-document.sc-ldf-liturgical-document,.sc-ldf-liturgical-document-h{font-family:var(--ldf-font-face);display:block}.container.editable.sc-ldf-liturgical-document{padding-top:0}.lookup.sc-ldf-liturgical-document{background-color:var(--ldf-editable-lookup-background-color);color:var(--ldf-editable-lookup-color);border-radius:4px;margin-bottom:1.5em;padding:1em;width:calc(100% - 2em)}.lookup.sc-ldf-liturgical-document code.sc-ldf-liturgical-document{font-weight:bold}.condition.sc-ldf-liturgical-document{background-color:var(--ldf-editable-condition-background-color);color:var(--ldf-editable-condition-color);border-radius:4px;padding:1em;width:calc(100% - 2em)}.condition.sc-ldf-liturgical-document code.sc-ldf-liturgical-document{font-weight:bold}.doc.sc-ldf-liturgical-document{margin-top:var(--ldf-liturgical-document-margin-top)}ldf-editable-metadata-buttons.sc-ldf-liturgical-document{height:none;display:block;z-index:10;background:var(--ldf-background);opacity:0.8;width:100%;position:sticky;top:2em;padding-top:1em;padding-bottom:1em}ldf-editable-metadata-buttons.top-level.sc-ldf-liturgical-document{position:relative;top:0}.small-only.sc-ldf-liturgical-document{display:block}.small-hidden.sc-ldf-liturgical-document{display:none}@media (min-width: 415px){.small-only.sc-ldf-liturgical-document{display:none}.small-hidden.sc-ldf-liturgical-document{display:block}}";const Q=class{constructor(i){t(this,i),this.preview=!1}docChanged(t){try{this.obj=new y("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new y}}componentWillLoad(){this.docChanged(this.doc)}onFocusPath(t){this.hasFocus=t.detail}render(){const t=("/"==this.path?"":`${this.path}/`)+"/value";return o(n,{lang:this.obj.language},(this.editable||this.preview)&&o("ldf-editable-add-block",{visible:!0,base:t,index:0}),this.obj.value.map(((i,e)=>{var n,l,s;const a=`${t}/${e}`,r=this.hasFocus==a||e==((null===(l=null===(n=this.obj)||void 0===n?void 0:n.value)||void 0===l?void 0:l.length)||0)-1||"option"===(null==i?void 0:i.type)&&(null===(s=this.hasFocus)||void 0===s?void 0:s.startsWith(a));return o("article",{style:{padding:this.editable?"1em":"0"}},o("ldf-liturgical-document",{doc:i,path:a,base:t,index:e,editable:this.editable,preview:this.preview,parentType:"liturgy"}),(this.editable||this.preview)&&o("ldf-editable-add-block",{visible:r,base:t,index:e+1}))})))}static get watchers(){return{doc:["docChanged"]}}},Y={en:{start:"Start",pause:"Pause",resume:"Resume",meditate:"Meditate for",minutes:"minutes.",seconds:" seconds. "}},tt=class{constructor(e){t(this,e),this.timerChanged=i(this,"timerChanged",7),this.started=!1,this.paused=!1,this.startingDuration=void 0,this.color="#3333ff"}docChanged(t){try{this.obj=new x("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new x}}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.autostart&&(this.secondsRemaining=this.obj.metadata.length,this.start())}async start(t){var i,e;const o=null!==(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)&&void 0!==e?e:{length:300,delay:0},n=t||o.length,l=o.delay;this.secondsRemaining=n,this.startingDuration=n,setTimeout((()=>{this.startTimer(),this.started=!0}),l),setTimeout((()=>{this.timerChanged.emit("start")}),l)}async pause(){this.paused=!0,this.stopTimer()}async resume(){this.paused=!1,this.startTimer(),this.timerChanged.emit("resume")}async rewind(){this.pause(),this.stopTimer(),this.start(),this.timerChanged.emit("rewind")}async duration(){return this.startingDuration}async reset(){await this.pause(),this.secondsRemaining=void 0}async loadLocaleStrings(){try{this.localeStrings=Y[z(this.element)]}catch(t){console.warn(t)}}minutesSeconds(t){const i=t<0,e=Math.floor(Math.abs(t/60));return`${i?"-":""}${e.toString().padStart(2,"0")}:${Math.abs(t-60*e).toString().padStart(2,"0")}`}startTimer(){this.timerId=setInterval((()=>{this.secondsRemaining--,0==this.secondsRemaining?(this.timerChanged.emit("complete"),this.startingDuration=void 0):this.timerChanged.emit(this.secondsRemaining)}),1e3)}stopTimer(){this.timerId&&clearInterval(this.timerId),this.timerChanged.emit("pause")}handleControlSubmit(t){t.preventDefault()}handleControlValue(t){var i,e,o;let n=t.target.value;""==n&&(n="0"),Object.assign(this.obj,{metadata:Object.assign(Object.assign({},this.obj.metadata),{length:60*parseInt(n)})}),this.obj=new x(this.obj),this.secondsRemaining=null!==(o=null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.length)&&void 0!==o?o:0}buttonNode(t,i,e,n="clear",l="large"){const s=this.localeStrings||{};return customElements&&customElements.get("ion-button")?o("ion-button",{onClick:t,fill:n,size:l},o("ion-icon",{name:e,slot:"start"}),o("ion-label",null,s[i])):o("button",{onClick:t,class:n,style:{color:this.color}},s[i])}render(){var t,i,e,l,s,a,r;const d=this.localeStrings||{},c=null!==(e=null===(i=null===(t=this.obj)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.length)&&void 0!==e?e:300,h=this.secondsRemaining/c*100;return this.editable?o(n,null,o("form",{class:"controls",onSubmit:t=>this.handleControlSubmit(t)},o("span",null,d.meditate),o("ldf-editable-text",{inputType:"number",short:!0,path:`${this.path}/metadata/length`,text:null===(r=null!==(a=null===(s=null===(l=this.obj)||void 0===l?void 0:l.metadata)||void 0===s?void 0:s.length)&&void 0!==a?a:300)||void 0===r?void 0:r.toString()}),o("span",null,d.seconds),o("span",null,"(",Math.floor(c/60),":",Math.floor(c%60).toString().padStart(2,"0"),")"))):o(n,null,o("div",{class:{"control-container":!0,hidden:!!this.secondsRemaining}},o("form",{class:"controls",onSubmit:t=>this.handleControlSubmit(t)},this.buttonNode((()=>this.start()),"meditate","sunny","solid","small"),o("input",{type:"number",value:c/60,onInput:t=>this.handleControlValue(t)}),o("span",null,d.minutes))),o("div",{class:{hidden:!this.secondsRemaining}},o("div",{class:"progress-circle-container"},o("div",{class:"progress-circle",style:{background:`conic-gradient(${this.color} ${100-h}%, 0, #ecf0f1 ${h}%)`}},o("div",{class:"circle-overlay"},o("div",{class:"seconds"},this.minutesSeconds(this.secondsRemaining)),o("div",{class:"controls"},!this.started&&this.buttonNode((()=>this.start()),"start","start"),this.started&&!this.paused&&this.buttonNode((()=>this.pause()),"pause","pause"),this.started&&this.paused&&this.buttonNode((()=>this.resume()),"resume","play")))))))}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};tt.style="ldf-heading.sc-ldf-meditation .control-container.sc-ldf-meditation,.sc-ldf-meditation-h .control-container.sc-ldf-meditation{display:block;margin:auto}ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;width:100%}ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation input.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation input.sc-ldf-meditation{text-align:center}@media (min-width: 767px){ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation{flex-direction:row}}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation{display:flex;align-items:center;justify-content:center;padding:1em}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation{width:300px;height:300px;display:flex;align-items:center;justify-content:center;border-radius:50%}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .circle-overlay.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .circle-overlay.sc-ldf-meditation{background-color:var(--ldf-background-color);display:flex;align-items:center;flex-direction:column;justify-content:center;height:92%;width:92%;border-radius:50%}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .seconds.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .seconds.sc-ldf-meditation{font-family:var(--ldf-font-face);font-size:3em}ldf-heading.sc-ldf-meditation button.clear.sc-ldf-meditation,.sc-ldf-meditation-h button.clear.sc-ldf-meditation{background-color:var(--ldf-background-color);border:none;font-size:1em}.hidden.sc-ldf-meditation{height:0;opacity:0;transition:0.25s}";const it={en:{option:"Option"}},et=class{constructor(e){t(this,e),this.ldfAddOptionToDoc=i(this,"ldfAddOptionToDoc",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.ldfOptionAskForStoredSelection=i(this,"ldfOptionAskForStoredSelection",7),this.ldfOptionMakeSelection=i(this,"ldfOptionMakeSelection",7)}docChanged(t){var i,e,o,n,l,s,a,r,d,c;try{this.obj=new j("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new j}const h=this.editable?null!==(s=null!==(o=null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.editor_selected)&&void 0!==o?o:null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.selected)&&void 0!==s?s:0:null!==(d=null===(r=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===r?void 0:r.selected)&&void 0!==d?d:0;this.select(h),(null===(c=this.obj)||void 0===c?void 0:c.value)&&this.obj.value[h]&&this.obj.value[h].value||this.selectFirstDefined(),this.filterOptions()}componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.ldfOptionAskForStoredSelection.emit({el:this.el})}async loadLocaleStrings(){try{this.localeStrings=it[z(this.el)]}catch(t){console.warn(t)}}async select(t,i=!1){var e,o,n,l,s,a,r,d;(null===(e=this.obj)||void 0===e?void 0:e.slug)&&"number"==typeof t&&i&&this.ldfOptionMakeSelection.emit({slug:null===(o=this.obj)||void 0===o?void 0:o.slug,index:t});const c=Boolean(null===(n=this.obj)||void 0===n?void 0:n.metadata),h=null===(s=null===(l=this.obj)||void 0===l?void 0:l.metadata)||void 0===s?void 0:s.editor_selected;Number(t)>=0?((null===(a=this.obj)||void 0===a?void 0:a.metadata)?(this.obj.metadata.selected=Number(t),this.obj.metadata.editor_selected=Number(t)):this.obj.metadata={selected:Number(t),editor_selected:Number(t)},this.obj=new j(Object.assign({},this.obj)),i&&!this.editable&&this.ldfDocShouldChange.emit(new O({path:`${this.path}/metadata`,op:[{type:"set",index:"selected",oldValue:h,value:Number(t)}]})),this.editable&&(c&&t!==h?this.ldfDocShouldChange.emit(new O({path:`${this.path}/metadata`,op:[{type:"set",index:"editor_selected",oldValue:h,value:Number(t)}]})):c||t===h||this.ldfDocShouldChange.emit(new O({path:`${this.path}`,op:[{type:"set",index:"metadata",value:{editor_selected:Number(t)}}]}))),Object.assign(this.obj,{metadata:Object.assign(Object.assign({},this.obj.metadata),{selected:t})}),Object.assign(this.obj,{metadata:Object.assign(Object.assign({},this.obj.metadata),{editor_selected:t})})):"add"===t&&this.ldfAddOptionToDoc.emit({base:this.path,index:null===(d=null===(r=this.obj)||void 0===r?void 0:r.value)||void 0===d?void 0:d.length,obj:this.obj})}onSelectChange(t){const i=parseInt(t.target.value);this.select(i,!0)}selectFirstDefined(){const t=this.obj.value.find((t=>void 0!==(null==t?void 0:t.value))),i=this.obj.value.filter((t=>Boolean(t))).indexOf(t);this.select(i)}filterOptions(){var t;this.obj&&(this.obj=new j(Object.assign(Object.assign({},this.obj),{value:((null===(t=this.obj)||void 0===t?void 0:t.value)||[]).filter((t=>this.editable||Boolean(t)&&(Boolean(t.value)||Boolean("bible-reading"===(null==t?void 0:t.type)&&t.citation))))})))}selectNode(){var t,i,e,n,l,s,a,r,d,c,h,u,p,v,b,f;const g=this.editable?null!==(s=null!==(e=null===(i=null===(t=this.obj)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.editor_selected)&&void 0!==e?e:null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.selected)&&void 0!==s?s:0:null!==(d=null===(r=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===r?void 0:r.selected)&&void 0!==d?d:0;return(null===(h=null===(c=this.obj)||void 0===c?void 0:c.value)||void 0===h?void 0:h.length)>1||this.editable?customElements&&customElements.get("ion-select")?!((null===(u=this.obj)||void 0===u?void 0:u.value)||[]).map(((t,i)=>{var e;return(null===(e=this.versionLabel(t,i))||void 0===e?void 0:e.length)>20})).reduce(((t,i)=>t||i),!1)&&(null===(p=this.obj)||void 0===p?void 0:p.value.length)<=4?o("ion-segment",{color:"primary",value:g.toString()},null===(v=this.obj)||void 0===v?void 0:v.value.map(((t,i)=>o("ion-segment-button",{value:i.toString(),onClick:()=>this.select(i,!0)},o("ion-label",null,this.versionLabel(t,i))))),this.editable&&o("ion-segment-button",{value:"add",class:"add",onClick:()=>this.select("add",!0)},o("ion-label",null,"+"))):(console.log(">2 or longish"),o("ion-toolbar",null,o("ion-select",{value:g,slot:this.editable?"start":"end",onIonChange:t=>this.select(Number(t.detail.value),!0)},null===(b=this.obj)||void 0===b?void 0:b.value.map(((t,i)=>o("ion-select-option",{value:i},o("ion-label",null,this.versionLabel(t,i)))))),this.editable&&o("ion-buttons",{slot:"end"},o("ion-button",{onClick:()=>this.select("add",!0)},o("ion-icon",{slot:"icon-only",name:"add"}))))):o("ldf-label-bar",null,o("select",{onInput:t=>this.onSelectChange(t),slot:this.editable?"start":"end"},null===(f=this.obj)||void 0===f?void 0:f.value.map(((t,i)=>o("option",{value:i,selected:i==g},this.versionLabel(t,i))))),this.editable&&o("button",{slot:"end",onClick:()=>this.select("add",!0)},"+")):[]}versionLabel(t,i){try{return this.obj.getVersionLabel(t)}catch(t){return console.warn(t),`${(this.localeStrings||{}).option} ${i+1}`}}render(){var t;const i=this.editable&&null!==(t=this.obj.metadata.editor_selected)&&void 0!==t?t:this.obj.metadata.selected;return o(n,{lang:this.obj.language},o("div",{class:"select-control"},o("ldf-label-bar",null,this.selectNode())),(this.obj.value||this.editable)&&o("ldf-liturgical-document",{doc:this.obj.value[i],path:`${this.path}/value/${this.obj.metadata.selected}`,base:`${this.path}/value`,index:i,editable:this.editable,parentType:"option"}))}get el(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};et.style=".select-control.sc-ldf-option{margin-top:var(--ldf-select-control-margin-top)}ion-select.sc-ldf-option{width:75vw;max-width:300px}";const ot={en:{changeCanticle:"Change Canticle",citation:"(Biblical) Citation",label:"Label",latinname:"Latin Name",section_break_insert:"+ insert section break",section_break_remove:"x remove section break",source:"Source",source_citation:"Citation"}},nt=class{constructor(e){t(this,e),this.ldfAskForCanticleOptions=i(this,"ldfAskForCanticleOptions",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.focusedVerse=void 0,this.focusedSection=void 0}docChanged(t){try{this.obj=new k("string"==typeof t?JSON.parse(t):t),this.filter()}catch(t){console.warn(t),this.obj=new k}}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.filter()}async loadLocaleStrings(){try{this.localeStrings=ot[z(this.element)]}catch(t){console.warn(t)}}async changeCanticle(){const t=await p.create({component:"ldf-editable-filter-documents"});t.componentProps={modal:t,type:"canticle",changeCallback:t=>{this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",oldValue:this.obj,value:t}]}))}},await t.present(),this.ldfAskForCanticleOptions.emit(this.path)}async filter(){this.filteredValue=this.obj.filteredVerses()}antiphonNode(t,i=!1){var e,n;if("string"==typeof t){const e=new L({type:"refrain",value:[t],style:"antiphon"});return o("ldf-refrain",{class:"antiphon",doc:e,editable:this.editable&&!i,path:`${this.path}/metadata/antiphon`})}if(null==t?void 0:t.type)return o("ldf-liturgical-document",{class:"antiphon",doc:t,path:`${this.path}/metadata/antiphon`,editable:this.editable&&!i});if("object"==typeof t){const i=this.obj.day?g(null===(n=null===(e=this.obj)||void 0===e?void 0:e.day)||void 0===n?void 0:n.date):new Date;return this.antiphonNode(t[`${i.getMonth()+1}/${i.getDate()}`]||t[`${i.getMonth()+1}-${i.getDate()}`],!0)}}gloriaNode(t){if("string"==typeof t){const i=new L({value:[t],style:"gloria"});return o("ldf-liturgical-document",{doc:i,editable:this.editable})}return o("ldf-liturgical-document",{doc:t,editable:this.editable})}headingNode(t,i=3,e=!0,n=!1,l=!1){var s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k,w,$,S,j;let O=this.obj.label;"canticle"==this.obj.style&&this.obj.metadata&&this.obj.metadata.number&&this.obj.metadata.localname?O=`${this.obj.metadata.number}. ${this.obj.metadata.localname}`:"canticle"==this.obj.style&&this.obj.metadata&&this.obj.metadata.localname&&(O=this.obj.metadata.localname);const z=new C({type:"heading",metadata:{level:i},citation:n||(null===(s=this.obj)||void 0===s?void 0:s.citation)===(null===(a=this.obj)||void 0===a?void 0:a.label)||null===(r=this.obj)||void 0===r?void 0:r.citation,value:[null!=t?t:O],source:l||null===(d=this.obj)||void 0===d?void 0:d.source});return this.editable?[o("ldf-label-bar",null,o("h3",{slot:"start",class:"editable-label"},o("ldf-editable-text",{id:"label",text:null===(c=this.obj)||void 0===c?void 0:c.label,path:`${this.path}/label`,placeholder:null===(h=this.localeStrings)||void 0===h?void 0:h.label})),(null===(u=this.obj)||void 0===u?void 0:u.metadata)&&o("ldf-editable-text",{id:"latinname",text:null===(v=null===(p=this.obj)||void 0===p?void 0:p.metadata)||void 0===v?void 0:v.latinname,path:`${this.path}/metadata/latinname`,placeholder:null===(b=this.localeStrings)||void 0===b?void 0:b.latinname}),o("ldf-editable-text",{slot:"end",id:"source-source",text:null===(g=null===(f=this.obj)||void 0===f?void 0:f.source)||void 0===g?void 0:g.source,path:`${this.path}/source/source`,placeholder:null===(m=this.localeStrings)||void 0===m?void 0:m.source}),o("ldf-editable-text",{slot:"end",id:"source-citation",text:null===(x=null===(y=this.obj)||void 0===y?void 0:y.source)||void 0===x?void 0:x.citation,path:`${this.path}/source/citation`,placeholder:null===(k=this.localeStrings)||void 0===k?void 0:k.source_citation})),o("ldf-label-bar",null,o("ldf-editable-text",{slot:"start",id:"citation",text:null===(w=this.obj)||void 0===w?void 0:w.citation,path:`${this.path}/citation`,placeholder:null===($=this.localeStrings)||void 0===$?void 0:$.citation}))]:o("ldf-heading",{doc:z},e&&o("h5",{slot:"additional"},null===(j=null===(S=this.obj)||void 0===S?void 0:S.metadata)||void 0===j?void 0:j.latinname))}insertSectionBreakAfterVerse(t,i){const e=this.obj.value[t],o=e.value.slice(0,i+1),n=e.value.slice(i+1);this.ldfDocShouldChange.emit(new O({path:`${this.path}/value/${t}`,op:[{type:"set",oldValue:e,value:Object.assign(Object.assign({},e),{value:o})}]})),this.ldfDocShouldChange.emit(new O({path:`${this.path}/value`,op:[{type:"insertAt",index:t+1,oldValue:e,value:Object.assign(Object.assign({},e),{value:n})}]}))}removeSectionBreakAfter(t){const i=this.obj.value[t],e=this.obj.value[t+1];if(i&&e){const o=i.value.concat(e.value);this.ldfDocShouldChange.emit(new O({path:`${this.path}/value/${t}/value`,op:[{type:"set",oldValue:i.value,value:o}]})),this.ldfDocShouldChange.emit(new O({path:`${this.path}/value`,op:[{type:"deleteAt",index:t+1,oldValue:e}]}))}}render(){var t,i,e,l,s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k;const w=this.obj.includeAntiphon();let $,S=t=>({type:"psalm-verse",number:"",halfverse:"",verse:t});this.editable&&($=Object.assign({},(null===(i=null===(t=this.obj)||void 0===t?void 0:t.value[0])||void 0===i?void 0:i.value[0])||{type:"psalm-verse",number:"",halfverse:"",verse:""}),$.number&&($.number=""),$.halfverse&&($.halfverse=""),$.verse&&($.verse=""));const j=((null===(e=this.obj)||void 0===e?void 0:e.value)||[]).map((t=>t.value.map((t=>!Boolean(t.number))))).flat().reduce(((t,i)=>t||i),!1),O=this.localeStrings||{};return o(n,{lang:(null===(l=this.obj)||void 0===l?void 0:l.language)||"en"},o("div",{class:`psalm-parent ${this.editable?"editable":""} ${(null===(s=this.obj)||void 0===s?void 0:s.display_format)||"default"} ${j?"no-numbers":""}`},(this.editable||"canticle"===(null===(a=this.obj)||void 0===a?void 0:a.style))&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"},"canticle"===(null===(r=this.obj)||void 0===r?void 0:r.style)&&(null===(c=null===(d=this.obj)||void 0===d?void 0:d.metadata)||void 0===c?void 0:c.changeable)&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"},o("ion-buttons",null,o("ion-button",{onClick:()=>this.changeCanticle()},o("ion-icon",{name:"swap-horizontal",slot:"start"}),o("ion-label",null,O.changeCanticle))))))),this.headingNode(),w&&this.antiphonNode(this.obj.metadata.antiphon),null===(h=this.filteredValue)||void 0===h?void 0:h.map(((t,i)=>{var e,n,l;return[t.label&&(null===(e=t.value)||void 0===e?void 0:e.length)>0&&this.headingNode(t.label,4,!1,!0,!0),o("div",{class:"psalm-set"},t.value.map(((t,e)=>{var n,l,s,a,r,d,c,h,u,p;if(t instanceof C)return o("ldf-heading",{doc:t});{const v=new Array;return v.push(o("div",{class:"verse"},this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}-${e}-verse`,text:t.verse,path:`${this.path}/value/${i}/value/${e}/verse`,placeholder:"Lorem ipsum sit dolor amet, *",template:$,templateMaker:S}):o("ldf-string",{text:t.verse,citation:{label:null===(n=this.obj)||void 0===n?void 0:n.label,book:"psalm"===(null===(l=this.obj)||void 0===l?void 0:l.style)?"Psalm":void 0,chapter:null===(a=null===(s=this.obj)||void 0===s?void 0:s.metadata)||void 0===a?void 0:a.number,verse:t.number},dropcap:0==e&&"he"!==(null===(r=this.obj)||void 0===r?void 0:r.language)&&"iu"!==(null===(d=this.obj)||void 0===d?void 0:d.language)?"force":"disabled",index:e,fragment:this.path}))),v.push(o("br",null)),v.push(o("div",{class:"halfverse"},this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}-${e}-halfverse`,text:t.halfverse,path:`${this.path}/value/${i}/value/${e}/halfverse`,placeholder:"consectetur adipiscing elit.",template:$}):o("ldf-string",{text:t.halfverse,citation:{label:null===(c=this.obj)||void 0===c?void 0:c.label,book:"psalm"===(null===(h=this.obj)||void 0===h?void 0:h.style)?"Psalm":void 0,chapter:null===(p=null===(u=this.obj)||void 0===u?void 0:u.metadata)||void 0===p?void 0:p.number,verse:t.number},dropcap:"disabled",fragment:this.path}))),o("p",{class:this.editable?"psalm editable":"psalm",onClick:()=>{this.focusedVerse=e,this.focusedSection=i}},this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}-${e}-number`,text:t.number,path:`${this.path}/value/${i}/value/${e}/number`,placeholder:"#",template:$}):t.number&&o("sup",null,t.number),o("div",{class:"text"},v,this.editable&&o("ion-button",{fill:"clear",class:{"section-break":!0,hidden:this.focusedVerse!==e||this.focusedSection!==i},onClick:()=>this.insertSectionBreakAfterVerse(i,e)},O.section_break_insert)))}})),this.obj.repeatAntiphon(i,this.filteredValue.length)&&o("div",{class:"repeat-antiphon"},this.antiphonNode(null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.antiphon)),this.editable&&this.obj.value.length>i+1&&o("ion-button",{fill:"clear",class:"section-break",onClick:()=>this.removeSectionBreakAfter(i)},O.section_break_remove))]})),(null===(p=null===(u=this.obj)||void 0===u?void 0:u.metadata)||void 0===p?void 0:p.gloria)&&!this.obj.metadata.omit_gloria&&this.gloriaNode(this.obj.metadata.gloria),((null===(b=null===(v=this.obj)||void 0===v?void 0:v.metadata)||void 0===b?void 0:b.gloria)&&!this.obj.metadata.omit_gloria||void 0===(null===(g=null===(f=this.obj)||void 0===f?void 0:f.metadata)||void 0===g?void 0:g.gloria)||Boolean(null===(y=null===(m=this.obj)||void 0===m?void 0:m.metadata)||void 0===y?void 0:y.omit_gloria))&&w&&this.antiphonNode(null===(k=null===(x=this.obj)||void 0===x?void 0:x.metadata)||void 0===k?void 0:k.antiphon)))}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};nt.style="ldf-psalm.sc-ldf-psalm,.sc-ldf-psalm-h{font-family:var(--ldf-font-face);--ldf-drop-margin-right:var(--ldf-drop-psalm-margin-right)}ldf-psalm[lang=he].sc-ldf-psalm .verse.sc-ldf-psalm,[lang=he].sc-ldf-psalm-h .verse.sc-ldf-psalm{text-align:right;--ldf-drop-float:right}.psalm-set.sc-ldf-psalm{margin-top:0.5em;margin-bottom:0.5em}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm{display:var(--ldf-psalm-grid-display);grid-template-columns:var(--ldf-psalm-grid-template-columns);grid-template-rows:auto;grid-template-areas:var(--ldf-psalm-grid-template-areas);margin:0;text-indent:var(--ldf-psalm-verse-indentation)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm br.sc-ldf-psalm{display:var(--ldf-psalm-line-break-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm sup.sc-ldf-psalm{float:var(--ldf-psalm-number-float);display:var(--ldf-psalm-number-display);grid-area:var(--ldf-psalm-number-grid-area);margin-right:var(--ldf-psalm-number-margin-right)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .text.sc-ldf-psalm{display:var(--ldf-psalm-text-display);grid-area:var(--ldf-psalm-text-grid-area)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{margin-left:var(--ldf-psalm-halfverse-margin-left)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .verse.sc-ldf-psalm,.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{display:var(--ldf-psalm-verse-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{display:var(--ldf-psalm-halfverse-display, var(--ldf-psalm-verse-display))}.editable.sc-ldf-psalm .verse.sc-ldf-psalm,.editable.sc-ldf-psalm .halfverse.sc-ldf-psalm{width:100%}.psalm-parent.no-numbers.sc-ldf-psalm{display:block;text-align:left;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none}.psalm-parent.no-numbers.sc-ldf-psalm .psalm.sc-ldf-psalm{display:block;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none}.psalm-parent.no-numbers.sc-ldf-psalm .psalm.sc-ldf-psalm .text.sc-ldf-psalm{text-align:left;grid-area:none;display:var(--ldf-psalm-text-display);width:100%}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) sup.sc-ldf-psalm{display:var(--ldf-psalm-set-first-verse-number-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .verse.sc-ldf-psalm:nth-of-type(1){display:var(--ldf-psalm-set-first-verse-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .halfverse.sc-ldf-psalm:nth-of-type(2){display:var(--ldf-psalm-set-first-half-verse-display, inline-block)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) sup.sc-ldf-psalm{display:var(--ldf-psalm-first-verse-number-display)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .verse.sc-ldf-psalm:nth-of-type(1){display:var(--ldf-psalm-first-verse-display)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .halfverse.sc-ldf-psalm:nth-of-type(2){display:var(--ldf-psalm-first-half-verse-display, inline-block)}.antiphon.sc-ldf-psalm{display:var(--ldf-psalm-antiphon-display);font-style:var(--ldf-antiphon-font-style);font-weight:var(--ldf-antiphon-font-weight);margin-top:0.5em}.repeat-antiphon.sc-ldf-psalm{display:var(--ldf-psalm-repeat-antiphon-display)}h5.sc-ldf-psalm{font-size:1em;font-style:italic;font-weight:normal;margin-right:1em}.psalm.unison.sc-ldf-psalm .text.sc-ldf-psalm{font-weight:var(--ldf-unison-font-weight);font-style:var(--ldf-unison-font-style)}.psalm.omit.sc-ldf-psalm .text.sc-ldf-psalm{display:none}.psalm.wholeverse.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-child(even),.psalm-parent.wholeverse.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-child(even){font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.psalm.halfverse.sc-ldf-psalm .halfverse.sc-ldf-psalm,.psalm-parent.halfverse.sc-ldf-psalm .halfverse.sc-ldf-psalm{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}h3.editable-label.sc-ldf-psalm{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.section-break.sc-ldf-psalm{display:block;text-align:center;width:100%}.section-break.hidden.sc-ldf-psalm{display:none}";const lt=class{constructor(i){t(this,i)}docChanged(t){try{this.obj=new L("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new L}}componentWillLoad(){this.docChanged(this.doc)}render(){var t,i,e;return o(n,{lang:this.obj.language},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),o("div",{class:`${(null===(t=this.obj)||void 0===t?void 0:t.style)||""} ${(null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.align)||""}`},this.obj.value&&this.obj.value.map(((t,i)=>this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}`,text:t,path:`${this.path}/value/${i}`}):o("p",{id:`${this.obj.uid||this.obj.slug}-${i}`,innerHTML:t})))))}static get watchers(){return{doc:["docChanged"]}}};lt.style="ldf-refrain.sc-ldf-refrain,.sc-ldf-refrain-h{font-family:var(--ldf-font-face);display:block}ldf-refrain.sc-ldf-refrain p.sc-ldf-refrain,.sc-ldf-refrain-h p.sc-ldf-refrain{font-style:inherit;margin-bottom:0;margin:0}.antiphon.sc-ldf-refrain{font-style:var(--ldf-antiphon-font-style)}.gloria.sc-ldf-refrain{margin-left:calc(var(--ldf-gloria-indent) / 2);text-indent:calc(var(--ldf-gloria-indent) / -2)}@media (min-width: 450px){.gloria.sc-ldf-refrain{margin-left:var(--ldf-gloria-indent);text-indent:calc(var(--ldf-gloria-indent) * -1)}.gloria.sc-ldf-refrain>p.sc-ldf-refrain:first-child{margin-left:0em}.gloria.sc-ldf-refrain>p.sc-ldf-refrain:nth-child(even){margin-left:1em}}.left.sc-ldf-refrain{text-align:left}.center.sc-ldf-refrain{text-align:center}.right.sc-ldf-refrain{text-align:right}";const st={en:{label:"Label",source:"Source",citation:"Citation",makeOptional:"Make Optional",optional:"Optional"}},at=class{constructor(i){t(this,i)}docChanged(t){try{this.obj=new w("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new w}}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=st[z(this.element)]}catch(t){console.warn(t)}}editableNode(t,i,e,n,l){return o("ldf-editable-text",{id:`${this.obj.uid}-${i}-${e}`,text:t[e],path:`${this.path}/value/${i}/${e}`,template:n,templateMaker:l})}stringNode(t,i,e){return o("ldf-string",{citation:{label:this.obj.label},id:`${this.obj.uid}-${i}-${e}`,text:t[e],dropcap:0==i?"enabled":"disabled",fragment:this.path})}litanyResponseStringNode(t,i){const e=t.response||this.obj.metadata.response;return"[Silence]"==e?o("span",{class:"rubric"},o("br",null),"Silence"):o("span",{class:"response"},o("ldf-string",{citation:{label:this.obj.label},id:`${this.obj.uid}-${i}-response`,text:e,fragment:this.path}))}editableHeader(){var t,i,e,n,l,s,a,r;return o("ldf-label-bar",null,o("h3",{slot:"start",class:"editable-label"},o("ldf-editable-text",{id:"label",text:null===(t=this.obj)||void 0===t?void 0:t.label,path:`${this.path}/label`,placeholder:null===(i=this.localeStrings)||void 0===i?void 0:i.label})),o("ldf-editable-text",{slot:"end",id:"source-source",text:null===(n=null===(e=this.obj)||void 0===e?void 0:e.source)||void 0===n?void 0:n.source,path:`${this.path}/source/source`,placeholder:null===(l=this.localeStrings)||void 0===l?void 0:l.source}),o("ldf-editable-text",{slot:"end",id:"source-citation",text:null===(a=null===(s=this.obj)||void 0===s?void 0:s.source)||void 0===a?void 0:a.citation,path:`${this.path}/source/citation`,placeholder:null===(r=this.localeStrings)||void 0===r?void 0:r.citation}))}render(){var t,i,e,l,s;const a=(null===(t=this.obj)||void 0===t?void 0:t.label)||(null===(i=this.obj)||void 0===i?void 0:i.citation)||(null===(e=this.obj)||void 0===e?void 0:e.source);if("preces"==this.obj.style){const t={label:"",text:""},i=t=>({label:"",text:t});return o(n,{class:this.obj.style,lang:this.obj.language},o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),!this.editable&&a&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation,source:this.obj.source})}),this.editable&&a&&this.editableHeader(),o("table",{class:"preces"},this.obj.value.map(((e,n)=>o("tr",{class:"row"},o("td",{class:"cell"},this.editable?this.editableNode(e,n,"label",t,i):this.stringNode(e,n,"label")),o("td",{class:n%2==0?"cell":"cell response"},this.editable?this.editableNode(e,n,"text",t,i):this.stringNode(e,n,"text")))))))}if("litany"==this.obj.style){const t={text:"",response:(null===(l=this.obj.metadata)||void 0===l?void 0:l.response)||""},i=t=>{var i;return{text:t,response:(null===(i=this.obj.metadata)||void 0===i?void 0:i.response)||""}};return o(n,{class:this.obj.style,lang:this.obj.language},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),!this.editable&&a&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation,source:this.obj.source})}),this.editable&&a&&this.editableHeader(),this.obj.value.map(((e,n)=>{var l,s;let a=new Array("litany");return e.optional&&a.push("optional"),o("div",{class:{line:!0,editable:this.editable}},o("p",{class:a.join(" ")},this.editable?this.editableNode(e,n,"text",t,i):this.stringNode(e,n,"text"),e.response&&(this.editable?o("span",{class:"response"},this.editableNode(e,n,"response",t,i)):[o("br",null),this.litanyResponseStringNode(e,n)]),!e.response&&(null===(l=this.obj.metadata)||void 0===l?void 0:l.response)&&(this.editable?o("span",{class:"response"},o("ldf-editable-text",{id:`${this.obj.uid}-${n}-response`,text:this.obj.metadata.response,path:`${this.path}/response`})):[o("br",null),this.litanyResponseStringNode(e,n)])),this.editable&&o("label",{class:"optional-label",htmlFor:`optional-${n}`},null===(s=this.localeStrings)||void 0===s?void 0:s.optional),this.editable&&o("ldf-editable-boolean",{id:`optional-${n}`,slot:"start",path:`${this.path}/value/${n}/optional`,value:e.optional}))})))}{const t={text:"",response:(null===(s=this.obj.metadata)||void 0===s?void 0:s.response)||""},i=t=>{var i;return{text:t,response:(null===(i=this.obj.metadata)||void 0===i?void 0:i.response)||""}};return o(n,{class:this.obj.style,lang:this.obj.language},!this.editableHeader&&a&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation,source:this.obj.source})}),this.editable&&a&&this.editableHeader(),o("p",{class:"responsive"},this.obj.value.map(((e,n)=>[o("div",null,this.editable?this.editableNode(e,n,"text",t,i):this.stringNode(e,n,"text")),o("div",{class:"response"},this.editable?this.editableNode(e,n,"response",t,i):this.stringNode(e,n,"response"))]))))}}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};at.style=".sc-ldf-responsive-prayer-h{text-align:var(--ldf-text-align);text-justify:inter-character}.response.sc-ldf-responsive-prayer{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.preces.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer{text-align:left}.preces.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer:first-child{font-style:italic;text-align:left;padding-right:1em;vertical-align:top}.optional.sc-ldf-responsive-prayer{padding-left:0.5em;border-left:2px solid black}.line.sc-ldf-responsive-prayer{display:flex;flex-direction:row;align-items:center}.line.sc-ldf-responsive-prayer>*.sc-ldf-responsive-prayer{text-align:var(--ldf-text-align)}.editable.line.sc-ldf-responsive-prayer ldf-editable-boolean.sc-ldf-responsive-prayer{width:2em}.editable.line.sc-ldf-responsive-prayer p.sc-ldf-responsive-prayer{width:calc(100% - 2em)}.rubric.sc-ldf-responsive-prayer{font-family:var(--ldf-font-face);color:var(--ldf-rubric-color);font-style:var(--ldf-rubric-font-style);font-weight:var(--ldf-rubric-font-weight);font-size:var(--ldf-rubric-font-size)}.litany.sc-ldf-responsive-prayer{white-space:pre-wrap}.preces.sc-ldf-responsive-prayer{width:100%}.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer{display:table-row;display:var(--ldf-preces-tr-display)}.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer .cell.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer .cell.sc-ldf-responsive-prayer{display:table-cell;display:var(--ldf-preces-td-display);margin-left:var(--ldf-preces-td-margin-left)}h3.editable-label.sc-ldf-responsive-prayer{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.optional-label.sc-ldf-responsive-prayer{margin-right:0.5em}";const rt=class{constructor(i){t(this,i)}docChanged(t){try{this.obj=new $("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new $}}componentWillLoad(){this.docChanged(this.doc)}render(){return o(n,{lang:this.obj.language},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),this.obj.value.map(((t,i)=>this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}`,text:t,path:`${this.path}/value/${i}`}):o("p",{id:`${this.obj.uid||this.obj.slug}-${i}`,class:"rubric"},t))))}static get watchers(){return{doc:["docChanged"]}}};rt.style=".sc-ldf-rubric-h{font-family:var(--ldf-font-face);color:var(--ldf-rubric-color);font-style:var(--ldf-rubric-font-style);font-weight:var(--ldf-rubric-font-weight);font-size:var(--ldf-rubric-font-size);text-align:var(--ldf-text-align);text-justify:inter-character}";export{T as ion_segment,D as ion_segment_button,R as ion_skeleton_text,A as ldf_bible_reading,B as ldf_editable_add_block,J as ldf_editable_metadata_buttons,W as ldf_editable_select,H as ldf_image,q as ldf_liturgical_document,Q as ldf_liturgy,tt as ldf_meditation,et as ldf_option,nt as ldf_psalm,lt as ldf_refrain,at as ldf_responsive_prayer,rt as ldf_rubric}
1
+ import{r as t,c as i,w as e,h as o,H as n,a as l}from"./p-978e2c6d.js";import{c as s,g as a}from"./p-d282d4f9.js";import{p as r}from"./p-714cf0b2.js";import{c as d,h as c}from"./p-5b51185b.js";import{f as h,l as u,m as p,t as v}from"./p-d7f8c770.js";import{R as b,L as f,d as g}from"./p-4aa9a6f2.js";import{B as m,L as y,M as x,P as k,R as w,a as $}from"./p-d56dff05.js";import{H as C}from"./p-a1729dbd.js";import{v as S,O as j}from"./p-e7a449d7.js";import{C as O}from"./p-991c0877.js";import{g as z}from"./p-0491d1d2.js";import{I as _}from"./p-476327d6.js";import{D as N}from"./p-e911e60d.js";import{R as L}from"./p-5b43e6be.js";import"./p-f3a0c163.js";import"./p-3e8ff66b.js";const T=class{constructor(e){t(this,e),this.ionChange=i(this,"ionChange",7),this.ionSelect=i(this,"ionSelect",7),this.ionStyle=i(this,"ionStyle",7),this.didInit=!1,this.activated=!1,this.disabled=!1,this.scrollable=!1,this.onClick=t=>{const i=t.target,e=this.checked;this.value=i.value,e&&this.scrollable&&this.checkButton(e,i),this.checked=i}}valueChanged(t,i){this.ionSelect.emit({value:t}),(""!==i||this.didInit)&&(this.activated?this.valueAfterGesture=t:this.ionChange.emit({value:t}))}disabledChanged(){this.gestureChanged();const t=this.getButtons();for(const i of t)i.disabled=this.disabled}gestureChanged(){this.gesture&&!this.scrollable&&this.gesture.enable(!this.disabled)}connectedCallback(){this.emitStyle()}componentWillLoad(){this.emitStyle()}async componentDidLoad(){this.setCheckedClasses(),this.gesture=(await import("./p-03389897.js")).createGesture({el:this.el,gestureName:"segment",gesturePriority:100,threshold:0,passive:!1,onStart:t=>this.onStart(t),onMove:t=>this.onMove(t),onEnd:t=>this.onEnd(t)}),this.gesture.enable(!this.scrollable),this.gestureChanged(),this.disabled&&this.disabledChanged(),this.didInit=!0}onStart(t){this.activate(t)}onMove(t){this.setNextIndex(t)}onEnd(t){this.setActivated(!1);const i=this.setNextIndex(t,!0);t.event.stopImmediatePropagation(),i&&this.addRipple(t);const e=this.valueAfterGesture;void 0!==e&&(this.ionChange.emit({value:e}),this.valueAfterGesture=void 0)}getButtons(){return Array.from(this.el.querySelectorAll("ion-segment-button"))}addRipple(t){if(!s.getBoolean("animated",!0)||!s.getBoolean("rippleEffect",!0))return;const i=this.getButtons().find((t=>t.value===this.value)),e=(i.shadowRoot||i).querySelector("ion-ripple-effect");if(!e)return;const{x:o,y:n}=r(t.event);e.addRipple(o,n).then((t=>t()))}setActivated(t){this.getButtons().forEach((i=>{t?i.classList.add("segment-button-activated"):i.classList.remove("segment-button-activated")})),this.activated=t}activate(t){const i=t.event.target,e=this.getButtons().find((t=>t.value===this.value));"ION-SEGMENT-BUTTON"===i.tagName&&(e||(this.value=i.value),this.value===i.value&&this.setActivated(!0))}getIndicator(t){return(t.shadowRoot||t).querySelector(".segment-button-indicator")}checkButton(t,i){const o=this.getIndicator(t),n=this.getIndicator(i);if(null===o||null===n)return;const l=o.getBoundingClientRect(),s=n.getBoundingClientRect(),a=`translate3d(${l.left-s.left}px, 0, 0) scaleX(${l.width/s.width})`;e((()=>{n.classList.remove("segment-button-indicator-animated"),n.style.setProperty("transform",a),n.getBoundingClientRect(),n.classList.add("segment-button-indicator-animated"),n.style.setProperty("transform","")})),this.value=i.value,this.setCheckedClasses()}setCheckedClasses(){const t=this.getButtons(),i=t.findIndex((t=>t.value===this.value))+1;this.checked=t.find((t=>t.value===this.value));for(const i of t)i.classList.remove("segment-button-after-checked");i<t.length&&t[i].classList.add("segment-button-after-checked")}setNextIndex(t,i=!1){const e="rtl"===document.dir,o=this.activated,n=this.getButtons(),l=n.findIndex((t=>t.value===this.value)),s=n[l];let a,r;if(-1===l)return;const d=s.getBoundingClientRect(),c=d.left,h=d.width,u=t.currentX,p=document.elementFromPoint(u,d.top+d.height/2);if(o&&!i){if(e?u>c+h:u<c){const t=l-1;t>=0&&(r=t)}else if((e?u<c:u>c+h)&&o&&!i){const t=l+1;t<n.length&&(r=t)}void 0===r||n[r].disabled||(a=n[r])}if(!o&&i&&(a=p),null!=a){if("ION-SEGMENT"===a.tagName)return!1;s!==a&&this.checkButton(s,a)}return!0}emitStyle(){this.ionStyle.emit({segment:!0})}render(){const t=a(this);return o(n,{onClick:this.onClick,class:Object.assign(Object.assign({},d(this.color)),{[t]:!0,"in-toolbar":c("ion-toolbar",this.el),"in-toolbar-color":c("ion-toolbar[color]",this.el),"segment-activated":this.activated,"segment-disabled":this.disabled,"segment-scrollable":this.scrollable})},o("slot",null))}get el(){return l(this)}static get watchers(){return{value:["valueChanged"],disabled:["disabledChanged"]}}};T.style={ios:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.065);border-radius:8px;overflow:hidden;z-index:0}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.065)}:host(.in-toolbar){margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;width:auto}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-toolbar){margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.in-toolbar:not(.ion-color)){background:var(--ion-toolbar-segment-background, var(--background))}:host(.in-toolbar-color:not(.ion-color)){background:rgba(var(--ion-color-contrast-rgb), 0.11)}",md:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:transparent}:host(.segment-scrollable) ::slotted(ion-segment-button){min-width:auto}"};let M=0;const D=class{constructor(i){t(this,i),this.segmentEl=null,this.checked=!1,this.disabled=!1,this.layout="icon-top",this.type="button",this.value="ion-sb-"+M++,this.updateState=()=>{this.segmentEl&&(this.checked=this.segmentEl.value===this.value)}}connectedCallback(){const t=this.segmentEl=this.el.closest("ion-segment");t&&(this.updateState(),t.addEventListener("ionSelect",this.updateState))}disconnectedCallback(){const t=this.segmentEl;t&&(t.removeEventListener("ionSelect",this.updateState),this.segmentEl=null)}get hasLabel(){return!!this.el.querySelector("ion-label")}get hasIcon(){return!!this.el.querySelector("ion-icon")}render(){const{checked:t,type:i,disabled:e,hasIcon:l,hasLabel:s,layout:r}=this,d=a(this);return o(n,{"aria-disabled":e?"true":null,class:{[d]:!0,"in-toolbar":c("ion-toolbar",this.el),"in-toolbar-color":c("ion-toolbar[color]",this.el),"in-segment":c("ion-segment",this.el),"in-segment-color":c("ion-segment[color]",this.el),"segment-button-has-label":s,"segment-button-has-icon":l,"segment-button-has-label-only":s&&!l,"segment-button-has-icon-only":l&&!s,"segment-button-disabled":e,"segment-button-checked":t,[`segment-button-layout-${r}`]:!0,"ion-activatable":!0,"ion-activatable-instant":!0,"ion-focusable":!0}},o("button",{type:i,"aria-pressed":t?"true":null,class:"button-native",disabled:e},o("span",{class:"button-inner"},o("slot",null)),"md"===d&&o("ion-ripple-effect",null)),o("div",{part:"indicator",class:{"segment-button-indicator":!0,"segment-button-indicator-animated":!0}},o("div",{part:"indicator-background",class:"segment-button-indicator-background"})))}get el(){return l(this)}};D.style={ios:':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:flex;position:relative;flex:1 1 auto;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);transform:translate3d(0, 0, 0);display:flex;position:relative;flex-direction:inherit;flex-grow:1;align-items:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:flex;position:relative;flex-flow:inherit;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){flex-shrink:0;order:-1;pointer-events:none}::slotted(ion-label){display:block;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{transform-origin:left;position:absolute;opacity:0;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);transform:var(--indicator-transform);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{transform:none}.segment-button-indicator-animated{transition:none}}:host{--background:none;--background-checked:none;--background-hover:none;--background-hover-opacity:0;--background-focused:none;--background-focused-opacity:0;--border-radius:7px;--border-width:1px;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);--border-style:solid;--indicator-box-shadow:0 0 5px rgba(0, 0, 0, 0.16);--indicator-color:var(--ion-color-step-350, var(--ion-background-color, #fff));--indicator-height:100%;--indicator-transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--transition:100ms all linear;--padding-top:0;--padding-end:13px;--padding-bottom:0;--padding-start:13px;margin-top:2px;margin-bottom:2px;position:relative;flex-basis:0;flex-direction:row;min-width:70px;min-height:28px;transform:translate3d(0, 0, 0);font-size:13px;font-weight:450;line-height:37px}:host::before{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;transition:160ms opacity ease-in-out;transition-delay:100ms;border-left:var(--border-width) var(--border-style) var(--border-color);content:"";opacity:1;will-change:opacity}:host(:first-of-type)::before{border-left-color:transparent}:host(.segment-button-disabled){opacity:0.3}::slotted(ion-icon){font-size:24px}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:2px;margin-right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:2px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:2px;margin-inline-end:2px}}.segment-button-indicator{padding-left:2px;padding-right:2px;left:0;right:0;top:0;bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.segment-button-indicator{padding-left:unset;padding-right:unset;-webkit-padding-start:2px;padding-inline-start:2px;-webkit-padding-end:2px;padding-inline-end:2px}}.segment-button-indicator-background{border-radius:var(--border-radius);background:var(--indicator-color)}.segment-button-indicator-background{transition:var(--indicator-transition)}:host(.segment-button-checked)::before,:host(.segment-button-after-checked)::before{opacity:0}:host(.segment-button-checked){z-index:-1}:host(.segment-button-activated){--indicator-transform:scale(0.95)}:host(.ion-focused) .button-native{opacity:0.7}@media (any-hover: hover){:host(:hover) .button-native{opacity:0.5}:host(.segment-button-checked:hover) .button-native{opacity:1}}:host(.in-segment-color){background:none;color:var(--ion-text-color, #000)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-step-350, var(--ion-background-color, #fff))}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native,:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-text-color, #000)}}:host(.in-toolbar:not(.in-segment-color)){--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, var(--ion-toolbar-color), initial);--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-toolbar-color), initial);--indicator-color:var(--ion-toolbar-segment-indicator-color, var(--ion-color-step-350, var(--ion-background-color, #fff)))}:host(.in-toolbar-color) .segment-button-indicator-background{background:#fff}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color):hover) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color):hover) .button-native{color:var(--ion-color-base)}}',md:':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:flex;position:relative;flex:1 1 auto;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);transform:translate3d(0, 0, 0);display:flex;position:relative;flex-direction:inherit;flex-grow:1;align-items:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:flex;position:relative;flex-flow:inherit;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){flex-shrink:0;order:-1;pointer-events:none}::slotted(ion-label){display:block;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{transform-origin:left;position:absolute;opacity:0;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);transform:var(--indicator-transform);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{transform:none}.segment-button-indicator-animated{transition:none}}:host{--background:none;--background-checked:none;--background-hover:var(--color-checked);--background-focused:var(--color-checked);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04;--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #3880ff);--indicator-box-shadow:none;--indicator-color:var(--color-checked);--indicator-height:2px;--indicator-transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--padding-top:0;--padding-end:16px;--padding-bottom:0;--padding-start:16px;--transition:color 0.15s linear 0s, opacity 0.15s linear 0s;min-width:90px;max-width:360px;min-height:48px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);font-size:14px;font-weight:500;letter-spacing:0.06em;line-height:40px;text-transform:uppercase}.button-native{min-width:90px}:host(.segment-button-disabled){opacity:0.3}:host(.in-segment-color){background:none;color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color) ion-ripple-effect{color:var(--ion-color-base)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked) .button-native{color:var(--ion-color-base)}:host(.in-segment-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native{color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color:hover) .button-native::after{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-segment-color)){--background:var(--ion-toolbar-segment-background, none);--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6));--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-color-primary, #3880ff));--indicator-color:var(--ion-toolbar-segment-color-checked, var(--color-checked))}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:rgba(var(--ion-color-contrast-rgb), 0.6)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color)) .button-native::after{background:var(--ion-color-contrast)}}::slotted(ion-icon){margin-top:12px;margin-bottom:12px;font-size:24px}::slotted(ion-label){margin-top:12px;margin-bottom:12px}:host(.segment-button-layout-icon-top) ::slotted(ion-label),:host(.segment-button-layout-icon-bottom) ::slotted(ion-icon){margin-top:0}:host(.segment-button-layout-icon-top) ::slotted(ion-icon),:host(.segment-button-layout-icon-bottom) ::slotted(ion-label){margin-bottom:0}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:8px;margin-right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}:host(.segment-button-has-icon-only) ::slotted(ion-icon){margin-top:12px;margin-bottom:12px}:host(.segment-button-has-label-only) ::slotted(ion-label){margin-top:12px;margin-bottom:12px}.segment-button-indicator{left:0;right:0;bottom:0}.segment-button-indicator-background{background:var(--indicator-color)}:host(.in-toolbar:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-toolbar-segment-indicator-color, var(--indicator-color))}:host(.in-toolbar-color:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-color-contrast)}'};const R=class{constructor(i){t(this,i),this.animated=!1}render(){const t=this.animated&&s.getBoolean("animated",!0),i=c("ion-avatar",this.el)||c("ion-thumbnail",this.el),e=a(this);return o(n,{class:{[e]:!0,"skeleton-text-animated":t,"in-media":i}},o("span",null," "))}get el(){return l(this)}};R.style=":host{--background:rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065);border-radius:var(--border-radius, inherit);display:block;width:100%;height:inherit;margin-top:4px;margin-bottom:4px;background:var(--background);line-height:10px;user-select:none;pointer-events:none}span{display:inline-block}:host(.in-media){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;height:100%}:host(.skeleton-text-animated){position:relative;background:linear-gradient(to right, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 8%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.135) 18%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 33%);background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear}@keyframes shimmer{0%{background-position:-468px 0}100%{background-position:468px 0}}";const V={en:{amen:"Amen.",book:"Book",chapter:"Chapter",citation:"Citation (e.g., John 1:1)",label:"Label",loading:"Loading...",verse:"Verse",changeReading:"Change Reading",newCitation:"Biblical citation.",cancel:"Cancel",ok:"OK"},es:{amen:"Amén.",loading:"Se está cargando..."}},A=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7)}docChanged(t){try{this.obj=new m("string"==typeof t?JSON.parse(t):t),this.processIntro()}catch(t){console.warn(t),this.obj=new m}this.loadVerses()}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.loadVerses(),this.processIntro()}processIntro(){var t,i;if(null===(i=null===(t=this.obj)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.intro)try{this.obj.compileIntro(),this.obj=new m(Object.assign({},this.obj))}catch(t){console.warn(t),console.warn(this.obj)}}async loadLocaleStrings(){try{this.localeStrings=V[z(this.element)]}catch(t){console.warn(t)}}async changeReading(){var t;const i=this.localeStrings||{},e=await h.create({header:i.changeReading,inputs:[{name:"citation",type:"text",value:null===(t=this.obj)||void 0===t?void 0:t.citation,placeholder:i.newCitation}],buttons:[{text:i.cancel,role:"cancel",cssClass:"secondary"},{text:i.ok,handler:async t=>{var e,o,n;this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:"citation",oldValue:null===(e=this.obj)||void 0===e?void 0:e.citation,value:null==t?void 0:t.citation}]}));const l=await u.create({message:i.loading});await l.present();const s=await async function(t,i="NRSV",e="https://us-central1-venite-2.cloudfunctions.net"){const o=new URL(`${e}/bible`);o.searchParams.append("citation",t),["NRSV","NRSVAE","ESV","CEB","KJV"].includes(i)?o.searchParams.append("version",i):o.searchParams.append("version","NRSV");const n=await fetch(o.toString()),l=await n.text();try{return JSON.parse(l)}catch(t){throw new Error(l)}}(t.citation,S(null===(o=this.obj)||void 0===o?void 0:o.version));await l.dismiss(),this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:"value",oldValue:null===(n=this.obj)||void 0===n?void 0:n.value,value:(null==s?void 0:s.value)||[]}]})),this.obj=new m(Object.assign(Object.assign({},this.obj),{citation:null==t?void 0:t.citation,value:(null==s?void 0:s.value)||[]})),this.loadVerses()}}]});await e.present()}loadVerses(){this.verses=this.obj.value||[]}paragraphs(){const t=new Array;let i=new Array;return this.verses.forEach((e=>{e.hasOwnProperty("type")&&"heading"===e.type?(t.push(i),i=new Array):i.push(e)})),t.push(i),t}render(){var t,i,e,l,s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k,w;const $=this.localeStrings||{};if(this.verses){if(this.editable){const n=Object.assign(Object.assign({},this.verses[0]),{text:""}),r=t=>Object.assign(Object.assign({},n),{text:t});return o("div",{lang:null===(t=this.obj)||void 0===t?void 0:t.language,class:`editable bible-reading ${(null===(i=this.obj)||void 0===i?void 0:i.display_format)||"default"}`},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"},o("ion-buttons",null,o("ion-button",{onClick:()=>this.changeReading()},o("ion-icon",{name:"swap-horizontal",slot:"start"}),o("ion-label",null,$.changeReading))))),o("ldf-label-bar",null,o("h3",{class:"editable-label",slot:"start"},o("ldf-editable-text",{id:"label",text:null===(e=this.obj)||void 0===e?void 0:e.label,path:`${this.path}/label`,placeholder:$.label})),(null===(l=this.obj)||void 0===l?void 0:l.citation)&&o("button",{class:"citation-button",slot:"end",onClick:()=>this.changeReading()},this.obj.citation)),(null===(a=null===(s=this.obj)||void 0===s?void 0:s.metadata)||void 0===a?void 0:a.compiled_intro)&&o("ldf-liturgical-document",{editable:!0,doc:this.obj.metadata.intro,path:`${this.path}/metadata/intro`}),o("section",{class:"verses"},this.verses.map(((t,i)=>[t.hasOwnProperty("type")&&"heading"===t.type?o("ldf-heading",{editable:!0,doc:t,path:`${this.path}/value/${i}`}):o("div",{class:"editable-verse"},o("div",{class:"editable-citation"},o("ldf-editable-text",{class:"book",id:`verse-${i}-book`,text:t.book,path:`${this.path}/value/${i}/book`,placeholder:$.book,short:!0}),o("ldf-editable-text",{id:`verse-${i}-chapter`,text:t.chapter,path:`${this.path}/value/${i}/chapter`,placeholder:$.chapter,short:!0})," :",o("ldf-editable-text",{id:`verse-${i}-verse`,text:t.verse,path:`${this.path}/value/${i}/verse`,placeholder:$.verse,short:!0})),o("ldf-editable-text",{id:`verse-${i}-text`,text:t.text,path:`${this.path}/value/${i}/text`,placeholder:$.text,short:!1,template:n,templateMaker:r}))]))))}if("short"==this.obj.style){const t=((null===(d=null===(r=this.obj)||void 0===r?void 0:r.metadata)||void 0===d?void 0:d.response)||$.amen).length<=5;let i;return i=(null===(h=null===(c=this.obj)||void 0===c?void 0:c.metadata)||void 0===h?void 0:h.response)?o("span",{class:"response"}," ",this.obj.metadata.response):o("span",{class:"response"}," ",$.amen),o(n,null,(null===(u=this.obj)||void 0===u?void 0:u.label)&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label]})}),o("div",{lang:null===(p=this.obj)||void 0===p?void 0:p.language,class:`bible-reading ${(null===(v=this.obj)||void 0===v?void 0:v.display_format)||"default"}`},o("p",null,this.verses.map(((t,i)=>{var e;return t.hasOwnProperty("type")&&"heading"===t.type?o("ldf-heading",{doc:new C(t)}):o("ldf-string",{citation:{book:t.book,chapter:t.chapter,verse:t.verse},id:this.obj.uid,text:t.text,fragment:this.path,dropcap:"force_dropcap"==(null===(e=this.obj)||void 0===e?void 0:e.display_format)&&0===i?"force":"disabled"})})),t&&!(null===(f=null===(b=this.obj)||void 0===b?void 0:b.metadata)||void 0===f?void 0:f.omit_response)&&i,o("span",{class:"citation"},this.obj.citation)),!t&&!(null===(m=null===(g=this.obj)||void 0===g?void 0:g.metadata)||void 0===m?void 0:m.omit_response)&&o("p",null,i)))}{const t=this.paragraphs();return o("div",{lang:null===(y=this.obj)||void 0===y?void 0:y.language,class:`bible-reading ${(null===(x=this.obj)||void 0===x?void 0:x.display_format)||"default"}`},o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation})}),(null===(w=null===(k=this.obj)||void 0===k?void 0:k.metadata)||void 0===w?void 0:w.compiled_intro)&&o("ldf-liturgical-document",{doc:this.obj.metadata.compiled_intro}),t.map(((t,i)=>o("p",{lang:this.obj.language},t.map(((t,e)=>{var n;return t.hasOwnProperty("type")&&"heading"===t.type?o("ldf-heading",{doc:new C(t)}):[o("sup",null,t.verse),o("ldf-string",{citation:t,dropcap:0==i&&0==e&&"iu"!==(null===(n=this.obj)||void 0===n?void 0:n.language)?"force":"disabled",id:`${t.chapter}-${t.book}-${t.verse}`,text:t.text,index:e,fragment:this.path})]}))))))}}return this.loadingError?o("pre",null,this.loadingError):o("p",null,$.loading)}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};A.style='ldf-bible-reading.sc-ldf-bible-reading,.sc-ldf-bible-reading-h{font-family:var(--ldf-font-face);text-align:var(--ldf-text-align)}.bible-reading[lang=he].sc-ldf-bible-reading{text-align:right;direction:rtl;font-size:1.5em;font-family:"Times New Roman" !important}.bible-reading[lang=he].sc-ldf-bible-reading .drop.sc-ldf-bible-reading{float:right !important;font-family:"Times New Roman" !important}.bible-reading.omit.sc-ldf-bible-reading .verses.sc-ldf-bible-reading{display:none}.editable.bible-reading.sc-ldf-bible-reading .verses.sc-ldf-bible-reading{display:block;color:var(--ldf-greyed-out-text-color)}sup.sc-ldf-bible-reading{display:var(--ldf-bible-reading-verse-number-display);margin-left:0;margin-right:0.25em}.citation.sc-ldf-bible-reading{font-size:80%;font-style:italic;margin-left:1em;float:var(--ldf-bible-reading-citation-float)}.response.sc-ldf-bible-reading{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.verses.sc-ldf-bible-reading .verse.sc-ldf-bible-reading{display:flex;flex-direction:row}sup.sc-ldf-bible-reading:first-of-type{display:var(--ldf-drop-early-verses-display)}.editable-verse.sc-ldf-bible-reading{display:inline}.editable-citation.sc-ldf-bible-reading{display:inline;width:100%}.editable-citation.sc-ldf-bible-reading ldf-editable-text.sc-ldf-bible-reading{display:inline-block;width:25px}.editable-citation.sc-ldf-bible-reading ldf-editable-text.book.sc-ldf-bible-reading{width:75px}h3.editable-label.sc-ldf-bible-reading{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.citation-button.sc-ldf-bible-reading{background:none;border:0;font-family:var(--ldf-font-face);font-size:inherit}';const E={en:{add:"Add",label:"Label",citation:"Citation"}},B=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.ldfDocShouldAdd=i(this,"ldfDocShouldAdd",7)}async componentWillLoad(){this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=E[z(this.element)]}catch(t){console.warn(t)}}render(){const t=this.localeStrings||{};return o(n,null,o("div",{class:{button:!0,hidden:!this.visible}},o("ion-button",{"aria-role":"button",fill:"outline",onClick:()=>this.ldfDocShouldAdd.emit({base:this.base,index:this.index})},o("ion-icon",{name:"add",slot:"icon-only"}),o("ion-label",{class:"visually-hidden"},t.add))))}get element(){return l(this)}};B.style=".sc-ldf-editable-add-block-h{display:flex;flex-direction:column;align-items:center;width:100%}.sc-ldf-editable-add-block-h .button-container.sc-ldf-editable-add-block{display:flex;align-items:center;height:0;justify-content:center;width:100%}.sc-ldf-editable-add-block-h button.sc-ldf-editable-add-block{background-color:var(--ldf-background-color);color:var(--ldf-color);font-family:var(--ldf-controls-font-family);font-weight:lighter}.sc-ldf-editable-add-block-h button.sc-ldf-editable-add-block:hover{cursor:pointer}.sc-ldf-editable-add-block-h .visible.sc-ldf-editable-add-block{height:0;opacity:1;transition:0.25s}.sc-ldf-editable-add-block-h .hidden.sc-ldf-editable-add-block{height:0;opacity:0;transition:2s}.sc-ldf-editable-add-block-h .underlying.sc-ldf-editable-add-block{width:100%;border-top:1px solid #a0a0a0;border-bottom:1px solid #a0a0a0;min-height:1em;position:relative;bottom:0.5em;z-index:-1}.sc-ldf-editable-add-block-h .underlying.visible.sc-ldf-editable-add-block{opacity:0.5;transition:0.25s}.sc-ldf-editable-add-block-h .underlying.visible.expanded.sc-ldf-editable-add-block{z-index:1}.sc-ldf-editable-add-block-h .underlying.collapsed.sc-ldf-editable-add-block{height:1em}.sc-ldf-editable-add-block-h .underlying.hidden.sc-ldf-editable-add-block{opacity:0;transition:1s}.sc-ldf-editable-add-block-h .underlying.hidden.sc-ldf-editable-add-block button.sc-ldf-editable-add-block{z-index:-1}.sc-ldf-editable-add-block-h .visually-hidden.sc-ldf-editable-add-block{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);white-space:nowrap}.button.sc-ldf-editable-add-block{position:absolute;display:flex;flex-direction:row;align-items:center;justify-content:center;opacity:1;transition:all 0.25s}.hidden.sc-ldf-editable-add-block{display:none;height:0;opacity:0;transition:all 0.25s}";const I={en:{abbreviated:"Abbreviated",addOption:"Add an Option",cancel:"Cancel",condition:"Conditions",copy:"Copy",copied:"Copied to Clipboard",default:"Default",displayFormat:"Display",halfverse:"By Half Verse",heading:"Heading Level",heading1:"1. Title",heading2:"2. Section Title",heading3:"3. Label",heading4:"4. Sub-Section Label",move_down:"Move Down",move_up:"Move Up",ok:"OK",omit:"Omit",preferences:"Preferences",settings:"Settings",edit:"Edit",preview:"Preview",responsive:"Responsive Display Settings",responsiveMsg:"What size devices should this appear on?",responsiveAll:"All devices",responsiveSmallOnly:"Only on small screens",responsiveSmallHidden:"Not on small screens",unison:"Unison",wholeverse:"By Whole Verse"}},J=class{constructor(e){t(this,e),this.ldfAddOptionToDoc=i(this,"ldfAddOptionToDoc",7),this.ldfTogglePreview=i(this,"ldfTogglePreview",7),this.ldfDocShouldMove=i(this,"ldfDocShouldMove",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.preview=!1}objChange(t){this.modal&&(this.modal.componentProps=Object.assign(Object.assign({},this.modal.componentProps),{obj:t}))}componentWillLoad(){this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=I[z(this.element)]}catch(t){console.warn(t)}}async openResponsive(){var t;const i=await h.create({header:this.localeStrings.responsive,message:this.localeStrings.responsiveMsg,inputs:[{name:"value",type:"radio",value:b.AllSizes,label:this.localeStrings.responsiveAll},{name:"value",type:"radio",value:b.SmallOnly,label:this.localeStrings.responsiveSmallOnly},{name:"value",type:"radio",value:b.SmallHidden,label:this.localeStrings.responsiveSmallHidden}],buttons:[{role:"cancel",text:this.localeStrings.cancel},this.localeStrings.ok]});await i.present();const{data:e}=await i.onDidDismiss(),{values:o}=e;o&&this.ldfDocShouldChange.emit(new O({path:`${this.base}/${this.index}/responsive`,op:[{type:"set",oldValue:null===(t=this.obj)||void 0===t?void 0:t.responsive,value:o}]}))}async openSettings(){this.modal=await this.openModal("ldf-editable-metadata")}async openCondition(){this.modal=await this.openModal("ldf-editable-condition",`${this.base}/${this.index}/condition`,{obj:this.obj})}async openPreferences(){const t=this.base&&this.index?`${this.base}/${this.index}`:"";this.modal=await this.openModal("ldf-editable-preferences",`${t}/metadata`,{obj:this.obj})}async openModal(t,i,e){const o=await p.create({component:t}),n=i||(this.base&&this.index>=0?`${this.base}/${this.index}`:"/");return o.componentProps=Object.assign(Object.assign({},e),{modal:o,doc:this.obj,path:n,visible:!0,collapsed:!1}),await o.present(),o}addOption(){this.ldfAddOptionToDoc.emit({base:this.base,index:this.index,obj:this.obj})}move(t){this.ldfDocShouldMove.emit({base:this.base,oldIndex:this.index,diff:t})}async headingLevel(){var t,i,e,o,n,l,s,a,r,d;const c=await h.create({header:null===(t=this.localeStrings)||void 0===t?void 0:t.heading,inputs:[{name:"level",type:"radio",value:1,label:null===(i=this.localeStrings)||void 0===i?void 0:i.heading1},{name:"level",type:"radio",value:2,label:null===(e=this.localeStrings)||void 0===e?void 0:e.heading2},{name:"level",type:"radio",value:3,label:null===(o=this.localeStrings)||void 0===o?void 0:o.heading3},{name:"level",type:"radio",value:4,label:null===(n=this.localeStrings)||void 0===n?void 0:n.heading4}],buttons:[{text:null===(l=this.localeStrings)||void 0===l?void 0:l.cancel,role:"cancel",cssClass:"secondary"},{text:null===(s=this.localeStrings)||void 0===s?void 0:s.ok}]});await c.present();const{data:u}=await c.onDidDismiss(),{values:p}=u;(null===(a=this.obj)||void 0===a?void 0:a.metadata)?this.ldfDocShouldChange.emit(new O({path:`${this.base}/${this.index}/metadata/level`,op:[{type:"set",value:p,oldValue:null===(d=null===(r=this.obj)||void 0===r?void 0:r.metadata)||void 0===d?void 0:d.level}]})):this.ldfDocShouldChange.emit(new O({path:`${this.base}/${this.index}/metadata`,op:[{type:"set",value:{level:p}}]}))}async copyDoc(){try{navigator.clipboard.writeText(JSON.stringify(this.obj));const t=await v.create({message:this.localeStrings.copied,duration:1e3,color:"success"});await t.present()}catch(t){console.warn("Clipboard operation not allowed.",t)}}render(){var t,i,e,l,s,a,r,d,c,h,u;const p=this.localeStrings||{},v=void 0!==this.index&&this.index>=0;return o(n,null,o("div",{class:{buttons:!0,hidden:!this.visible||!this.preview}},o("ion-buttons",{slot:"end"},(null===navigator||void 0===navigator?void 0:navigator.clipboard)&&o("ion-button",{onClick:()=>this.copyDoc(),"aria-role":"button","aria-label":p.copy},o("ion-label",{class:"sm-hidden"},p.copy),o("ion-icon",{slot:"end",name:"clipboard"})),o("ion-button",{onClick:()=>this.ldfTogglePreview.emit(!1)},o("ion-label",{class:"sm-hidden"},null===(t=this.localeStrings)||void 0===t?void 0:t.edit),o("ion-icon",{slot:"end",name:"create"})))),o("div",{class:{buttons:!0,hidden:!this.visible||this.preview}},o("ion-buttons",{slot:"end"},o("ion-button",{onClick:()=>this.ldfTogglePreview.emit(!0)},o("ion-label",{class:"sm-hidden"},null===(i=this.localeStrings)||void 0===i?void 0:i.preview),o("ion-icon",{slot:"end",name:"eye"})),"option"!==(null===(e=this.obj)||void 0===e?void 0:e.type)&&"option"!==this.parentType&&this.base&&o("ion-button",{onClick:()=>this.addOption(),"aria-role":"button","aria-label":p.addOption},o("ion-icon",{slot:"icon-only",name:"add"})),"liturgy"==(null===(l=this.obj)||void 0===l?void 0:l.type)&&o("ion-button",{onClick:()=>this.openPreferences(),"aria-role":"button","aria-label":p.preferences},o("ion-icon",{slot:"icon-only",name:"list"})),"heading"==(null===(s=this.obj)||void 0===s?void 0:s.type)&&o("ion-button",{onClick:()=>this.headingLevel()},o("ion-label",null,p[`heading${(null===(r=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===r?void 0:r.level)||3}`]||"Heading")),(null===(c=null===(d=this.obj)||void 0===d?void 0:d.availableDisplayFormats())||void 0===c?void 0:c.length)>0&&o("ldf-editable-select",{placeholder:p.displayFormat,value:this.obj.display_format,path:`${this.base}/${this.index}`,property:"display_format",options:this.obj.availableDisplayFormats().map((t=>({value:t,label:p[t]||t})))}),(this.base&&v||"liturgy"!==(null===(h=this.obj)||void 0===h?void 0:h.type))&&o("ion-button",{onClick:()=>this.openCondition(),"aria-role":"button","aria-label":p.condition},o("ion-icon",{slot:"icon-only",name:"calendar"})),(this.base&&v||"liturgy"!==(null===(u=this.obj)||void 0===u?void 0:u.type))&&o("ion-button",{onClick:()=>this.openResponsive(),"aria-role":"button","aria-label":p.responsive},o("ion-icon",{slot:"icon-only",name:"phone-portrait"})),(null===navigator||void 0===navigator?void 0:navigator.clipboard)&&o("ion-button",{onClick:()=>this.copyDoc(),"aria-role":"button","aria-label":p.copy},o("ion-icon",{slot:"icon-only",name:"clipboard"})),o("ion-button",{onClick:()=>this.openSettings(),"aria-role":"button","aria-label":p.settings},o("ion-icon",{slot:"icon-only",name:"cog"})),this.base&&v&&this.index>0&&o("ion-button",{onClick:()=>this.move(-1),"aria-role":"button","aria-label":p.move_up},o("ion-icon",{slot:"icon-only",name:"arrow-up"})),this.base&&v&&o("ion-button",{onClick:()=>this.move(1),"aria-role":"button","aria-label":p.move_down},o("ion-icon",{slot:"icon-only",name:"arrow-down"})),v&&o("ldf-editable-delete",{base:this.base,index:this.index,obj:this.obj}))))}get element(){return l(this)}static get watchers(){return{obj:["objChange"]}}};J.style=".buttons.sc-ldf-editable-metadata-buttons{position:absolute;height:0;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;opacity:1;transition:all 0.25s}.buttons.sc-ldf-editable-metadata-buttons ion-buttons.sc-ldf-editable-metadata-buttons{background-color:var(--ion-color-light, #f4f5f8);border-radius:3px;flex-wrap:wrap;max-width:100%}.hidden.sc-ldf-editable-metadata-buttons{display:none;height:0;opacity:0;transition:all 0.25s}@media (max-width: 767px){.sm-hidden.sc-ldf-editable-metadata-buttons{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}";const W=class{constructor(e){t(this,e),this.ldfChange=i(this,"ldfChange",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7)}onChange(t){const i=this.value,e=t.detail.value;e!==i&&(this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:this.property,oldValue:i,value:e}]})),this.ldfChange.emit(e))}render(){return o("ion-select",{value:this.value,placeholder:this.placeholder},this.options.map((t=>o("ion-select-option",{value:t.value},t.label))))}get element(){return l(this)}};W.style="";const P={en:{close:"Return to Bulletin",url:"URL"}},H=class{constructor(e){t(this,e),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.isResizing=!1,this.resizingStartPoint=null,this.resizingCorner=null}docChanged(t){var i,e,o,n;try{this.obj=new _("string"==typeof t?JSON.parse(t):t),this.height=(null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.height)||null,this.width=(null===(n=null===(o=this.obj)||void 0===o?void 0:o.metadata)||void 0===n?void 0:n.width)||null}catch(t){console.warn(t),this.obj=new _}}componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=P[z(this.element)]}catch(t){console.warn(t)}}async showZoomed(){const t=await p.create({component:"ldf-image"});t.componentProps={modal:t,doc:this.obj},await t.present()}startResizing(t,i,e){this.resizingCorner=t,this.resizingStartPoint={x:i,y:e}}stopResizing(){console.log("stopResizing"),this.resizingCorner=null}resizingMove(t){this.resizingCorner&&this.resizingStartPoint&&this.processResizingMove(this.resizingCorner,t.clientX,t.clientY)}processResizingMove(t,i,e){const{x:o}=this.resizingStartPoint,n="nw"===t||"sw"===t?i-o:o-i;this.resizingStartPoint={x:i,y:e},this.width=this.imgElement.clientWidth-n,this.height=null,this.updateDoc()}touchStart(t,i){i.preventDefault();const e=i.touches[0];e&&this.startResizing(t,e.clientX,e.clientY)}touchMove(t,i){i.preventDefault();const e=i.touches[0];e&&this.processResizingMove(t,e.clientX,e.clientY)}updateDoc(){var t,i,e,o,n,l;(null===(t=this.obj)||void 0===t?void 0:t.metadata)||this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",index:"metadata",oldValue:null===(i=this.obj)||void 0===i?void 0:i.metadata,value:{}}]})),this.ldfDocShouldChange.emit(new O({path:`${this.path}/metadata`,op:[{type:"set",index:"height",oldValue:null===(o=null===(e=this.obj)||void 0===e?void 0:e.metadata)||void 0===o?void 0:o.height,value:this.imgElement.clientHeight},{type:"set",index:"width",oldValue:null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.width,value:this.imgElement.clientWidth}]}))}render(){var t,i,e,l,s;const a=this.localeStrings||{},r=[this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),o("div",{class:`${(null===(t=this.obj)||void 0===t?void 0:t.style)||""} ${(null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.align)||"center"}`},this.obj.value&&this.obj.value.map(((t,i)=>{var e;return this.editable?o("figure",null,o("div",{class:"img-wrapper"},o("img",{src:t,ref:t=>this.imgElement=t,alt:null===(e=this.obj)||void 0===e?void 0:e.label,style:{height:this.height?`${this.height}px`:"auto",width:this.width?`${this.width}px`:"auto"},class:"editable"}),o("button",{class:"resize top-left",onMouseDown:t=>this.startResizing("nw",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("nw",t),onTouchMove:t=>this.touchMove("nw",t),onTouchEnd:()=>this.stopResizing()}),o("button",{class:"resize bottom-left",onMouseDown:t=>this.startResizing("sw",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("sw",t),onTouchMove:t=>this.touchMove("sw",t),onTouchEnd:()=>this.stopResizing()}),o("button",{class:"resize top-right",onMouseDown:t=>this.startResizing("ne",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("ne",t),onTouchMove:t=>this.touchMove("ne",t),onTouchEnd:()=>this.stopResizing()}),o("button",{class:"resize bottom-right",onMouseDown:t=>this.startResizing("se",t.clientX,t.clientY),onTouchStart:t=>this.touchStart("se",t),onTouchMove:t=>this.touchMove("se",t),onTouchEnd:()=>this.stopResizing()})),o("figcaption",null,o("code",null,a.url),o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}`,text:t,path:`${this.path}/value/${i}`}))):o("img",{src:t,onClick:()=>this.showZoomed(),style:{height:this.height?`${this.height}px`:"auto",width:this.width?`${this.width}px`:"auto"}})})))];return this.modal?[o("ion-header",null,o("ion-toolbar",null,o("ion-buttons",{slot:"end"},o("ion-button",{onClick:()=>this.modal.dismiss()},o("ion-label",{slot:"start"},a.close),o("ion-icon",{slot:"end",name:"close"}))))),o("ion-content",{class:"ion-padding",scrollX:!0,lang:null===(s=this.obj)||void 0===s?void 0:s.language},r)]:o(n,{lang:null===(l=this.obj)||void 0===l?void 0:l.language},r)}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};(function(t,i,e,o){var n,l=arguments.length,s=l<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(l<3?n(s):l>3?n(i,e,s):n(i,e))||s);l>3&&s&&Object.defineProperty(i,e,s)})([N(250)],H.prototype,"updateDoc",null),H.style="img.sc-ldf-image{height:auto;max-width:100%;z-index:1}figcaption.sc-ldf-image{background-color:var(--ldf-editable-lookup-background-color);border-radius:4px;color:var(--ldf-editable-lookup-color);display:block;margin:auto;text-align:center}.left.sc-ldf-image{text-align:left}.center.sc-ldf-image{text-align:center}.right.sc-ldf-image{text-align:right}.img-wrapper.sc-ldf-image{margin:0;padding:12px;display:inline-block;position:relative}img.editable.sc-ldf-image{border:3px solid var(--ldf-color)}button.resize.sc-ldf-image{height:30px;width:30px;margin:0;padding:0;background-color:var(--ldf-editable-lookup-background-color);border-radius:50%;border:3px solid var(--ldf-color)}.resize.top-left.sc-ldf-image{position:absolute;left:0;top:-3px;cursor:nwse-resize}.resize.bottom-left.sc-ldf-image{position:absolute;left:-3px;bottom:0;cursor:nesw-resize}.resize.top-right.sc-ldf-image{position:absolute;right:-6px;top:-3px;cursor:nesw-resize}.resize.bottom-right.sc-ldf-image{position:absolute;right:-6px;bottom:0;cursor:nwse-resize}";const F=({doc:t,localeStrings:i},e)=>o("div",{class:"condition"},o("p",null,i.condition,o("code",null,i[t.condition.mode]),i.of_the_following),o("ul",null,t.condition.conditions.map((t=>o(U,{condition:t,localeStrings:i})))),e),U=({condition:t,localeStrings:i})=>{let e=[];return t.day&&(e=e.concat(o(K,{condition:t,field:"day",localeStrings:i}))),t.season&&(e=e.concat(o(K,{condition:t,field:"season",localeStrings:i}))),t.week&&(e=e.concat(o(K,{condition:t,field:"week",localeStrings:i}))),t.weekday&&(e=e.concat(o(K,{condition:t,field:"weekday",localeStrings:i}))),t.day_of_month&&e.push([i.day_of_month_1,(n=Number(t.day_of_month),l=n%10,s=n%100,1==l&&11!=s?n+"st":2==l&&12!=s?n+"nd":3==l&&13!=s?n+"rd":n+"th"),i.day_of_month_2]),t.hasOwnProperty("feastDay")&&e.push([i.the_day,t.feastDay?i.is:i.is_not,i.feastDay]),t.preference&&e.push([i.the_preference,o("code",null,t.preference.key),t.preference.is?i.is:i.is_not,o("code",null,t.preference.value)]),t.date&&e.push([i.the_date,t.date.lt&&`${i.lt} ${t.date.lt}`,t.date.lte&&`${i.lte} ${t.date.lte}`,t.date.gte&&`${i.gte} ${t.date.gte}`,t.date.gt&&`${i.gt} ${t.date.gt}`]),e.map((t=>o("li",null,t)));var n,l,s},K=({condition:t,field:i,localeStrings:e})=>{var o,n;const l=[];return(null===(o=t[i].except)||void 0===o?void 0:o.length)>0&&l.push([e[i],e.is,t[i].except.length>1?e.except:e.except_1,t[i].except.join(", ")]),(null===(n=t[i].only)||void 0===n?void 0:n.length)>0&&l.push([e[i],e.is,t[i].only.length>1?e.only:e.only_1,t[i].only.join(", ")]),l};const G=(t,i)=>"object"==typeof t?o("span",null,i.definedByPreference," ",o("code",null,t.preference)):o("code",null,t),X=({doc:t,localeStrings:i})=>{var e,n,l,s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k,w,$,C,S,j,O,z,_,N,L;let T;if(t.lookup)switch(null===(e=t.lookup)||void 0===e?void 0:e.type){case"lectionary":T=[i.lectionaryReading,G(null===(n=t.lookup)||void 0===n?void 0:n.item,i),i.fromLectionary,G(null===(l=t.lookup)||void 0===l?void 0:l.table,i),"."];break;case"canticle":T=[i[`canticle-${null===(s=t.lookup)||void 0===s?void 0:s.item}`],i.fromCanticleTable,G(null===(a=t.lookup)||void 0===a?void 0:a.table,i),"."];break;case"category":T=[i.category,t.category.map((t=>o("code",null,t))),(null===(r=t.lookup)||void 0===r?void 0:r.filter)&&"seasonal"==(null===(d=t.lookup)||void 0===d?void 0:d.filter)&&i["filter-seasonal"],(null===(c=t.lookup)||void 0===c?void 0:c.filter)&&"evening"==(null===(h=t.lookup)||void 0===h?void 0:h.filter)&&i[`filter-evening-${(null===(u=t.lookup)||void 0===u?void 0:u.item)||!0}`],(null===(p=t.lookup)||void 0===p?void 0:p.filter)&&"day"==(null===(v=t.lookup)||void 0===v?void 0:v.filter)&&i["filter-day"],(null===(b=t.lookup)||void 0===b?void 0:b.filter)&&"day"==(null===(f=t.lookup)||void 0===f?void 0:f.filter)&&o("code",null,null===(g=t.lookup)||void 0===g?void 0:g.item),(null===(m=t.lookup)||void 0===m?void 0:m.hasOwnProperty("rotate"))&&i[`rotate-${null===(y=t.lookup)||void 0===y?void 0:y.rotate}`],"."];break;case"slug":T=[i.slug,o("code",null,t.slug),(null===(x=t.lookup)||void 0===x?void 0:x.filter)&&"seasonal"==(null===(k=t.lookup)||void 0===k?void 0:k.filter)&&i["filter-seasonal"],(null===(w=t.lookup)||void 0===w?void 0:w.filter)&&"evening"==(null===($=t.lookup)||void 0===$?void 0:$.filter)&&i[`filter-evening-${(null===(C=t.lookup)||void 0===C?void 0:C.item)||!0}`],(null===(S=t.lookup)||void 0===S?void 0:S.filter)&&"day"==(null===(j=t.lookup)||void 0===j?void 0:j.filter)&&i["filter-day"],(null===(O=t.lookup)||void 0===O?void 0:O.filter)&&"day"==(null===(z=t.lookup)||void 0===z?void 0:z.filter)&&o("code",null,null===(_=t.lookup)||void 0===_?void 0:_.item),(null===(N=t.lookup)||void 0===N?void 0:N.hasOwnProperty("rotate"))&&i[`rotate-${null===(L=t.lookup)||void 0===L?void 0:L.rotate}`],"."];break;case"collect":T=o("code",null,i.collect);break;default:T=JSON.stringify(t.lookup)}else"bible-reading"===t.type&&t.citation&&(T=[o("code",null,t.citation),i.bible_version,..."string"==typeof t.version?[o("code",null,t.version)]:[i.the_preference_specified,o("code",null,"bibleVersion")]]);return o("article",{class:"lookup"},T)},Z={en:{bible_version:" in the version ","canticle-1":"The first canticle ","canticle-2":"The second canticle ",category:"All items that match the category ",collect:"The Collect of the Day.",day_of_month_1:"It is the ",day_of_month_2:" day of the month",definedByPreference:" defined by the preference ",fromCanticleTable:" from the canticle table ",fromLectionary:" from the lectionary ",lectionaryReading:"The lectionary reading ","filter-seasonal":" and the current season","filter-evening-true":" and are in the evening ","filter-evening-false":" and are not in the evening ","filter-day":" and the liturgical day ","rotate-true":" (rotating by day)","rotate-false":" (including all possibilities)",slug:"All items with the slug ",condition:"Included when ",and:"all",or:"any",the_day:" the day ",of_the_following:" of the following are true: ",day:"the liturgical day",season:"the liturgical season",week:"the liturgical week",weekday:"the day of the week",feastDay:"a Sunday or Holy Day",is:" is ",is_not:" is not ",only:" one of: ",only_1:"",except:" anything but: ",except_1:" not ",the_preference:"the preference ",the_preference_specified:"chosen in the preference ",the_date:"the date ",lte:" ≤ ",lt:" < ",gt:" > ",gte:" ≥ ",smallOnly:"Only appears on small screens",smallHidden:"Doesn't appear on small screens"}},q=class{constructor(e){t(this,e),this.focusPath=i(this,"focusPath",7),this.focusObj=i(this,"focusObj",7),this.ldfSelectionChange=i(this,"ldfSelectionChange",7),this.hasFocus=!1,this.buttonsSelected=!1,this.interrupt=!1,this.parentType=null,this.preview=!1,this.padding=void 0}async docChanged(t){let i;try{i=new f("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),i=new f}this.obj=i||new f}onDragOver(){"/"!==this.path&&(this.hasFocus=!0,this.focusPath.emit(this.path),this.focusObj.emit({obj:this.obj,path:this.path}),console.log("dragged over",this.path))}selectionChangeHandler(t){var i,e;t.preventDefault();const o=document.getSelection(),n=o.anchorNode,l=null===(e=null===(i=null==n?void 0:n.parentElement)||void 0===i?void 0:i.closest("ldf-string"))||void 0===e?void 0:e.citation;if(this.element.contains(n)){const t=o.toString();this.ldfSelectionChange.emit({target:this.element,text:t,citation:l,fragment:this.path})}}componentWillLoad(){this.loadLocaleStrings(),this.docChanged(this.doc)}onMouseOver(){this.hasFocus=!0,this.focusPath.emit(this.path)}onMouseOut(t){const i=this.element.querySelector("div.container");t.relatedTarget==i&&setTimeout((()=>{this.hasFocus=!1,this.focusPath.emit(this.path)}),500)}onClick(){this.hasFocus=!0,this.focusPath.emit(this.path),this.focusObj.emit({obj:this.obj,path:this.path})}async loadLocaleStrings(){try{this.localeStrings=Z[z(this.element)]}catch(t){console.warn(t)}}nodeFromDoc(t,i){return null==t?(null===customElements||void 0===customElements?void 0:customElements.get("ion-skeleton-text"))?o("ion-skeleton-text",null):o("p",null,"..."):this.editable||i?this.editableNode(t):this.chooseComponent(t)}editableNode(t){var i;const e=this.localeStrings||{};return(null===(i=t.value)||void 0===i?void 0:i.length)>0&&Boolean(t.value[0])?t.condition?o(F,{doc:t,localeStrings:e},this.chooseComponent(t)):this.chooseComponent(t):t.condition&&!t.lookup?o(F,{doc:t,localeStrings:e},this.chooseComponent(t)):t.condition&&t.lookup?o(F,{doc:t,localeStrings:e},o(X,{doc:t,localeStrings:e})):!t.condition&&t.lookup||"bible-reading"===t.type?o(X,{doc:t,localeStrings:e}):this.chooseComponent(t)}chooseComponent(t){var i,e;let n;const l=this.editable&&!this.preview;switch(null==t?void 0:t.type){case"liturgy":n=o("ldf-liturgy",{path:this.path,editable:l,preview:this.preview,doc:t});break;case"heading":n=o("ldf-heading",{path:this.path,editable:l,doc:t});break;case"image":n=o("ldf-image",{path:this.path,editable:l,doc:t});break;case"meditation":const s=null===(e=null===(i=this.obj)||void 0===i?void 0:i.day)||void 0===e?void 0:e.color,a=(null==s?void 0:s.hasOwnProperty("hex"))?s.hex:s||"#3489eb";n=o("ldf-meditation",{path:this.path,editable:this.editable||this.preview,doc:t,color:a});break;case"option":n=o("ldf-option",{path:this.path,editable:l,preview:this.preview,doc:t});break;case"refrain":n=o("ldf-refrain",{path:this.path,editable:l,doc:t});break;case"rubric":n=o("ldf-rubric",{path:this.path,editable:l,doc:t});break;case"text":n=o("ldf-text",{path:this.path,editable:l,doc:t});break;case"responsive":n=o("ldf-responsive-prayer",{path:this.path,editable:l,doc:t});break;case"bible-reading":n=o("ldf-bible-reading",{path:this.path,editable:l,doc:t});break;case"psalm":n=o("ldf-psalm",{path:this.path,editable:l,doc:t});break;default:console.warn("invalid type for document",t)}return n}setPreview(t){this.preview=t,this.editable=!0}render(){var t,i,e,l,s,a,r,d,c,h,u;const p=this.nodeFromDoc(this.obj);return p&&o(n,{lang:(null===(t=this.obj)||void 0===t?void 0:t.language)||"en"},o("div",{class:{container:!0,editable:this.editable||this.preview,"small-only":!this.editable&&!this.preview&&void 0!==(null===(i=this.obj)||void 0===i?void 0:i.responsive)&&(null===(e=this.obj)||void 0===e?void 0:e.responsive)==b.SmallOnly,"small-hidden":!this.editable&&!this.preview&&void 0!==(null===(l=this.obj)||void 0===l?void 0:l.responsive)&&(null===(s=this.obj)||void 0===s?void 0:s.responsive)==b.SmallHidden}},(this.editable||this.preview)&&o("ldf-editable-metadata-buttons",{visible:this.hasFocus,base:this.base,index:this.index,obj:this.obj,parentType:this.parentType,preview:this.preview,onLdfTogglePreview:t=>this.setPreview(t.detail),class:{"top-level":"liturgy"===(null===(a=this.obj)||void 0===a?void 0:a.type)||"option"===(null===(r=this.obj)||void 0===r?void 0:r.type)}}),(this.editable||this.preview)&&((null===(d=this.obj)||void 0===d?void 0:d.responsive)===b.SmallHidden||(null===(c=this.obj)||void 0===c?void 0:c.responsive)===b.SmallOnly)&&o("ion-chip",{class:"responsive-banner"},o("ion-icon",{name:"phone-portrait-outline"}),(null===(h=this.obj)||void 0===h?void 0:h.responsive)===b.SmallOnly&&o("ion-label",null,this.localeStrings.smallOnly),(null===(u=this.obj)||void 0===u?void 0:u.responsive)===b.SmallHidden&&o("ion-label",null,this.localeStrings.smallHidden)),o("div",{id:(this.path||"").replace(/\//g,"-"),class:{doc:!0,editable:this.editable||this.preview},style:{padding:this.padding}},p)))}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};q.style="ldf-liturgical-document.sc-ldf-liturgical-document,.sc-ldf-liturgical-document-h{font-family:var(--ldf-font-face);display:block}.container.editable.sc-ldf-liturgical-document{padding-top:0}.lookup.sc-ldf-liturgical-document{background-color:var(--ldf-editable-lookup-background-color);color:var(--ldf-editable-lookup-color);border-radius:4px;margin-bottom:1.5em;padding:1em;width:calc(100% - 2em)}.lookup.sc-ldf-liturgical-document code.sc-ldf-liturgical-document{font-weight:bold}.condition.sc-ldf-liturgical-document{background-color:var(--ldf-editable-condition-background-color);color:var(--ldf-editable-condition-color);border-radius:4px;padding:1em;width:calc(100% - 2em)}.condition.sc-ldf-liturgical-document code.sc-ldf-liturgical-document{font-weight:bold}.doc.sc-ldf-liturgical-document{margin-top:var(--ldf-liturgical-document-margin-top)}ldf-editable-metadata-buttons.sc-ldf-liturgical-document{height:none;display:block;z-index:10;background:var(--ldf-background);opacity:0.8;width:100%;position:sticky;top:2em;padding-top:1em;padding-bottom:1em}ldf-editable-metadata-buttons.top-level.sc-ldf-liturgical-document{position:relative;top:0}.small-only.sc-ldf-liturgical-document{display:block}.small-hidden.sc-ldf-liturgical-document{display:none}@media (min-width: 415px){.small-only.sc-ldf-liturgical-document{display:none}.small-hidden.sc-ldf-liturgical-document{display:block}}";const Q=class{constructor(i){t(this,i),this.preview=!1}docChanged(t){try{this.obj=new y("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new y}}componentWillLoad(){this.docChanged(this.doc)}onFocusPath(t){this.hasFocus=t.detail}render(){const t=("/"==this.path?"":`${this.path}/`)+"/value";return o(n,{lang:this.obj.language},(this.editable||this.preview)&&o("ldf-editable-add-block",{visible:!0,base:t,index:0}),this.obj.value.map(((i,e)=>{var n,l,s;const a=`${t}/${e}`,r=this.hasFocus==a||e==((null===(l=null===(n=this.obj)||void 0===n?void 0:n.value)||void 0===l?void 0:l.length)||0)-1||"option"===(null==i?void 0:i.type)&&(null===(s=this.hasFocus)||void 0===s?void 0:s.startsWith(a));return o("article",{style:{padding:this.editable?"1em":"0"}},o("ldf-liturgical-document",{doc:i,path:a,base:t,index:e,editable:this.editable,preview:this.preview,parentType:"liturgy"}),(this.editable||this.preview)&&o("ldf-editable-add-block",{visible:r,base:t,index:e+1}))})))}static get watchers(){return{doc:["docChanged"]}}},Y={en:{start:"Start",pause:"Pause",resume:"Resume",meditate:"Meditate for",minutes:"minutes.",seconds:" seconds. "}},tt=class{constructor(e){t(this,e),this.timerChanged=i(this,"timerChanged",7),this.started=!1,this.paused=!1,this.startingDuration=void 0,this.color="#3333ff"}docChanged(t){try{this.obj=new x("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new x}}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.autostart&&(this.secondsRemaining=this.obj.metadata.length,this.start())}async start(t){var i,e;const o=null!==(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)&&void 0!==e?e:{length:300,delay:0},n=t||o.length,l=o.delay;this.secondsRemaining=n,this.startingDuration=n,setTimeout((()=>{this.startTimer(),this.started=!0}),l),setTimeout((()=>{this.timerChanged.emit("start")}),l)}async pause(){this.paused=!0,this.stopTimer()}async resume(){this.paused=!1,this.startTimer(),this.timerChanged.emit("resume")}async rewind(){this.pause(),this.stopTimer(),this.start(),this.timerChanged.emit("rewind")}async duration(){return this.startingDuration}async reset(){await this.pause(),this.secondsRemaining=void 0}async loadLocaleStrings(){try{this.localeStrings=Y[z(this.element)]}catch(t){console.warn(t)}}minutesSeconds(t){const i=t<0,e=Math.floor(Math.abs(t/60));return`${i?"-":""}${e.toString().padStart(2,"0")}:${Math.abs(t-60*e).toString().padStart(2,"0")}`}startTimer(){this.timerId=setInterval((()=>{this.secondsRemaining--,0==this.secondsRemaining?(this.timerChanged.emit("complete"),this.startingDuration=void 0):this.timerChanged.emit(this.secondsRemaining)}),1e3)}stopTimer(){this.timerId&&clearInterval(this.timerId),this.timerChanged.emit("pause")}handleControlSubmit(t){t.preventDefault()}handleControlValue(t){var i,e,o;let n=t.target.value;""==n&&(n="0"),Object.assign(this.obj,{metadata:Object.assign(Object.assign({},this.obj.metadata),{length:60*parseInt(n)})}),this.obj=new x(this.obj),this.secondsRemaining=null!==(o=null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.length)&&void 0!==o?o:0}buttonNode(t,i,e,n="clear",l="large"){const s=this.localeStrings||{};return customElements&&customElements.get("ion-button")?o("ion-button",{onClick:t,fill:n,size:l},o("ion-icon",{name:e,slot:"start"}),o("ion-label",null,s[i])):o("button",{onClick:t,class:n,style:{color:this.color}},s[i])}render(){var t,i,e,l,s,a,r;const d=this.localeStrings||{},c=null!==(e=null===(i=null===(t=this.obj)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.length)&&void 0!==e?e:300,h=this.secondsRemaining/c*100;return this.editable?o(n,null,o("form",{class:"controls",onSubmit:t=>this.handleControlSubmit(t)},o("span",null,d.meditate),o("ldf-editable-text",{inputType:"number",short:!0,path:`${this.path}/metadata/length`,text:null===(r=null!==(a=null===(s=null===(l=this.obj)||void 0===l?void 0:l.metadata)||void 0===s?void 0:s.length)&&void 0!==a?a:300)||void 0===r?void 0:r.toString()}),o("span",null,d.seconds),o("span",null,"(",Math.floor(c/60),":",Math.floor(c%60).toString().padStart(2,"0"),")"))):o(n,null,o("div",{class:{"control-container":!0,hidden:!!this.secondsRemaining}},o("form",{class:"controls",onSubmit:t=>this.handleControlSubmit(t)},this.buttonNode((()=>this.start()),"meditate","sunny","solid","small"),o("input",{type:"number",value:c/60,onInput:t=>this.handleControlValue(t)}),o("span",null,d.minutes))),o("div",{class:{hidden:!this.secondsRemaining}},o("div",{class:"progress-circle-container"},o("div",{class:"progress-circle",style:{background:`conic-gradient(${this.color} ${100-h}%, 0, #ecf0f1 ${h}%)`}},o("div",{class:"circle-overlay"},o("div",{class:"seconds"},this.minutesSeconds(this.secondsRemaining)),o("div",{class:"controls"},!this.started&&this.buttonNode((()=>this.start()),"start","start"),this.started&&!this.paused&&this.buttonNode((()=>this.pause()),"pause","pause"),this.started&&this.paused&&this.buttonNode((()=>this.resume()),"resume","play")))))))}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};tt.style="ldf-heading.sc-ldf-meditation .control-container.sc-ldf-meditation,.sc-ldf-meditation-h .control-container.sc-ldf-meditation{display:block;margin:auto}ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;width:100%}ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation input.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation input.sc-ldf-meditation{text-align:center}@media (min-width: 767px){ldf-heading.sc-ldf-meditation .controls.sc-ldf-meditation,.sc-ldf-meditation-h .controls.sc-ldf-meditation{flex-direction:row}}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation{display:flex;align-items:center;justify-content:center;padding:1em}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation{width:300px;height:300px;display:flex;align-items:center;justify-content:center;border-radius:50%}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .circle-overlay.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .circle-overlay.sc-ldf-meditation{background-color:var(--ldf-background-color);display:flex;align-items:center;flex-direction:column;justify-content:center;height:92%;width:92%;border-radius:50%}ldf-heading.sc-ldf-meditation .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .seconds.sc-ldf-meditation,.sc-ldf-meditation-h .progress-circle-container.sc-ldf-meditation .progress-circle.sc-ldf-meditation .seconds.sc-ldf-meditation{font-family:var(--ldf-font-face);font-size:3em}ldf-heading.sc-ldf-meditation button.clear.sc-ldf-meditation,.sc-ldf-meditation-h button.clear.sc-ldf-meditation{background-color:var(--ldf-background-color);border:none;font-size:1em}.hidden.sc-ldf-meditation{height:0;opacity:0;transition:0.25s}";const it={en:{option:"Option"}},et=class{constructor(e){t(this,e),this.ldfAddOptionToDoc=i(this,"ldfAddOptionToDoc",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.ldfOptionAskForStoredSelection=i(this,"ldfOptionAskForStoredSelection",7),this.ldfOptionMakeSelection=i(this,"ldfOptionMakeSelection",7)}docChanged(t){var i,e,o,n,l,s,a,r,d,c;try{this.obj=new j("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new j}const h=this.editable?null!==(s=null!==(o=null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.editor_selected)&&void 0!==o?o:null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.selected)&&void 0!==s?s:0:null!==(d=null===(r=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===r?void 0:r.selected)&&void 0!==d?d:0;this.select(h),(null===(c=this.obj)||void 0===c?void 0:c.value)&&this.obj.value[h]&&this.obj.value[h].value||this.selectFirstDefined(),this.filterOptions()}componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.ldfOptionAskForStoredSelection.emit({el:this.el})}async loadLocaleStrings(){try{this.localeStrings=it[z(this.el)]}catch(t){console.warn(t)}}async select(t,i=!1){var e,o,n,l,s,a,r,d;(null===(e=this.obj)||void 0===e?void 0:e.slug)&&"number"==typeof t&&i&&this.ldfOptionMakeSelection.emit({slug:null===(o=this.obj)||void 0===o?void 0:o.slug,index:t});const c=Boolean(null===(n=this.obj)||void 0===n?void 0:n.metadata),h=null===(s=null===(l=this.obj)||void 0===l?void 0:l.metadata)||void 0===s?void 0:s.editor_selected;Number(t)>=0?((null===(a=this.obj)||void 0===a?void 0:a.metadata)?(this.obj.metadata.selected=Number(t),this.obj.metadata.editor_selected=Number(t)):this.obj.metadata={selected:Number(t),editor_selected:Number(t)},this.obj=new j(Object.assign({},this.obj)),i&&!this.editable&&this.ldfDocShouldChange.emit(new O({path:`${this.path}/metadata`,op:[{type:"set",index:"selected",oldValue:h,value:Number(t)}]})),this.editable&&(c&&t!==h?this.ldfDocShouldChange.emit(new O({path:`${this.path}/metadata`,op:[{type:"set",index:"editor_selected",oldValue:h,value:Number(t)}]})):c||t===h||this.ldfDocShouldChange.emit(new O({path:`${this.path}`,op:[{type:"set",index:"metadata",value:{editor_selected:Number(t)}}]}))),Object.assign(this.obj,{metadata:Object.assign(Object.assign({},this.obj.metadata),{selected:t})}),Object.assign(this.obj,{metadata:Object.assign(Object.assign({},this.obj.metadata),{editor_selected:t})})):"add"===t&&this.ldfAddOptionToDoc.emit({base:this.path,index:null===(d=null===(r=this.obj)||void 0===r?void 0:r.value)||void 0===d?void 0:d.length,obj:this.obj})}onSelectChange(t){const i=parseInt(t.target.value);this.select(i,!0)}selectFirstDefined(){const t=this.obj.value.find((t=>void 0!==(null==t?void 0:t.value))),i=this.obj.value.filter((t=>Boolean(t))).indexOf(t);this.select(i)}filterOptions(){var t;this.obj&&(this.obj=new j(Object.assign(Object.assign({},this.obj),{value:((null===(t=this.obj)||void 0===t?void 0:t.value)||[]).filter((t=>this.editable||Boolean(t)&&(Boolean(t.value)||Boolean("bible-reading"===(null==t?void 0:t.type)&&t.citation))))})))}selectNode(){var t,i,e,n,l,s,a,r,d,c,h,u,p,v,b,f;const g=this.editable?null!==(s=null!==(e=null===(i=null===(t=this.obj)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.editor_selected)&&void 0!==e?e:null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.selected)&&void 0!==s?s:0:null!==(d=null===(r=null===(a=this.obj)||void 0===a?void 0:a.metadata)||void 0===r?void 0:r.selected)&&void 0!==d?d:0;return(null===(h=null===(c=this.obj)||void 0===c?void 0:c.value)||void 0===h?void 0:h.length)>1||this.editable?customElements&&customElements.get("ion-select")?!((null===(u=this.obj)||void 0===u?void 0:u.value)||[]).map(((t,i)=>{var e;return(null===(e=this.versionLabel(t,i))||void 0===e?void 0:e.length)>20})).reduce(((t,i)=>t||i),!1)&&(null===(p=this.obj)||void 0===p?void 0:p.value.length)<=3?o("ion-segment",{color:"primary",value:g.toString()},null===(v=this.obj)||void 0===v?void 0:v.value.map(((t,i)=>o("ion-segment-button",{value:i.toString(),onClick:()=>this.select(i,!0)},o("ion-label",null,this.versionLabel(t,i))))),this.editable&&o("ion-segment-button",{value:"add",class:"add",onClick:()=>this.select("add",!0)},o("ion-label",null,"+"))):(console.log(">2 or longish"),o("ion-toolbar",null,o("ion-select",{value:g,slot:this.editable?"start":"end",onIonChange:t=>this.select(Number(t.detail.value),!0)},null===(b=this.obj)||void 0===b?void 0:b.value.map(((t,i)=>o("ion-select-option",{value:i},o("ion-label",null,this.versionLabel(t,i)))))),this.editable&&o("ion-buttons",{slot:"end"},o("ion-button",{onClick:()=>this.select("add",!0)},o("ion-icon",{slot:"icon-only",name:"add"}))))):o("ldf-label-bar",null,o("select",{onInput:t=>this.onSelectChange(t),slot:this.editable?"start":"end"},null===(f=this.obj)||void 0===f?void 0:f.value.map(((t,i)=>o("option",{value:i,selected:i==g},this.versionLabel(t,i))))),this.editable&&o("button",{slot:"end",onClick:()=>this.select("add",!0)},"+")):[]}versionLabel(t,i){try{return this.obj.getVersionLabel(t)}catch(t){return console.warn(t),`${(this.localeStrings||{}).option} ${i+1}`}}render(){var t;const i=this.editable&&null!==(t=this.obj.metadata.editor_selected)&&void 0!==t?t:this.obj.metadata.selected;return o(n,{lang:this.obj.language},o("div",{class:"select-control"},o("ldf-label-bar",null,this.selectNode())),(this.obj.value||this.editable)&&o("ldf-liturgical-document",{doc:this.obj.value[i],path:`${this.path}/value/${this.obj.metadata.selected}`,base:`${this.path}/value`,index:i,editable:this.editable,parentType:"option"}))}get el(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};et.style=".select-control.sc-ldf-option{margin-top:var(--ldf-select-control-margin-top)}ion-select.sc-ldf-option{width:75vw;max-width:300px}";const ot={en:{changeCanticle:"Change Canticle",citation:"(Biblical) Citation",label:"Label",latinname:"Latin Name",section_break_insert:"+ insert section break",section_break_remove:"x remove section break",source:"Source",source_citation:"Citation"}},nt=class{constructor(e){t(this,e),this.ldfAskForCanticleOptions=i(this,"ldfAskForCanticleOptions",7),this.ldfDocShouldChange=i(this,"ldfDocShouldChange",7),this.focusedVerse=void 0,this.focusedSection=void 0}docChanged(t){try{this.obj=new k("string"==typeof t?JSON.parse(t):t),this.filter()}catch(t){console.warn(t),this.obj=new k}}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings(),this.filter()}async loadLocaleStrings(){try{this.localeStrings=ot[z(this.element)]}catch(t){console.warn(t)}}async changeCanticle(){const t=await p.create({component:"ldf-editable-filter-documents"});t.componentProps={modal:t,type:"canticle",changeCallback:t=>{this.ldfDocShouldChange.emit(new O({path:this.path,op:[{type:"set",oldValue:this.obj,value:t}]}))}},await t.present(),this.ldfAskForCanticleOptions.emit(this.path)}async filter(){this.filteredValue=this.obj.filteredVerses()}antiphonNode(t,i=!1){var e,n;if("string"==typeof t){const e=new L({type:"refrain",value:[t],style:"antiphon"});return o("ldf-refrain",{class:"antiphon",doc:e,editable:this.editable&&!i,path:`${this.path}/metadata/antiphon`})}if(null==t?void 0:t.type)return o("ldf-liturgical-document",{class:"antiphon",doc:t,path:`${this.path}/metadata/antiphon`,editable:this.editable&&!i});if("object"==typeof t){const i=this.obj.day?g(null===(n=null===(e=this.obj)||void 0===e?void 0:e.day)||void 0===n?void 0:n.date):new Date;return this.antiphonNode(t[`${i.getMonth()+1}/${i.getDate()}`]||t[`${i.getMonth()+1}-${i.getDate()}`],!0)}}gloriaNode(t){if("string"==typeof t){const i=new L({value:[t],style:"gloria"});return o("ldf-liturgical-document",{doc:i,editable:this.editable})}return o("ldf-liturgical-document",{doc:t,editable:this.editable})}headingNode(t,i=3,e=!0,n=!1,l=!1){var s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k,w,$,S,j;let O=this.obj.label;"canticle"==this.obj.style&&this.obj.metadata&&this.obj.metadata.number&&this.obj.metadata.localname?O=`${this.obj.metadata.number}. ${this.obj.metadata.localname}`:"canticle"==this.obj.style&&this.obj.metadata&&this.obj.metadata.localname&&(O=this.obj.metadata.localname);const z=new C({type:"heading",metadata:{level:i},citation:n||(null===(s=this.obj)||void 0===s?void 0:s.citation)===(null===(a=this.obj)||void 0===a?void 0:a.label)||null===(r=this.obj)||void 0===r?void 0:r.citation,value:[null!=t?t:O],source:l||null===(d=this.obj)||void 0===d?void 0:d.source});return this.editable?[o("ldf-label-bar",null,o("h3",{slot:"start",class:"editable-label"},o("ldf-editable-text",{id:"label",text:null===(c=this.obj)||void 0===c?void 0:c.label,path:`${this.path}/label`,placeholder:null===(h=this.localeStrings)||void 0===h?void 0:h.label})),(null===(u=this.obj)||void 0===u?void 0:u.metadata)&&o("ldf-editable-text",{id:"latinname",text:null===(v=null===(p=this.obj)||void 0===p?void 0:p.metadata)||void 0===v?void 0:v.latinname,path:`${this.path}/metadata/latinname`,placeholder:null===(b=this.localeStrings)||void 0===b?void 0:b.latinname}),o("ldf-editable-text",{slot:"end",id:"source-source",text:null===(g=null===(f=this.obj)||void 0===f?void 0:f.source)||void 0===g?void 0:g.source,path:`${this.path}/source/source`,placeholder:null===(m=this.localeStrings)||void 0===m?void 0:m.source}),o("ldf-editable-text",{slot:"end",id:"source-citation",text:null===(x=null===(y=this.obj)||void 0===y?void 0:y.source)||void 0===x?void 0:x.citation,path:`${this.path}/source/citation`,placeholder:null===(k=this.localeStrings)||void 0===k?void 0:k.source_citation})),o("ldf-label-bar",null,o("ldf-editable-text",{slot:"start",id:"citation",text:null===(w=this.obj)||void 0===w?void 0:w.citation,path:`${this.path}/citation`,placeholder:null===($=this.localeStrings)||void 0===$?void 0:$.citation}))]:o("ldf-heading",{doc:z},e&&o("h5",{slot:"additional"},null===(j=null===(S=this.obj)||void 0===S?void 0:S.metadata)||void 0===j?void 0:j.latinname))}insertSectionBreakAfterVerse(t,i){const e=this.obj.value[t],o=e.value.slice(0,i+1),n=e.value.slice(i+1);this.ldfDocShouldChange.emit(new O({path:`${this.path}/value/${t}`,op:[{type:"set",oldValue:e,value:Object.assign(Object.assign({},e),{value:o})}]})),this.ldfDocShouldChange.emit(new O({path:`${this.path}/value`,op:[{type:"insertAt",index:t+1,oldValue:e,value:Object.assign(Object.assign({},e),{value:n})}]}))}removeSectionBreakAfter(t){const i=this.obj.value[t],e=this.obj.value[t+1];if(i&&e){const o=i.value.concat(e.value);this.ldfDocShouldChange.emit(new O({path:`${this.path}/value/${t}/value`,op:[{type:"set",oldValue:i.value,value:o}]})),this.ldfDocShouldChange.emit(new O({path:`${this.path}/value`,op:[{type:"deleteAt",index:t+1,oldValue:e}]}))}}render(){var t,i,e,l,s,a,r,d,c,h,u,p,v,b,f,g,m,y,x,k;const w=this.obj.includeAntiphon();let $,S=t=>({type:"psalm-verse",number:"",halfverse:"",verse:t});this.editable&&($=Object.assign({},(null===(i=null===(t=this.obj)||void 0===t?void 0:t.value[0])||void 0===i?void 0:i.value[0])||{type:"psalm-verse",number:"",halfverse:"",verse:""}),$.number&&($.number=""),$.halfverse&&($.halfverse=""),$.verse&&($.verse=""));const j=((null===(e=this.obj)||void 0===e?void 0:e.value)||[]).map((t=>t.value.map((t=>!Boolean(t.number))))).flat().reduce(((t,i)=>t||i),!1),O=this.localeStrings||{};return o(n,{lang:(null===(l=this.obj)||void 0===l?void 0:l.language)||"en"},o("div",{class:`psalm-parent ${this.editable?"editable":""} ${(null===(s=this.obj)||void 0===s?void 0:s.display_format)||"default"} ${j?"no-numbers":""}`},(this.editable||"canticle"===(null===(a=this.obj)||void 0===a?void 0:a.style))&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"},"canticle"===(null===(r=this.obj)||void 0===r?void 0:r.style)&&(null===(c=null===(d=this.obj)||void 0===d?void 0:d.metadata)||void 0===c?void 0:c.changeable)&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"},o("ion-buttons",null,o("ion-button",{onClick:()=>this.changeCanticle()},o("ion-icon",{name:"swap-horizontal",slot:"start"}),o("ion-label",null,O.changeCanticle))))))),this.headingNode(),w&&this.antiphonNode(this.obj.metadata.antiphon),null===(h=this.filteredValue)||void 0===h?void 0:h.map(((t,i)=>{var e,n,l;return[t.label&&(null===(e=t.value)||void 0===e?void 0:e.length)>0&&this.headingNode(t.label,4,!1,!0,!0),o("div",{class:"psalm-set"},t.value.map(((t,e)=>{var n,l,s,a,r,d,c,h,u,p;if(t instanceof C)return o("ldf-heading",{doc:t});{const v=new Array;return v.push(o("div",{class:"verse"},this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}-${e}-verse`,text:t.verse,path:`${this.path}/value/${i}/value/${e}/verse`,placeholder:"Lorem ipsum sit dolor amet, *",template:$,templateMaker:S}):o("ldf-string",{text:t.verse,citation:{label:null===(n=this.obj)||void 0===n?void 0:n.label,book:"psalm"===(null===(l=this.obj)||void 0===l?void 0:l.style)?"Psalm":void 0,chapter:null===(a=null===(s=this.obj)||void 0===s?void 0:s.metadata)||void 0===a?void 0:a.number,verse:t.number},dropcap:0==e&&"he"!==(null===(r=this.obj)||void 0===r?void 0:r.language)&&"iu"!==(null===(d=this.obj)||void 0===d?void 0:d.language)?"force":"disabled",index:e,fragment:this.path}))),v.push(o("br",null)),v.push(o("div",{class:"halfverse"},this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}-${e}-halfverse`,text:t.halfverse,path:`${this.path}/value/${i}/value/${e}/halfverse`,placeholder:"consectetur adipiscing elit.",template:$}):o("ldf-string",{text:t.halfverse,citation:{label:null===(c=this.obj)||void 0===c?void 0:c.label,book:"psalm"===(null===(h=this.obj)||void 0===h?void 0:h.style)?"Psalm":void 0,chapter:null===(p=null===(u=this.obj)||void 0===u?void 0:u.metadata)||void 0===p?void 0:p.number,verse:t.number},dropcap:"disabled",fragment:this.path}))),o("p",{class:this.editable?"psalm editable":"psalm",onClick:()=>{this.focusedVerse=e,this.focusedSection=i}},this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}-${e}-number`,text:t.number,path:`${this.path}/value/${i}/value/${e}/number`,placeholder:"#",template:$}):t.number&&o("sup",null,t.number),o("div",{class:"text"},v,this.editable&&o("ion-button",{fill:"clear",class:{"section-break":!0,hidden:this.focusedVerse!==e||this.focusedSection!==i},onClick:()=>this.insertSectionBreakAfterVerse(i,e)},O.section_break_insert)))}})),this.obj.repeatAntiphon(i,this.filteredValue.length)&&o("div",{class:"repeat-antiphon"},this.antiphonNode(null===(l=null===(n=this.obj)||void 0===n?void 0:n.metadata)||void 0===l?void 0:l.antiphon)),this.editable&&this.obj.value.length>i+1&&o("ion-button",{fill:"clear",class:"section-break",onClick:()=>this.removeSectionBreakAfter(i)},O.section_break_remove))]})),(null===(p=null===(u=this.obj)||void 0===u?void 0:u.metadata)||void 0===p?void 0:p.gloria)&&!this.obj.metadata.omit_gloria&&this.gloriaNode(this.obj.metadata.gloria),((null===(b=null===(v=this.obj)||void 0===v?void 0:v.metadata)||void 0===b?void 0:b.gloria)&&!this.obj.metadata.omit_gloria||void 0===(null===(g=null===(f=this.obj)||void 0===f?void 0:f.metadata)||void 0===g?void 0:g.gloria)||Boolean(null===(y=null===(m=this.obj)||void 0===m?void 0:m.metadata)||void 0===y?void 0:y.omit_gloria))&&w&&this.antiphonNode(null===(k=null===(x=this.obj)||void 0===x?void 0:x.metadata)||void 0===k?void 0:k.antiphon)))}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};nt.style="ldf-psalm.sc-ldf-psalm,.sc-ldf-psalm-h{font-family:var(--ldf-font-face);--ldf-drop-margin-right:var(--ldf-drop-psalm-margin-right)}ldf-psalm[lang=he].sc-ldf-psalm .verse.sc-ldf-psalm,[lang=he].sc-ldf-psalm-h .verse.sc-ldf-psalm{text-align:right;--ldf-drop-float:right}.psalm-set.sc-ldf-psalm{margin-top:0.5em;margin-bottom:0.5em}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm{display:var(--ldf-psalm-grid-display);grid-template-columns:var(--ldf-psalm-grid-template-columns);grid-template-rows:auto;grid-template-areas:var(--ldf-psalm-grid-template-areas);margin:0;text-indent:var(--ldf-psalm-verse-indentation)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm br.sc-ldf-psalm{display:var(--ldf-psalm-line-break-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm sup.sc-ldf-psalm{float:var(--ldf-psalm-number-float);display:var(--ldf-psalm-number-display);grid-area:var(--ldf-psalm-number-grid-area);margin-right:var(--ldf-psalm-number-margin-right)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .text.sc-ldf-psalm{display:var(--ldf-psalm-text-display);grid-area:var(--ldf-psalm-text-grid-area)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{margin-left:var(--ldf-psalm-halfverse-margin-left)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .verse.sc-ldf-psalm,.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{display:var(--ldf-psalm-verse-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm .halfverse.sc-ldf-psalm{display:var(--ldf-psalm-halfverse-display, var(--ldf-psalm-verse-display))}.editable.sc-ldf-psalm .verse.sc-ldf-psalm,.editable.sc-ldf-psalm .halfverse.sc-ldf-psalm{width:100%}.psalm-parent.no-numbers.sc-ldf-psalm{display:block;text-align:left;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none}.psalm-parent.no-numbers.sc-ldf-psalm .psalm.sc-ldf-psalm{display:block;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none}.psalm-parent.no-numbers.sc-ldf-psalm .psalm.sc-ldf-psalm .text.sc-ldf-psalm{text-align:left;grid-area:none;display:var(--ldf-psalm-text-display);width:100%}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) sup.sc-ldf-psalm{display:var(--ldf-psalm-set-first-verse-number-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .verse.sc-ldf-psalm:nth-of-type(1){display:var(--ldf-psalm-set-first-verse-display)}.psalm-set.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .halfverse.sc-ldf-psalm:nth-of-type(2){display:var(--ldf-psalm-set-first-half-verse-display, inline-block)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) sup.sc-ldf-psalm{display:var(--ldf-psalm-first-verse-number-display)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .verse.sc-ldf-psalm:nth-of-type(1){display:var(--ldf-psalm-first-verse-display)}.psalm-set.sc-ldf-psalm:nth-of-type(1) .psalm.sc-ldf-psalm:nth-of-type(1) .text.sc-ldf-psalm:nth-of-type(1) .halfverse.sc-ldf-psalm:nth-of-type(2){display:var(--ldf-psalm-first-half-verse-display, inline-block)}.antiphon.sc-ldf-psalm{display:var(--ldf-psalm-antiphon-display);font-style:var(--ldf-antiphon-font-style);font-weight:var(--ldf-antiphon-font-weight);margin-top:0.5em}.repeat-antiphon.sc-ldf-psalm{display:var(--ldf-psalm-repeat-antiphon-display)}h5.sc-ldf-psalm{font-size:1em;font-style:italic;font-weight:normal;margin-right:1em}.psalm.unison.sc-ldf-psalm .text.sc-ldf-psalm{font-weight:var(--ldf-unison-font-weight);font-style:var(--ldf-unison-font-style)}.psalm.omit.sc-ldf-psalm .text.sc-ldf-psalm{display:none}.psalm.wholeverse.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-child(even),.psalm-parent.wholeverse.sc-ldf-psalm .psalm.sc-ldf-psalm:nth-child(even){font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.psalm.halfverse.sc-ldf-psalm .halfverse.sc-ldf-psalm,.psalm-parent.halfverse.sc-ldf-psalm .halfverse.sc-ldf-psalm{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}h3.editable-label.sc-ldf-psalm{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.section-break.sc-ldf-psalm{display:block;text-align:center;width:100%}.section-break.hidden.sc-ldf-psalm{display:none}";const lt=class{constructor(i){t(this,i)}docChanged(t){try{this.obj=new L("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new L}}componentWillLoad(){this.docChanged(this.doc)}render(){var t,i,e;return o(n,{lang:this.obj.language},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),o("div",{class:`${(null===(t=this.obj)||void 0===t?void 0:t.style)||""} ${(null===(e=null===(i=this.obj)||void 0===i?void 0:i.metadata)||void 0===e?void 0:e.align)||""}`},this.obj.value&&this.obj.value.map(((t,i)=>this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}`,text:t,path:`${this.path}/value/${i}`}):o("p",{id:`${this.obj.uid||this.obj.slug}-${i}`,innerHTML:t})))))}static get watchers(){return{doc:["docChanged"]}}};lt.style="ldf-refrain.sc-ldf-refrain,.sc-ldf-refrain-h{font-family:var(--ldf-font-face);display:block}ldf-refrain.sc-ldf-refrain p.sc-ldf-refrain,.sc-ldf-refrain-h p.sc-ldf-refrain{font-style:inherit;margin-bottom:0;margin:0}.antiphon.sc-ldf-refrain{font-style:var(--ldf-antiphon-font-style)}.gloria.sc-ldf-refrain{margin-left:calc(var(--ldf-gloria-indent) / 2);text-indent:calc(var(--ldf-gloria-indent) / -2)}@media (min-width: 450px){.gloria.sc-ldf-refrain{margin-left:var(--ldf-gloria-indent);text-indent:calc(var(--ldf-gloria-indent) * -1)}.gloria.sc-ldf-refrain>p.sc-ldf-refrain:first-child{margin-left:0em}.gloria.sc-ldf-refrain>p.sc-ldf-refrain:nth-child(even){margin-left:1em}}.left.sc-ldf-refrain{text-align:left}.center.sc-ldf-refrain{text-align:center}.right.sc-ldf-refrain{text-align:right}";const st={en:{label:"Label",source:"Source",citation:"Citation",makeOptional:"Make Optional",optional:"Optional"}},at=class{constructor(i){t(this,i)}docChanged(t){try{this.obj=new w("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new w}}async componentWillLoad(){this.docChanged(this.doc),this.loadLocaleStrings()}async loadLocaleStrings(){try{this.localeStrings=st[z(this.element)]}catch(t){console.warn(t)}}editableNode(t,i,e,n,l){return o("ldf-editable-text",{id:`${this.obj.uid}-${i}-${e}`,text:t[e],path:`${this.path}/value/${i}/${e}`,template:n,templateMaker:l})}stringNode(t,i,e){return o("ldf-string",{citation:{label:this.obj.label},id:`${this.obj.uid}-${i}-${e}`,text:t[e],dropcap:0==i?"enabled":"disabled",fragment:this.path})}litanyResponseStringNode(t,i){const e=t.response||this.obj.metadata.response;return"[Silence]"==e?o("span",{class:"rubric"},o("br",null),"Silence"):o("span",{class:"response"},o("ldf-string",{citation:{label:this.obj.label},id:`${this.obj.uid}-${i}-response`,text:e,fragment:this.path}))}editableHeader(){var t,i,e,n,l,s,a,r;return o("ldf-label-bar",null,o("h3",{slot:"start",class:"editable-label"},o("ldf-editable-text",{id:"label",text:null===(t=this.obj)||void 0===t?void 0:t.label,path:`${this.path}/label`,placeholder:null===(i=this.localeStrings)||void 0===i?void 0:i.label})),o("ldf-editable-text",{slot:"end",id:"source-source",text:null===(n=null===(e=this.obj)||void 0===e?void 0:e.source)||void 0===n?void 0:n.source,path:`${this.path}/source/source`,placeholder:null===(l=this.localeStrings)||void 0===l?void 0:l.source}),o("ldf-editable-text",{slot:"end",id:"source-citation",text:null===(a=null===(s=this.obj)||void 0===s?void 0:s.source)||void 0===a?void 0:a.citation,path:`${this.path}/source/citation`,placeholder:null===(r=this.localeStrings)||void 0===r?void 0:r.citation}))}render(){var t,i,e,l,s;const a=(null===(t=this.obj)||void 0===t?void 0:t.label)||(null===(i=this.obj)||void 0===i?void 0:i.citation)||(null===(e=this.obj)||void 0===e?void 0:e.source);if("preces"==this.obj.style){const t={label:"",text:""},i=t=>({label:"",text:t});return o(n,{class:this.obj.style,lang:this.obj.language},o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),!this.editable&&a&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation,source:this.obj.source})}),this.editable&&a&&this.editableHeader(),o("table",{class:"preces"},this.obj.value.map(((e,n)=>o("tr",{class:"row"},o("td",{class:"cell"},this.editable?this.editableNode(e,n,"label",t,i):this.stringNode(e,n,"label")),o("td",{class:n%2==0?"cell":"cell response"},this.editable?this.editableNode(e,n,"text",t,i):this.stringNode(e,n,"text")))))))}if("litany"==this.obj.style){const t={text:"",response:(null===(l=this.obj.metadata)||void 0===l?void 0:l.response)||""},i=t=>{var i;return{text:t,response:(null===(i=this.obj.metadata)||void 0===i?void 0:i.response)||""}};return o(n,{class:this.obj.style,lang:this.obj.language},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),!this.editable&&a&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation,source:this.obj.source})}),this.editable&&a&&this.editableHeader(),this.obj.value.map(((e,n)=>{var l,s;let a=new Array("litany");return e.optional&&a.push("optional"),o("div",{class:{line:!0,editable:this.editable}},o("p",{class:a.join(" ")},this.editable?this.editableNode(e,n,"text",t,i):this.stringNode(e,n,"text"),e.response&&(this.editable?o("span",{class:"response"},this.editableNode(e,n,"response",t,i)):[o("br",null),this.litanyResponseStringNode(e,n)]),!e.response&&(null===(l=this.obj.metadata)||void 0===l?void 0:l.response)&&(this.editable?o("span",{class:"response"},o("ldf-editable-text",{id:`${this.obj.uid}-${n}-response`,text:this.obj.metadata.response,path:`${this.path}/response`})):[o("br",null),this.litanyResponseStringNode(e,n)])),this.editable&&o("label",{class:"optional-label",htmlFor:`optional-${n}`},null===(s=this.localeStrings)||void 0===s?void 0:s.optional),this.editable&&o("ldf-editable-boolean",{id:`optional-${n}`,slot:"start",path:`${this.path}/value/${n}/optional`,value:e.optional}))})))}{const t={text:"",response:(null===(s=this.obj.metadata)||void 0===s?void 0:s.response)||""},i=t=>{var i;return{text:t,response:(null===(i=this.obj.metadata)||void 0===i?void 0:i.response)||""}};return o(n,{class:this.obj.style,lang:this.obj.language},!this.editableHeader&&a&&o("ldf-heading",{doc:new C({type:"heading",metadata:{level:3},value:[this.obj.label],citation:this.obj.citation,source:this.obj.source})}),this.editable&&a&&this.editableHeader(),o("p",{class:"responsive"},this.obj.value.map(((e,n)=>[o("div",null,this.editable?this.editableNode(e,n,"text",t,i):this.stringNode(e,n,"text")),o("div",{class:"response"},this.editable?this.editableNode(e,n,"response",t,i):this.stringNode(e,n,"response"))]))))}}get element(){return l(this)}static get watchers(){return{doc:["docChanged"]}}};at.style=".sc-ldf-responsive-prayer-h{text-align:var(--ldf-text-align);text-justify:inter-character}.response.sc-ldf-responsive-prayer{font-weight:var(--ldf-response-font-weight);font-style:var(--ldf-response-font-style)}.preces.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer{text-align:left}.preces.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer:first-child{font-style:italic;text-align:left;padding-right:1em;vertical-align:top}.optional.sc-ldf-responsive-prayer{padding-left:0.5em;border-left:2px solid black}.line.sc-ldf-responsive-prayer{display:flex;flex-direction:row;align-items:center}.line.sc-ldf-responsive-prayer>*.sc-ldf-responsive-prayer{text-align:var(--ldf-text-align)}.editable.line.sc-ldf-responsive-prayer ldf-editable-boolean.sc-ldf-responsive-prayer{width:2em}.editable.line.sc-ldf-responsive-prayer p.sc-ldf-responsive-prayer{width:calc(100% - 2em)}.rubric.sc-ldf-responsive-prayer{font-family:var(--ldf-font-face);color:var(--ldf-rubric-color);font-style:var(--ldf-rubric-font-style);font-weight:var(--ldf-rubric-font-weight);font-size:var(--ldf-rubric-font-size)}.litany.sc-ldf-responsive-prayer{white-space:pre-wrap}.preces.sc-ldf-responsive-prayer{width:100%}.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer{display:table-row;display:var(--ldf-preces-tr-display)}.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer tr.sc-ldf-responsive-prayer .cell.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer td.sc-ldf-responsive-prayer,.preces.sc-ldf-responsive-prayer .row.sc-ldf-responsive-prayer .cell.sc-ldf-responsive-prayer{display:table-cell;display:var(--ldf-preces-td-display);margin-left:var(--ldf-preces-td-margin-left)}h3.editable-label.sc-ldf-responsive-prayer{text-align:var(--ldf-h3-text-align);font-weight:var(--ldf-h3-font-weight);font-style:var(--ldf-h3-font-style);font-variant:var(--ldf-h3-font-variant);font-size:var(--ldf-h3-font-size);text-transform:var(--ldf-h3-text-transform)}.optional-label.sc-ldf-responsive-prayer{margin-right:0.5em}";const rt=class{constructor(i){t(this,i)}docChanged(t){try{this.obj=new $("string"==typeof t?JSON.parse(t):t)}catch(t){console.warn(t),this.obj=new $}}componentWillLoad(){this.docChanged(this.doc)}render(){return o(n,{lang:this.obj.language},this.editable&&o("ldf-label-bar",null,o("slot",{slot:"end",name:"controls"})),this.obj.value.map(((t,i)=>this.editable?o("ldf-editable-text",{id:`${this.obj.uid||this.obj.slug}-${i}`,text:t,path:`${this.path}/value/${i}`}):o("p",{id:`${this.obj.uid||this.obj.slug}-${i}`,class:"rubric"},t))))}static get watchers(){return{doc:["docChanged"]}}};rt.style=".sc-ldf-rubric-h{font-family:var(--ldf-font-face);color:var(--ldf-rubric-color);font-style:var(--ldf-rubric-font-style);font-weight:var(--ldf-rubric-font-weight);font-size:var(--ldf-rubric-font-size);text-align:var(--ldf-text-align);text-justify:inter-character}";export{T as ion_segment,D as ion_segment_button,R as ion_skeleton_text,A as ldf_bible_reading,B as ldf_editable_add_block,J as ldf_editable_metadata_buttons,W as ldf_editable_select,H as ldf_image,q as ldf_liturgical_document,Q as ldf_liturgy,tt as ldf_meditation,et as ldf_option,nt as ldf_psalm,lt as ldf_refrain,at as ldf_responsive_prayer,rt as ldf_rubric}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venite/components",
3
- "version": "0.16.23",
3
+ "version": "0.16.24",
4
4
  "description": "Rendering components for the Venite.app Liturgical Document Format (LDF)",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",