UNPKG

@tindtechnologies/universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

1 lines 6.85 kB
"use strict";(self.webpackChunkUV=self.webpackChunkUV||[]).push([[3794],{3794(t,r,n){n.r(r),n.d(r,{ion_toolbar:()=>i});var o=n(5873),e=n(636),i=function(){function t(t){(0,o.r)(this,t),this.childrenStyles=new Map}return t.prototype.componentWillLoad=function(){var t=Array.from(this.el.querySelectorAll("ion-buttons")),r=t.find((function(t){return"start"===t.slot}));r&&r.classList.add("buttons-first-slot");var n=t.reverse(),o=n.find((function(t){return"end"===t.slot}))||n.find((function(t){return"primary"===t.slot}))||n.find((function(t){return"secondary"===t.slot}));o&&o.classList.add("buttons-last-slot")},t.prototype.childrenStyle=function(t){t.stopPropagation();var r=t.target.tagName,n=t.detail,o={},e=this.childrenStyles.get(r)||{},i=!1;Object.keys(n).forEach((function(t){var r="toolbar-"+t,a=n[t];a!==e[r]&&(i=!0),a&&(o[r]=!0)})),i&&(this.childrenStyles.set(r,o),this.el.forceUpdate())},t.prototype.render=function(){var t,r=(0,o.f)(this),n={};return this.childrenStyles.forEach((function(t){Object.assign(n,t)})),(0,o.h)(o.H,{class:Object.assign(Object.assign((t={"in-toolbar":(0,e.h)("ion-toolbar",this.el)},t[r]=!0,t),n),(0,e.c)(this.color))},(0,o.h)("div",{class:"toolbar-background"}),(0,o.h)("div",{class:"toolbar-container"},(0,o.h)("slot",{name:"start"}),(0,o.h)("slot",{name:"secondary"}),(0,o.h)("div",{class:"toolbar-content"},(0,o.h)("slot",null)),(0,o.h)("slot",{name:"primary"}),(0,o.h)("slot",{name:"end"})))},Object.defineProperty(t.prototype,"el",{get:function(){return(0,o.d)(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{--border-width:0;--border-style:solid;--opacity:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:var(--ion-safe-area-left);padding-right:var(--ion-safe-area-right);display:block;position:relative;width:100%;color:var(--color);font-family:var(--ion-font-family,inherit);contain:content;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-safe-area-left);padding-inline-start:var(--ion-safe-area-left);-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.toolbar-container{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)}}.toolbar-background{top:0;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:var(--opacity);z-index:-1;pointer-events:none}.toolbar-background,::slotted(ion-progress-bar){left:0;right:0;bottom:0;position:absolute}:host{--background:var(--ion-toolbar-background,var(--ion-background-color,#fff));--color:var(--ion-toolbar-color,var(--ion-text-color,#424242));--border-color:var(--ion-toolbar-border-color,var(--ion-border-color,var(--ion-color-step-150,#c1c4cd)));--padding-top:0;--padding-bottom:0;--padding-start:0;--padding-end:0;--min-height:56px}.toolbar-content{-ms-flex:1;flex:1;-ms-flex-order:3;order:3;min-width:0;max-width:100%}::slotted(ion-segment){min-height:var(--min-height)}::slotted(.buttons-first-slot){margin-left:4px}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted(.buttons-first-slot){margin-left:unset;-webkit-margin-start:4px;margin-inline-start:4px}}::slotted(.buttons-last-slot){margin-right:4px}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted(.buttons-last-slot){margin-right:unset;-webkit-margin-end:4px;margin-inline-end:4px}}::slotted([slot=start]){-ms-flex-order:2;order:2}::slotted([slot=secondary]){-ms-flex-order:4;order:4}::slotted([slot=primary]){-ms-flex-order:5;order:5;text-align:end}::slotted([slot=end]){-ms-flex-order:6;order:6;text-align:end}"},enumerable:!0,configurable:!0}),t}()},636(t,r,n){n.d(r,{c:()=>e,g:()=>i,h:()=>o,o:()=>s});var o=function(t,r){return null!==r.closest(t)},e=function(t){var r;return"string"==typeof t&&t.length>0?((r={"ion-color":!0})["ion-color-"+t]=!0,r):void 0},i=function(t){var r={};return function(t){return void 0!==t?(Array.isArray(t)?t:t.split(" ")).filter((function(t){return null!=t})).map((function(t){return t.trim()})).filter((function(t){return""!==t})):[]}(t).forEach((function(t){return r[t]=!0})),r},a=/^[a-z][a-z0-9+\-.]*:/,s=function(t,r,n){return o=void 0,e=void 0,s=function(){var o;return function(t,r){var n,o,e,i,a={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(e=2&i[0]?o.return:i[0]?o.throw||((e=o.return)&&e.call(o),0):o.next)&&!(e=e.call(o,i[1])).done)return e;switch(o=0,e&&(i=[2&i[0],e.value]),i[0]){case 0:case 1:e=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((e=(e=a.trys).length>0&&e[e.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!e||i[1]>e[0]&&i[1]<e[3])){a.label=i[1];break}if(6===i[0]&&a.label<e[1]){a.label=e[1],e=i;break}if(e&&a.label<e[2]){a.label=e[2],a.ops.push(i);break}e[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(t,a)}catch(t){i=[6,t],o=0}finally{n=e=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(e){return null!=t&&"#"!==t[0]&&!a.test(t)&&(o=document.querySelector("ion-router"))?(null!=r&&r.preventDefault(),[2,o.push(t,n)]):[2,!1]}))},new((i=void 0)||(i=Promise))((function(t,r){function n(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(r){r.done?t(r.value):new i((function(t){t(r.value)})).then(n,a)}l((s=s.apply(o,e||[])).next())}));var o,e,i,s}}}]);