(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,39312,e=>{"use strict";let t=(0,e.i(75254).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],39312)},97223,e=>{"use strict";var t=e.i(43476),o=e.i(71645),r=e.i(39312),n=e.i(86557);let a={container:`import 'package:flutter/material.dart';

void main() {
  runApp(
    const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Color(0xFF1E1E1E),
        body: Center(
          child: CustomContainer(),
        ),
      ),
    ),
  );
}

class CustomContainer extends StatelessWidget {
  const CustomContainer({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 200,
      height: 200,
      decoration: BoxDecoration(
        color: Colors.blueAccent,
        borderRadius: BorderRadius.circular(30),
        boxShadow: const [
          BoxShadow(
            color: Colors.black45,
            blurRadius: 20,
            offset: Offset(0, 10),
          ),
        ],
      ),
      child: const Center(
        child: Icon(Icons.flutter_dash, size: 100, color: Colors.white),
      ),
    );
  }
}`,button:`import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Colors.grey[900],
        body: const Center(
          child: ModernButton(),
        ),
      ),
    ),
  );
}

class ModernButton extends StatelessWidget {
  const ModernButton({super.key});

  @override
  Widget build(BuildContext context) {
    return ElevatedButton(
      style: ElevatedButton.styleFrom(
        padding: const EdgeInsets.symmetric(horizontal: 48, vertical: 24),
        backgroundColor: Colors.deepPurpleAccent,
        foregroundColor: Colors.white,
        elevation: 10,
        shadowColor: Colors.deepPurpleAccent.withOpacity(0.5),
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(40),
        ),
      ),
      onPressed: () {
        ScaffoldMessenger.of(context).showSnackBar(
          const SnackBar(content: Text('Button Pressed!')),
        );
      },
      child: const Text(
        'CLICK ME',
        style: TextStyle(fontWeight: FontWeight.w900, fontSize: 20, letterSpacing: 2),
      ),
    );
  }
}`,login_screen:`import 'package:flutter/material.dart';

void main() {
  runApp(
    const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: LoginScreen(),
    ),
  );
}

class LoginScreen extends StatelessWidget {
  const LoginScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: SafeArea(
        child: Padding(
          padding: const EdgeInsets.all(32.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Container(
                width: 72, 
                height: 72,
                decoration: BoxDecoration(
                  color: Colors.blueAccent, 
                  borderRadius: BorderRadius.circular(20),
                  boxShadow: [
                     BoxShadow(color: Colors.blueAccent.withOpacity(0.3), blurRadius: 20, offset: const Offset(0, 10))
                  ]
                ),
                child: const Icon(Icons.lock_outline, color: Colors.white, size: 36),
              ),
              const SizedBox(height: 40),
              const Text('Welcome Back', style: TextStyle(fontSize: 36, fontWeight: FontWeight.w900, color: Colors.black87)),
              const SizedBox(height: 8),
              const Text('Sign in to continue', style: TextStyle(fontSize: 16, color: Colors.black54)),
              const SizedBox(height: 40),
              TextField(
                decoration: InputDecoration(
                  hintText: 'Email', 
                  prefixIcon: const Icon(Icons.email_outlined),
                  border: OutlineInputBorder(borderRadius: BorderRadius.circular(16)),
                  filled: true,
                  fillColor: Colors.grey[50],
                )
              ),
              const SizedBox(height: 16),
              TextField(
                obscureText: true, 
                decoration: InputDecoration(
                  hintText: 'Password', 
                  prefixIcon: const Icon(Icons.lock_outline),
                  border: OutlineInputBorder(borderRadius: BorderRadius.circular(16)),
                  filled: true,
                  fillColor: Colors.grey[50],
                )
              ),
              const SizedBox(height: 40),
              SizedBox(
                width: double.infinity,
                height: 60,
                child: ElevatedButton(
                  onPressed: () {},
                  style: ElevatedButton.styleFrom(
                    backgroundColor: Colors.blueAccent, 
                    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
                    elevation: 0,
                  ),
                  child: const Text('Sign In', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, letterSpacing: 1, color: Colors.white)),
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}`};function l(){let[e,l]=(0,o.useState)("container"),[i,s]=(0,o.useState)(!1),d=e=>{let t=document.getElementById("dartpad-iframe");t&&t.contentWindow&&t.contentWindow.postMessage({sourceCode:{"main.dart":e,"pubspec.yaml":"name: flutter_playground\n\nenvironment:\n  sdk: '>=3.0.0 <4.0.0'\n\ndependencies:\n  flutter:\n    sdk: flutter\n"},type:"sourceCode"},"*")};return(0,o.useEffect)(()=>{let e=e=>{("ready"===e.data||e.data&&"ready"===e.data.type)&&(s(!0),d(a.container))};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]),(0,t.jsxs)("div",{className:"w-full h-[calc(100vh-80px)] p-6 md:p-8 flex flex-col space-y-6",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 shrink-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-3xl font-black italic flex items-center gap-3 text-primary mb-2",children:[(0,t.jsx)(r.Zap,{className:"w-8 h-8 fill-current"}),"Live Flutter Runner"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground font-medium max-w-xl",children:"Powered by the official DartPad compiler. Write real Flutter code, use actual packages, and see it run instantly in the browser."})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 p-2 bg-secondary/30 border border-border rounded-2xl",children:[(0,t.jsxs)("span",{className:"text-[10px] font-black uppercase text-muted-foreground tracking-widest px-3 flex items-center gap-2",children:[(0,t.jsx)(n.Layout,{className:"w-3 h-3"}),"Push Template"]}),(0,t.jsx)("div",{className:"flex gap-2",children:Object.keys(a).map(o=>(0,t.jsx)("button",{onClick:()=>{l(o),d(a[o])},className:`px-4 py-2 rounded-xl transition-all text-[10px] font-black uppercase tracking-widest ${e===o?"bg-primary text-white shadow-lg shadow-primary/20 scale-105":"bg-card border border-border hover:border-primary/50 text-muted-foreground hover:text-foreground hover:scale-105"}`,children:o.replace("_"," ")},o))})]})]}),(0,t.jsxs)("div",{className:"flex-1 w-full border border-border rounded-[2rem] shadow-2xl shadow-primary/5 overflow-hidden bg-[#1E1E1E] relative group",children:[!i&&(0,t.jsxs)("div",{className:"absolute inset-0 z-10 bg-[#1E1E1E] flex flex-col items-center justify-center space-y-6",children:[(0,t.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin"}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("h3",{className:"text-white font-black text-xl mb-2 tracking-wide",children:"Initializing Dart Engine"}),(0,t.jsx)("p",{className:"text-white/50 text-xs font-bold uppercase tracking-widest",children:"Connecting to dartpad.dev..."})]})]}),(0,t.jsx)("iframe",{id:"dartpad-iframe",src:"https://dartpad.dev/embed-flutter.html?theme=dark&run=true&split=50",className:"w-full h-full border-0 absolute inset-0 z-0 bg-transparent",allow:"clipboard-read; clipboard-write; microphone; camera; geolocation"}),(0,t.jsx)("div",{className:"absolute top-4 right-4 z-20 pointer-events-none",children:(0,t.jsxs)("div",{className:"px-4 py-2 bg-black/40 backdrop-blur-md border border-white/10 rounded-full flex items-center gap-2 shadow-2xl",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,t.jsx)("span",{className:"text-[10px] font-black text-white uppercase tracking-tighter",children:"Real Flutter Compiler"})]})})]})]})}e.s(["default",()=>l])}]);