exports.id = 749;
exports.ids = [749];
exports.modules = {

/***/ 5961:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"src":"/_next/static/media/apple-store.070bda53.svg","height":139,"width":467});

/***/ }),

/***/ 9888:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"src":"/_next/static/media/google-play.86297c0b.svg","height":139,"width":467});

/***/ }),

/***/ 2746:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"src":"/_next/static/media/no_image.560d448a.png","height":188,"width":300,"blurDataURL":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAAAAABd+vKJAAAANklEQVR42g3Guw0AIAgFQPYfyiEsbf0kaiBIeNLqVUeAyzSAPGqp8/rPyqmFE0z62AaC8lFWPENZJRvgkHgrAAAAAElFTkSuQmCC","blurWidth":8,"blurHeight":5});

/***/ }),

/***/ 4665:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"src":"/_next/static/media/trsondakika.c38db9b5.png","height":31,"width":200,"blurDataURL":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAABCAYAAADjAO9DAAAAKUlEQVR4nGN8zMAQJnThPDOXvgHj/3//fjAwAoX+/+dmZGL6+bqlQQMA0mINT9/ZelgAAAAASUVORK5CYII=","blurWidth":8,"blurHeight":1});

/***/ }),

/***/ 1157:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"src":"/_next/static/media/trsondakika_footer.dd2378a8.png","height":31,"width":200,"blurDataURL":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAABCAYAAADjAO9DAAAAKklEQVR4nGN8rcsQtpLLjzmHVYxR+f+fH68ZGB4LMDBwP2Jk/nnu21kNALw1DJOBialKAAAAAElFTkSuQmCC","blurWidth":8,"blurHeight":1});

/***/ }),

/***/ 697:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ banner)
});

// EXTERNAL MODULE: external "react/jsx-runtime"
var jsx_runtime_ = __webpack_require__(997);
// EXTERNAL MODULE: ./node_modules/next/link.js
var next_link = __webpack_require__(1664);
var link_default = /*#__PURE__*/__webpack_require__.n(next_link);
// EXTERNAL MODULE: external "react"
var external_react_ = __webpack_require__(6689);
// EXTERNAL MODULE: external "react-redux"
var external_react_redux_ = __webpack_require__(6022);
// EXTERNAL MODULE: ./node_modules/next/image.js
var next_image = __webpack_require__(5675);
var image_default = /*#__PURE__*/__webpack_require__.n(next_image);
// EXTERNAL MODULE: ./node_modules/next/script.js
var script = __webpack_require__(4298);
// EXTERNAL MODULE: ./lib/imagesPath.js
var imagesPath = __webpack_require__(1717);
// EXTERNAL MODULE: external "react-adsense"
var external_react_adsense_ = __webpack_require__(6348);
var external_react_adsense_default = /*#__PURE__*/__webpack_require__.n(external_react_adsense_);
// EXTERNAL MODULE: external "nextjs-google-adsense"
var external_nextjs_google_adsense_ = __webpack_require__(8450);
// EXTERNAL MODULE: external "prop-types"
var external_prop_types_ = __webpack_require__(580);
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
;// CONCATENATED MODULE: ./components/banner/GoogleAd.js



class GoogleAd extends external_react_.Component {
    googleInit = null;
    componentDidMount() {
        const { timeout  } = this.props;
        this.googleInit = setTimeout(()=>{
            if (false) {}
        }, timeout);
    }
    componentWillUnmount() {
        if (this.googleInit) clearTimeout(this.googleInit);
    }
    render() {
        const { classNames , slot , googleAdId , style , format  } = this.props;
        return /*#__PURE__*/ jsx_runtime_.jsx("div", {
            style: {
                minWidth: "270px !important"
            },
            className: classNames,
            children: /*#__PURE__*/ jsx_runtime_.jsx("ins", {
                className: "adsbygoogle",
                style: style || {
                    display: "block",
                    textAlign: "center"
                },
                "data-ad-client": googleAdId,
                "data-ad-slot": slot,
                "data-ad-format": format || "auto",
                "data-full-width-responsive": "true"
            })
        });
    }
}
GoogleAd.propTypes = {
    classNames: (external_prop_types_default()).string,
    slot: (external_prop_types_default()).string,
    timeout: (external_prop_types_default()).number,
    googleAdId: (external_prop_types_default()).string
};
GoogleAd.defaultProps = {
    classNames: "",
    timeout: 200
};
/* harmony default export */ const banner_GoogleAd = ((/* unused pure expression or super */ null && (GoogleAd)));

// EXTERNAL MODULE: external "react-player"
var external_react_player_ = __webpack_require__(8924);
;// CONCATENATED MODULE: ./components/banner/index.js











const BannerBlock = ({ className , area ="1"  })=>{
    const { setting , settingSuccess  } = (0,external_react_redux_.useSelector)((state)=>state.setting);
    const { advertising , advertisingStatus  } = (0,external_react_redux_.useSelector)((state)=>state.advertising);
    const [data, setData] = (0,external_react_.useState)("");
    (0,external_react_.useEffect)(()=>{
        if (settingSuccess && setting.advertising_status) {
            if (advertising) {
                setData(advertising.filter((item)=>item.area == area));
            }
        }
    }, [
        settingSuccess,
        advertisingStatus
    ]);
    if (!settingSuccess) {
        return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {});
    }
    if (data.length > 0) {
        if (data[0].content) {
            return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {
                children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                    className: `banner-${area} ${className ? className : ""}`,
                    children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                        dangerouslySetInnerHTML: {
                            __html: data[0].content
                        }
                    })
                })
            });
        }
        if (data[0].script) {
            return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {
                children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                    className: `banner-${area} ${className ? className : ""}`,
                    children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                        dangerouslySetInnerHTML: {
                            __html: data[0].script
                        }
                    })
                })
            });
        }
        if (data[0].content) {
            return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {
                children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                    className: `banner-${area} ${className ? className : ""}`,
                    children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                        dangerouslySetInnerHTML: {
                            __html: data[0].content
                        }
                    })
                })
            });
        }
        if (data[0].google_ads_slote) {
            return /*#__PURE__*/ jsx_runtime_.jsx("div", {
                id: `banner_${area}`,
                className: `banner-${area} ${className ? className : ""}`,
                children: /*#__PURE__*/ jsx_runtime_.jsx((external_react_adsense_default()).Google, {
                    client: `ca-pub-${setting.google_ads_client_code}`,
                    slot: `${data[0].google_ads_slote}`,
                    style: {
                        display: "block"
                    },
                    layout: "in-article",
                    format: "fluid"
                })
            });
        }
        // if (data[0].google_ads_slote) {
        //   return (
        //     <GoogleAd
        //       slot={data[0].google_ads_slote}
        //       googleAdId={setting.google_ads_client_code}
        //     />
        //   );
        // }
        ///ÇALIŞAN
        // if (data[0].google_ads_slote) {
        //   return (
        //     <>
        //       <div
        //         id={`banner_${area}`}
        //         className={`banner-${area} ${className ? className : ""}`}
        //       >
        //         <ins
        //           className="adsbygoogle"
        //           style={{ display: "block" }}
        //           data-ad-client={`ca-pub-${setting.google_ads_client_code}`}
        //           data-ad-slot={`${data[0].google_ads_slote}`}
        //           data-ad-format="auto"
        //           data-full-width-responsive="true"
        //         ></ins>
        //       </div>
        //     </>
        //   );
        // }
        if (data[0].image && !data[0].check_video) {
            return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {
                children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                    className: `banner-${area} ${className ? className : ""}`,
                    children: /*#__PURE__*/ jsx_runtime_.jsx((link_default()), {
                        title: data[0].title,
                        href: data[0].url ? data[0].url : "#",
                        children: /*#__PURE__*/ jsx_runtime_.jsx((image_default()), {
                            src: `${"https://trsondakika-front.s3.amazonaws.com"}/${data[0].image}`,
                            className: "object-cover my-2 inline-block",
                            width: 1535,
                            height: 200,
                            alt: data[0].title,
                            onError: ()=>imagesPath/* default.no_image */.Z.no_image
                        })
                    })
                })
            });
        }
        if (data[0].image && data[0].check_video) {
            return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {
                children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                    className: `banner-${area} ${className ? className : ""}`,
                    children: /*#__PURE__*/ jsx_runtime_.jsx((link_default()), {
                        title: data[0].title,
                        href: data[0].url ? data[0].url : "#",
                        children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                            dangerouslySetInnerHTML: {
                                __html: `
        <video
          loop
          muted
          autoplay
          playsinline
          src="${"https://trsondakika-front.s3.amazonaws.com"}/${data[0].image}"
        />,
      `
                            }
                        })
                    })
                })
            });
        }
        return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {
            children: /*#__PURE__*/ jsx_runtime_.jsx("div", {
                className: `banner-${area} ${className ? className : ""}`
            })
        });
    } else {
        return null;
    }
};
/* harmony default export */ const banner = (BannerBlock);


/***/ }),

/***/ 8953:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "v": () => (/* binding */ CheckUrlSlug)
/* harmony export */ });
const CheckUrlSlug = (id, category, slug)=>{
    if (category && id > 152930) {
        return `${"/"}${category}/${slug}`;
    } else {
        return `${"/"}${slug}`;
    }
};


/***/ }),

/***/ 1717:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
    logo: __webpack_require__(4665),
    logo_footer: __webpack_require__(1157),
    no_image: __webpack_require__(2746),
    appleStore: __webpack_require__(5961),
    googleStore: __webpack_require__(9888)
});


/***/ }),

/***/ 9483:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "I": () => (/* binding */ minuteDifference)
/* harmony export */ });
const minuteDifference = (storageDate)=>{
    var now = new Date();
    var time_difference = (now - storageDate) / 1000;
    var minute = 60;
    var hour = minute * 60;
    var day = hour * 24;
    var mount = day * 30;
    var year = mount * 12 + 60 * 60 * 6;
    var year_difference = Math.floor(time_difference / year);
    var mount_difference = Math.floor(time_difference % year / mount);
    var gun_difference = Math.floor(time_difference % mount / day);
    var hour_difference = Math.floor(time_difference % day / hour);
    var minute_difference = Math.floor(time_difference % hour / minute);
    var second_difference = Math.floor(time_difference % minute);
    return minute_difference;
};


/***/ }),

/***/ 9219:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "A": () => (/* binding */ getApiMostPopuler),
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5184);
/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _lib_timeDifference__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9483);


// Slice
const slice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({
    name: "mostPopuler",
    initialState: {
        mostPopuler: [],
        mostPopulerStatus: false
    },
    reducers: {
        setMostPopuler: (state, action)=>{
            state.mostPopuler = action.payload;
            state.mostPopulerStatus = true;
        }
    }
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (slice.reducer);
// Actions
const { setMostPopuler  } = slice.actions;
const setLocalStorageData = (par)=>{
    var now = new Date();
    localStorage.setItem("mostPopuler", JSON.stringify({
        items: par,
        time: now
    }));
};
const getLocalStorageData = ()=>{
    const getData = localStorage.getItem("mostPopuler");
    const data = JSON.parse(getData);
    if (data && data?.items?.length > 0) {
        return data;
    } else {
        return false;
    }
};
const getApiMostPopuler = ()=>async (dispatch)=>{
        const data = getLocalStorageData();
        const storageDate = new Date(data?.time);
        const time = (0,_lib_timeDifference__WEBPACK_IMPORTED_MODULE_1__/* .minuteDifference */ .I)(storageDate);
        try {
            if (data && time < 5) {
                dispatch(setMostPopuler(data?.items));
            } else {
                try {
                    const request = await fetch(`${"https://api.trsondakika.com/api"}/newsMostPopular`, {
                        method: "POST",
                        headers: {
                            "Content-Type": "application/json"
                        }
                    });
                    const response = await request.json();
                    setLocalStorageData(response?.item);
                    dispatch(setMostPopuler(response?.item));
                } catch (e) {
                    return console.error(e.message);
                }
            }
        } catch (e1) {
            console.log("getApiMostPopuler error:", e1);
        }
    };


/***/ }),

/***/ 4298:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(3573)


/***/ })

};
;