favesalon-embed 0.1.0 → 1.0.1
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.
- package/dist/cjs/chat-button.cjs.entry.js +118 -0
- package/dist/cjs/favesalon-embed.cjs.js +7 -3
- package/dist/cjs/google-map_5.cjs.entry.js +26 -7
- package/dist/cjs/{index-e6bea8f5.js → index-47c2a5f6.js} +512 -208
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/relativeTime-3721080d.js +9 -0
- package/dist/cjs/salon-booking-modal.cjs.entry.js +3 -2
- package/dist/cjs/salon-booking.cjs.entry.js +3 -2
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +3 -2
- package/dist/cjs/salon-gift-card.cjs.entry.js +3 -2
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +5 -3
- package/dist/cjs/salon-lookbook.cjs.entry.js +7 -3
- package/dist/cjs/salon-ranking.cjs.entry.js +3 -2
- package/dist/cjs/salon-reviews.cjs.entry.js +10 -3
- package/dist/cjs/salon-services.cjs.entry.js +6 -3
- package/dist/cjs/salon-stylists.cjs.entry.js +9 -3
- package/dist/cjs/services-125c82d8.js +21492 -0
- package/dist/cjs/style-detail.cjs.entry.js +11 -9
- package/dist/cjs/user-avatar.cjs.entry.js +7 -3
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/chat-button/index.css +122 -0
- package/dist/collection/components/chat-button/index.js +218 -0
- package/dist/collection/components/chat-conversation/index.js +103 -0
- package/dist/collection/components/google-map/index.js +72 -68
- package/dist/collection/components/salon-booking/index.css +5 -0
- package/dist/collection/components/salon-booking/index.js +85 -80
- package/dist/collection/components/salon-booking/salon-booking-modal.js +73 -69
- package/dist/collection/components/salon-gift-card/index.css +6 -1
- package/dist/collection/components/salon-gift-card/index.js +85 -80
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +56 -52
- package/dist/collection/components/salon-info/index.css +1 -0
- package/dist/collection/components/salon-info/index.js +60 -54
- package/dist/collection/components/salon-latest-reviews/index.css +3 -0
- package/dist/collection/components/salon-latest-reviews/index.js +131 -144
- package/dist/collection/components/salon-latest-styles/index.css +2 -0
- package/dist/collection/components/salon-latest-styles/index.js +143 -138
- package/dist/collection/components/salon-locations/index.css +3 -0
- package/dist/collection/components/salon-locations/index.js +112 -120
- package/dist/collection/components/salon-lookbook/index.css +3 -0
- package/dist/collection/components/salon-lookbook/index.js +182 -190
- package/dist/collection/components/salon-ranking/index.js +68 -65
- package/dist/collection/components/salon-reviews/index.css +3 -0
- package/dist/collection/components/salon-reviews/index.js +146 -183
- package/dist/collection/components/salon-schedules/index.css +3 -0
- package/dist/collection/components/salon-schedules/index.js +129 -151
- package/dist/collection/components/salon-services/index.css +1 -0
- package/dist/collection/components/salon-services/index.js +117 -127
- package/dist/collection/components/salon-stylists/index.css +8 -0
- package/dist/collection/components/salon-stylists/index.js +137 -136
- package/dist/collection/components/style-detail/index.css +14 -0
- package/dist/collection/components/style-detail/index.js +265 -340
- package/dist/collection/components/user-avatar/index.js +119 -112
- package/dist/collection/mocks/users.js +10 -0
- package/dist/collection/services/services.js +121 -0
- package/dist/collection/types/chat.js +23 -0
- package/dist/collection/types/user.js +1 -1
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +24628 -8605
- package/dist/esm/chat-button.entry.js +114 -0
- package/dist/esm/favesalon-embed.js +4 -3
- package/dist/esm/google-map_5.entry.js +26 -7
- package/dist/esm/{index-6af0a03d.js → index-3fae868e.js} +512 -209
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/relativeTime-cd452e6d.js +7 -0
- package/dist/esm/salon-booking-modal.entry.js +3 -2
- package/dist/esm/salon-booking.entry.js +3 -2
- package/dist/esm/salon-gift-card-modal.entry.js +3 -2
- package/dist/esm/salon-gift-card.entry.js +3 -2
- package/dist/esm/salon-latest-reviews.entry.js +5 -3
- package/dist/esm/salon-lookbook.entry.js +7 -3
- package/dist/esm/salon-ranking.entry.js +3 -2
- package/dist/esm/salon-reviews.entry.js +10 -3
- package/dist/esm/salon-services.entry.js +6 -3
- package/dist/esm/salon-stylists.entry.js +9 -3
- package/dist/esm/services-40a3e622.js +21485 -0
- package/dist/esm/style-detail.entry.js +10 -8
- package/dist/esm/user-avatar.entry.js +7 -3
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
- package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
- package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
- package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
- package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
- package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
- package/dist/favesalon-embed/p-22093506.entry.js +1 -0
- package/dist/favesalon-embed/p-32b314e9.js +2 -0
- package/dist/favesalon-embed/p-4a5eca9a.js +1 -1
- package/dist/favesalon-embed/p-58d2e9be.js +1 -0
- package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
- package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
- package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
- package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
- package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
- package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
- package/dist/favesalon-embed/p-b630ae68.js +1580 -0
- package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
- package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
- package/dist/favesalon-embed/p-fc9a5551.js +1 -1
- package/dist/types/components/chat-button/index.d.ts +24 -0
- package/dist/types/components.d.ts +22 -0
- package/dist/types/mocks/users.d.ts +10 -0
- package/dist/types/services/services.d.ts +15 -0
- package/dist/types/stencil-public-runtime.d.ts +85 -11
- package/dist/types/types/chat.d.ts +17 -0
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +3 -3
- package/readme.md +2 -2
- package/dist/cjs/services-eee8f251.js +0 -5634
- package/dist/esm/services-295247b1.js +0 -5627
- package/dist/favesalon-embed/p-292b97ba.entry.js +0 -1
- package/dist/favesalon-embed/p-4869dfed.entry.js +0 -1
- package/dist/favesalon-embed/p-4aee4fd9.entry.js +0 -1
- package/dist/favesalon-embed/p-5528c705.entry.js +0 -1
- package/dist/favesalon-embed/p-612ad685.entry.js +0 -1
- package/dist/favesalon-embed/p-75aef7e0.entry.js +0 -1
- package/dist/favesalon-embed/p-8c780874.entry.js +0 -1
- package/dist/favesalon-embed/p-8dbf04c5.js +0 -1
- package/dist/favesalon-embed/p-9f31061a.entry.js +0 -1
- package/dist/favesalon-embed/p-a60d78e9.entry.js +0 -1
- package/dist/favesalon-embed/p-a6debdae.entry.js +0 -1
- package/dist/favesalon-embed/p-bad1e9a7.entry.js +0 -1
- package/dist/favesalon-embed/p-c2ecb365.js +0 -1
- package/dist/favesalon-embed/p-c7dea70c.entry.js +0 -1
- package/dist/favesalon-embed/p-f0e14641.entry.js +0 -1
- package/dist/types/types/tmp.d.ts +0 -0
- /package/dist/{collection/types/tmp.js → types/components/chat-conversation/index.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i}from"./p-32b314e9.js";import{H as e,d as s,s as l}from"./p-b630ae68.js";import{C as o}from"./p-a33331cc.js";import"./p-d6083940.js";const a=10,r=[{value:"newest",label:"Newest first"},{value:"oldest",label:"Oldest first"},{value:"rating_desc",label:"High rating first"},{value:"rating_asc",label:"Low rating first"}],n=class{constructor(i){t(this,i),this.salonId=void 0,this.primaryColor=o.Primary,this.salonInfo=void 0,this.stats={},this.totalReviews=0,this.allReviews=[],this.isLoading=void 0,this.isSorting=void 0,this.isFiltering=void 0,this.isLoadingMore=void 0,this.canLoadMore=void 0,this.page=1,this.filterBy=[],this.sortBy=r[0].value}componentWillLoad(){this.fetchData()}fetchData(){this.isLoading=!0;try{e().fetchSalonReviews(this.salonId,{page:1,sort:this.sortBy,limit:a}).then((t=>{const{total:i,stats:e,data:s}=t;this.stats=e,this.totalReviews=i,this.allReviews=s,this.canLoadMore=i>a}))}catch(t){}this.isLoading=!1}onLoadMore(){this.isLoadingMore=!0;try{e().fetchSalonReviews(this.salonId,{page:this.page+1,sort:this.sortBy,limit:a}).then((t=>{const{total:i,data:e}=t;this.page=this.page+1,this.totalReviews=i,this.allReviews=this.allReviews.concat(e),this.canLoadMore=(e||[]).length===a}))}catch(t){}this.isLoadingMore=!1}onChangeFilter(t){this.isFiltering=!0;try{e().fetchSalonReviews(this.salonId,Object.assign({page:1,sort:this.sortBy,limit:a},t.length>0?{avg_point:t}:{})).then((t=>{const{total:i,data:e}=t;this.page=1,this.totalReviews=i,this.allReviews=e,this.canLoadMore=(e||[]).length===a}))}catch(t){}this.isFiltering=!1}onChangeSorting(t){this.isSorting=!0;try{e().fetchSalonReviews(this.salonId,Object.assign({page:1,sort:t,limit:a},this.filterBy.length>0?{avg_point:this.filterBy}:{})).then((t=>{const{total:i,data:e}=t;this.page=1,this.totalReviews=i,this.allReviews=e,this.canLoadMore=(e||[]).length===a}))}catch(t){}this.isSorting=!1}render(){const t=["","Poor","Sufficient","Average","Well","Very good"];return i("div",{class:"view view--salon-reviews"},i("div",{class:"salon-reviews--filters"},i("div",{class:"salon-reviews--score"},i("div",{class:"salon-review--rating",style:{display:"flex",flexDirection:"row"}},[1,2,3,4,5].map((t=>i("i",{class:t<=this.stats.reviewPoint?"ri-heart-fill":"ri-heart-line",style:Object.assign({fontSize:"32px",marginRight:"4px"},t<=this.stats.reviewPoint?{color:this.primaryColor}:{color:o.Gray04})})))),i("div",{class:"salon-review--rating--date",style:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:"-8px"}},i("span",{style:{fontSize:"24px"}},this.stats.reviewPoint,"/5")," ",i("span",{style:{color:o.Gray04,marginLeft:"8px"}},"(",this.stats.totalReviews," reviews)"))),i("div",{class:"salon-reviews--filters--options",style:{marginTop:"24px"}},i("div",{style:{background:o.Gray01,display:"flex",alignItems:"center",borderRadius:"4px",padding:"16px"}},i("div",null,i("input",{type:"checkbox",checked:0===this.filterBy.length,onChange:()=>{this.filterBy=[],this.onChangeFilter([])}})," ",i("span",{style:{marginLeft:"4px"}},"All reviews")),[5,4,3,2,1].map((t=>{const e=this.filterBy.indexOf(t)>-1;return i("div",{key:`salon-reviews--filters-score--${t}`,style:{display:"flex",alignItems:"center",marginLeft:"16px"}},i("input",{type:"checkbox",checked:e,onChange:()=>{const i=e?this.filterBy.filter((i=>i!==t)):this.filterBy.concat([t]);this.filterBy=i,this.onChangeFilter(i)}})," ",i("span",{style:{display:"flex",alignItems:"center",marginLeft:"4px"}},t," ",i("i",{class:"ri-heart-line",style:{fontSize:"16px",marginLeft:"4px",marginRight:"4px",lineHeight:"1"}})," ",i("span",{style:{color:o.Gray04,fontSize:"12px"}},"(",this.stats[String(t)]||0,")")))}))))),i("div",{class:"salon-reviews--list-header",style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:"24px"}},i("div",{class:"view--salon-reviews--counter"},this.totalReviews," ",1===this.totalReviews?"review":"reviews"),i("div",{style:{display:"flex",alignItems:"center"}},i("label",{style:{marginRight:"8px",color:o.Gray04}},"Sort by"),i("select",{class:"search-filter--select","place-holder":"Most popular",disabled:this.isLoading,onChange:t=>{this.sortBy=t.target.value,this.onChangeSorting(t.target.value)},style:{display:"flex",alignItems:"center",backgroundColor:o.Gray01,borderColor:o.Gray01,borderRadius:"4px",height:"40px",width:"130px"}},r.map((t=>i("option",{value:t.value,selected:t.value===this.sortBy,key:`search-filter--select-option--${t.value}`},t.label)))))),i("div",{class:"salon-reviews--list-content",style:{marginTop:"24px"}},this.allReviews.map(((e,a)=>{const r=e.user||{};return i("div",{class:"salon-review",key:`salon-review--${a}`,style:{borderBottom:`1px solid ${o.Gray02}`,marginBottom:"24px",paddingBottom:"24px"}},i("div",{class:"salon-review--user",style:{marginBottom:"16px",overflow:"hidden"}},i("user-avatar",{size:48,avatar:r.avatar,name:i("span",{style:{fontSize:"18px",fontWeight:"600",color:o.TextColor}},r.firstName||r.lastName?`${r.firstName||""} ${r.lastName||""}`:""),shortName:`${(r.firstName||"").charAt(0)}${(r.lastName||"").charAt(0)}`,nameStyle:{fontWeight:"bold"}})),i("div",{class:"salon-review--rating",style:{display:"flex",flexDirection:"row",marginBottom:"4px"}},[1,2,3,4,5].map((t=>i("i",{key:`salon-review--rating--item--score--${t}`,class:t<=e.point?"ri-heart-fill":"ri-heart-line",style:{color:t<=e.point?this.primaryColor:o.Gray04,fontSize:"16px",marginRight:"4px"}}))),e.createdDate&&i("div",{class:"salon-review--rating--date",style:{fontSize:"14px",color:o.Gray04,marginLeft:"16px",position:"relative",top:"2px"}},s(e.createdDate).format(l))),i("div",{class:"salon-review--rating-text",style:{fontSize:"16px",fontWeight:"600"}},t[e.point]),(e.title||e.description)&&i("div",{class:"salon-review--detail",style:{marginTop:"16px"}},i("div",{class:"salon-review--title",style:{fontSize:"18px",fontWeight:"bold"},innerHTML:e.title}),i("div",{class:"salon-review--description",style:{fontSize:"16px"},innerHTML:e.description})),e.photos.length>0&&i("div",{style:{display:"flex",flexDirection:"row",overflowX:"auto"}},e.photos.map((t=>i("div",{key:`upload-file--${t.id}`,class:"review--photo",style:{position:"relative",cursor:"pointer",marginTop:"16px",marginRight:"12px"}},i("img",{width:72,src:t.imageUrlThumb,style:{display:"block"}}))))))}))),i("div",{class:"salon-reviews--list-footer",style:{textAlign:"center",paddingTop:"16px",paddingBottom:"16px"}},i("button",{class:"btn btn-light btn-lg",style:{background:o.White,border:`1px solid ${o.Gray02}`,borderRadius:"4px",paddingLeft:"24px",paddingRight:"24px"},onClick:()=>this.onLoadMore()},"Load more")))}};n.style="@media (max-width: 768px){salon-reviews .salon-reviews{flex-direction:column !important}salon-reviews .salon-reviews--filters--options{display:none !important}salon-reviews .salon-reviews--list{padding-top:32px !important;padding-left:0px !important}salon-reviews .reviews-list--sorting>label{display:none !important}}";export{n as salon_reviews}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as s}from"./p-32b314e9.js";import{H as i,a as o}from"./p-b630ae68.js";import{C as t}from"./p-a33331cc.js";import"./p-d6083940.js";const r=class{constructor(s){e(this,s),this.salonId=void 0,this.buttonClass="btn btn-light",this.salonServices=void 0,this.isLoading=void 0}componentWillLoad(){this.fetchData()}async fetchData(){this.isLoading=!0;try{this.salonServices=await i().fetchSalonServices(this.salonId)}catch(e){this.salonServices=[]}this.isLoading=!1}render(){return this.isLoading?s("div",{class:"salon-services--container"},s("div",{class:"view view--salon-services--header",style:{border:`1px solid ${t.Gray01}`}},s("div",{class:"view-content",style:{overflowX:"auto"}},s("div",{style:{whiteSpace:"nowrap",overflow:"hidden"}},[1,2,3,4,5,6].map(((e,i)=>s("div",{key:`service-group--${e}--${i}`,style:{backgroundColor:t.Gray02,float:"left",marginRight:"12px",height:"30px",width:"120px"}})))))),[1,2,3,4,5,6].map(((e,i)=>s("div",{id:`service-group--${e}`,style:{marginTop:"32px"}},s("div",{key:`service-group--${e}--${i}`,style:{backgroundColor:t.Gray03,height:"20px",width:"120px"}}),s("div",{class:"view view--salon-service-type",style:{border:`1px solid ${t.Gray01}`,marginTop:"12px"}},s("div",{class:"view-content"},[1,2,3].map(((o,r)=>s("div",{key:`service-group--${e}--service-${o}--${r}`,class:"salon-service"},s("div",{class:"salon-service--name",style:Object.assign({},r>0?{marginTop:"12px",paddingTop:"12px",borderTop:`1px solid ${t.Gray01}`}:{})},s("div",{key:`service-group--${e}--${i}`,style:{backgroundColor:t.Gray01,height:"16px",width:"120px"}})),s("div",{style:{marginTop:"4px"}},s("div",{style:{backgroundColor:t.Gray01,height:"16px",width:"240px"}}))))))))))):s("div",{class:"salon-services--container"},s("div",{class:"view view--salon-services--header",style:{border:`1px solid ${t.Gray02}`}},s("div",{class:"view-content",style:{overflowX:"auto"}},s("div",{style:{whiteSpace:"nowrap"}},o(this.salonServices||[],["order","name"]).map(((e,i)=>s("a",{href:`#service-group--${e.id}`},s("button",{type:"button",class:this.buttonClass,style:i>0?{marginLeft:"12px"}:{}},e.name))))))),o(this.salonServices||[],["order","name"]).map((e=>{const i=(e.data||[]).length>1;return s("div",{id:`service-group--${e.id}`,style:{marginTop:"32px"}},s("h3",{style:{fontSize:"24px",marginBottom:"12px"}},e.name),s("div",{class:"view view--salon-service-type",style:{border:`1px solid ${t.Gray02}`}},s("div",{class:"view-content"},(e.data||[]).map(((e,o)=>s("div",{class:"salon-service-category"},i&&s("h4",{style:Object.assign({fontSize:"20px",marginBottom:"12px",paddingBottom:"12px",borderBottom:`1px solid ${t.Gray02}`},o>0?{marginTop:"32px"}:{})},e.name),(e.data||[]).map(((e,i)=>s("div",{class:"salon-service"},s("div",{class:"salon-service--name",style:Object.assign({fontSize:"16px",fontWeight:"500"},i>0?{marginTop:"12px",paddingTop:"12px",borderTop:`1px solid ${t.Gray01}`}:{})},e.name),(!e.hideDuration||!e.hidePrice)&&s("div",{style:{display:"block",marginTop:"4px",fontSize:"90%",color:t.Gray05}},[e.hideDuration?"":`${e.duration} mins`,e.hidePrice?"":`$${e.price}`].filter((e=>!!e)).join(" · ")))))))))))})))}};r.style="";export{r as salon_services}
|
|
@@ -3,4 +3,4 @@ import{a as t,g as n}from"./p-d6083940.js";var e={aliceblue:[240,248,255],antiqu
|
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
|
-
*/function x(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var _=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var n={},e=0;e<10;e++)n["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(t){return n[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,n){for(var e,r,i=x(t),o=1;o<arguments.length;o++){for(var u in e=Object(arguments[o]))O.call(e,u)&&(i[u]=e[u]);if(M){r=M(e);for(var a=0;a<r.length;a++)j.call(e,r[a])&&(i[r[a]]=e[r[a]])}}return i},S=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.StyleSheet=c;var e,r=(e=_)&&e.__esModule?e:{default:e};function i(t){return t[t.length-1]}function o(t){if(t.sheet)return t.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===t)return document.styleSheets[n]}var u="undefined"!=typeof window,a=function(){if(u){var t=document.createElement("div");return t.innerHTML="\x3c!--[if lt IE 10]><i></i><![endif]--\x3e",1===t.getElementsByTagName("i").length}}();function s(){var t=document.createElement("style");return t.type="text/css",t.setAttribute("data-glamor",""),t.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(t),t}function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.speedy,e=void 0===n||n,r=t.maxLength,i=void 0===r?u&&a?4e3:65e3:r;this.isSpeedy=e,this.sheet=void 0,this.tags=[],this.maxLength=i,this.ctr=0}(0,r.default)(c.prototype,{getSheet:function(){return o(i(this.tags))},inject:function(){var t=this;if(this.injected)throw new Error("already injected stylesheet!");u?this.tags[0]=s():this.sheet={cssRules:[],insertRule:function(n){t.sheet.cssRules.push({cssText:n})}},this.injected=!0},speedy:function(t){if(0!==this.ctr)throw new Error("cannot change speedy mode after inserting any rule to sheet. Either call speedy("+t+") earlier in your app, or call flush() before speedy("+t+")");this.isSpeedy=!!t},_insert:function(t){try{var n=this.getSheet();n.insertRule(t,-1!==t.indexOf("@import")?0:n.cssRules.length)}catch(t){}},insert:function(t){if(u)if(this.isSpeedy&&this.getSheet().insertRule)this._insert(t);else if(-1!==t.indexOf("@import")){var n=i(this.tags);n.insertBefore(document.createTextNode(t),n.firstChild)}else i(this.tags).appendChild(document.createTextNode(t));else this.sheet.insertRule(t,-1!==t.indexOf("@import")?0:this.sheet.cssRules.length);return this.ctr++,u&&this.ctr%this.maxLength==0&&this.tags.push(s()),this.ctr-1},delete:function(t){return this.replace(t,"")},flush:function(){u?(this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.sheet=null,this.ctr=0):this.sheet.cssRules=[],this.injected=!1},rules:function(){if(!u)return this.sheet.cssRules;var t=[];return this.tags.forEach((function(n){return t.splice.apply(t,[t.length,0].concat(function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}(Array.from(o(n).cssRules))))})),t}})})),A=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowStart:!0,gridRowEnd:!0,gridColumn:!0,gridColumnStart:!0,gridColumnEnd:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];Object.keys(e).forEach((function(t){r.forEach((function(n){e[function(t,n){return t+n.charAt(0).toUpperCase()+n.substring(1)}(n,t)]=e[t]}))})),n.default={isUnitlessNumber:e,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}}})),z=t((function(t,n){var e;Object.defineProperty(n,"__esModule",{value:!0});var r=((e=A)&&e.__esModule?e:{default:e}).default.isUnitlessNumber;n.default=function(t,n){return null==n||"boolean"==typeof n||""===n?"":isNaN(n)||0===n||r.hasOwnProperty(t)&&r[t]?""+n:("string"==typeof n&&(n=n.trim()),n+"px")}})),W=/([A-Z])/g,C=/^ms-/,I=function(t){return function(t){return t.replace(W,"-$1").toLowerCase()}(t).replace(C,"-ms-")},E=function(t){var n={};return function(e){return n.hasOwnProperty(e)||(n[e]=t.call(this,e)),n[e]}},F=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.processStyleName=void 0,n.createMarkupForStyles=function(t,n){var r="";for(var i in t){var o=0===i.indexOf("--");if(t.hasOwnProperty(i)&&"label"!==i){var a=t[i];null!=a&&(o?r+=i+":"+a+";":(r+=u(i)+":",r+=(0,e.default)(i,a,n)+";"))}}return r||null};var e=o(z),r=o(I),i=o(E);function o(t){return t&&t.__esModule?t:{default:t}}var u=n.processStyleName=(0,i.default)(r.default)})),R=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(t){return Array.isArray(t)?(i=!1,o=[],(n=t).forEach((function(t){var n=r(t);null!==n&&n===t||(i=!0),null!==n&&o.push(n)})),0==o.length?null:i?o:n):function(t){if(function(t){return null==t||!1===t||"object"===(void 0===t?"undefined":e(t))&&0===Object.keys(t).length}(t))return null;if("object"!==(void 0===t?"undefined":e(t)))return t;for(var n={},i=Object.keys(t),o=!1,u=0;u<i.length;u++){var a=t[i[u]],s=r(a);null!==s&&s===a||(o=!0),null!==s&&(n[i[u]]=s)}return 0===Object.keys(n).length?null:o?n:t}(t);var n,i,o}n.default=r})),q=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e=["Webkit"],r=["Moz"],i=["ms"],o=["Webkit","Moz"],u=["Webkit","ms"],a=["Webkit","Moz","ms"];n.default={plugins:[],prefixMap:{appearance:o,userSelect:a,textEmphasisPosition:e,textEmphasis:e,textEmphasisStyle:e,textEmphasisColor:e,boxDecorationBreak:e,clipPath:e,maskImage:e,maskMode:e,maskRepeat:e,maskPosition:e,maskClip:e,maskOrigin:e,maskSize:e,maskComposite:e,mask:e,maskBorderSource:e,maskBorderMode:e,maskBorderSlice:e,maskBorderWidth:e,maskBorderOutset:e,maskBorderRepeat:e,maskBorder:e,maskType:e,textDecorationStyle:e,textDecorationSkip:e,textDecorationLine:e,textDecorationColor:e,filter:e,fontFeatureSettings:e,breakAfter:a,breakBefore:a,breakInside:a,columnCount:o,columnFill:o,columnGap:o,columnRule:o,columnRuleColor:o,columnRuleStyle:o,columnRuleWidth:o,columns:o,columnSpan:o,columnWidth:o,writingMode:u,flex:e,flexBasis:e,flexDirection:e,flexGrow:e,flexFlow:e,flexShrink:e,flexWrap:e,alignContent:e,alignItems:e,alignSelf:e,justifyContent:e,order:e,transform:e,transformOrigin:e,transformOriginX:e,transformOriginY:e,backfaceVisibility:e,perspective:e,perspectiveOrigin:e,transformStyle:e,transformOriginZ:e,animation:e,animationDelay:e,animationDirection:e,animationFillMode:e,animationDuration:e,animationIterationCount:e,animationName:e,animationPlayState:e,animationTimingFunction:e,backdropFilter:e,fontKerning:e,scrollSnapType:u,scrollSnapPointsX:u,scrollSnapPointsY:u,scrollSnapDestination:u,scrollSnapCoordinate:u,shapeImageThreshold:e,shapeImageMargin:e,shapeImageOutside:e,hyphens:a,flowInto:u,flowFrom:u,regionFragment:u,textAlignLast:r,tabSize:r,wrapFlow:i,wrapThrough:i,wrapMargin:i,gridTemplateColumns:i,gridTemplateRows:i,gridTemplateAreas:i,gridTemplate:i,gridAutoColumns:i,gridAutoRows:i,gridAutoFlow:i,grid:i,gridRowStart:i,gridColumnStart:i,gridRowEnd:i,gridRow:i,gridColumn:i,gridColumnEnd:i,gridColumnGap:i,gridRowGap:i,gridArea:i,gridGap:i,textSizeAdjust:u,borderImage:e,borderImageOutset:e,borderImageRepeat:e,borderImageSlice:e,borderImageSource:e,borderImageWidth:e,transitionDelay:e,transitionDuration:e,transitionProperty:e,transitionTimingFunction:e}},t.exports=n.default})),T=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},t.exports=n.default})),P=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,e){if(t.hasOwnProperty(n))for(var i=t[n],o=0,u=i.length;o<u;++o)e[i[o]+(0,r.default)(n)]=e[n]};var e,r=(e=T)&&e.__esModule?e:{default:e};t.exports=n.default})),D=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,e,r,i){for(var o=0,u=t.length;o<u;++o){var a=t[o](n,e,r,i);if(a)return a}},t.exports=n.default})),B=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("cursor"===t&&r.hasOwnProperty(n))return e.map((function(t){return t+n}))};var e=["-webkit-","-moz-",""],r={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};t.exports=n.default})),N=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return"string"==typeof t&&e.test(t)};var e=/-webkit-|-moz-|-ms-/;t.exports=n.default})),G=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&n.indexOf("cross-fade(")>-1)return i.map((function(t){return n.replace(/cross-fade\(/g,t+"cross-fade(")}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-",""];t.exports=n.default})),L=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&n.indexOf("filter(")>-1)return i.map((function(t){return n.replace(/filter\(/g,t+"filter(")}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-",""];t.exports=n.default})),$=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("display"===t&&e.hasOwnProperty(n))return e[n]};var e={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};t.exports=n.default})),H=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,i){"flexDirection"===t&&"string"==typeof n&&(i.WebkitBoxOrient=n.indexOf("column")>-1?"vertical":"horizontal",i.WebkitBoxDirection=n.indexOf("reverse")>-1?"reverse":"normal"),r.hasOwnProperty(t)&&(i[r[t]]=e[n]||n)};var e={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},r={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};t.exports=n.default})),Z=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&o.test(n))return i.map((function(t){return t+n}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-","-moz-",""],o=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;t.exports=n.default})),U=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&n.indexOf("image-set(")>-1)return i.map((function(t){return n.replace(/image-set\(/g,t+"image-set(")}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-",""];t.exports=n.default})),X=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("position"===t&&"sticky"===n)return["-webkit-sticky","sticky"]},t.exports=n.default})),Y=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if(r.hasOwnProperty(t)&&i.hasOwnProperty(n))return e.map((function(t){return t+n}))};var e=["-webkit-","-moz-",""],r={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},i={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};t.exports=n.default})),J=/[A-Z]/g,V=/^ms-/,K={};function Q(t){return"-"+t.toLowerCase()}const tt=n(Object.freeze({__proto__:null,default:function(t){if(K.hasOwnProperty(t))return K[t];var n=t.replace(J,Q);return K[t]=V.test(n)?"-"+n:n}}));var nt=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return(0,r.default)(t)};var e,r=(e=tt)&&e.__esModule?e:{default:e};t.exports=n.default})),et=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,o,s){if("string"==typeof n&&u.hasOwnProperty(t)){var c=function(t,n){if((0,r.default)(t))return t;for(var i=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,u=i.length;o<u;++o){var s=i[o],c=[s];for(var l in n){var f=(0,e.default)(l);if(s.indexOf(f)>-1&&"order"!==f)for(var h=n[l],d=0,b=h.length;d<b;++d)c.unshift(s.replace(f,a[h[d]]+f))}i[o]=c.join(",")}return i.join(",")}(n,s),l=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(t){return!/-moz-|-ms-/.test(t)})).join(",");if(t.indexOf("Webkit")>-1)return l;var f=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(t){return!/-webkit-|-ms-/.test(t)})).join(",");return t.indexOf("Moz")>-1?f:(o["Webkit"+(0,i.default)(t)]=l,o["Moz"+(0,i.default)(t)]=f,c)}};var e=o(nt),r=o(N),i=o(T);function o(t){return t&&t.__esModule?t:{default:t}}var u={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},a={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};t.exports=n.default})),rt=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){for(var n in t){var e=(0,i.default)(g,n,t[n],t,p);e&&(t[n]=e),(0,r.default)(p,n,t)}return t};var e=m(q),r=m(P),i=m(D),o=m(B),u=m(G),a=m(L),s=m($),c=m(H),l=m(Z),f=m(U),h=m(X),d=m(Y),b=m(et);function m(t){return t&&t.__esModule?t:{default:t}}var g=[u.default,o.default,a.default,c.default,l.default,f.default,h.default,d.default,b.default,s.default],p=e.default.prefixMap})),it=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};n.PluginSet=u,n.fallbacks=function(t){if(Object.keys(t.style).map((function(n){return Array.isArray(t.style[n])})).indexOf(!0)>=0){var n=t.style,e=Object.keys(n).reduce((function(t,e){return t[e]=Array.isArray(n[e])?n[e].join("; "+(0,F.processStyleName)(e)+": "):n[e],t}),{});return(0,r.default)({},t,{style:e})}return t},n.contentWrap=function(t){if(t.style.content){var n=t.style.content;return a.indexOf(n)>=0||/^(attr|calc|counters?|url)\(/.test(n)?t:n.charAt(0)!==n.charAt(n.length-1)||'"'!==n.charAt(0)&&"'"!==n.charAt(0)?e({},t,{style:e({},t.style,{content:'"'+n+'"'})}):t}return t},n.prefixes=function(t){return(0,r.default)({},t,{style:(0,i.default)(e({},t.style))})};var r=o(_),i=o(rt);function o(t){return t&&t.__esModule?t:{default:t}}function u(t){this.fns=t||[]}(0,r.default)(u.prototype,{add:function(){for(var t=this,n=arguments.length,e=Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach((function(n){t.fns.indexOf(n)>=0||(t.fns=[n].concat(t.fns))}))},remove:function(t){this.fns=this.fns.filter((function(n){return n!==t}))},clear:function(){this.fns=[]},transform:function(t){return this.fns.reduce((function(t,n){return n(t)}),t)}});var a=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit"]})),ot=t((function(t,n){function e(t,n){return t.charCodeAt(n++)+(t.charCodeAt(n++)<<8)+(t.charCodeAt(n++)<<16)+(t.charCodeAt(n)<<24)}function r(t,n){return t.charCodeAt(n++)+(t.charCodeAt(n++)<<8)}function i(t,n){return(65535&(t|=0))*(n|=0)+(((t>>>16)*n&65535)<<16)|0}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){for(var o=1540483477,u=n^t.length,a=t.length,s=0;a>=4;){var c=e(t,s);c=i(c,o),c=i(c^=c>>>24,o),u=i(u,o),u^=c,s+=4,a-=4}switch(a){case 3:u^=r(t,s),u=i(u^=t.charCodeAt(s+2)<<16,o);break;case 2:u=i(u^=r(t,s),o);break;case 1:u=i(u^=t.charCodeAt(s),o)}return u=i(u^=u>>>13,o),(u^=u>>>15)>>>0}})),ut=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.compose=n.merge=n.$=n.style=n.presets=n.keyframes=n.fontFace=n.insertGlobal=n.insertRule=n.plugins=n.styleSheet=void 0,n.speedy=function(t){return a.speedy(t)},n.simulations=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];l=!!t},n.simulate=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return(n=(0,r.default)(n))?l?n.reduce((function(t,n){return t["data-simulate-"+b(n)]="",t}),{}):(f||(console.warn("can't simulate without once calling simulations(true)"),f=!0),h||(console.warn("don't use simulation outside dev"),h=!0),{}):{}},n.cssLabels=function(t){d=!!t},n.isLikeRule=g,n.idFor=p,n.css=G,n.rehydrate=function(t){(0,e.default)(j,t.reduce((function(t,n){return t[n]=!0,t}),{}))},n.flush=function(){j=a.inserted={},x=a.registered={},z={},a.flush(),a.inject()},n.select=$,n.parent=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return G(u({},t+" &",e))},n.media=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return G(u({},"@media "+t,e))},n.pseudo=H,n.active=function(t){return H(":active",t)},n.any=function(t){return H(":any",t)},n.checked=function(t){return H(":checked",t)},n.disabled=function(t){return H(":disabled",t)},n.empty=function(t){return H(":empty",t)},n.enabled=function(t){return H(":enabled",t)},n._default=function(t){return H(":default",t)},n.first=function(t){return H(":first",t)},n.firstChild=function(t){return H(":first-child",t)},n.firstOfType=function(t){return H(":first-of-type",t)},n.fullscreen=function(t){return H(":fullscreen",t)},n.focus=function(t){return H(":focus",t)},n.hover=function(t){return H(":hover",t)},n.indeterminate=function(t){return H(":indeterminate",t)},n.inRange=function(t){return H(":in-range",t)},n.invalid=function(t){return H(":invalid",t)},n.lastChild=function(t){return H(":last-child",t)},n.lastOfType=function(t){return H(":last-of-type",t)},n.left=function(t){return H(":left",t)},n.link=function(t){return H(":link",t)},n.onlyChild=function(t){return H(":only-child",t)},n.onlyOfType=function(t){return H(":only-of-type",t)},n.optional=function(t){return H(":optional",t)},n.outOfRange=function(t){return H(":out-of-range",t)},n.readOnly=function(t){return H(":read-only",t)},n.readWrite=function(t){return H(":read-write",t)},n.required=function(t){return H(":required",t)},n.right=function(t){return H(":right",t)},n.root=function(t){return H(":root",t)},n.scope=function(t){return H(":scope",t)},n.target=function(t){return H(":target",t)},n.valid=function(t){return H(":valid",t)},n.visited=function(t){return H(":visited",t)},n.dir=function(t,n){return H(":dir("+t+")",n)},n.lang=function(t,n){return H(":lang("+t+")",n)},n.not=function(t,n){var e=t.split(",").map((function(t){return t.trim()})).map((function(t){return":not("+t+")"}));return 1===e.length?H(":not("+t+")",n):$(e.join(""),n)},n.nthChild=function(t,n){return H(":nth-child("+t+")",n)},n.nthLastChild=function(t,n){return H(":nth-last-child("+t+")",n)},n.nthLastOfType=function(t,n){return H(":nth-last-of-type("+t+")",n)},n.nthOfType=function(t,n){return H(":nth-of-type("+t+")",n)},n.after=function(t){return H("::after",t)},n.before=function(t){return H("::before",t)},n.firstLetter=function(t){return H("::first-letter",t)},n.firstLine=function(t){return H("::first-line",t)},n.selection=function(t){return H("::selection",t)},n.backdrop=function(t){return H("::backdrop",t)},n.placeholder=function(t){return G({"::placeholder":t})},n.cssFor=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return(n=(0,r.default)(n))?n.map((function(t){var n={label:[]};return q(n,{src:t}),O(m(n),M(n)).join("")})).join(""):""},n.attribsFor=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];var i=(n=(0,r.default)(n))?n.map((function(t){p(t);var n=Object.keys(t)[0];return n+'="'+(t[n]||"")+'"'})).join(" "):"";return i};var e=o(_),r=o(R),i=o(ot);function o(t){return t&&t.__esModule?t:{default:t}}function u(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var a=n.styleSheet=new S.StyleSheet;a.inject();var s=n.plugins=a.plugins=new it.PluginSet([it.prefixes,it.contentWrap,it.fallbacks]);s.media=new it.PluginSet,s.fontFace=new it.PluginSet,s.keyframes=new it.PluginSet([it.prefixes,it.fallbacks]);var c="undefined"!=typeof window,l=false,f=!1,h=!1,d=false;function b(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.toLowerCase().replace(/[^a-z0-9]/g,n)}function m(t){var n=JSON.stringify(t);return(0,i.default)(n).toString(36)}function g(t){var n=Object.keys(t).filter((function(t){return"toString"!==t}));return 1===n.length&&!!/data\-css\-([a-zA-Z0-9\-_]+)/.exec(n[0])}function p(t){var n=Object.keys(t).filter((function(t){return"toString"!==t}));if(1!==n.length)throw new Error("not a rule");var e=/data\-css\-([a-zA-Z0-9\-_]+)/.exec(n[0]);if(!e)throw new Error("not a rule");return e[1]}var v=/[(),]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\//g;function y(t){if(-1===t.indexOf(","))return[t];for(var n,e=[],r=[],i=0;n=v.exec(t);)switch(n[0]){case"(":i++;break;case")":i--;break;case",":if(i)break;e.push(n.index)}for(n=e.length;n--;)r.unshift(t.slice(e[n]+1)),t=t.slice(0,e[n]);return r.unshift(t),r}function k(t,n){if(!t)return n.replace(/\&/g,"");if(!n)return".css-"+t+",[data-css-"+t+"]";var e=y(n).map((function(n){return n.indexOf("&")>=0?[n.replace(/\&/gm,".css-"+t),n.replace(/\&/gm,"[data-css-"+t+"]")].join(","):".css-"+t+n+",[data-css-"+t+"]"+n})).join(",");return l&&/^\&\:/.exec(n)&&!/\s/.exec(n)&&(e+=",.css-"+t+"[data-simulate-"+b(n)+"],[data-css-"+t+"][data-simulate-"+b(n)+"]"),e}function w(t){var n=s.transform({selector:t.selector,style:t.style});return n.selector+"{"+(0,F.createMarkupForStyles)(n.style)+"}"}function M(t){var n=void 0,e=void 0,r=void 0,i=void 0;return Object.keys(t).forEach((function(o){o.indexOf("&")>=0?(e=e||{})[o]=t[o]:0===o.indexOf("@media")?(r=r||{})[o]=M(t[o]):0===o.indexOf("@supports")?(i=i||{})[o]=M(t[o]):"label"===o?t.label.length>0&&((n=n||{}).label=d?t.label.join("."):""):(n=n||{})[o]=t[o]})),{plain:n,selects:e,medias:r,supports:i}}function O(t,n){var e=[],r=n.plain,i=n.selects,o=n.medias,u=n.supports;return r&&e.push(w({style:r,selector:k(t)})),i&&Object.keys(i).forEach((function(n){return e.push(w({style:i[n],selector:k(t,n)}))})),o&&Object.keys(o).forEach((function(n){return e.push(n+"{"+O(t,o[n]).join("")+"}")})),u&&Object.keys(u).forEach((function(n){return e.push(n+"{"+O(t,u[n]).join("")+"}")})),e}var j=a.inserted={},x=a.registered={};function A(t){x[t.id]||(x[t.id]=t)}var z={};function W(t,n){var e=y(t).map((function(t){return t.indexOf("&")>=0?t:"&"+t}));return y(n).map((function(t){return t.indexOf("&")>=0?t:"&"+t})).reduce((function(t,n){return t.concat(e.map((function(t){return n.replace(/\&/g,t)})))}),[]).join(",")}function C(t,n){return t?"@supports "+t.substring(9)+" and "+n.substring(9):n}function I(t){for(var n=[],e=0;e<t.length;e++)n=Array.isArray(t[e])?n.concat(I(t[e])):n.concat(t[e]);return n}var E={"::placeholder":["::-webkit-input-placeholder","::-moz-placeholder","::-ms-input-placeholder"],":fullscreen":[":-webkit-full-screen",":-moz-full-screen",":-ms-fullscreen"]};function q(t,n){var e=n.selector,i=void 0===e?"":e,o=n.mq,u=void 0===o?"":o,a=n.supp,s=void 0===a?"":a,c=n.src,l=void 0===c?{}:c;Array.isArray(l)||(l=[l]),(l=I(l)).forEach((function(n){if(g(n)){var e=function(t){if(g(t)){var n=x[p(t)];if(null==n)throw new Error("[glamor] an unexpected rule cache miss occurred. This is probably a sign of multiple glamor instances in your app. See https://github.com/threepointone/glamor/issues/79");return n}return t}(n);if("css"!==e.type)throw new Error("cannot merge this rule");n=e.style}(n=(0,r.default)(n))&&n.composes&&q(t,{selector:i,mq:u,supp:s,src:n.composes}),Object.keys(n||{}).forEach((function(e){if(function(t){for(var n=[":",".","[",">"," "],e=!1,r=t.charAt(0),i=0;i<n.length;i++)if(r===n[i]){e=!0;break}return e||t.indexOf("&")>=0}(e))E[e]&&E[e].forEach((function(r){return q(t,{selector:W(i,r),mq:u,supp:s,src:n[e]})})),q(t,{selector:W(i,e),mq:u,supp:s,src:n[e]});else if(function(t){return 0===t.indexOf("@media")}(e))q(t,{selector:i,mq:(o=u,a=e,o?"@media "+o.substring(6)+" and "+a.substring(6):a),supp:s,src:n[e]});else if(function(t){return 0===t.indexOf("@supports")}(e))q(t,{selector:i,mq:u,supp:C(s,e),src:n[e]});else if("composes"===e);else{var r=t;s&&(r[s]=r[s]||{},r=r[s]),u&&(r[u]=r[u]||{},r=r[u]),i&&(r[i]=r[i]||{},r=r[i]),"label"===e?d&&(t.label=t.label.concat(n.label)):r[e]=n[e]}var o,a}))}))}function T(t){var n={label:[]};return q(n,{src:t}),function(t){if(A(t),function(t){if(!j[t.id]){j[t.id]=!0;var n=M(t.style),e=O(t.id,n);j[t.id]=!!c||e,e.forEach((function(t){return a.insert(t)}))}}(t),z[t.id])return z[t.id];var n=u({},"data-css-"+t.id,d&&t.label||"");return Object.defineProperty(n,"toString",{enumerable:!1,value:function(){return"css-"+t.id}}),z[t.id]=n,n}({id:m(n),style:n,label:d?n.label.join("."):"",type:"css"})}var P={};Object.defineProperty(P,"toString",{enumerable:!1,value:function(){return"css-nil"}});var D,B="undefined"!=typeof WeakMap?[P,new WeakMap,new WeakMap,new WeakMap]:[P],N="undefined"!=typeof WeakMap?(D=T,function(t){if(B[t.length]){for(var n=B[t.length],e=0;e<t.length-1;)n.has(t[e])||n.set(t[e],new WeakMap),n=n.get(t[e]),e++;if(n.has(t[t.length-1])){var r=n.get(t[e]);if(x[r.toString().substring(4)])return r}}var i=D(t);if(B[t.length]){for(var o=0,u=B[t.length];o<t.length-1;)u=u.get(t[o]),o++;try{u.set(t[o],i)}catch(t){}}return i}):T;function G(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];if(n[0]&&n[0].length&&n[0].raw)throw new Error("you forgot to include glamor/babel in your babel plugins.");return(n=(0,r.default)(n))?N(n):P}n.insertRule=G.insert=function(t){var n={id:m(t),css:t,type:"raw"};A(n),j[n.id]||(a.insert(n.css),j[n.id]=!!c||[n.css])},n.insertGlobal=G.global=function(t,n){if(n=(0,r.default)(n))return G.insert(w({selector:t,style:n}))},G.keyframes=function(t,n){n||(n=t,t="animation");var e={id:m({name:t,kfs:n=(0,r.default)(n)||{}}),type:"keyframes",name:t,keyframes:n};return A(e),function(t){if(!j[t.id]){var n=Object.keys(t.keyframes).map((function(n){var e=s.keyframes.transform({id:t.id,name:n,style:t.keyframes[n]});return e.name+"{"+(0,F.createMarkupForStyles)(e.style)+"}"})).join(""),e=["-webkit-","-moz-","-o-",""].map((function(e){return"@"+e+"keyframes "+t.name+"_"+t.id+"{"+n+"}"}));e.forEach((function(t){return a.insert(t)})),j[t.id]=!!c||e}}(e),t+"_"+e.id},n.fontFace=G.fontFace=function(t){var n={id:m(t=(0,r.default)(t)),type:"font-face",font:t};return A(n),function(t){if(!j[t.id]){var n="@font-face{"+(0,F.createMarkupForStyles)(t.font)+"}";a.insert(n),j[t.id]=!!c||[n]}}(n),t.fontFamily},n.keyframes=G.keyframes,n.presets={mobile:"(min-width: 400px)",Mobile:"@media (min-width: 400px)",phablet:"(min-width: 550px)",Phablet:"@media (min-width: 550px)",tablet:"(min-width: 750px)",Tablet:"@media (min-width: 750px)",desktop:"(min-width: 1000px)",Desktop:"@media (min-width: 1000px)",hd:"(min-width: 1200px)",Hd:"@media (min-width: 1200px)"};var L=n.style=G;function $(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return t?G(u({},t,e)):L(e)}function H(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return G(u({},t,e))}n.$=$,n.merge=G,n.compose=G}));export{w as c,ut as l}
|
|
6
|
+
*/function x(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var _=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var n={},e=0;e<10;e++)n["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(t){return n[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,n){for(var e,r,i=x(t),o=1;o<arguments.length;o++){for(var u in e=Object(arguments[o]))O.call(e,u)&&(i[u]=e[u]);if(M){r=M(e);for(var a=0;a<r.length;a++)j.call(e,r[a])&&(i[r[a]]=e[r[a]])}}return i},S=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.StyleSheet=c;var e,r=(e=_)&&e.__esModule?e:{default:e};function i(t){return t[t.length-1]}function o(t){if(t.sheet)return t.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===t)return document.styleSheets[n]}var u="undefined"!=typeof window,a=function(){if(u){var t=document.createElement("div");return t.innerHTML="\x3c!--[if lt IE 10]><i></i><![endif]--\x3e",1===t.getElementsByTagName("i").length}}();function s(){var t=document.createElement("style");return t.type="text/css",t.setAttribute("data-glamor",""),t.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(t),t}function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.speedy,e=void 0===n||n,r=t.maxLength,i=void 0===r?u&&a?4e3:65e3:r;this.isSpeedy=e,this.sheet=void 0,this.tags=[],this.maxLength=i,this.ctr=0}(0,r.default)(c.prototype,{getSheet:function(){return o(i(this.tags))},inject:function(){var t=this;if(this.injected)throw new Error("already injected stylesheet!");u?this.tags[0]=s():this.sheet={cssRules:[],insertRule:function(n){t.sheet.cssRules.push({cssText:n})}},this.injected=!0},speedy:function(t){if(0!==this.ctr)throw new Error("cannot change speedy mode after inserting any rule to sheet. Either call speedy("+t+") earlier in your app, or call flush() before speedy("+t+")");this.isSpeedy=!!t},_insert:function(t){try{var n=this.getSheet();n.insertRule(t,-1!==t.indexOf("@import")?0:n.cssRules.length)}catch(t){}},insert:function(t){if(u)if(this.isSpeedy&&this.getSheet().insertRule)this._insert(t);else if(-1!==t.indexOf("@import")){var n=i(this.tags);n.insertBefore(document.createTextNode(t),n.firstChild)}else i(this.tags).appendChild(document.createTextNode(t));else this.sheet.insertRule(t,-1!==t.indexOf("@import")?0:this.sheet.cssRules.length);return this.ctr++,u&&this.ctr%this.maxLength==0&&this.tags.push(s()),this.ctr-1},delete:function(t){return this.replace(t,"")},flush:function(){u?(this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.sheet=null,this.ctr=0):this.sheet.cssRules=[],this.injected=!1},rules:function(){if(!u)return this.sheet.cssRules;var t=[];return this.tags.forEach((function(n){return t.splice.apply(t,[t.length,0].concat(function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}(Array.from(o(n).cssRules))))})),t}})})),A=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowStart:!0,gridRowEnd:!0,gridColumn:!0,gridColumnStart:!0,gridColumnEnd:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];Object.keys(e).forEach((function(t){r.forEach((function(n){e[function(t,n){return t+n.charAt(0).toUpperCase()+n.substring(1)}(n,t)]=e[t]}))})),n.default={isUnitlessNumber:e,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}}})),z=t((function(t,n){var e;Object.defineProperty(n,"__esModule",{value:!0});var r=((e=A)&&e.__esModule?e:{default:e}).default.isUnitlessNumber;n.default=function(t,n){return null==n||"boolean"==typeof n||""===n?"":isNaN(n)||0===n||r.hasOwnProperty(t)&&r[t]?""+n:("string"==typeof n&&(n=n.trim()),n+"px")}})),W=/([A-Z])/g,C=/^ms-/,I=function(t){return function(t){return t.replace(W,"-$1").toLowerCase()}(t).replace(C,"-ms-")},E=function(t){var n={};return function(e){return n.hasOwnProperty(e)||(n[e]=t.call(this,e)),n[e]}},F=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.processStyleName=void 0,n.createMarkupForStyles=function(t,n){var r="";for(var i in t){var o=0===i.indexOf("--");if(t.hasOwnProperty(i)&&"label"!==i){var a=t[i];null!=a&&(o?r+=i+":"+a+";":(r+=u(i)+":",r+=(0,e.default)(i,a,n)+";"))}}return r||null};var e=o(z),r=o(I),i=o(E);function o(t){return t&&t.__esModule?t:{default:t}}var u=n.processStyleName=(0,i.default)(r.default)})),R=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(t){return Array.isArray(t)?(i=!1,o=[],(n=t).forEach((function(t){var n=r(t);null!==n&&n===t||(i=!0),null!==n&&o.push(n)})),0==o.length?null:i?o:n):function(t){if(function(t){return null==t||!1===t||"object"===(void 0===t?"undefined":e(t))&&0===Object.keys(t).length}(t))return null;if("object"!==(void 0===t?"undefined":e(t)))return t;for(var n={},i=Object.keys(t),o=!1,u=0;u<i.length;u++){var a=t[i[u]],s=r(a);null!==s&&s===a||(o=!0),null!==s&&(n[i[u]]=s)}return 0===Object.keys(n).length?null:o?n:t}(t);var n,i,o}n.default=r})),q=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e=["Webkit"],r=["Moz"],i=["ms"],o=["Webkit","Moz"],u=["Webkit","ms"],a=["Webkit","Moz","ms"];n.default={plugins:[],prefixMap:{appearance:o,userSelect:a,textEmphasisPosition:e,textEmphasis:e,textEmphasisStyle:e,textEmphasisColor:e,boxDecorationBreak:e,clipPath:e,maskImage:e,maskMode:e,maskRepeat:e,maskPosition:e,maskClip:e,maskOrigin:e,maskSize:e,maskComposite:e,mask:e,maskBorderSource:e,maskBorderMode:e,maskBorderSlice:e,maskBorderWidth:e,maskBorderOutset:e,maskBorderRepeat:e,maskBorder:e,maskType:e,textDecorationStyle:e,textDecorationSkip:e,textDecorationLine:e,textDecorationColor:e,filter:e,fontFeatureSettings:e,breakAfter:a,breakBefore:a,breakInside:a,columnCount:o,columnFill:o,columnGap:o,columnRule:o,columnRuleColor:o,columnRuleStyle:o,columnRuleWidth:o,columns:o,columnSpan:o,columnWidth:o,writingMode:u,flex:e,flexBasis:e,flexDirection:e,flexGrow:e,flexFlow:e,flexShrink:e,flexWrap:e,alignContent:e,alignItems:e,alignSelf:e,justifyContent:e,order:e,transform:e,transformOrigin:e,transformOriginX:e,transformOriginY:e,backfaceVisibility:e,perspective:e,perspectiveOrigin:e,transformStyle:e,transformOriginZ:e,animation:e,animationDelay:e,animationDirection:e,animationFillMode:e,animationDuration:e,animationIterationCount:e,animationName:e,animationPlayState:e,animationTimingFunction:e,backdropFilter:e,fontKerning:e,scrollSnapType:u,scrollSnapPointsX:u,scrollSnapPointsY:u,scrollSnapDestination:u,scrollSnapCoordinate:u,shapeImageThreshold:e,shapeImageMargin:e,shapeImageOutside:e,hyphens:a,flowInto:u,flowFrom:u,regionFragment:u,textAlignLast:r,tabSize:r,wrapFlow:i,wrapThrough:i,wrapMargin:i,gridTemplateColumns:i,gridTemplateRows:i,gridTemplateAreas:i,gridTemplate:i,gridAutoColumns:i,gridAutoRows:i,gridAutoFlow:i,grid:i,gridRowStart:i,gridColumnStart:i,gridRowEnd:i,gridRow:i,gridColumn:i,gridColumnEnd:i,gridColumnGap:i,gridRowGap:i,gridArea:i,gridGap:i,textSizeAdjust:u,borderImage:e,borderImageOutset:e,borderImageRepeat:e,borderImageSlice:e,borderImageSource:e,borderImageWidth:e,transitionDelay:e,transitionDuration:e,transitionProperty:e,transitionTimingFunction:e}},t.exports=n.default})),T=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},t.exports=n.default})),P=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,e){if(t.hasOwnProperty(n))for(var i=t[n],o=0,u=i.length;o<u;++o)e[i[o]+(0,r.default)(n)]=e[n]};var e,r=(e=T)&&e.__esModule?e:{default:e};t.exports=n.default})),D=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,e,r,i){for(var o=0,u=t.length;o<u;++o){var a=t[o](n,e,r,i);if(a)return a}},t.exports=n.default})),B=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("cursor"===t&&r.hasOwnProperty(n))return e.map((function(t){return t+n}))};var e=["-webkit-","-moz-",""],r={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};t.exports=n.default})),N=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return"string"==typeof t&&e.test(t)};var e=/-webkit-|-moz-|-ms-/;t.exports=n.default})),G=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&n.indexOf("cross-fade(")>-1)return i.map((function(t){return n.replace(/cross-fade\(/g,t+"cross-fade(")}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-",""];t.exports=n.default})),L=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&n.indexOf("filter(")>-1)return i.map((function(t){return n.replace(/filter\(/g,t+"filter(")}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-",""];t.exports=n.default})),$=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("display"===t&&e.hasOwnProperty(n))return e[n]};var e={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};t.exports=n.default})),H=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,i){"flexDirection"===t&&"string"==typeof n&&(i.WebkitBoxOrient=n.indexOf("column")>-1?"vertical":"horizontal",i.WebkitBoxDirection=n.indexOf("reverse")>-1?"reverse":"normal"),r.hasOwnProperty(t)&&(i[r[t]]=e[n]||n)};var e={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},r={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};t.exports=n.default})),Z=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&o.test(n))return i.map((function(t){return t+n}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-","-moz-",""],o=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;t.exports=n.default})),U=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("string"==typeof n&&!(0,r.default)(n)&&n.indexOf("image-set(")>-1)return i.map((function(t){return n.replace(/image-set\(/g,t+"image-set(")}))};var e,r=(e=N)&&e.__esModule?e:{default:e},i=["-webkit-",""];t.exports=n.default})),X=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if("position"===t&&"sticky"===n)return["-webkit-sticky","sticky"]},t.exports=n.default})),Y=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if(r.hasOwnProperty(t)&&i.hasOwnProperty(n))return e.map((function(t){return t+n}))};var e=["-webkit-","-moz-",""],r={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},i={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};t.exports=n.default})),J=/[A-Z]/g,V=/^ms-/,K={};function Q(t){return"-"+t.toLowerCase()}const tt=n(Object.freeze({__proto__:null,default:function(t){if(K.hasOwnProperty(t))return K[t];var n=t.replace(J,Q);return K[t]=V.test(n)?"-"+n:n}}));var nt=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return(0,r.default)(t)};var e,r=(e=tt)&&e.__esModule?e:{default:e};t.exports=n.default})),et=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,o,s){if("string"==typeof n&&u.hasOwnProperty(t)){var c=function(t,n){if((0,r.default)(t))return t;for(var i=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,u=i.length;o<u;++o){var s=i[o],c=[s];for(var l in n){var f=(0,e.default)(l);if(s.indexOf(f)>-1&&"order"!==f)for(var h=n[l],d=0,b=h.length;d<b;++d)c.unshift(s.replace(f,a[h[d]]+f))}i[o]=c.join(",")}return i.join(",")}(n,s),l=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(t){return!/-moz-|-ms-/.test(t)})).join(",");if(t.indexOf("Webkit")>-1)return l;var f=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(t){return!/-webkit-|-ms-/.test(t)})).join(",");return t.indexOf("Moz")>-1?f:(o["Webkit"+(0,i.default)(t)]=l,o["Moz"+(0,i.default)(t)]=f,c)}};var e=o(nt),r=o(N),i=o(T);function o(t){return t&&t.__esModule?t:{default:t}}var u={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},a={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};t.exports=n.default})),rt=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){for(var n in t){var e=(0,i.default)(g,n,t[n],t,p);e&&(t[n]=e),(0,r.default)(p,n,t)}return t};var e=m(q),r=m(P),i=m(D),o=m(B),u=m(G),a=m(L),s=m($),c=m(H),l=m(Z),f=m(U),h=m(X),d=m(Y),b=m(et);function m(t){return t&&t.__esModule?t:{default:t}}var g=[u.default,o.default,a.default,c.default,l.default,f.default,h.default,d.default,b.default,s.default],p=e.default.prefixMap})),it=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};n.PluginSet=u,n.fallbacks=function(t){if(Object.keys(t.style).map((function(n){return Array.isArray(t.style[n])})).indexOf(!0)>=0){var n=t.style,e=Object.keys(n).reduce((function(t,e){return t[e]=Array.isArray(n[e])?n[e].join("; "+(0,F.processStyleName)(e)+": "):n[e],t}),{});return(0,r.default)({},t,{style:e})}return t},n.contentWrap=function(t){if(t.style.content){var n=t.style.content;return a.indexOf(n)>=0||/^(attr|calc|counters?|url)\(/.test(n)?t:n.charAt(0)!==n.charAt(n.length-1)||'"'!==n.charAt(0)&&"'"!==n.charAt(0)?e({},t,{style:e({},t.style,{content:'"'+n+'"'})}):t}return t},n.prefixes=function(t){return(0,r.default)({},t,{style:(0,i.default)(e({},t.style))})};var r=o(_),i=o(rt);function o(t){return t&&t.__esModule?t:{default:t}}function u(t){this.fns=t||[]}(0,r.default)(u.prototype,{add:function(){for(var t=this,n=arguments.length,e=Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach((function(n){t.fns.indexOf(n)>=0||(t.fns=[n].concat(t.fns))}))},remove:function(t){this.fns=this.fns.filter((function(n){return n!==t}))},clear:function(){this.fns=[]},transform:function(t){return this.fns.reduce((function(t,n){return n(t)}),t)}});var a=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit"]})),ot=t((function(t,n){function e(t,n){return t.charCodeAt(n++)+(t.charCodeAt(n++)<<8)+(t.charCodeAt(n++)<<16)+(t.charCodeAt(n)<<24)}function r(t,n){return t.charCodeAt(n++)+(t.charCodeAt(n++)<<8)}function i(t,n){return(65535&(t|=0))*(n|=0)+(((t>>>16)*n&65535)<<16)|0}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){for(var o=1540483477,u=n^t.length,a=t.length,s=0;a>=4;){var c=e(t,s);c=i(c,o),c=i(c^=c>>>24,o),u=i(u,o),u^=c,s+=4,a-=4}switch(a){case 3:u^=r(t,s),u=i(u^=t.charCodeAt(s+2)<<16,o);break;case 2:u=i(u^=r(t,s),o);break;case 1:u=i(u^=t.charCodeAt(s),o)}return u=i(u^=u>>>13,o),(u^=u>>>15)>>>0}})),ut=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.compose=n.merge=n.$=n.style=n.presets=n.keyframes=n.fontFace=n.insertGlobal=n.insertRule=n.plugins=n.styleSheet=void 0,n.speedy=function(t){return a.speedy(t)},n.simulations=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];l=!!t},n.simulate=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return(n=(0,r.default)(n))?l?n.reduce((function(t,n){return t["data-simulate-"+b(n)]="",t}),{}):(f||(console.warn("can't simulate without once calling simulations(true)"),f=!0),h||(console.warn("don't use simulation outside dev"),h=!0),{}):{}},n.cssLabels=function(t){d=!!t},n.isLikeRule=g,n.idFor=p,n.css=G,n.rehydrate=function(t){(0,e.default)(j,t.reduce((function(t,n){return t[n]=!0,t}),{}))},n.flush=function(){j=a.inserted={},x=a.registered={},z={},a.flush(),a.inject()},n.select=$,n.parent=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return G(u({},t+" &",e))},n.media=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return G(u({},"@media "+t,e))},n.pseudo=H,n.active=function(t){return H(":active",t)},n.any=function(t){return H(":any",t)},n.checked=function(t){return H(":checked",t)},n.disabled=function(t){return H(":disabled",t)},n.empty=function(t){return H(":empty",t)},n.enabled=function(t){return H(":enabled",t)},n._default=function(t){return H(":default",t)},n.first=function(t){return H(":first",t)},n.firstChild=function(t){return H(":first-child",t)},n.firstOfType=function(t){return H(":first-of-type",t)},n.fullscreen=function(t){return H(":fullscreen",t)},n.focus=function(t){return H(":focus",t)},n.hover=function(t){return H(":hover",t)},n.indeterminate=function(t){return H(":indeterminate",t)},n.inRange=function(t){return H(":in-range",t)},n.invalid=function(t){return H(":invalid",t)},n.lastChild=function(t){return H(":last-child",t)},n.lastOfType=function(t){return H(":last-of-type",t)},n.left=function(t){return H(":left",t)},n.link=function(t){return H(":link",t)},n.onlyChild=function(t){return H(":only-child",t)},n.onlyOfType=function(t){return H(":only-of-type",t)},n.optional=function(t){return H(":optional",t)},n.outOfRange=function(t){return H(":out-of-range",t)},n.readOnly=function(t){return H(":read-only",t)},n.readWrite=function(t){return H(":read-write",t)},n.required=function(t){return H(":required",t)},n.right=function(t){return H(":right",t)},n.root=function(t){return H(":root",t)},n.scope=function(t){return H(":scope",t)},n.target=function(t){return H(":target",t)},n.valid=function(t){return H(":valid",t)},n.visited=function(t){return H(":visited",t)},n.dir=function(t,n){return H(":dir("+t+")",n)},n.lang=function(t,n){return H(":lang("+t+")",n)},n.not=function(t,n){var e=t.split(",").map((function(t){return t.trim()})).map((function(t){return":not("+t+")"}));return 1===e.length?H(":not("+t+")",n):$(e.join(""),n)},n.nthChild=function(t,n){return H(":nth-child("+t+")",n)},n.nthLastChild=function(t,n){return H(":nth-last-child("+t+")",n)},n.nthLastOfType=function(t,n){return H(":nth-last-of-type("+t+")",n)},n.nthOfType=function(t,n){return H(":nth-of-type("+t+")",n)},n.after=function(t){return H("::after",t)},n.before=function(t){return H("::before",t)},n.firstLetter=function(t){return H("::first-letter",t)},n.firstLine=function(t){return H("::first-line",t)},n.selection=function(t){return H("::selection",t)},n.backdrop=function(t){return H("::backdrop",t)},n.placeholder=function(t){return G({"::placeholder":t})},n.cssFor=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return(n=(0,r.default)(n))?n.map((function(t){var n={label:[]};return q(n,{src:t}),O(m(n),M(n)).join("")})).join(""):""},n.attribsFor=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];var i=(n=(0,r.default)(n))?n.map((function(t){p(t);var n=Object.keys(t)[0];return n+'="'+(t[n]||"")+'"'})).join(" "):"";return i};var e=o(_),r=o(R),i=o(ot);function o(t){return t&&t.__esModule?t:{default:t}}function u(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var a=n.styleSheet=new S.StyleSheet;a.inject();var s=n.plugins=a.plugins=new it.PluginSet([it.prefixes,it.contentWrap,it.fallbacks]);s.media=new it.PluginSet,s.fontFace=new it.PluginSet,s.keyframes=new it.PluginSet([it.prefixes,it.fallbacks]);var c="undefined"!=typeof window,l=false,f=!1,h=!1,d=false;function b(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.toLowerCase().replace(/[^a-z0-9]/g,n)}function m(t){var n=JSON.stringify(t);return(0,i.default)(n).toString(36)}function g(t){var n=Object.keys(t).filter((function(t){return"toString"!==t}));return 1===n.length&&!!/data\-css\-([a-zA-Z0-9\-_]+)/.exec(n[0])}function p(t){var n=Object.keys(t).filter((function(t){return"toString"!==t}));if(1!==n.length)throw new Error("not a rule");var e=/data\-css\-([a-zA-Z0-9\-_]+)/.exec(n[0]);if(!e)throw new Error("not a rule");return e[1]}var v=/[(),]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\//g;function y(t){if(-1===t.indexOf(","))return[t];for(var n,e=[],r=[],i=0;n=v.exec(t);)switch(n[0]){case"(":i++;break;case")":i--;break;case",":if(i)break;e.push(n.index)}for(n=e.length;n--;)r.unshift(t.slice(e[n]+1)),t=t.slice(0,e[n]);return r.unshift(t),r}function k(t,n){if(!t)return n.replace(/\&/g,"");if(!n)return".css-"+t+",[data-css-"+t+"]";var e=y(n).map((function(n){return n.indexOf("&")>=0?[n.replace(/\&/gm,".css-"+t),n.replace(/\&/gm,"[data-css-"+t+"]")].join(","):".css-"+t+n+",[data-css-"+t+"]"+n})).join(",");return l&&/^\&\:/.exec(n)&&!/\s/.exec(n)&&(e+=",.css-"+t+"[data-simulate-"+b(n)+"],[data-css-"+t+"][data-simulate-"+b(n)+"]"),e}function w(t){var n=s.transform({selector:t.selector,style:t.style});return n.selector+"{"+(0,F.createMarkupForStyles)(n.style)+"}"}function M(t){var n=void 0,e=void 0,r=void 0,i=void 0;return Object.keys(t).forEach((function(o){o.indexOf("&")>=0?(e=e||{})[o]=t[o]:0===o.indexOf("@media")?(r=r||{})[o]=M(t[o]):0===o.indexOf("@supports")?(i=i||{})[o]=M(t[o]):"label"===o?t.label.length>0&&((n=n||{}).label=d?t.label.join("."):""):(n=n||{})[o]=t[o]})),{plain:n,selects:e,medias:r,supports:i}}function O(t,n){var e=[],r=n.plain,i=n.selects,o=n.medias,u=n.supports;return r&&e.push(w({style:r,selector:k(t)})),i&&Object.keys(i).forEach((function(n){return e.push(w({style:i[n],selector:k(t,n)}))})),o&&Object.keys(o).forEach((function(n){return e.push(n+"{"+O(t,o[n]).join("")+"}")})),u&&Object.keys(u).forEach((function(n){return e.push(n+"{"+O(t,u[n]).join("")+"}")})),e}var j=a.inserted={},x=a.registered={};function A(t){x[t.id]||(x[t.id]=t)}var z={};function W(t,n){var e=y(t).map((function(t){return t.indexOf("&")>=0?t:"&"+t})),r=y(n).map((function(t){return t.indexOf("&")>=0?t:"&"+t}));return r.reduce((function(t,n){return t.concat(e.map((function(t){return n.replace(/\&/g,t)})))}),[]).join(",")}function C(t,n){return t?"@supports "+t.substring(9)+" and "+n.substring(9):n}function I(t){for(var n=[],e=0;e<t.length;e++)n=Array.isArray(t[e])?n.concat(I(t[e])):n.concat(t[e]);return n}var E={"::placeholder":["::-webkit-input-placeholder","::-moz-placeholder","::-ms-input-placeholder"],":fullscreen":[":-webkit-full-screen",":-moz-full-screen",":-ms-fullscreen"]};function q(t,n){var e=n.selector,i=void 0===e?"":e,o=n.mq,u=void 0===o?"":o,a=n.supp,s=void 0===a?"":a,c=n.src,l=void 0===c?{}:c;Array.isArray(l)||(l=[l]),(l=I(l)).forEach((function(n){if(g(n)){var e=function(t){if(g(t)){var n=x[p(t)];if(null==n)throw new Error("[glamor] an unexpected rule cache miss occurred. This is probably a sign of multiple glamor instances in your app. See https://github.com/threepointone/glamor/issues/79");return n}return t}(n);if("css"!==e.type)throw new Error("cannot merge this rule");n=e.style}(n=(0,r.default)(n))&&n.composes&&q(t,{selector:i,mq:u,supp:s,src:n.composes}),Object.keys(n||{}).forEach((function(e){if(function(t){for(var n=[":",".","[",">"," "],e=!1,r=t.charAt(0),i=0;i<n.length;i++)if(r===n[i]){e=!0;break}return e||t.indexOf("&")>=0}(e))E[e]&&E[e].forEach((function(r){return q(t,{selector:W(i,r),mq:u,supp:s,src:n[e]})})),q(t,{selector:W(i,e),mq:u,supp:s,src:n[e]});else if(function(t){return 0===t.indexOf("@media")}(e))q(t,{selector:i,mq:(o=u,a=e,o?"@media "+o.substring(6)+" and "+a.substring(6):a),supp:s,src:n[e]});else if(function(t){return 0===t.indexOf("@supports")}(e))q(t,{selector:i,mq:u,supp:C(s,e),src:n[e]});else if("composes"===e);else{var r=t;s&&(r[s]=r[s]||{},r=r[s]),u&&(r[u]=r[u]||{},r=r[u]),i&&(r[i]=r[i]||{},r=r[i]),"label"===e?d&&(t.label=t.label.concat(n.label)):r[e]=n[e]}var o,a}))}))}function T(t){var n={label:[]};return q(n,{src:t}),function(t){if(A(t),function(t){if(!j[t.id]){j[t.id]=!0;var n=M(t.style),e=O(t.id,n);j[t.id]=!!c||e,e.forEach((function(t){return a.insert(t)}))}}(t),z[t.id])return z[t.id];var n=u({},"data-css-"+t.id,d&&t.label||"");return Object.defineProperty(n,"toString",{enumerable:!1,value:function(){return"css-"+t.id}}),z[t.id]=n,n}({id:m(n),style:n,label:d?n.label.join("."):"",type:"css"})}var P={};Object.defineProperty(P,"toString",{enumerable:!1,value:function(){return"css-nil"}});var D,B="undefined"!=typeof WeakMap?[P,new WeakMap,new WeakMap,new WeakMap]:[P],N="undefined"!=typeof WeakMap?(D=T,function(t){if(B[t.length]){for(var n=B[t.length],e=0;e<t.length-1;)n.has(t[e])||n.set(t[e],new WeakMap),n=n.get(t[e]),e++;if(n.has(t[t.length-1])){var r=n.get(t[e]);if(x[r.toString().substring(4)])return r}}var i=D(t);if(B[t.length]){for(var o=0,u=B[t.length];o<t.length-1;)u=u.get(t[o]),o++;try{u.set(t[o],i)}catch(t){}}return i}):T;function G(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];if(n[0]&&n[0].length&&n[0].raw)throw new Error("you forgot to include glamor/babel in your babel plugins.");return(n=(0,r.default)(n))?N(n):P}G.insert=function(t){var n={id:m(t),css:t,type:"raw"};A(n),j[n.id]||(a.insert(n.css),j[n.id]=!!c||[n.css])},n.insertRule=G.insert,G.global=function(t,n){if(n=(0,r.default)(n))return G.insert(w({selector:t,style:n}))},n.insertGlobal=G.global,G.keyframes=function(t,n){n||(n=t,t="animation");var e={id:m({name:t,kfs:n=(0,r.default)(n)||{}}),type:"keyframes",name:t,keyframes:n};return A(e),function(t){if(!j[t.id]){var n=Object.keys(t.keyframes).map((function(n){var e=s.keyframes.transform({id:t.id,name:n,style:t.keyframes[n]});return e.name+"{"+(0,F.createMarkupForStyles)(e.style)+"}"})).join(""),e=["-webkit-","-moz-","-o-",""].map((function(e){return"@"+e+"keyframes "+t.name+"_"+t.id+"{"+n+"}"}));e.forEach((function(t){return a.insert(t)})),j[t.id]=!!c||e}}(e),t+"_"+e.id},n.fontFace=G.fontFace=function(t){var n={id:m(t=(0,r.default)(t)),type:"font-face",font:t};return A(n),function(t){if(!j[t.id]){var n="@font-face{"+(0,F.createMarkupForStyles)(t.font)+"}";a.insert(n),j[t.id]=!!c||[n]}}(n),t.fontFamily},n.keyframes=G.keyframes,n.presets={mobile:"(min-width: 400px)",Mobile:"@media (min-width: 400px)",phablet:"(min-width: 550px)",Phablet:"@media (min-width: 550px)",tablet:"(min-width: 750px)",Tablet:"@media (min-width: 750px)",desktop:"(min-width: 1000px)",Desktop:"@media (min-width: 1000px)",hd:"(min-width: 1200px)",Hd:"@media (min-width: 1200px)"};var L=n.style=G;function $(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return t?G(u({},t,e)):L(e)}function H(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return G(u({},t,e))}n.$=$,n.merge=G,n.compose=G}));export{w as c,ut as l}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { User } from '../../types/user';
|
|
2
|
+
import { ChatMessage, ChatRoom } from '../../types/chat';
|
|
3
|
+
export declare class ChatButton {
|
|
4
|
+
primaryColor: string;
|
|
5
|
+
accessToken: string;
|
|
6
|
+
senderId: string;
|
|
7
|
+
receiverId: string;
|
|
8
|
+
senderInfo: User;
|
|
9
|
+
receiverInfo: User;
|
|
10
|
+
chatRoom: ChatRoom;
|
|
11
|
+
chatMessages: ChatMessage[];
|
|
12
|
+
isChatExpanded: boolean;
|
|
13
|
+
componentWillLoad(): void;
|
|
14
|
+
componentDidLoad(): void;
|
|
15
|
+
componentWillUpdate(): void;
|
|
16
|
+
fetchData(): Promise<void>;
|
|
17
|
+
private onSubmitMessage;
|
|
18
|
+
private markMessagesAsRead;
|
|
19
|
+
private scrollToLastMessage;
|
|
20
|
+
private renderMessage;
|
|
21
|
+
private renderMessages;
|
|
22
|
+
private renderForm;
|
|
23
|
+
render(): any;
|
|
24
|
+
}
|
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
|
+
interface ChatButton {
|
|
10
|
+
"accessToken": string;
|
|
11
|
+
"fetchData": () => Promise<void>;
|
|
12
|
+
"primaryColor": string;
|
|
13
|
+
"receiverId": string;
|
|
14
|
+
"senderId": string;
|
|
15
|
+
}
|
|
9
16
|
interface GoogleMap {
|
|
10
17
|
"locationAddress"?: string;
|
|
11
18
|
"locationName"?: string;
|
|
@@ -100,6 +107,12 @@ export namespace Components {
|
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
109
|
declare global {
|
|
110
|
+
interface HTMLChatButtonElement extends Components.ChatButton, HTMLStencilElement {
|
|
111
|
+
}
|
|
112
|
+
var HTMLChatButtonElement: {
|
|
113
|
+
prototype: HTMLChatButtonElement;
|
|
114
|
+
new (): HTMLChatButtonElement;
|
|
115
|
+
};
|
|
103
116
|
interface HTMLGoogleMapElement extends Components.GoogleMap, HTMLStencilElement {
|
|
104
117
|
}
|
|
105
118
|
var HTMLGoogleMapElement: {
|
|
@@ -203,6 +216,7 @@ declare global {
|
|
|
203
216
|
new (): HTMLUserAvatarElement;
|
|
204
217
|
};
|
|
205
218
|
interface HTMLElementTagNameMap {
|
|
219
|
+
"chat-button": HTMLChatButtonElement;
|
|
206
220
|
"google-map": HTMLGoogleMapElement;
|
|
207
221
|
"salon-booking": HTMLSalonBookingElement;
|
|
208
222
|
"salon-booking-modal": HTMLSalonBookingModalElement;
|
|
@@ -223,6 +237,12 @@ declare global {
|
|
|
223
237
|
}
|
|
224
238
|
}
|
|
225
239
|
declare namespace LocalJSX {
|
|
240
|
+
interface ChatButton {
|
|
241
|
+
"accessToken"?: string;
|
|
242
|
+
"primaryColor"?: string;
|
|
243
|
+
"receiverId"?: string;
|
|
244
|
+
"senderId"?: string;
|
|
245
|
+
}
|
|
226
246
|
interface GoogleMap {
|
|
227
247
|
"locationAddress"?: string;
|
|
228
248
|
"locationName"?: string;
|
|
@@ -303,6 +323,7 @@ declare namespace LocalJSX {
|
|
|
303
323
|
"size"?: number;
|
|
304
324
|
}
|
|
305
325
|
interface IntrinsicElements {
|
|
326
|
+
"chat-button": ChatButton;
|
|
306
327
|
"google-map": GoogleMap;
|
|
307
328
|
"salon-booking": SalonBooking;
|
|
308
329
|
"salon-booking-modal": SalonBookingModal;
|
|
@@ -326,6 +347,7 @@ export { LocalJSX as JSX };
|
|
|
326
347
|
declare module "@stencil/core" {
|
|
327
348
|
export namespace JSX {
|
|
328
349
|
interface IntrinsicElements {
|
|
350
|
+
"chat-button": LocalJSX.ChatButton & JSXBase.HTMLAttributes<HTMLChatButtonElement>;
|
|
329
351
|
"google-map": LocalJSX.GoogleMap & JSXBase.HTMLAttributes<HTMLGoogleMapElement>;
|
|
330
352
|
"salon-booking": LocalJSX.SalonBooking & JSXBase.HTMLAttributes<HTMLSalonBookingElement>;
|
|
331
353
|
"salon-booking-modal": LocalJSX.SalonBookingModal & JSXBase.HTMLAttributes<HTMLSalonBookingModalElement>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { ChatMessage } from '../types/chat';
|
|
2
3
|
declare class HttpService {
|
|
3
4
|
http: AxiosInstance;
|
|
5
|
+
firebaseDatabase: any;
|
|
6
|
+
firebaseApp: any;
|
|
4
7
|
constructor();
|
|
5
8
|
fetchStyleDetail(styleId: number): Promise<{
|
|
6
9
|
styleInfo: any;
|
|
@@ -55,6 +58,18 @@ declare class HttpService {
|
|
|
55
58
|
total: number;
|
|
56
59
|
data: any[];
|
|
57
60
|
}>;
|
|
61
|
+
createChatRoom(receiverId: any, accessToken: any): Promise<any>;
|
|
62
|
+
private fetchRooms;
|
|
63
|
+
fetchChatRooms(accessToken: string): any;
|
|
64
|
+
fetchChatMessages(roomId: any, onDone: any): Promise<{}>;
|
|
65
|
+
markMessagesAsRead(roomId: any, roomMessages: ChatMessage[]): Promise<void>;
|
|
66
|
+
sendChatMessage(options: any): Promise<{
|
|
67
|
+
uid: string;
|
|
68
|
+
message: any;
|
|
69
|
+
unRead: number;
|
|
70
|
+
senderId: any;
|
|
71
|
+
timestamp: number;
|
|
72
|
+
}>;
|
|
58
73
|
}
|
|
59
74
|
declare const _default: () => HttpService;
|
|
60
75
|
export default _default;
|
|
@@ -133,7 +133,7 @@ export interface ListenOptions {
|
|
|
133
133
|
*/
|
|
134
134
|
passive?: boolean;
|
|
135
135
|
}
|
|
136
|
-
export
|
|
136
|
+
export type ListenTargetOptions = 'body' | 'document' | 'window';
|
|
137
137
|
export interface StateDecorator {
|
|
138
138
|
(): PropertyDecorator;
|
|
139
139
|
}
|
|
@@ -214,14 +214,16 @@ export declare const State: StateDecorator;
|
|
|
214
214
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
215
215
|
*/
|
|
216
216
|
export declare const Watch: WatchDecorator;
|
|
217
|
-
export
|
|
218
|
-
export
|
|
217
|
+
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
218
|
+
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
219
219
|
/**
|
|
220
220
|
* `setMode()` is used for libraries which provide multiple "modes" for styles.
|
|
221
221
|
*/
|
|
222
222
|
export declare const setMode: (handler: ResolutionHandler) => void;
|
|
223
223
|
/**
|
|
224
|
-
* getMode
|
|
224
|
+
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
|
+
* @param ref a reference to the node to get styles for
|
|
226
|
+
* @returns the current mode or undefined, if not found
|
|
225
227
|
*/
|
|
226
228
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
227
229
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -234,6 +236,9 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
234
236
|
/**
|
|
235
237
|
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
|
|
236
238
|
* if the path needs to be customized.
|
|
239
|
+
* @param path the path to use in calculating the asset path. this value will be
|
|
240
|
+
* used in conjunction with the base asset path
|
|
241
|
+
* @returns the base path
|
|
237
242
|
*/
|
|
238
243
|
export declare function getAssetPath(path: string): string;
|
|
239
244
|
/**
|
|
@@ -246,22 +251,38 @@ export declare function getAssetPath(path: string): string;
|
|
|
246
251
|
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
|
|
247
252
|
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
|
|
248
253
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
249
|
-
*
|
|
254
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
250
255
|
* will have to ensure the static assets are copied to its build directory.
|
|
256
|
+
* @param path the asset path to set
|
|
257
|
+
* @returns the set path
|
|
251
258
|
*/
|
|
252
259
|
export declare function setAssetPath(path: string): string;
|
|
253
260
|
/**
|
|
254
|
-
*
|
|
261
|
+
* Used to specify a nonce value that corresponds with an application's
|
|
262
|
+
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
|
|
263
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
264
|
+
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
|
|
265
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
|
|
266
|
+
* @param nonce The value to be used for the nonce attribute.
|
|
267
|
+
*/
|
|
268
|
+
export declare function setNonce(nonce: string): void;
|
|
269
|
+
/**
|
|
270
|
+
* Retrieve a Stencil element for a given reference
|
|
271
|
+
* @param ref the ref to get the Stencil element for
|
|
272
|
+
* @returns a reference to the element
|
|
255
273
|
*/
|
|
256
274
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
257
275
|
/**
|
|
258
276
|
* Schedules a new render of the given instance or element even if no state changed.
|
|
259
277
|
*
|
|
260
|
-
* Notice `forceUpdate()` is not
|
|
278
|
+
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
|
|
279
|
+
*
|
|
280
|
+
* @param ref the node/element to force the re-render of
|
|
261
281
|
*/
|
|
262
282
|
export declare function forceUpdate(ref: any): void;
|
|
263
283
|
/**
|
|
264
284
|
* getRenderingRef
|
|
285
|
+
* @returns the rendering ref
|
|
265
286
|
*/
|
|
266
287
|
export declare function getRenderingRef(): any;
|
|
267
288
|
export interface HTMLStencilElement extends HTMLElement {
|
|
@@ -272,6 +293,8 @@ export interface HTMLStencilElement extends HTMLElement {
|
|
|
272
293
|
* in the best moment to perform DOM mutation without causing layout thrashing.
|
|
273
294
|
*
|
|
274
295
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
296
|
+
*
|
|
297
|
+
* @param task the DOM-write to schedule
|
|
275
298
|
*/
|
|
276
299
|
export declare function writeTask(task: RafCallback): void;
|
|
277
300
|
/**
|
|
@@ -279,6 +302,8 @@ export declare function writeTask(task: RafCallback): void;
|
|
|
279
302
|
* in the best moment to perform DOM reads without causing layout thrashing.
|
|
280
303
|
*
|
|
281
304
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
305
|
+
*
|
|
306
|
+
* @param task the DOM-read to schedule
|
|
282
307
|
*/
|
|
283
308
|
export declare function readTask(task: RafCallback): void;
|
|
284
309
|
/**
|
|
@@ -417,13 +442,57 @@ interface HostAttributes {
|
|
|
417
442
|
ref?: (el: HTMLElement | null) => void;
|
|
418
443
|
[prop: string]: any;
|
|
419
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Utilities for working with functional Stencil components. An object
|
|
447
|
+
* conforming to this interface is passed by the Stencil runtime as the third
|
|
448
|
+
* argument to a functional component, allowing component authors to work with
|
|
449
|
+
* features like children.
|
|
450
|
+
*
|
|
451
|
+
* The children of a functional component will be passed as the second
|
|
452
|
+
* argument, so a functional component which uses these utils to transform its
|
|
453
|
+
* children might look like the following:
|
|
454
|
+
*
|
|
455
|
+
* ```ts
|
|
456
|
+
* export const AddClass: FunctionalComponent = (_, children, utils) => (
|
|
457
|
+
* utils.map(children, child => ({
|
|
458
|
+
* ...child,
|
|
459
|
+
* vattrs: {
|
|
460
|
+
* ...child.vattrs,
|
|
461
|
+
* class: `${child.vattrs.class} add-class`
|
|
462
|
+
* }
|
|
463
|
+
* }))
|
|
464
|
+
* );
|
|
465
|
+
* ```
|
|
466
|
+
*
|
|
467
|
+
* For more see the Stencil documentation, here:
|
|
468
|
+
* https://stenciljs.com/docs/functional-components
|
|
469
|
+
*/
|
|
420
470
|
export interface FunctionalUtilities {
|
|
471
|
+
/**
|
|
472
|
+
* Utility for reading the children of a functional component at runtime.
|
|
473
|
+
* Since the Stencil runtime uses a different interface for children it is
|
|
474
|
+
* not recommendeded to read the children directly, and is preferable to use
|
|
475
|
+
* this utility to, for instance, perform a side effect for each child.
|
|
476
|
+
*/
|
|
421
477
|
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
|
|
478
|
+
/**
|
|
479
|
+
* Utility for transforming the children of a functional component. Given an
|
|
480
|
+
* array of children and a callback this will return a list of the results of
|
|
481
|
+
* passing each child to the supplied callback.
|
|
482
|
+
*/
|
|
422
483
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
423
484
|
}
|
|
424
485
|
export interface FunctionalComponent<T = {}> {
|
|
425
486
|
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
|
|
426
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* A Child VDOM node
|
|
490
|
+
*
|
|
491
|
+
* This has most of the same properties as {@link VNode} but friendlier names
|
|
492
|
+
* (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
|
|
493
|
+
* order to provide a friendlier public interface for users of the
|
|
494
|
+
* {@link FunctionalUtilities}).
|
|
495
|
+
*/
|
|
427
496
|
export interface ChildNode {
|
|
428
497
|
vtag?: string | number | Function;
|
|
429
498
|
vkey?: string | number;
|
|
@@ -470,6 +539,9 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
|
|
|
470
539
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
471
540
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
472
541
|
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
542
|
+
/**
|
|
543
|
+
* A virtual DOM node
|
|
544
|
+
*/
|
|
473
545
|
export interface VNode {
|
|
474
546
|
$flags$: number;
|
|
475
547
|
$tag$: string | number | Function;
|
|
@@ -666,7 +738,7 @@ export declare namespace JSXBase {
|
|
|
666
738
|
use: JSXBase.SVGAttributes;
|
|
667
739
|
view: JSXBase.SVGAttributes;
|
|
668
740
|
}
|
|
669
|
-
interface SlotAttributes {
|
|
741
|
+
interface SlotAttributes extends JSXAttributes {
|
|
670
742
|
name?: string;
|
|
671
743
|
slot?: string;
|
|
672
744
|
onSlotchange?: (event: Event) => void;
|
|
@@ -1427,9 +1499,7 @@ export declare namespace JSXBase {
|
|
|
1427
1499
|
z?: number | string;
|
|
1428
1500
|
zoomAndPan?: string;
|
|
1429
1501
|
}
|
|
1430
|
-
interface DOMAttributes<T
|
|
1431
|
-
key?: string | number;
|
|
1432
|
-
ref?: (elm?: T) => void;
|
|
1502
|
+
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1433
1503
|
slot?: string;
|
|
1434
1504
|
part?: string;
|
|
1435
1505
|
exportparts?: string;
|
|
@@ -1550,6 +1620,10 @@ export declare namespace JSXBase {
|
|
|
1550
1620
|
onTransitionEndCapture?: (event: TransitionEvent) => void;
|
|
1551
1621
|
}
|
|
1552
1622
|
}
|
|
1623
|
+
export interface JSXAttributes<T = Element> {
|
|
1624
|
+
key?: string | number;
|
|
1625
|
+
ref?: (elm?: T) => void;
|
|
1626
|
+
}
|
|
1553
1627
|
export interface CustomElementsDefineOptions {
|
|
1554
1628
|
exclude?: string[];
|
|
1555
1629
|
resourcesUrl?: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { User } from './user';
|
|
2
|
+
export interface ChatMessage {
|
|
3
|
+
uid: string;
|
|
4
|
+
message: string;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
unRead: number;
|
|
7
|
+
senderId: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function createChatMessage(blob: any): ChatMessage;
|
|
10
|
+
export declare class ChatRoom {
|
|
11
|
+
id: number;
|
|
12
|
+
uid: string;
|
|
13
|
+
members: User[];
|
|
14
|
+
messages: ChatMessage[];
|
|
15
|
+
constructor(fields: any);
|
|
16
|
+
}
|
|
17
|
+
export declare function createChatRoom(blob: any): ChatRoom;
|
package/loader/index.d.ts
CHANGED
|
@@ -10,3 +10,12 @@ export interface CustomElementsDefineOptions {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
|
|
12
12
|
export declare function applyPolyfills(): Promise<void>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
16
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
17
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
18
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
19
|
+
* will result in the same behavior.
|
|
20
|
+
*/
|
|
21
|
+
export declare function setNonce(nonce: string): void;
|
package/loader/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "favesalon-embed",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Favesalon Embed",
|
|
5
5
|
"author": "Trung Luu <trung@favesalon.com> (https://favesalon.com)",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"generate": "stencil generate"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@stencil/core": "^2.
|
|
26
|
+
"@stencil/core": "^2.22.3",
|
|
27
27
|
"axios": "^0.22.0",
|
|
28
28
|
"color": "^4.0.1",
|
|
29
29
|
"dayjs": "^1.10.7",
|
|
30
|
+
"firebase": "^10.0.0",
|
|
30
31
|
"glamor": "^2.20.40",
|
|
31
32
|
"lodash": "^4.17.21"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@stencil/less": "^1.0.0",
|
|
35
35
|
"@types/jest": "^26.0.24",
|
|
36
36
|
"jest": "^26.6.3",
|
|
37
37
|
"jest-cli": "^26.6.3",
|
package/readme.md
CHANGED
|
@@ -34,6 +34,6 @@ npm i favesalon-embed --save
|
|
|
34
34
|
|
|
35
35
|
or use the hosted version from unpkg:
|
|
36
36
|
```html
|
|
37
|
-
<link rel="stylesheet" href="https://unpkg.com/favesalon-embed@
|
|
38
|
-
<script type="module" src="https://unpkg.com/favesalon-embed@
|
|
37
|
+
<link rel="stylesheet" href="https://unpkg.com/favesalon-embed@1.0.0/favesalon-embed/favesalon-embed.css" />
|
|
38
|
+
<script type="module" src="https://unpkg.com/favesalon-embed@1.0.0/favesalon-embed/favesalon-embed.esm.js"></script>
|
|
39
39
|
```
|