UNPKG

@groww-tech/ella

Version:

Ella is a utility-belt library for JavaScript that provides general purpose methods used in day to day programming.

2 lines (1 loc) 3.33 kB
import{a as s}from"./chunk-L3TC5D3X.js";import{w as u}from"./chunk-CJJ2N4YR.js";import{a,c as m}from"./chunk-AED4KRKC.js";import i from"react";function w(){let t={"@context":"https://schema.org","@type":"Organization",name:"Groww",description:"Start Online Investing in Stocks and Direct Mutual Funds with India's Leading Investment and Trading Platform - Groww. Equity Trading, US Stocks, Direct Mutual Funds with Zero-commission.",url:a.PROD_HOST,logo:a.DEFAULT_GROWW_LOGO_270,address:{"@type":"PostalAddress",streetAddress:"No.11, 2nd floor, 80 FT Road, 4th Block, S.T Bed, Koramangala",addressLocality:"Bengaluru",addressRegion:"Karnataka",addressCountry:"IN",postalCode:"560034"},contactPoint:{"@type":"ContactPoint",telephone:"+91 9108800000",email:"support@groww.in"},sameAs:[a.FACEBOOK_PAGE,a.TWITTER_PAGE,a.YOUTUBE_MAIN_CHANNEL,a.LINKEDIN_PAGE,a.INSTAGRAM_PAGE]};return i.createElement(s,{schemaData:t})}var E=(t,r)=>{let e=t.desc;e=e.length>315?e.substring(0,315)+" ...":e;let n={"@context":"https://schema.org","@type":"WebPage",name:t.title,description:e,url:r+t.routeName,publisher:{"@type":"Organization",name:"Groww",url:r,logo:{"@type":"ImageObject",contentUrl:a.DEFAULT_GROWW_LOGO_270}}};return i.createElement(s,{schemaData:n})};function L(t,r){let e=t.inLanguage?t.inLanguage:"en",n=t.image?t.image:a.DEFAULT_GROWW_LOGO_270,o={"@context":"https://schema.org","@type":"NewsArticle",headline:[t.headline],image:[n],inLanguage:e,datePublished:t.datePublished,dateModified:t.dateModified,author:[{"@type":"Person",name:"Groww Team",url:r}]};return i.createElement(s,{schemaData:o})}function _(t,r){let e=t.desc;e=e.length>315?e.substring(0,315)+" ...":e;let n=null,o=t.logoUrl?t.logoUrl:a.DEFAULT_GROWW_LOGO_270;return n={"@context":"https://schema.org","@type":"Product",name:t.schemeName,description:e,url:r+t.routeName,image:o,brand:{"@type":"Organization",name:t.fundHouse},review:{"@type":"Review",reviewRating:{"@type":"Rating",ratingValue:t.rating,bestRating:5},author:{"@type":"Organization",name:"Groww"}}},i.createElement(s,{schemaData:n})}function T(t){let r=null,e=[];for(let n=0;n<t.length;n++)e.push({"@type":"Question",name:t[n].question,acceptedAnswer:{"@type":"Answer",text:t[n].answer}});return r={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e},i.createElement(s,{schemaData:r})}var P=(t,r)=>{let e=[];for(let o=0;o<t.length;o++)e.push({"@type":"ListItem",position:o+1,item:{"@id":r+t[o].url,name:t[o].name}});return i.createElement(s,{schemaData:{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e}})},G=()=>{let t={"@context":"https://schema.org","@type":"WebSite",url:a.PROD_HOST,potentialAction:{"@type":"SearchAction",target:[{"@type":"EntryPoint",urlTemplate:`${a.PROD_HOST}/search?q={searchTerms}`}],"query-input":"required name=searchTerms"}};return i.createElement(s,{schemaData:t})};function O(t,r,e=0,n={},o="bold"){try{r=r.replace(/[^\w\s]/gi,"");let g=t.split(new RegExp(`(${r})`,"gi"));return i.createElement("div",{key:`${t}${e}`,style:n},g.map((d,c)=>i.createElement("span",{key:c,style:d.toLowerCase()===r.toLowerCase()?{fontWeight:o||"bold"}:{}},d)))}catch(g){console.error("Error in getting highlighted text: ",g),u(m.TRACK_LOG,{function:"getHighlightedText",error:g})}}export{w as a,E as b,L as c,_ as d,T as e,P as f,G as g,O as h};