1 line
9.6 KiB
Plaintext
1 line
9.6 KiB
Plaintext
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-spinner.entry.js"],"names":["spinnerCss","Spinner","hostRef","paused","spinnerName","name","get","mode","self","getName","spinner","duration","dur","svgs","circles","undefined","i","push","buildCircle","lines","buildLine","color","getBoolean","role","style","elmDuration","animationDuration","index","total","data","fn","viewBox","transform","cx","cy","r","y1","y2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAKA,UAAMA,UAAU,GAAG,y0HAAnB;;AAEA,UAAMC,OAAO;AACX,yBAAYC,OAAZ,EAAqB;AAAA;;AACnB,uEAAiB,IAAjB,EAAuBA,OAAvB;AACA;;;;AAGA,eAAKC,MAAL,GAAc,KAAd;AACD;;AAPU;AAAA;AAAA,oCAQD;AACR,gBAAMC,WAAW,GAAG,KAAKC,IAAL,IAAa,4DAAOC,GAAP,CAAW,SAAX,CAAjC;;AACA,gBAAMC,IAAI,GAAG,oEAAW,IAAX,CAAb;;AACA,gBAAIH,WAAJ,EAAiB;AACf,qBAAOA,WAAP;AACD;;AACD,mBAAQG,IAAI,KAAK,KAAV,GAAmB,OAAnB,GAA6B,UAApC;AACD;AAfU;AAAA;AAAA,mCAgBF;AAAA;;AACP,gBAAMC,IAAI,GAAG,IAAb;AACA,gBAAMD,IAAI,GAAG,oEAAWC,IAAX,CAAb;AACA,gBAAMJ,WAAW,GAAGI,IAAI,CAACC,OAAL,EAApB;AACA,gBAAMC,OAAO,GAAG,+DAASN,WAAT,KAAyB,+DAAS,OAAT,CAAzC;AACA,gBAAMO,QAAQ,GAAI,OAAOH,IAAI,CAACG,QAAZ,KAAyB,QAAzB,IAAqCH,IAAI,CAACG,QAAL,GAAgB,EAArD,GAA0DH,IAAI,CAACG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as registerInstance, h, H as Host } from './index-e806d1f6.js';\nimport { c as config, b as getIonMode } from './ionic-global-9d5c8ee3.js';\nimport { c as createColorClasses } from './theme-ff3fc52f.js';\nimport { S as SPINNERS } from './spinner-configs-cd7845af.js';\n\nconst spinnerCss = \":host{display:inline-block;position:relative;width:28px;height:28px;color:var(--color);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.ion-color){color:var(--ion-color-base)}svg{left:0;top:0;-webkit-transform-origin:center;transform-origin:center;position:absolute;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0)}[dir=rtl] svg,:host-context([dir=rtl]) svg{left:unset;right:unset;right:0}[dir=rtl] svg,:host-context([dir=rtl]) svg{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}:host(.spinner-lines) line,:host(.spinner-lines-small) line{stroke-width:4px;stroke-linecap:round;stroke:currentColor}:host(.spinner-lines) svg,:host(.spinner-lines-small) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite}:host(.spinner-bubbles) svg{-webkit-animation:spinner-scale-out 1s linear infinite;animation:spinner-scale-out 1s linear infinite;fill:currentColor}:host(.spinner-circles) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite;fill:currentColor}:host(.spinner-crescent) circle{fill:transparent;stroke-width:4px;stroke-dasharray:128px;stroke-dashoffset:82px;stroke:currentColor}:host(.spinner-crescent) svg{-webkit-animation:spinner-rotate 1s linear infinite;animation:spinner-rotate 1s linear infinite}:host(.spinner-dots) circle{stroke-width:0;fill:currentColor}:host(.spinner-dots) svg{-webkit-animation:spinner-dots 1s linear infinite;animation:spinner-dots 1s linear infinite}:host(.spinner-circular){-webkit-animation:spinner-circular linear infinite;animation:spinner-circular linear infinite}:host(.spinner-circular) circle{-webkit-animation:spinner-circular-inner ease-in-out infinite;animation:spinner-circular-inner ease-in-out infinite;stroke:currentColor;stroke-dasharray:80px, 200px;stroke-dashoffset:0px;stroke-width:5.6;fill:none}:host(.spinner-paused),:host(.spinner-paused) svg,:host(.spinner-paused) circle{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@-webkit-keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@-webkit-keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}@keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}\";\n\nconst Spinner = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * If `true`, the spinner's animation will be paused.\n */\n this.paused = false;\n }\n getName() {\n const spinnerName = this.name || config.get('spinner');\n const mode = getIonMode(this);\n if (spinnerName) {\n return spinnerName;\n }\n return (mode === 'ios') ? 'lines' : 'circular';\n }\n render() {\n const self = this;\n const mode = getIonMode(self);\n const spinnerName = self.getName();\n const spinner = SPINNERS[spinnerName] || SPINNERS['lines'];\n const duration = (typeof self.duration === 'number' && self.duration > 10 ? self.duration : spinner.dur);\n const svgs = [];\n if (spinner.circles !== undefined) {\n for (let i = 0; i < spinner.circles; i++) {\n svgs.push(buildCircle(spinner, duration, i, spinner.circles));\n }\n }\n else if (spinner.lines !== undefined) {\n for (let i = 0; i < spinner.lines; i++) {\n svgs.push(buildLine(spinner, duration, i, spinner.lines));\n }\n }\n return (h(Host, { class: createColorClasses(self.color, {\n [mode]: true,\n [`spinner-${spinnerName}`]: true,\n 'spinner-paused': !!self.paused || config.getBoolean('_testing')\n }), role: \"progressbar\", style: spinner.elmDuration ? { animationDuration: duration + 'ms' } : {} }, svgs));\n }\n};\nconst buildCircle = (spinner, duration, index, total) => {\n const data = spinner.fn(duration, index, total);\n data.style['animation-duration'] = duration + 'ms';\n return (h(\"svg\", { viewBox: data.viewBox || '0 0 64 64', style: data.style }, h(\"circle\", { transform: data.transform || 'translate(32,32)', cx: data.cx, cy: data.cy, r: data.r, style: spinner.elmDuration ? { animationDuration: duration + 'ms' } : {} })));\n};\nconst buildLine = (spinner, duration, index, total) => {\n const data = spinner.fn(duration, index, total);\n data.style['animation-duration'] = duration + 'ms';\n return (h(\"svg\", { viewBox: data.viewBox || '0 0 64 64', style: data.style }, h(\"line\", { transform: \"translate(32,32)\", y1: data.y1, y2: data.y2 })));\n};\nSpinner.style = spinnerCss;\n\nexport { Spinner as ion_spinner };\n"]} |